summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-18 18:48:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-25 13:45:48 +0300
commit5e527213a2430bb3018e5eebd909aef294edf9b5 (patch)
tree94de33c82080b53d9a9e300170f6d221d89078f4
parent7420f85ea19b0562ffdd8123442f32bc8bac1267 (diff)
Switch to build2
-rw-r--r--.gitattributes19
-rw-r--r--.gitignore26
-rw-r--r--INSTALL71
-rw-r--r--LICENSE2
-rw-r--r--build/bootstrap.make101
-rw-r--r--build/configuration-rules.make16
-rw-r--r--build/configuration.make30
-rwxr-xr-xbuild/configure69
-rw-r--r--build/import/cli/cli-cxx.make47
-rw-r--r--build/import/cli/configuration-rules.make13
-rwxr-xr-xbuild/import/cli/configure53
-rw-r--r--build/import/cli/stub.make28
-rw-r--r--build/import/libace/configuration-rules.make13
-rwxr-xr-xbuild/import/libace/configure56
-rw-r--r--build/import/libace/rules.make27
-rw-r--r--build/import/libace/stub.make30
-rw-r--r--build/import/libace/version1
-rw-r--r--build/import/libboost/configuration-rules.make13
-rwxr-xr-xbuild/import/libboost/configure72
-rw-r--r--build/import/libboost/date-time/rules.make49
-rw-r--r--build/import/libboost/date-time/stub.make34
-rw-r--r--build/import/libboost/serialization/rules.make48
-rw-r--r--build/import/libboost/serialization/stub.make34
-rw-r--r--build/import/libboost/version1
-rw-r--r--build/import/libcutl/configuration-rules.make13
-rwxr-xr-xbuild/import/libcutl/configure53
-rw-r--r--build/import/libcutl/stub.make28
-rw-r--r--build/import/libxerces-c/configuration-rules.make13
-rwxr-xr-xbuild/import/libxerces-c/configure71
-rw-r--r--build/import/libxerces-c/rules.make50
-rw-r--r--build/import/libxerces-c/stub.make30
-rw-r--r--build/import/libxerces-c/version1
-rw-r--r--build/import/libxqilla/configuration-rules.make13
-rwxr-xr-xbuild/import/libxqilla/configure55
-rw-r--r--build/import/libxqilla/rules.make28
-rw-r--r--build/import/libxqilla/stub.make30
-rw-r--r--build/import/libxqilla/version1
-rw-r--r--build/import/libxsd-frontend/configuration-rules.make13
-rwxr-xr-xbuild/import/libxsd-frontend/configure53
-rw-r--r--build/import/libxsd-frontend/stub.make28
-rw-r--r--build/import/libz/configuration-rules.make13
-rwxr-xr-xbuild/import/libz/configure56
-rw-r--r--build/import/libz/rules.make27
-rw-r--r--build/import/libz/stub.make30
-rw-r--r--build/import/libz/version1
-rw-r--r--build/xsd/parser/xsd-cxx.make75
-rw-r--r--build/xsd/tree/xsd-cxx.make46
-rw-r--r--buildfile7
-rw-r--r--dist/README-UNIX82
-rw-r--r--dist/README-WINDOWS192
-rw-r--r--dist/etc/vc-1x.0/xsd-cxx-parser.props33
-rw-r--r--dist/etc/vc-1x.0/xsd-cxx-parser.targets92
-rw-r--r--dist/etc/vc-1x.0/xsd-cxx-parser.xml284
-rw-r--r--dist/etc/vc-1x.0/xsd-cxx-tree.props47
-rw-r--r--dist/etc/vc-1x.0/xsd-cxx-tree.targets107
-rw-r--r--dist/etc/vc-1x.0/xsd-cxx-tree.xml411
-rw-r--r--dist/etc/vc-8.0/xsd-cxx-parser.rules206
-rw-r--r--dist/etc/vc-8.0/xsd-cxx-tree.rules320
-rw-r--r--dist/etc/vc-9.0/xsd-cxx-parser.rules206
-rw-r--r--dist/etc/vc-9.0/xsd-cxx-tree.rules319
-rw-r--r--dist/examples/build/cxx/compilers.make117
-rw-r--r--dist/examples/build/cxx/rules.make57
-rw-r--r--dist/examples/build/xsd/common.make9
-rw-r--r--dist/examples/build/xsd/parser-rules.make21
-rw-r--r--dist/examples/build/xsd/tree-rules.make13
-rw-r--r--dist/examples/cxx/makefile11
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc10.vcxproj203
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc10.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc11.vcxproj207
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc11.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc12.vcxproj211
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc12.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc8.vcproj427
-rw-r--r--dist/examples/cxx/parser/generated/generated-vc9.vcproj424
-rw-r--r--dist/examples/cxx/parser/generated/makefile49
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc10.vcxproj201
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc11.vcxproj205
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc12.vcxproj209
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc8.vcproj419
-rw-r--r--dist/examples/cxx/parser/hello/hello-vc9.vcproj416
-rw-r--r--dist/examples/cxx/parser/hello/makefile28
-rw-r--r--dist/examples/cxx/parser/library/library-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/parser/library/library-vc10.vcxproj.filters54
-rw-r--r--dist/examples/cxx/parser/library/library-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/parser/library/library-vc11.vcxproj.filters54
-rw-r--r--dist/examples/cxx/parser/library/library-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/parser/library/library-vc12.vcxproj.filters54
-rw-r--r--dist/examples/cxx/parser/library/library-vc8.vcproj440
-rw-r--r--dist/examples/cxx/parser/library/library-vc9.vcproj437
-rw-r--r--dist/examples/cxx/parser/library/makefile30
-rw-r--r--dist/examples/cxx/parser/makefile12
-rw-r--r--dist/examples/cxx/parser/mixed/makefile30
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj202
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj.filters41
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj206
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj.filters41
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj210
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj.filters41
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc8.vcproj423
-rw-r--r--dist/examples/cxx/parser/mixed/mixed-vc9.vcproj420
-rw-r--r--dist/examples/cxx/parser/mixin/makefile30
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj202
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj.filters41
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj206
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj.filters41
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj210
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj.filters41
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc8.vcproj423
-rw-r--r--dist/examples/cxx/parser/mixin/mixin-vc9.vcproj420
-rw-r--r--dist/examples/cxx/parser/multiroot/makefile32
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj208
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj.filters47
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj212
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj.filters47
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj216
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj.filters47
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc8.vcproj435
-rw-r--r--dist/examples/cxx/parser/multiroot/multiroot-vc9.vcproj432
-rw-r--r--dist/examples/cxx/parser/performance/makefile30
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc10.vcxproj203
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc10.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc11.vcxproj207
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc11.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc12.vcxproj211
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc12.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc8.vcproj427
-rw-r--r--dist/examples/cxx/parser/performance/performance-vc9.vcproj424
-rw-r--r--dist/examples/cxx/parser/polymorphism/makefile30
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj207
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj211
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj215
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc8.vcproj431
-rw-r--r--dist/examples/cxx/parser/polymorphism/polymorphism-vc9.vcproj428
-rw-r--r--dist/examples/cxx/parser/polyroot/makefile31
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj207
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj211
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj215
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj.filters44
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc8.vcproj431
-rw-r--r--dist/examples/cxx/parser/polyroot/polyroot-vc9.vcproj428
-rw-r--r--dist/examples/cxx/parser/wildcard/makefile28
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj201
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj205
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj209
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc8.vcproj419
-rw-r--r--dist/examples/cxx/parser/wildcard/wildcard-vc9.vcproj416
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj208
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj.filters47
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj212
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj.filters47
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj216
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj.filters47
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc8.vcproj435
-rw-r--r--dist/examples/cxx/tree/binary/boost/boost-vc9.vcproj432
-rw-r--r--dist/examples/cxx/tree/binary/boost/makefile37
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/binary/cdr/cdr-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/binary/cdr/makefile35
-rw-r--r--dist/examples/cxx/tree/binary/makefile25
-rw-r--r--dist/examples/cxx/tree/binary/xdr/makefile35
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/binary/xdr/xdr-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/caching/caching-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/caching/makefile28
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc10.vcxproj209
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc10.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc11.vcxproj213
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc11.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc12.vcxproj217
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc12.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc8.vcproj435
-rw-r--r--dist/examples/cxx/tree/compression/compression-vc9.vcproj432
-rw-r--r--dist/examples/cxx/tree/compression/makefile37
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj229
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj.filters54
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj233
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj.filters54
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj237
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj.filters54
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc8.vcproj456
-rw-r--r--dist/examples/cxx/tree/custom/calendar/calendar-vc9.vcproj453
-rw-r--r--dist/examples/cxx/tree/custom/calendar/makefile42
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj231
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj.filters60
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj235
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj.filters60
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj239
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj.filters60
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc8.vcproj464
-rw-r--r--dist/examples/cxx/tree/custom/comments/comments-vc9.vcproj461
-rw-r--r--dist/examples/cxx/tree/custom/comments/makefile49
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj208
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj212
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj216
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc8.vcproj440
-rw-r--r--dist/examples/cxx/tree/custom/contacts/contacts-vc9.vcproj437
-rw-r--r--dist/examples/cxx/tree/custom/contacts/makefile39
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc10.vcxproj229
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc10.vcxproj.filters54
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc11.vcxproj233
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc11.vcxproj.filters54
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc12.vcxproj237
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc12.vcxproj.filters54
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc8.vcproj456
-rw-r--r--dist/examples/cxx/tree/custom/double/double-vc9.vcproj453
-rw-r--r--dist/examples/cxx/tree/custom/double/makefile42
-rw-r--r--dist/examples/cxx/tree/custom/makefile15
-rw-r--r--dist/examples/cxx/tree/custom/mixed/makefile40
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj208
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj212
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj216
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc8.vcproj440
-rw-r--r--dist/examples/cxx/tree/custom/mixed/mixed-vc9.vcproj437
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/makefile39
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj210
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj.filters57
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj214
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj.filters57
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj218
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj.filters57
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc8.vcproj448
-rw-r--r--dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc9.vcproj445
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/makefile40
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj208
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj212
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj216
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj.filters51
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc8.vcproj440
-rw-r--r--dist/examples/cxx/tree/custom/wildcard/wildcard-vc9.vcproj437
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc10.sln38
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj215
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc11.sln38
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj219
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc12.sln40
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj223
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc8.sln41
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc8.vcproj439
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc9.sln41
-rw-r--r--dist/examples/cxx/tree/embedded/embedded-vc9.vcproj436
-rw-r--r--dist/examples/cxx/tree/embedded/makefile36
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj182
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj.filters14
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj186
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj.filters14
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj190
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj.filters14
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc8.vcproj356
-rw-r--r--dist/examples/cxx/tree/embedded/xsdbin-vc9.vcproj353
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/hello/hello-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/hello/makefile29
-rw-r--r--dist/examples/cxx/tree/library/library-vc10.vcxproj206
-rw-r--r--dist/examples/cxx/tree/library/library-vc10.vcxproj.filters45
-rw-r--r--dist/examples/cxx/tree/library/library-vc11.vcxproj210
-rw-r--r--dist/examples/cxx/tree/library/library-vc11.vcxproj.filters45
-rw-r--r--dist/examples/cxx/tree/library/library-vc12.vcxproj214
-rw-r--r--dist/examples/cxx/tree/library/library-vc12.vcxproj.filters45
-rw-r--r--dist/examples/cxx/tree/library/library-vc8.vcproj432
-rw-r--r--dist/examples/cxx/tree/library/library-vc9.vcproj429
-rw-r--r--dist/examples/cxx/tree/library/makefile32
-rw-r--r--dist/examples/cxx/tree/makefile20
-rw-r--r--dist/examples/cxx/tree/messaging/makefile35
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj209
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj213
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj217
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj.filters50
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc8.vcproj439
-rw-r--r--dist/examples/cxx/tree/messaging/messaging-vc9.vcproj436
-rw-r--r--dist/examples/cxx/tree/mixed/makefile28
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/mixed/mixed-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/multiroot/makefile33
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj207
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj.filters44
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj211
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj.filters44
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj215
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj.filters44
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc8.vcproj431
-rw-r--r--dist/examples/cxx/tree/multiroot/multiroot-vc9.vcproj428
-rw-r--r--dist/examples/cxx/tree/order/element/makefile31
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/order/element/order-element-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/order/makefile11
-rw-r--r--dist/examples/cxx/tree/order/mixed/makefile32
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/order/mixed/order-mixed-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/performance/makefile34
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc10.vcxproj210
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc10.vcxproj.filters57
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc11.vcxproj214
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc11.vcxproj.filters57
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc12.vcxproj218
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc12.vcxproj.filters57
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc8.vcproj445
-rw-r--r--dist/examples/cxx/tree/performance/performance-vc9.vcproj442
-rw-r--r--dist/examples/cxx/tree/polymorphism/makefile30
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj205
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj209
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj213
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj.filters38
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc8.vcproj423
-rw-r--r--dist/examples/cxx/tree/polymorphism/polymorphism-vc9.vcproj420
-rw-r--r--dist/examples/cxx/tree/secure/makefile28
-rw-r--r--dist/examples/cxx/tree/streaming/makefile34
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj211
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj.filters56
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj215
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj.filters56
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj219
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj.filters56
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc8.vcproj441
-rw-r--r--dist/examples/cxx/tree/streaming/streaming-vc9.vcproj438
-rw-r--r--dist/examples/cxx/tree/wildcard/makefile32
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj206
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj.filters45
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj210
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj.filters45
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj214
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj.filters45
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc8.vcproj432
-rw-r--r--dist/examples/cxx/tree/wildcard/wildcard-vc9.vcproj429
-rw-r--r--dist/examples/cxx/tree/xpath/makefile30
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj207
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj.filters44
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj211
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj.filters44
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj215
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj.filters44
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc8.vcproj431
-rw-r--r--dist/examples/cxx/tree/xpath/xpath-vc9.vcproj428
-rw-r--r--dist/examples/makefile11
-rw-r--r--dist/examples/test.bat73
-rw-r--r--dist/examples/tester.bat46
-rw-r--r--dist/template-vc10.sln15
-rw-r--r--dist/template-vc11.sln15
-rw-r--r--dist/template-vc12.sln17
-rw-r--r--dist/template-vc8.sln15
-rw-r--r--dist/template-vc9.sln15
-rw-r--r--doc/cxx/makefile20
-rw-r--r--doc/cxx/parser/guide/guide.html2ps65
-rw-r--r--doc/cxx/parser/guide/index.xhtml4158
-rw-r--r--doc/cxx/parser/guide/makefile55
-rw-r--r--doc/cxx/parser/makefile20
-rw-r--r--doc/cxx/tree/guide/guide.html2ps65
-rw-r--r--doc/cxx/tree/guide/index.xhtml2732
-rw-r--r--doc/cxx/tree/guide/makefile53
-rw-r--r--doc/cxx/tree/makefile40
-rw-r--r--doc/cxx/tree/manual/index.xhtml6822
-rw-r--r--doc/cxx/tree/manual/makefile53
-rw-r--r--doc/cxx/tree/manual/manual.html2ps66
-rw-r--r--doc/cxx/tree/reference/footer.html6
-rw-r--r--doc/cxx/tree/reference/libxsd.doxygen1291
-rw-r--r--doc/cxx/tree/reference/makefile18
-rwxr-xr-xdoc/doc.sh105
-rw-r--r--doc/makefile142
-rw-r--r--doc/xsd-prologue.1119
-rw-r--r--doc/xsd-prologue.xhtml122
-rw-r--r--examples/cxx/parser/generated/library.xml52
-rw-r--r--examples/cxx/parser/generated/library.xsd78
-rw-r--r--examples/cxx/parser/generated/makefile109
-rw-r--r--examples/cxx/parser/hello/driver.cxx67
-rw-r--r--examples/cxx/parser/hello/hello.xml19
-rw-r--r--examples/cxx/parser/hello/hello.xsd21
-rw-r--r--examples/cxx/parser/hello/makefile100
-rw-r--r--examples/cxx/parser/library/driver.cxx109
-rw-r--r--examples/cxx/parser/library/library-pimpl.cxx183
-rw-r--r--examples/cxx/parser/library/library-pimpl.hxx135
-rw-r--r--examples/cxx/parser/library/library.hxx241
-rw-r--r--examples/cxx/parser/library/library.map15
-rw-r--r--examples/cxx/parser/library/library.xml52
-rw-r--r--examples/cxx/parser/library/library.xsd78
-rw-r--r--examples/cxx/parser/library/makefile109
-rw-r--r--examples/cxx/parser/makefile55
-rw-r--r--examples/cxx/parser/mixed/anchor.hxx33
-rw-r--r--examples/cxx/parser/mixed/driver.cxx100
-rw-r--r--examples/cxx/parser/mixed/makefile106
-rw-r--r--examples/cxx/parser/mixed/text.map6
-rw-r--r--examples/cxx/parser/mixed/text.xml17
-rw-r--r--examples/cxx/parser/mixed/text.xsd28
-rw-r--r--examples/cxx/parser/mixin/driver.cxx103
-rw-r--r--examples/cxx/parser/mixin/instance.xml16
-rw-r--r--examples/cxx/parser/mixin/makefile106
-rw-r--r--examples/cxx/parser/mixin/schema.map7
-rw-r--r--examples/cxx/parser/mixin/schema.xsd30
-rw-r--r--examples/cxx/parser/mixin/types.hxx43
-rw-r--r--examples/cxx/parser/multiroot/balance.xml16
-rw-r--r--examples/cxx/parser/multiroot/deposit.xml17
-rw-r--r--examples/cxx/parser/multiroot/driver.cxx161
-rw-r--r--examples/cxx/parser/multiroot/makefile112
-rw-r--r--examples/cxx/parser/multiroot/protocol-pimpl.cxx46
-rw-r--r--examples/cxx/parser/multiroot/protocol-pimpl.hxx48
-rw-r--r--examples/cxx/parser/multiroot/protocol.hxx61
-rw-r--r--examples/cxx/parser/multiroot/protocol.map11
-rw-r--r--examples/cxx/parser/multiroot/protocol.xsd50
-rw-r--r--examples/cxx/parser/multiroot/withdraw.xml17
-rw-r--r--examples/cxx/parser/performance/README42
-rw-r--r--examples/cxx/parser/performance/driver.cxx341
-rw-r--r--examples/cxx/parser/performance/makefile108
-rw-r--r--examples/cxx/parser/performance/test.xsd49
-rw-r--r--examples/cxx/parser/performance/time.cxx46
-rw-r--r--examples/cxx/parser/performance/time.hxx110
-rw-r--r--examples/cxx/parser/polymorphism/driver.cxx70
-rw-r--r--examples/cxx/parser/polymorphism/makefile105
-rw-r--r--examples/cxx/parser/polymorphism/supermen-pimpl.cxx85
-rw-r--r--examples/cxx/parser/polymorphism/supermen-pimpl.hxx68
-rw-r--r--examples/cxx/parser/polymorphism/supermen.xml25
-rw-r--r--examples/cxx/parser/polymorphism/supermen.xsd48
-rw-r--r--examples/cxx/parser/polyroot/batman.xml16
-rw-r--r--examples/cxx/parser/polyroot/driver.cxx138
-rw-r--r--examples/cxx/parser/polyroot/makefile109
-rw-r--r--examples/cxx/parser/polyroot/person.xml15
-rw-r--r--examples/cxx/parser/polyroot/superman.xml16
-rw-r--r--examples/cxx/parser/polyroot/supermen-pimpl.cxx85
-rw-r--r--examples/cxx/parser/polyroot/supermen-pimpl.hxx64
-rw-r--r--examples/cxx/parser/polyroot/supermen.xsd36
-rw-r--r--examples/cxx/parser/wildcard/driver.cxx239
-rw-r--r--examples/cxx/parser/wildcard/email.xml31
-rw-r--r--examples/cxx/parser/wildcard/email.xsd50
-rw-r--r--examples/cxx/parser/wildcard/makefile101
-rw-r--r--examples/cxx/tree/binary/boost/boost-archive-extraction.hxx188
-rw-r--r--examples/cxx/tree/binary/boost/boost-archive-insertion.hxx177
-rw-r--r--examples/cxx/tree/binary/boost/driver.cxx72
-rw-r--r--examples/cxx/tree/binary/boost/library.xml52
-rw-r--r--examples/cxx/tree/binary/boost/library.xsd75
-rw-r--r--examples/cxx/tree/binary/boost/makefile131
-rw-r--r--examples/cxx/tree/binary/cdr/driver.cxx87
-rw-r--r--examples/cxx/tree/binary/cdr/library.xml52
-rw-r--r--examples/cxx/tree/binary/cdr/library.xsd75
-rw-r--r--examples/cxx/tree/binary/cdr/makefile119
-rw-r--r--examples/cxx/tree/binary/makefile55
-rw-r--r--examples/cxx/tree/binary/xdr/README34
-rw-r--r--examples/cxx/tree/binary/xdr/driver.cxx148
-rw-r--r--examples/cxx/tree/binary/xdr/library.xml52
-rw-r--r--examples/cxx/tree/binary/xdr/library.xsd75
-rw-r--r--examples/cxx/tree/binary/xdr/makefile113
-rw-r--r--examples/cxx/tree/caching/README29
-rw-r--r--examples/cxx/tree/caching/driver.cxx165
-rw-r--r--examples/cxx/tree/caching/library.xml52
-rw-r--r--examples/cxx/tree/caching/library.xsd72
-rw-r--r--examples/cxx/tree/caching/makefile100
-rw-r--r--examples/cxx/tree/compression/compressed-format-target.cxx152
-rw-r--r--examples/cxx/tree/compression/compressed-format-target.hxx91
-rw-r--r--examples/cxx/tree/compression/compressed-input-source.cxx195
-rw-r--r--examples/cxx/tree/compression/compressed-input-source.hxx121
-rw-r--r--examples/cxx/tree/compression/driver.cxx124
-rw-r--r--examples/cxx/tree/compression/library.xsd72
-rw-r--r--examples/cxx/tree/compression/makefile127
-rw-r--r--examples/cxx/tree/custom/calendar/calendar.xml22
-rw-r--r--examples/cxx/tree/custom/calendar/calendar.xsd31
-rw-r--r--examples/cxx/tree/custom/calendar/driver.cxx39
-rw-r--r--examples/cxx/tree/custom/calendar/makefile136
-rw-r--r--examples/cxx/tree/custom/calendar/xml-schema-custom.cxx56
-rw-r--r--examples/cxx/tree/custom/calendar/xml-schema-custom.hxx33
-rw-r--r--examples/cxx/tree/custom/comments/dom-parse.cxx93
-rw-r--r--examples/cxx/tree/custom/comments/dom-parse.hxx22
-rw-r--r--examples/cxx/tree/custom/comments/driver.cxx90
-rw-r--r--examples/cxx/tree/custom/comments/makefile122
-rw-r--r--examples/cxx/tree/custom/comments/people.xml20
-rw-r--r--examples/cxx/tree/custom/comments/people.xsd29
-rw-r--r--examples/cxx/tree/custom/comments/xml-schema-custom.cxx117
-rw-r--r--examples/cxx/tree/custom/comments/xml-schema-custom.hxx57
-rw-r--r--examples/cxx/tree/custom/contacts/contacts-custom.cxx50
-rw-r--r--examples/cxx/tree/custom/contacts/contacts-custom.hxx43
-rw-r--r--examples/cxx/tree/custom/contacts/contacts.xml20
-rw-r--r--examples/cxx/tree/custom/contacts/contacts.xsd31
-rw-r--r--examples/cxx/tree/custom/contacts/driver.cxx38
-rw-r--r--examples/cxx/tree/custom/contacts/makefile112
-rw-r--r--examples/cxx/tree/custom/double/double-custom.cxx96
-rw-r--r--examples/cxx/tree/custom/double/double-custom.hxx67
-rw-r--r--examples/cxx/tree/custom/double/driver.cxx31
-rw-r--r--examples/cxx/tree/custom/double/makefile111
-rw-r--r--examples/cxx/tree/custom/double/order.xsd25
-rw-r--r--examples/cxx/tree/custom/makefile60
-rw-r--r--examples/cxx/tree/custom/mixed/driver.cxx123
-rw-r--r--examples/cxx/tree/custom/mixed/makefile114
-rw-r--r--examples/cxx/tree/custom/mixed/people-custom.cxx89
-rw-r--r--examples/cxx/tree/custom/mixed/people-custom.hxx83
-rw-r--r--examples/cxx/tree/custom/mixed/people.xml38
-rw-r--r--examples/cxx/tree/custom/mixed/people.xsd45
-rw-r--r--examples/cxx/tree/custom/taxonomy/driver.cxx38
-rw-r--r--examples/cxx/tree/custom/taxonomy/makefile121
-rw-r--r--examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx19
-rw-r--r--examples/cxx/tree/custom/taxonomy/people-custom.cxx156
-rw-r--r--examples/cxx/tree/custom/taxonomy/people-custom.hxx96
-rw-r--r--examples/cxx/tree/custom/taxonomy/people.xml26
-rw-r--r--examples/cxx/tree/custom/taxonomy/people.xsd44
-rw-r--r--examples/cxx/tree/custom/wildcard/driver.cxx47
-rw-r--r--examples/cxx/tree/custom/wildcard/makefile115
-rw-r--r--examples/cxx/tree/custom/wildcard/wildcard-custom.cxx84
-rw-r--r--examples/cxx/tree/custom/wildcard/wildcard-custom.hxx66
-rw-r--r--examples/cxx/tree/custom/wildcard/wildcard.xml14
-rw-r--r--examples/cxx/tree/custom/wildcard/wildcard.xsd25
-rw-r--r--examples/cxx/tree/embedded/driver.cxx183
-rw-r--r--examples/cxx/tree/embedded/grammar-input-stream.cxx95
-rw-r--r--examples/cxx/tree/embedded/grammar-input-stream.hxx40
-rw-r--r--examples/cxx/tree/embedded/library.xml52
-rw-r--r--examples/cxx/tree/embedded/library.xsd72
-rw-r--r--examples/cxx/tree/embedded/makefile122
-rw-r--r--examples/cxx/tree/embedded/xsdbin.cxx494
-rw-r--r--examples/cxx/tree/hello/driver.cxx36
-rw-r--r--examples/cxx/tree/hello/hello.xml19
-rw-r--r--examples/cxx/tree/hello/hello.xsd52
-rw-r--r--examples/cxx/tree/hello/makefile100
-rw-r--r--examples/cxx/tree/library/driver.cxx130
-rw-r--r--examples/cxx/tree/library/library.xml52
-rw-r--r--examples/cxx/tree/library/library.xsd72
-rw-r--r--examples/cxx/tree/library/makefile101
-rw-r--r--examples/cxx/tree/makefile69
-rw-r--r--examples/cxx/tree/messaging/balance.xml16
-rw-r--r--examples/cxx/tree/messaging/deposit.xml17
-rw-r--r--examples/cxx/tree/messaging/dom-parse.cxx93
-rw-r--r--examples/cxx/tree/messaging/dom-parse.hxx22
-rw-r--r--examples/cxx/tree/messaging/dom-serialize.cxx64
-rw-r--r--examples/cxx/tree/messaging/dom-serialize.hxx20
-rw-r--r--examples/cxx/tree/messaging/driver.cxx144
-rw-r--r--examples/cxx/tree/messaging/makefile116
-rw-r--r--examples/cxx/tree/messaging/protocol.xsd53
-rw-r--r--examples/cxx/tree/messaging/withdraw.xml17
-rw-r--r--examples/cxx/tree/mixed/driver.cxx122
-rw-r--r--examples/cxx/tree/mixed/makefile101
-rw-r--r--examples/cxx/tree/mixed/text.xml17
-rw-r--r--examples/cxx/tree/mixed/text.xsd28
-rw-r--r--examples/cxx/tree/multiroot/balance.xml16
-rw-r--r--examples/cxx/tree/multiroot/deposit.xml17
-rw-r--r--examples/cxx/tree/multiroot/dom-parse.cxx93
-rw-r--r--examples/cxx/tree/multiroot/dom-parse.hxx22
-rw-r--r--examples/cxx/tree/multiroot/driver.cxx124
-rw-r--r--examples/cxx/tree/multiroot/makefile108
-rw-r--r--examples/cxx/tree/multiroot/protocol.xsd50
-rw-r--r--examples/cxx/tree/multiroot/withdraw.xml17
-rw-r--r--examples/cxx/tree/order/element/driver.cxx147
-rw-r--r--examples/cxx/tree/order/element/makefile99
-rw-r--r--examples/cxx/tree/order/element/transactions.xml32
-rw-r--r--examples/cxx/tree/order/element/transactions.xsd58
-rw-r--r--examples/cxx/tree/order/makefile43
-rw-r--r--examples/cxx/tree/order/mixed/driver.cxx89
-rw-r--r--examples/cxx/tree/order/mixed/makefile98
-rw-r--r--examples/cxx/tree/order/mixed/text.xml17
-rw-r--r--examples/cxx/tree/order/mixed/text.xsd28
-rw-r--r--examples/cxx/tree/performance/README58
-rw-r--r--examples/cxx/tree/performance/driver.cxx90
-rw-r--r--examples/cxx/tree/performance/gen.cxx76
-rw-r--r--examples/cxx/tree/performance/makefile110
-rw-r--r--examples/cxx/tree/performance/parsing.cxx172
-rw-r--r--examples/cxx/tree/performance/serialization.cxx132
-rw-r--r--examples/cxx/tree/performance/test.xsd49
-rw-r--r--examples/cxx/tree/performance/time.cxx46
-rw-r--r--examples/cxx/tree/performance/time.hxx110
-rw-r--r--examples/cxx/tree/polymorphism/driver.cxx59
-rw-r--r--examples/cxx/tree/polymorphism/makefile103
-rw-r--r--examples/cxx/tree/polymorphism/supermen.xml25
-rw-r--r--examples/cxx/tree/polymorphism/supermen.xsd48
-rw-r--r--examples/cxx/tree/secure/driver.cxx141
-rw-r--r--examples/cxx/tree/secure/library.xml59
-rw-r--r--examples/cxx/tree/secure/library.xsd72
-rw-r--r--examples/cxx/tree/secure/makefile103
-rw-r--r--examples/cxx/tree/secure/secure-dom-parser.cxx24
-rw-r--r--examples/cxx/tree/secure/secure-dom-parser.hxx25
-rw-r--r--examples/cxx/tree/streaming/driver.cxx139
-rw-r--r--examples/cxx/tree/streaming/grammar-input-stream.cxx96
-rw-r--r--examples/cxx/tree/streaming/grammar-input-stream.hxx41
-rw-r--r--examples/cxx/tree/streaming/makefile114
-rw-r--r--examples/cxx/tree/streaming/parser.cxx372
-rw-r--r--examples/cxx/tree/streaming/parser.hxx67
-rw-r--r--examples/cxx/tree/streaming/position.xml29
-rw-r--r--examples/cxx/tree/streaming/position.xsd37
-rw-r--r--examples/cxx/tree/streaming/serializer.cxx636
-rw-r--r--examples/cxx/tree/streaming/serializer.hxx205
-rw-r--r--examples/cxx/tree/wildcard/driver.cxx159
-rw-r--r--examples/cxx/tree/wildcard/email.xml31
-rw-r--r--examples/cxx/tree/wildcard/email.xsd50
-rw-r--r--examples/cxx/tree/wildcard/makefile101
-rw-r--r--examples/cxx/tree/xpath/dom-parse.cxx88
-rw-r--r--examples/cxx/tree/xpath/dom-parse.hxx25
-rw-r--r--examples/cxx/tree/xpath/driver.cxx136
-rw-r--r--examples/cxx/tree/xpath/makefile122
-rw-r--r--examples/cxx/tree/xpath/people.xml28
-rw-r--r--examples/cxx/tree/xpath/people.xsd38
-rw-r--r--examples/makefile19
-rw-r--r--libxsd-tests/.gitignore28
l---------libxsd-tests/FLOSSE1
l---------libxsd-tests/GPLv21
l---------libxsd-tests/LICENSE1
-rw-r--r--libxsd-tests/README8
-rw-r--r--libxsd-tests/build/.gitignore3
-rw-r--r--libxsd-tests/build/bootstrap.build9
-rw-r--r--libxsd-tests/build/root.build25
-rw-r--r--libxsd-tests/buildfile4
-rw-r--r--libxsd-tests/cxx/parser/expat/basic/buildfile7
-rw-r--r--libxsd-tests/cxx/parser/expat/basic/driver.cxx124
-rw-r--r--libxsd-tests/cxx/parser/expat/basic/testscript41
-rw-r--r--libxsd-tests/cxx/parser/xerces/basic/buildfile7
-rw-r--r--libxsd-tests/cxx/parser/xerces/basic/driver.cxx124
-rw-r--r--libxsd-tests/cxx/parser/xerces/basic/testscript41
-rw-r--r--libxsd-tests/cxx/tree/basic/buildfile7
-rw-r--r--libxsd-tests/cxx/tree/basic/driver.cxx65
-rw-r--r--libxsd-tests/cxx/tree/basic/testscript73
-rw-r--r--libxsd-tests/manifest15
-rw-r--r--libxsd/.gitignore19
l---------[-rw-r--r--]libxsd/FLOSSE90
l---------[-rw-r--r--]libxsd/GPLv2341
-rw-r--r--libxsd/INSTALL19
l---------[-rw-r--r--]libxsd/LICENSE29
-rw-r--r--libxsd/NEWS1
-rw-r--r--libxsd/README7
-rw-r--r--libxsd/README-GIT4
-rw-r--r--libxsd/build/.gitignore3
-rw-r--r--libxsd/build/bootstrap.build10
-rw-r--r--libxsd/build/export.build9
-rw-r--r--libxsd/build/root.build14
-rw-r--r--libxsd/buildfile8
-rw-r--r--libxsd/doc/buildfile83
-rw-r--r--libxsd/doc/cxx/tree/reference/.gitignore4
-rw-r--r--libxsd/doc/cxx/tree/reference/footer.html.in6
-rw-r--r--libxsd/doc/cxx/tree/reference/libxsd.doxygen.in1289
-rw-r--r--libxsd/makefile43
-rw-r--r--libxsd/manifest17
-rw-r--r--libxsd/xsd/buildfile39
-rw-r--r--libxsd/xsd/cxx/tree/elements.hxx10
-rw-r--r--libxsd/xsd/cxx/tree/types.hxx4
-rw-r--r--libxsd/xsd/cxx/version.hxx27
-rw-r--r--libxsd/xsd/cxx/version.hxx.in43
-rw-r--r--libxsd/xsd/cxx/xml/char-utf8.txx4
-rw-r--r--makefile102
-rw-r--r--packages.manifest10
-rw-r--r--repositories.manifest22
-rw-r--r--tests/cxx/makefile15
-rw-r--r--tests/cxx/parser/built-in/driver.cxx529
-rw-r--r--tests/cxx/parser/built-in/makefile82
-rw-r--r--tests/cxx/parser/enumeration/driver.cxx81
-rw-r--r--tests/cxx/parser/enumeration/makefile83
-rw-r--r--tests/cxx/parser/generated-impl/makefile93
-rw-r--r--tests/cxx/parser/list/driver.cxx105
-rw-r--r--tests/cxx/parser/list/makefile82
-rw-r--r--tests/cxx/parser/makefile18
-rw-r--r--tests/cxx/parser/name-clash/inheritance/driver.cxx62
-rw-r--r--tests/cxx/parser/name-clash/inheritance/makefile83
-rw-r--r--tests/cxx/parser/polymorphism/makefile16
-rw-r--r--tests/cxx/parser/polymorphism/recursive/driver.cxx68
-rw-r--r--tests/cxx/parser/polymorphism/recursive/makefile83
-rw-r--r--tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx147
-rw-r--r--tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx94
-rw-r--r--tests/cxx/parser/polymorphism/same-type/driver.cxx62
-rw-r--r--tests/cxx/parser/polymorphism/same-type/makefile83
-rw-r--r--tests/cxx/parser/recursive/driver.cxx139
-rw-r--r--tests/cxx/parser/recursive/makefile83
-rw-r--r--tests/cxx/parser/test-template/driver.cxx66
-rw-r--r--tests/cxx/parser/test-template/makefile82
-rw-r--r--tests/cxx/parser/union/driver.cxx60
-rw-r--r--tests/cxx/parser/union/makefile82
-rw-r--r--tests/cxx/parser/validation/all/driver.cxx98
-rw-r--r--tests/cxx/parser/validation/all/makefile92
-rw-r--r--tests/cxx/parser/validation/all/test-000.std46
-rw-r--r--tests/cxx/parser/validation/all/test-000.xml53
-rw-r--r--tests/cxx/parser/validation/all/test-001.std6
-rw-r--r--tests/cxx/parser/validation/all/test-001.xml11
-rw-r--r--tests/cxx/parser/validation/all/test-002.std4
-rw-r--r--tests/cxx/parser/validation/all/test-002.xml9
-rw-r--r--tests/cxx/parser/validation/all/test-003.std6
-rw-r--r--tests/cxx/parser/validation/all/test-003.xml12
-rw-r--r--tests/cxx/parser/validation/any/driver.cxx121
-rw-r--r--tests/cxx/parser/validation/any/makefile92
-rw-r--r--tests/cxx/parser/validation/attribute/driver.cxx197
-rw-r--r--tests/cxx/parser/validation/attribute/makefile92
-rw-r--r--tests/cxx/parser/validation/built-in/any-type/driver.cxx154
-rw-r--r--tests/cxx/parser/validation/built-in/any-type/makefile92
-rw-r--r--tests/cxx/parser/validation/built-in/binary/driver.cxx153
-rw-r--r--tests/cxx/parser/validation/built-in/binary/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/boolean/driver.cxx145
-rw-r--r--tests/cxx/parser/validation/built-in/boolean/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/byte/driver.cxx256
-rw-r--r--tests/cxx/parser/validation/built-in/byte/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/date-time/driver.cxx1533
-rw-r--r--tests/cxx/parser/validation/built-in/date-time/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/float/driver.cxx285
-rw-r--r--tests/cxx/parser/validation/built-in/float/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/int/driver.cxx116
-rw-r--r--tests/cxx/parser/validation/built-in/int/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/integer/driver.cxx303
-rw-r--r--tests/cxx/parser/validation/built-in/integer/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/long/driver.cxx116
-rw-r--r--tests/cxx/parser/validation/built-in/long/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/makefile17
-rw-r--r--tests/cxx/parser/validation/built-in/qname/driver.cxx105
-rw-r--r--tests/cxx/parser/validation/built-in/qname/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/short/driver.cxx116
-rw-r--r--tests/cxx/parser/validation/built-in/short/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/string/driver.cxx512
-rw-r--r--tests/cxx/parser/validation/built-in/string/makefile70
-rw-r--r--tests/cxx/parser/validation/built-in/uri/driver.cxx53
-rw-r--r--tests/cxx/parser/validation/built-in/uri/makefile70
-rw-r--r--tests/cxx/parser/validation/choice/driver.cxx126
-rw-r--r--tests/cxx/parser/validation/choice/makefile92
-rw-r--r--tests/cxx/parser/validation/choice/test-000.std22
-rw-r--r--tests/cxx/parser/validation/choice/test-000.xml30
-rw-r--r--tests/cxx/parser/validation/choice/test-001.std4
-rw-r--r--tests/cxx/parser/validation/choice/test-001.xml10
-rw-r--r--tests/cxx/parser/validation/choice/test-002.std11
-rw-r--r--tests/cxx/parser/validation/choice/test-002.xml17
-rw-r--r--tests/cxx/parser/validation/choice/test-003.std5
-rw-r--r--tests/cxx/parser/validation/choice/test-003.xml11
-rw-r--r--tests/cxx/parser/validation/choice/test-004.std4
-rw-r--r--tests/cxx/parser/validation/choice/test-004.xml11
-rw-r--r--tests/cxx/parser/validation/makefile16
-rw-r--r--tests/cxx/parser/validation/restriction/driver.cxx107
-rw-r--r--tests/cxx/parser/validation/restriction/makefile92
-rw-r--r--tests/cxx/parser/validation/restriction/test-000.std0
-rw-r--r--tests/cxx/parser/validation/restriction/test-000.xml31
-rw-r--r--tests/cxx/parser/validation/restriction/test-001.std1
-rw-r--r--tests/cxx/parser/validation/restriction/test-001.xml11
-rw-r--r--tests/cxx/parser/validation/restriction/test-002.std1
-rw-r--r--tests/cxx/parser/validation/restriction/test-002.xml12
-rw-r--r--tests/cxx/parser/validation/restriction/test-003.std1
-rw-r--r--tests/cxx/parser/validation/restriction/test-003.xml16
-rw-r--r--tests/cxx/parser/validation/restriction/test-004.std1
-rw-r--r--tests/cxx/parser/validation/restriction/test-004.xml10
-rw-r--r--tests/cxx/parser/validation/restriction/test-005.std1
-rw-r--r--tests/cxx/parser/validation/restriction/test-005.xml11
-rw-r--r--tests/cxx/parser/validation/sequence/driver.cxx139
-rw-r--r--tests/cxx/parser/validation/sequence/makefile92
-rw-r--r--tests/cxx/parser/validation/sequence/test-000.std56
-rw-r--r--tests/cxx/parser/validation/sequence/test-000.xml46
-rw-r--r--tests/cxx/parser/validation/sequence/test-001.std4
-rw-r--r--tests/cxx/parser/validation/sequence/test-001.xml10
-rw-r--r--tests/cxx/parser/validation/sequence/test-002.std20
-rw-r--r--tests/cxx/parser/validation/sequence/test-002.xml27
-rw-r--r--tests/cxx/parser/validation/sequence/test-003.std5
-rw-r--r--tests/cxx/parser/validation/sequence/test-003.xml17
-rw-r--r--tests/cxx/parser/validation/sequence/test-004.std4
-rw-r--r--tests/cxx/parser/validation/sequence/test-004.xml14
-rw-r--r--tests/cxx/parser/validation/sequence/test-005.std6
-rw-r--r--tests/cxx/parser/validation/sequence/test-005.xml15
-rw-r--r--tests/cxx/parser/validation/sequence/test-006.std13
-rw-r--r--tests/cxx/parser/validation/sequence/test-006.xml17
-rw-r--r--tests/cxx/tree/any-type/driver.cxx144
-rw-r--r--tests/cxx/tree/any-type/makefile86
-rw-r--r--tests/cxx/tree/binary/cdr/makefile89
-rw-r--r--tests/cxx/tree/binary/makefile16
-rw-r--r--tests/cxx/tree/binary/polymorphic/makefile90
-rw-r--r--tests/cxx/tree/binary/xdr-ordered/driver.cxx189
-rw-r--r--tests/cxx/tree/binary/xdr-ordered/makefile85
-rw-r--r--tests/cxx/tree/binary/xdr/driver.cxx187
-rw-r--r--tests/cxx/tree/binary/xdr/makefile85
-rw-r--r--tests/cxx/tree/built-in/attributes.xml73
-rw-r--r--tests/cxx/tree/built-in/driver.cxx93
-rw-r--r--tests/cxx/tree/built-in/elements.xml84
-rw-r--r--tests/cxx/tree/built-in/inherited.xml84
-rw-r--r--tests/cxx/tree/built-in/makefile99
-rw-r--r--tests/cxx/tree/chameleon/driver.cxx35
-rw-r--r--tests/cxx/tree/chameleon/makefile85
-rw-r--r--tests/cxx/tree/comparison/driver.cxx38
-rw-r--r--tests/cxx/tree/comparison/makefile85
-rw-r--r--tests/cxx/tree/compilation/driver.cxx116
-rw-r--r--tests/cxx/tree/compilation/makefile85
-rw-r--r--tests/cxx/tree/complex/ctor/driver.cxx122
-rw-r--r--tests/cxx/tree/complex/ctor/makefile86
-rw-r--r--tests/cxx/tree/complex/makefile16
-rw-r--r--tests/cxx/tree/containment/driver.cxx118
-rw-r--r--tests/cxx/tree/containment/makefile85
-rw-r--r--tests/cxx/tree/default/general/driver.cxx37
-rw-r--r--tests/cxx/tree/default/general/makefile86
-rw-r--r--tests/cxx/tree/default/makefile16
-rw-r--r--tests/cxx/tree/default/omit/driver.cxx46
-rw-r--r--tests/cxx/tree/default/omit/makefile86
-rw-r--r--tests/cxx/tree/detach/driver.cxx108
-rw-r--r--tests/cxx/tree/detach/makefile85
-rw-r--r--tests/cxx/tree/dom-association/dom-parse.cxx95
-rw-r--r--tests/cxx/tree/dom-association/dom-parse.hxx23
-rw-r--r--tests/cxx/tree/dom-association/driver.cxx71
-rw-r--r--tests/cxx/tree/dom-association/makefile91
-rw-r--r--tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx74
-rw-r--r--tests/cxx/tree/encoding/char/iso-8859-1/makefile86
-rw-r--r--tests/cxx/tree/encoding/char/lcp/driver.cxx40
-rw-r--r--tests/cxx/tree/encoding/char/lcp/makefile85
-rw-r--r--tests/cxx/tree/encoding/char/makefile16
-rw-r--r--tests/cxx/tree/encoding/char/utf-8/driver.cxx63
-rw-r--r--tests/cxx/tree/encoding/char/utf-8/makefile85
-rw-r--r--tests/cxx/tree/encoding/makefile16
-rw-r--r--tests/cxx/tree/encoding/wchar/driver.cxx55
-rw-r--r--tests/cxx/tree/encoding/wchar/makefile86
-rw-r--r--tests/cxx/tree/enumeration/ctor/driver.cxx30
-rw-r--r--tests/cxx/tree/enumeration/ctor/makefile86
-rw-r--r--tests/cxx/tree/enumeration/inheritance/driver.cxx53
-rw-r--r--tests/cxx/tree/enumeration/inheritance/makefile85
-rw-r--r--tests/cxx/tree/enumeration/makefile16
-rw-r--r--tests/cxx/tree/float/driver.cxx53
-rw-r--r--tests/cxx/tree/float/makefile85
-rw-r--r--tests/cxx/tree/list/ctor/driver.cxx50
-rw-r--r--tests/cxx/tree/list/ctor/makefile86
-rw-r--r--tests/cxx/tree/list/makefile16
-rw-r--r--tests/cxx/tree/makefile43
-rw-r--r--tests/cxx/tree/name-clash/inheritance/driver.cxx35
-rw-r--r--tests/cxx/tree/name-clash/inheritance/makefile85
-rw-r--r--tests/cxx/tree/name-clash/makefile16
-rw-r--r--tests/cxx/tree/naming/camel/driver.cxx154
-rw-r--r--tests/cxx/tree/naming/camel/makefile93
-rw-r--r--tests/cxx/tree/naming/java/driver.cxx153
-rw-r--r--tests/cxx/tree/naming/java/makefile93
-rw-r--r--tests/cxx/tree/naming/knr/driver.cxx154
-rw-r--r--tests/cxx/tree/naming/knr/makefile93
-rw-r--r--tests/cxx/tree/naming/makefile16
-rw-r--r--tests/cxx/tree/order/driver.cxx64
-rw-r--r--tests/cxx/tree/order/makefile93
-rw-r--r--tests/cxx/tree/polymorphism/comparison/driver.cxx85
-rw-r--r--tests/cxx/tree/polymorphism/comparison/makefile86
-rw-r--r--tests/cxx/tree/polymorphism/makefile16
-rw-r--r--tests/cxx/tree/polymorphism/ostream/driver.cxx34
-rw-r--r--tests/cxx/tree/polymorphism/ostream/makefile87
-rw-r--r--tests/cxx/tree/polymorphism/same-type/driver.cxx35
-rw-r--r--tests/cxx/tree/polymorphism/same-type/makefile86
-rw-r--r--tests/cxx/tree/prefix/driver.cxx34
-rw-r--r--tests/cxx/tree/prefix/makefile86
-rw-r--r--tests/cxx/tree/test-template/driver.cxx35
-rw-r--r--tests/cxx/tree/test-template/makefile85
-rw-r--r--tests/cxx/tree/types-only/driver.cxx30
-rw-r--r--tests/cxx/tree/types-only/makefile85
-rw-r--r--tests/cxx/tree/union/ctor/driver.cxx30
-rw-r--r--tests/cxx/tree/union/ctor/makefile86
-rw-r--r--tests/cxx/tree/union/makefile16
-rw-r--r--tests/cxx/tree/wildcard/driver.cxx203
-rw-r--r--tests/cxx/tree/wildcard/makefile86
-rw-r--r--tests/makefile14
-rw-r--r--tests/morphing/anonymous/unstable/includee-2.xsd14
-rw-r--r--tests/schema/attribute/ref.xsd42
-rw-r--r--tests/schema/list/driver.cxx13
-rw-r--r--version1
-rw-r--r--xsd-examples/.gitignore32
-rw-r--r--xsd-examples/README21
-rw-r--r--xsd-examples/UNLICENSE24
-rw-r--r--xsd-examples/build/.gitignore3
-rw-r--r--xsd-examples/build/bootstrap.build9
-rw-r--r--xsd-examples/build/root.build38
-rw-r--r--xsd-examples/buildfile4
-rw-r--r--xsd-examples/cxx/parser/.gitignore1
-rw-r--r--xsd-examples/cxx/parser/README (renamed from examples/cxx/parser/README)0
-rw-r--r--xsd-examples/cxx/parser/buildfile4
-rw-r--r--xsd-examples/cxx/parser/generated/.gitignore2
-rw-r--r--xsd-examples/cxx/parser/generated/README (renamed from examples/cxx/parser/generated/README)0
-rw-r--r--xsd-examples/cxx/parser/generated/buildfile32
-rw-r--r--xsd-examples/cxx/parser/generated/library.xml52
-rw-r--r--xsd-examples/cxx/parser/generated/library.xsd78
-rw-r--r--xsd-examples/cxx/parser/hello/README (renamed from examples/cxx/parser/hello/README)0
-rw-r--r--xsd-examples/cxx/parser/hello/buildfile24
-rw-r--r--xsd-examples/cxx/parser/hello/driver.cxx67
-rw-r--r--xsd-examples/cxx/parser/hello/hello.xml19
-rw-r--r--xsd-examples/cxx/parser/hello/hello.xsd21
-rw-r--r--xsd-examples/cxx/parser/library/README (renamed from examples/cxx/parser/library/README)0
-rw-r--r--xsd-examples/cxx/parser/library/buildfile25
-rw-r--r--xsd-examples/cxx/parser/library/driver.cxx109
-rw-r--r--xsd-examples/cxx/parser/library/library-pimpl.cxx183
-rw-r--r--xsd-examples/cxx/parser/library/library-pimpl.hxx135
-rw-r--r--xsd-examples/cxx/parser/library/library.hxx241
-rw-r--r--xsd-examples/cxx/parser/library/library.map15
-rw-r--r--xsd-examples/cxx/parser/library/library.xml52
-rw-r--r--xsd-examples/cxx/parser/library/library.xsd78
-rw-r--r--xsd-examples/cxx/parser/mixed/README (renamed from examples/cxx/parser/mixed/README)0
-rw-r--r--xsd-examples/cxx/parser/mixed/anchor.hxx33
-rw-r--r--xsd-examples/cxx/parser/mixed/buildfile25
-rw-r--r--xsd-examples/cxx/parser/mixed/driver.cxx100
-rw-r--r--xsd-examples/cxx/parser/mixed/text.map6
-rw-r--r--xsd-examples/cxx/parser/mixed/text.xml17
-rw-r--r--xsd-examples/cxx/parser/mixed/text.xsd28
-rw-r--r--xsd-examples/cxx/parser/mixin/README (renamed from examples/cxx/parser/mixin/README)0
-rw-r--r--xsd-examples/cxx/parser/mixin/buildfile25
-rw-r--r--xsd-examples/cxx/parser/mixin/driver.cxx103
-rw-r--r--xsd-examples/cxx/parser/mixin/instance.xml16
-rw-r--r--xsd-examples/cxx/parser/mixin/schema.map7
-rw-r--r--xsd-examples/cxx/parser/mixin/schema.xsd30
-rw-r--r--xsd-examples/cxx/parser/mixin/types.hxx43
-rw-r--r--xsd-examples/cxx/parser/multiroot/README (renamed from examples/cxx/parser/multiroot/README)0
-rw-r--r--xsd-examples/cxx/parser/multiroot/balance.xml16
-rw-r--r--xsd-examples/cxx/parser/multiroot/buildfile24
-rw-r--r--xsd-examples/cxx/parser/multiroot/deposit.xml17
-rw-r--r--xsd-examples/cxx/parser/multiroot/driver.cxx161
-rw-r--r--xsd-examples/cxx/parser/multiroot/protocol-pimpl.cxx46
-rw-r--r--xsd-examples/cxx/parser/multiroot/protocol-pimpl.hxx48
-rw-r--r--xsd-examples/cxx/parser/multiroot/protocol.hxx61
-rw-r--r--xsd-examples/cxx/parser/multiroot/protocol.map11
-rw-r--r--xsd-examples/cxx/parser/multiroot/protocol.xsd50
-rw-r--r--xsd-examples/cxx/parser/multiroot/testscript6
-rw-r--r--xsd-examples/cxx/parser/multiroot/withdraw.xml17
-rw-r--r--xsd-examples/cxx/parser/performance/.gitignore7
-rw-r--r--xsd-examples/cxx/parser/performance/README46
-rw-r--r--xsd-examples/cxx/parser/performance/buildfile57
-rw-r--r--xsd-examples/cxx/parser/performance/driver.cxx346
-rw-r--r--xsd-examples/cxx/parser/performance/gen.cxx79
-rw-r--r--xsd-examples/cxx/parser/performance/gen.testscript9
-rw-r--r--xsd-examples/cxx/parser/performance/test-50k.xml (renamed from examples/cxx/parser/performance/test-50k.xml)0
-rw-r--r--xsd-examples/cxx/parser/performance/test.xsd49
-rw-r--r--xsd-examples/cxx/parser/performance/time.cxx46
-rw-r--r--xsd-examples/cxx/parser/performance/time.hxx110
-rw-r--r--xsd-examples/cxx/parser/polymorphism/README (renamed from examples/cxx/parser/polymorphism/README)0
-rw-r--r--xsd-examples/cxx/parser/polymorphism/buildfile25
-rw-r--r--xsd-examples/cxx/parser/polymorphism/driver.cxx70
-rw-r--r--xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx85
-rw-r--r--xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx68
-rw-r--r--xsd-examples/cxx/parser/polymorphism/supermen.xml25
-rw-r--r--xsd-examples/cxx/parser/polymorphism/supermen.xsd48
-rw-r--r--xsd-examples/cxx/parser/polyroot/README (renamed from examples/cxx/parser/polyroot/README)0
-rw-r--r--xsd-examples/cxx/parser/polyroot/batman.xml16
-rw-r--r--xsd-examples/cxx/parser/polyroot/buildfile24
-rw-r--r--xsd-examples/cxx/parser/polyroot/driver.cxx138
-rw-r--r--xsd-examples/cxx/parser/polyroot/person.xml15
-rw-r--r--xsd-examples/cxx/parser/polyroot/superman.xml16
-rw-r--r--xsd-examples/cxx/parser/polyroot/supermen-pimpl.cxx85
-rw-r--r--xsd-examples/cxx/parser/polyroot/supermen-pimpl.hxx64
-rw-r--r--xsd-examples/cxx/parser/polyroot/supermen.xsd36
-rw-r--r--xsd-examples/cxx/parser/polyroot/testscript6
-rw-r--r--xsd-examples/cxx/parser/wildcard/README (renamed from examples/cxx/parser/wildcard/README)0
-rw-r--r--xsd-examples/cxx/parser/wildcard/buildfile24
-rw-r--r--xsd-examples/cxx/parser/wildcard/driver.cxx239
-rw-r--r--xsd-examples/cxx/parser/wildcard/email.xml31
-rw-r--r--xsd-examples/cxx/parser/wildcard/email.xsd50
-rw-r--r--xsd-examples/cxx/tree/README (renamed from examples/cxx/tree/README)0
-rw-r--r--xsd-examples/cxx/tree/binary/README (renamed from examples/cxx/tree/binary/README)0
-rw-r--r--xsd-examples/cxx/tree/binary/boost/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/binary/boost/README (renamed from examples/cxx/tree/binary/boost/README)0
-rw-r--r--xsd-examples/cxx/tree/binary/boost/boost-archive-extraction.hxx188
-rw-r--r--xsd-examples/cxx/tree/binary/boost/boost-archive-insertion.hxx177
-rw-r--r--xsd-examples/cxx/tree/binary/boost/buildfile32
-rw-r--r--xsd-examples/cxx/tree/binary/boost/driver.cxx72
-rw-r--r--xsd-examples/cxx/tree/binary/boost/library-prologue.hxx (renamed from examples/cxx/tree/binary/boost/library-prologue.hxx)0
-rw-r--r--xsd-examples/cxx/tree/binary/boost/library.xml52
-rw-r--r--xsd-examples/cxx/tree/binary/boost/library.xsd75
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/README (renamed from examples/cxx/tree/binary/cdr/README)0
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/buildfile28
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/driver.cxx87
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/library.xml52
-rw-r--r--xsd-examples/cxx/tree/binary/cdr/library.xsd75
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/README36
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/buildfile30
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/driver.cxx148
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/library.xml52
-rw-r--r--xsd-examples/cxx/tree/binary/xdr/library.xsd75
-rw-r--r--xsd-examples/cxx/tree/buildfile6
-rw-r--r--xsd-examples/cxx/tree/caching/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/caching/README29
-rw-r--r--xsd-examples/cxx/tree/caching/buildfile27
-rw-r--r--xsd-examples/cxx/tree/caching/driver.cxx165
-rw-r--r--xsd-examples/cxx/tree/caching/library.xml52
-rw-r--r--xsd-examples/cxx/tree/caching/library.xsd72
-rw-r--r--xsd-examples/cxx/tree/compression/.gitignore2
-rw-r--r--xsd-examples/cxx/tree/compression/README (renamed from examples/cxx/tree/compression/README)0
-rw-r--r--xsd-examples/cxx/tree/compression/buildfile28
-rw-r--r--xsd-examples/cxx/tree/compression/compressed-format-target.cxx152
-rw-r--r--xsd-examples/cxx/tree/compression/compressed-format-target.hxx91
-rw-r--r--xsd-examples/cxx/tree/compression/compressed-input-source.cxx195
-rw-r--r--xsd-examples/cxx/tree/compression/compressed-input-source.hxx121
-rw-r--r--xsd-examples/cxx/tree/compression/driver.cxx124
-rw-r--r--xsd-examples/cxx/tree/compression/library.xml.gz (renamed from examples/cxx/tree/compression/library.xml.gz)bin486 -> 486 bytes
-rw-r--r--xsd-examples/cxx/tree/compression/library.xsd72
-rw-r--r--xsd-examples/cxx/tree/compression/testscript4
-rw-r--r--xsd-examples/cxx/tree/custom/README (renamed from examples/cxx/tree/custom/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/buildfile6
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/.gitignore2
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/README (renamed from examples/cxx/tree/custom/calendar/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/buildfile47
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/calendar.xml22
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/calendar.xsd31
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/driver.cxx39
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.cxx56
-rw-r--r--xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.hxx33
-rw-r--r--xsd-examples/cxx/tree/custom/comments/.gitignore2
-rw-r--r--xsd-examples/cxx/tree/custom/comments/README (renamed from examples/cxx/tree/custom/comments/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/comments/buildfile48
-rw-r--r--xsd-examples/cxx/tree/custom/comments/dom-parse.cxx93
-rw-r--r--xsd-examples/cxx/tree/custom/comments/dom-parse.hxx23
-rw-r--r--xsd-examples/cxx/tree/custom/comments/driver.cxx90
-rw-r--r--xsd-examples/cxx/tree/custom/comments/people.xml20
-rw-r--r--xsd-examples/cxx/tree/custom/comments/people.xsd29
-rw-r--r--xsd-examples/cxx/tree/custom/comments/xml-schema-custom.cxx117
-rw-r--r--xsd-examples/cxx/tree/custom/comments/xml-schema-custom.hxx60
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/README (renamed from examples/cxx/tree/custom/contacts/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/buildfile25
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/contacts-custom.cxx50
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/contacts-custom.hxx43
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/contacts.xml20
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/contacts.xsd31
-rw-r--r--xsd-examples/cxx/tree/custom/contacts/driver.cxx38
-rw-r--r--xsd-examples/cxx/tree/custom/double/.gitignore2
-rw-r--r--xsd-examples/cxx/tree/custom/double/README (renamed from examples/cxx/tree/custom/double/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/double/buildfile46
-rw-r--r--xsd-examples/cxx/tree/custom/double/double-custom.cxx96
-rw-r--r--xsd-examples/cxx/tree/custom/double/double-custom.hxx67
-rw-r--r--xsd-examples/cxx/tree/custom/double/driver.cxx31
-rw-r--r--xsd-examples/cxx/tree/custom/double/order.xsd25
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/README (renamed from examples/cxx/tree/custom/mixed/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/buildfile30
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/driver.cxx122
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/people-custom.cxx89
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/people-custom.hxx83
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/people.xml38
-rw-r--r--xsd-examples/cxx/tree/custom/mixed/people.xsd45
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/.gitignore2
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/README (renamed from examples/cxx/tree/custom/taxonomy/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/buildfile31
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/driver.cxx38
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx19
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/people-custom.cxx156
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/people-custom.hxx105
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/people.xml26
-rw-r--r--xsd-examples/cxx/tree/custom/taxonomy/people.xsd44
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/README (renamed from examples/cxx/tree/custom/wildcard/README)0
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/buildfile27
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/driver.cxx47
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.cxx84
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.hxx66
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/wildcard.xml14
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/wildcard.xsd25
-rw-r--r--xsd-examples/cxx/tree/embedded/.gitignore3
-rw-r--r--xsd-examples/cxx/tree/embedded/README (renamed from examples/cxx/tree/embedded/README)0
-rw-r--r--xsd-examples/cxx/tree/embedded/buildfile46
-rw-r--r--xsd-examples/cxx/tree/embedded/driver.cxx183
-rw-r--r--xsd-examples/cxx/tree/embedded/grammar-input-stream.cxx95
-rw-r--r--xsd-examples/cxx/tree/embedded/grammar-input-stream.hxx40
-rw-r--r--xsd-examples/cxx/tree/embedded/library.xml52
-rw-r--r--xsd-examples/cxx/tree/embedded/library.xsd72
-rw-r--r--xsd-examples/cxx/tree/embedded/xsdbin.cxx494
-rw-r--r--xsd-examples/cxx/tree/hello/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/hello/README (renamed from examples/cxx/tree/hello/README)0
-rw-r--r--xsd-examples/cxx/tree/hello/buildfile23
-rw-r--r--xsd-examples/cxx/tree/hello/driver.cxx36
-rw-r--r--xsd-examples/cxx/tree/hello/hello.xml19
-rw-r--r--xsd-examples/cxx/tree/hello/hello.xsd52
-rw-r--r--xsd-examples/cxx/tree/library/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/library/README (renamed from examples/cxx/tree/library/README)0
-rw-r--r--xsd-examples/cxx/tree/library/buildfile25
-rw-r--r--xsd-examples/cxx/tree/library/driver.cxx130
-rw-r--r--xsd-examples/cxx/tree/library/library.xml52
-rw-r--r--xsd-examples/cxx/tree/library/library.xsd72
-rw-r--r--xsd-examples/cxx/tree/messaging/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/messaging/README (renamed from examples/cxx/tree/messaging/README)0
-rw-r--r--xsd-examples/cxx/tree/messaging/balance.xml16
-rw-r--r--xsd-examples/cxx/tree/messaging/buildfile29
-rw-r--r--xsd-examples/cxx/tree/messaging/deposit.xml17
-rw-r--r--xsd-examples/cxx/tree/messaging/dom-parse.cxx93
-rw-r--r--xsd-examples/cxx/tree/messaging/dom-parse.hxx22
-rw-r--r--xsd-examples/cxx/tree/messaging/dom-serialize.cxx64
-rw-r--r--xsd-examples/cxx/tree/messaging/dom-serialize.hxx20
-rw-r--r--xsd-examples/cxx/tree/messaging/driver.cxx146
-rw-r--r--xsd-examples/cxx/tree/messaging/protocol.xsd53
-rw-r--r--xsd-examples/cxx/tree/messaging/testscript6
-rw-r--r--xsd-examples/cxx/tree/messaging/withdraw.xml17
-rw-r--r--xsd-examples/cxx/tree/mixed/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/mixed/README (renamed from examples/cxx/tree/mixed/README)0
-rw-r--r--xsd-examples/cxx/tree/mixed/buildfile27
-rw-r--r--xsd-examples/cxx/tree/mixed/driver.cxx122
-rw-r--r--xsd-examples/cxx/tree/mixed/text.xml17
-rw-r--r--xsd-examples/cxx/tree/mixed/text.xsd28
-rw-r--r--xsd-examples/cxx/tree/multiroot/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/multiroot/README (renamed from examples/cxx/tree/multiroot/README)0
-rw-r--r--xsd-examples/cxx/tree/multiroot/balance.xml16
-rw-r--r--xsd-examples/cxx/tree/multiroot/buildfile26
-rw-r--r--xsd-examples/cxx/tree/multiroot/deposit.xml17
-rw-r--r--xsd-examples/cxx/tree/multiroot/dom-parse.cxx93
-rw-r--r--xsd-examples/cxx/tree/multiroot/dom-parse.hxx22
-rw-r--r--xsd-examples/cxx/tree/multiroot/driver.cxx124
-rw-r--r--xsd-examples/cxx/tree/multiroot/protocol.xsd50
-rw-r--r--xsd-examples/cxx/tree/multiroot/testscript6
-rw-r--r--xsd-examples/cxx/tree/multiroot/withdraw.xml17
-rw-r--r--xsd-examples/cxx/tree/order/README (renamed from examples/cxx/tree/order/README)0
-rw-r--r--xsd-examples/cxx/tree/order/element/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/order/element/README (renamed from examples/cxx/tree/order/element/README)0
-rw-r--r--xsd-examples/cxx/tree/order/element/buildfile30
-rw-r--r--xsd-examples/cxx/tree/order/element/driver.cxx147
-rw-r--r--xsd-examples/cxx/tree/order/element/transactions.xml32
-rw-r--r--xsd-examples/cxx/tree/order/element/transactions.xsd58
-rw-r--r--xsd-examples/cxx/tree/order/mixed/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/order/mixed/README (renamed from examples/cxx/tree/order/mixed/README)0
-rw-r--r--xsd-examples/cxx/tree/order/mixed/buildfile25
-rw-r--r--xsd-examples/cxx/tree/order/mixed/driver.cxx89
-rw-r--r--xsd-examples/cxx/tree/order/mixed/text.xml17
-rw-r--r--xsd-examples/cxx/tree/order/mixed/text.xsd28
-rw-r--r--xsd-examples/cxx/tree/performance/.gitignore5
-rw-r--r--xsd-examples/cxx/tree/performance/README62
-rw-r--r--xsd-examples/cxx/tree/performance/buildfile36
-rw-r--r--xsd-examples/cxx/tree/performance/driver.cxx90
-rw-r--r--xsd-examples/cxx/tree/performance/gen.cxx (renamed from examples/cxx/parser/performance/gen.cxx)0
-rw-r--r--xsd-examples/cxx/tree/performance/gen.testscript9
-rw-r--r--xsd-examples/cxx/tree/performance/parsing.cxx172
-rw-r--r--xsd-examples/cxx/tree/performance/serialization.cxx132
-rw-r--r--xsd-examples/cxx/tree/performance/test-50k.xml (renamed from examples/cxx/tree/performance/test-50k.xml)0
-rw-r--r--xsd-examples/cxx/tree/performance/test.xsd49
-rw-r--r--xsd-examples/cxx/tree/performance/time.cxx46
-rw-r--r--xsd-examples/cxx/tree/performance/time.hxx110
-rw-r--r--xsd-examples/cxx/tree/polymorphism/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/polymorphism/README (renamed from examples/cxx/tree/polymorphism/README)0
-rw-r--r--xsd-examples/cxx/tree/polymorphism/buildfile26
-rw-r--r--xsd-examples/cxx/tree/polymorphism/driver.cxx59
-rw-r--r--xsd-examples/cxx/tree/polymorphism/supermen.xml25
-rw-r--r--xsd-examples/cxx/tree/polymorphism/supermen.xsd48
-rw-r--r--xsd-examples/cxx/tree/secure/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/secure/README (renamed from examples/cxx/tree/secure/README)0
-rw-r--r--xsd-examples/cxx/tree/secure/buildfile27
-rw-r--r--xsd-examples/cxx/tree/secure/driver.cxx141
-rw-r--r--xsd-examples/cxx/tree/secure/library.xml59
-rw-r--r--xsd-examples/cxx/tree/secure/library.xsd72
-rw-r--r--xsd-examples/cxx/tree/secure/secure-dom-parser.cxx24
-rw-r--r--xsd-examples/cxx/tree/secure/secure-dom-parser.hxx25
-rw-r--r--xsd-examples/cxx/tree/streaming/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/streaming/README (renamed from examples/cxx/tree/streaming/README)0
-rw-r--r--xsd-examples/cxx/tree/streaming/buildfile26
-rw-r--r--xsd-examples/cxx/tree/streaming/driver.cxx139
-rw-r--r--xsd-examples/cxx/tree/streaming/grammar-input-stream.cxx96
-rw-r--r--xsd-examples/cxx/tree/streaming/grammar-input-stream.hxx41
-rw-r--r--xsd-examples/cxx/tree/streaming/parser.cxx371
-rw-r--r--xsd-examples/cxx/tree/streaming/parser.hxx67
-rw-r--r--xsd-examples/cxx/tree/streaming/position.xml29
-rw-r--r--xsd-examples/cxx/tree/streaming/position.xsd37
-rw-r--r--xsd-examples/cxx/tree/streaming/serializer.cxx636
-rw-r--r--xsd-examples/cxx/tree/streaming/serializer.hxx209
-rw-r--r--xsd-examples/cxx/tree/streaming/testscript10
-rw-r--r--xsd-examples/cxx/tree/wildcard/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/wildcard/README (renamed from examples/cxx/tree/wildcard/README)0
-rw-r--r--xsd-examples/cxx/tree/wildcard/buildfile30
-rw-r--r--xsd-examples/cxx/tree/wildcard/driver.cxx159
-rw-r--r--xsd-examples/cxx/tree/wildcard/email.xml31
-rw-r--r--xsd-examples/cxx/tree/wildcard/email.xsd50
-rw-r--r--xsd-examples/cxx/tree/xpath/.gitignore1
-rw-r--r--xsd-examples/cxx/tree/xpath/README (renamed from examples/cxx/tree/xpath/README)0
-rw-r--r--xsd-examples/cxx/tree/xpath/buildfile28
-rw-r--r--xsd-examples/cxx/tree/xpath/dom-parse.cxx88
-rw-r--r--xsd-examples/cxx/tree/xpath/dom-parse.hxx25
-rw-r--r--xsd-examples/cxx/tree/xpath/driver.cxx137
-rw-r--r--xsd-examples/cxx/tree/xpath/people.xml28
-rw-r--r--xsd-examples/cxx/tree/xpath/people.xsd38
-rw-r--r--xsd-examples/manifest17
-rw-r--r--xsd-tests/.gitignore32
l---------xsd-tests/FLOSSE1
l---------xsd-tests/GPLv21
l---------xsd-tests/LICENSE1
-rw-r--r--xsd-tests/README8
-rw-r--r--xsd-tests/build/.gitignore3
-rw-r--r--xsd-tests/build/bootstrap.build9
-rw-r--r--xsd-tests/build/root.build40
-rw-r--r--xsd-tests/buildfile4
-rw-r--r--xsd-tests/clash/.gitignore2
-rw-r--r--xsd-tests/clash/buildfile27
-rw-r--r--xsd-tests/clash/clash.xsd (renamed from tests/clash/clash.xsd)0
-rw-r--r--xsd-tests/clash/driver.cxx10
-rw-r--r--xsd-tests/clash/foo.xsd (renamed from tests/clash/foo.xsd)0
-rw-r--r--xsd-tests/code/name-conflict/buildfile22
-rw-r--r--xsd-tests/code/name-conflict/driver.cxx9
-rw-r--r--xsd-tests/code/name-conflict/test.xsd (renamed from tests/code/name-conflict/test.xsd)0
-rw-r--r--xsd-tests/code/name-escaping/buildfile22
-rw-r--r--xsd-tests/code/name-escaping/driver.cxx9
-rw-r--r--xsd-tests/code/name-escaping/test.xsd (renamed from tests/code/name-escaping/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/.gitignore1
-rw-r--r--xsd-tests/cxx/parser/built-in/buildfile23
-rw-r--r--xsd-tests/cxx/parser/built-in/driver.cxx529
-rw-r--r--xsd-tests/cxx/parser/built-in/output (renamed from tests/cxx/parser/built-in/output)0
-rw-r--r--xsd-tests/cxx/parser/built-in/test.xml (renamed from tests/cxx/parser/built-in/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/built-in/test.xsd (renamed from tests/cxx/parser/built-in/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/enumeration/buildfile24
-rw-r--r--xsd-tests/cxx/parser/enumeration/driver.cxx81
-rw-r--r--xsd-tests/cxx/parser/enumeration/gender.hxx (renamed from tests/cxx/parser/enumeration/gender.hxx)0
-rw-r--r--xsd-tests/cxx/parser/enumeration/output (renamed from tests/cxx/parser/enumeration/output)0
-rw-r--r--xsd-tests/cxx/parser/enumeration/test.map (renamed from tests/cxx/parser/enumeration/test.map)0
-rw-r--r--xsd-tests/cxx/parser/enumeration/test.xml (renamed from tests/cxx/parser/enumeration/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/enumeration/test.xsd (renamed from tests/cxx/parser/enumeration/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/generated-impl/.gitignore2
-rw-r--r--xsd-tests/cxx/parser/generated-impl/buildfile31
-rw-r--r--xsd-tests/cxx/parser/generated-impl/output (renamed from tests/cxx/parser/generated-impl/output)0
-rw-r--r--xsd-tests/cxx/parser/generated-impl/test.xml (renamed from tests/cxx/parser/generated-impl/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/generated-impl/test.xsd (renamed from tests/cxx/parser/generated-impl/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/list/buildfile23
-rw-r--r--xsd-tests/cxx/parser/list/driver.cxx105
-rw-r--r--xsd-tests/cxx/parser/list/output (renamed from tests/cxx/parser/list/output)0
-rw-r--r--xsd-tests/cxx/parser/list/test.xml (renamed from tests/cxx/parser/list/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/list/test.xsd (renamed from tests/cxx/parser/list/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/buildfile24
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx62
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/output (renamed from tests/cxx/parser/name-clash/inheritance/output)0
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/test.xml (renamed from tests/cxx/parser/name-clash/inheritance/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/name-clash/inheritance/test.xsd (renamed from tests/cxx/parser/name-clash/inheritance/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/buildfile24
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx68
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/output (renamed from tests/cxx/parser/polymorphism/recursive/output)0
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx147
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx94
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/test.xml (renamed from tests/cxx/parser/polymorphism/recursive/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/polymorphism/recursive/test.xsd (renamed from tests/cxx/parser/polymorphism/recursive/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/buildfile24
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx62
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/output (renamed from tests/cxx/parser/polymorphism/same-type/output)0
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/test.xml (renamed from tests/cxx/parser/polymorphism/same-type/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/polymorphism/same-type/test.xsd (renamed from tests/cxx/parser/polymorphism/same-type/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/recursive/buildfile24
-rw-r--r--xsd-tests/cxx/parser/recursive/driver.cxx139
-rw-r--r--xsd-tests/cxx/parser/recursive/output (renamed from tests/cxx/parser/recursive/output)0
-rw-r--r--xsd-tests/cxx/parser/recursive/test.xml (renamed from tests/cxx/parser/recursive/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/recursive/test.xsd (renamed from tests/cxx/parser/recursive/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/test-template/buildfile23
-rw-r--r--xsd-tests/cxx/parser/test-template/driver.cxx66
-rw-r--r--xsd-tests/cxx/parser/test-template/output (renamed from tests/cxx/parser/test-template/output)0
-rw-r--r--xsd-tests/cxx/parser/test-template/test.xml (renamed from tests/cxx/parser/test-template/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/test-template/test.xsd (renamed from tests/cxx/parser/test-template/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/union/buildfile23
-rw-r--r--xsd-tests/cxx/parser/union/driver.cxx60
-rw-r--r--xsd-tests/cxx/parser/union/output (renamed from tests/cxx/parser/union/output)0
-rw-r--r--xsd-tests/cxx/parser/union/test.xml (renamed from tests/cxx/parser/union/test.xml)0
-rw-r--r--xsd-tests/cxx/parser/union/test.xsd (renamed from tests/cxx/parser/union/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/all/buildfile22
-rw-r--r--xsd-tests/cxx/parser/validation/all/driver.cxx98
-rw-r--r--xsd-tests/cxx/parser/validation/all/test.xsd (renamed from tests/cxx/parser/validation/all/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/all/testscript190
-rw-r--r--xsd-tests/cxx/parser/validation/any/buildfile24
-rw-r--r--xsd-tests/cxx/parser/validation/any/driver.cxx121
-rw-r--r--xsd-tests/cxx/parser/validation/any/output (renamed from tests/cxx/parser/validation/any/test-000.std)0
-rw-r--r--xsd-tests/cxx/parser/validation/any/test.xml (renamed from tests/cxx/parser/validation/any/test-000.xml)0
-rw-r--r--xsd-tests/cxx/parser/validation/any/test.xsd (renamed from tests/cxx/parser/validation/any/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/buildfile24
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/driver.cxx197
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/output (renamed from tests/cxx/parser/validation/attribute/test-000.std)0
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/test.xml (renamed from tests/cxx/parser/validation/attribute/test-000.xml)0
-rw-r--r--xsd-tests/cxx/parser/validation/attribute/test.xsd (renamed from tests/cxx/parser/validation/attribute/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/buildfile24
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx154
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/output (renamed from tests/cxx/parser/validation/built-in/any-type/test-000.std)0
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/test.xml (renamed from tests/cxx/parser/validation/built-in/any-type/test-000.xml)0
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/any-type/test.xsd (renamed from tests/cxx/parser/validation/built-in/any-type/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/binary/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx153
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/boolean/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx145
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/byte/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx256
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/date-time/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx1533
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/float/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/float/driver.cxx285
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/int/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/int/driver.cxx116
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/integer/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx303
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/long/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/long/driver.cxx116
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/qname/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx105
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/short/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/short/driver.cxx116
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/string/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/string/driver.cxx512
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/uri/buildfile10
-rw-r--r--xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx53
-rw-r--r--xsd-tests/cxx/parser/validation/choice/buildfile22
-rw-r--r--xsd-tests/cxx/parser/validation/choice/driver.cxx126
-rw-r--r--xsd-tests/cxx/parser/validation/choice/test.xsd (renamed from tests/cxx/parser/validation/choice/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/choice/testscript179
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/buildfile22
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/driver.cxx107
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/test.xsd (renamed from tests/cxx/parser/validation/restriction/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/restriction/testscript159
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/buildfile22
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/driver.cxx139
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/test.xsd (renamed from tests/cxx/parser/validation/sequence/test.xsd)0
-rw-r--r--xsd-tests/cxx/parser/validation/sequence/testscript328
-rw-r--r--xsd-tests/cxx/tree/any-type/buildfile26
-rw-r--r--xsd-tests/cxx/tree/any-type/driver.cxx144
-rw-r--r--xsd-tests/cxx/tree/any-type/output (renamed from tests/cxx/tree/any-type/output)0
-rw-r--r--xsd-tests/cxx/tree/any-type/test.xml (renamed from tests/cxx/tree/any-type/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/any-type/test.xsd (renamed from tests/cxx/tree/any-type/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/buildfile25
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/driver.cxx (renamed from tests/cxx/tree/binary/cdr/driver.cxx)0
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/test.xml (renamed from tests/cxx/tree/binary/cdr/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/binary/cdr/test.xsd (renamed from tests/cxx/tree/binary/cdr/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/buildfile27
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/driver.cxx (renamed from tests/cxx/tree/binary/polymorphic/driver.cxx)0
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/test.xml (renamed from tests/cxx/tree/binary/polymorphic/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/binary/polymorphic/test.xsd (renamed from tests/cxx/tree/binary/polymorphic/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/buildfile28
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx206
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/test.xml (renamed from tests/cxx/tree/binary/xdr-ordered/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/binary/xdr-ordered/test.xsd (renamed from tests/cxx/tree/binary/xdr-ordered/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/buildfile27
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/driver.cxx204
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/test.xml (renamed from tests/cxx/tree/binary/xdr/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/binary/xdr/test.xsd (renamed from tests/cxx/tree/binary/xdr/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/buildfile6
-rw-r--r--xsd-tests/cxx/tree/built-in/.gitignore1
-rw-r--r--xsd-tests/cxx/tree/built-in/buildfile25
-rw-r--r--xsd-tests/cxx/tree/built-in/driver.cxx93
-rw-r--r--xsd-tests/cxx/tree/built-in/testscript394
-rw-r--r--xsd-tests/cxx/tree/built-in/types.xsd (renamed from tests/cxx/tree/built-in/types.xsd)0
-rw-r--r--xsd-tests/cxx/tree/chameleon/.gitignore1
-rw-r--r--xsd-tests/cxx/tree/chameleon/buildfile24
-rw-r--r--xsd-tests/cxx/tree/chameleon/driver.cxx35
-rw-r--r--xsd-tests/cxx/tree/chameleon/includee.xsd (renamed from tests/cxx/tree/chameleon/includee.xsd)0
-rw-r--r--xsd-tests/cxx/tree/chameleon/includer.xsd (renamed from tests/cxx/tree/chameleon/includer.xsd)0
-rw-r--r--xsd-tests/cxx/tree/chameleon/output (renamed from tests/cxx/tree/chameleon/output)0
-rw-r--r--xsd-tests/cxx/tree/chameleon/test.xml (renamed from tests/cxx/tree/chameleon/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/comparison/buildfile22
-rw-r--r--xsd-tests/cxx/tree/comparison/driver.cxx38
-rw-r--r--xsd-tests/cxx/tree/comparison/test.xml (renamed from tests/cxx/tree/comparison/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/comparison/test.xsd (renamed from tests/cxx/tree/comparison/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/compilation/buildfile20
-rw-r--r--xsd-tests/cxx/tree/compilation/driver.cxx116
-rw-r--r--xsd-tests/cxx/tree/compilation/test.xsd (renamed from tests/cxx/tree/compilation/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/buildfile25
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/driver.cxx122
-rw-r--r--xsd-tests/cxx/tree/complex/ctor/test.xsd (renamed from tests/cxx/tree/complex/ctor/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/containment/buildfile20
-rw-r--r--xsd-tests/cxx/tree/containment/driver.cxx118
-rw-r--r--xsd-tests/cxx/tree/containment/test.xsd (renamed from tests/cxx/tree/containment/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/default/general/buildfile26
-rw-r--r--xsd-tests/cxx/tree/default/general/driver.cxx37
-rw-r--r--xsd-tests/cxx/tree/default/general/output (renamed from tests/cxx/tree/default/general/output)0
-rw-r--r--xsd-tests/cxx/tree/default/general/test.xml (renamed from tests/cxx/tree/default/general/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/default/general/test.xsd (renamed from tests/cxx/tree/default/general/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/default/omit/buildfile27
-rw-r--r--xsd-tests/cxx/tree/default/omit/driver.cxx46
-rw-r--r--xsd-tests/cxx/tree/default/omit/output (renamed from tests/cxx/tree/default/omit/output)0
-rw-r--r--xsd-tests/cxx/tree/default/omit/test.xml (renamed from tests/cxx/tree/default/omit/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/default/omit/test.xsd (renamed from tests/cxx/tree/default/omit/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/detach/buildfile21
-rw-r--r--xsd-tests/cxx/tree/detach/driver.cxx108
-rw-r--r--xsd-tests/cxx/tree/detach/test.xsd (renamed from tests/cxx/tree/detach/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/dom-association/buildfile27
-rw-r--r--xsd-tests/cxx/tree/dom-association/dom-parse.cxx95
-rw-r--r--xsd-tests/cxx/tree/dom-association/dom-parse.hxx23
-rw-r--r--xsd-tests/cxx/tree/dom-association/driver.cxx71
-rw-r--r--xsd-tests/cxx/tree/dom-association/output (renamed from tests/cxx/tree/dom-association/output)0
-rw-r--r--xsd-tests/cxx/tree/dom-association/test.xml (renamed from tests/cxx/tree/dom-association/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/dom-association/test.xsd (renamed from tests/cxx/tree/dom-association/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile25
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx74
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/output (renamed from tests/cxx/tree/encoding/char/iso-8859-1/test.std)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/test.xml (renamed from tests/cxx/tree/encoding/char/iso-8859-1/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/iso-8859-1/test.xsd (renamed from tests/cxx/tree/encoding/char/iso-8859-1/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/buildfile24
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx40
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/output (renamed from tests/cxx/tree/encoding/char/lcp/test.std)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/test.xml (renamed from tests/cxx/tree/encoding/char/lcp/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/lcp/test.xsd (renamed from tests/cxx/tree/encoding/char/lcp/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/buildfile24
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx63
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/output (renamed from tests/cxx/tree/encoding/char/utf-8/test.std)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/test.xml (renamed from tests/cxx/tree/encoding/char/utf-8/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/encoding/char/utf-8/test.xsd (renamed from tests/cxx/tree/encoding/char/utf-8/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/buildfile25
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/driver.cxx55
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/output (renamed from tests/cxx/tree/encoding/wchar/test.std)0
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/test.xml (renamed from tests/cxx/tree/encoding/wchar/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/encoding/wchar/test.xsd (renamed from tests/cxx/tree/encoding/wchar/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/buildfile22
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/driver.cxx30
-rw-r--r--xsd-tests/cxx/tree/enumeration/ctor/test.xsd (renamed from tests/cxx/tree/enumeration/ctor/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/buildfile23
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx53
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/output (renamed from tests/cxx/tree/enumeration/inheritance/output)0
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/test.xml (renamed from tests/cxx/tree/enumeration/inheritance/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/enumeration/inheritance/test.xsd (renamed from tests/cxx/tree/enumeration/inheritance/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/float/buildfile24
-rw-r--r--xsd-tests/cxx/tree/float/driver.cxx53
-rw-r--r--xsd-tests/cxx/tree/float/output (renamed from tests/cxx/tree/float/test.std)0
-rw-r--r--xsd-tests/cxx/tree/float/test.xml (renamed from tests/cxx/tree/float/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/float/test.xsd (renamed from tests/cxx/tree/float/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/list/ctor/buildfile22
-rw-r--r--xsd-tests/cxx/tree/list/ctor/driver.cxx50
-rw-r--r--xsd-tests/cxx/tree/list/ctor/test.xsd (renamed from tests/cxx/tree/list/ctor/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/buildfile23
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx35
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/output (renamed from tests/cxx/tree/name-clash/inheritance/output)0
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/test.xml (renamed from tests/cxx/tree/name-clash/inheritance/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/name-clash/inheritance/test.xsd (renamed from tests/cxx/tree/name-clash/inheritance/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/naming/camel/buildfile25
-rw-r--r--xsd-tests/cxx/tree/naming/camel/driver.cxx154
-rw-r--r--xsd-tests/cxx/tree/naming/camel/test.xsd (renamed from tests/cxx/tree/naming/camel/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/naming/java/buildfile25
-rw-r--r--xsd-tests/cxx/tree/naming/java/driver.cxx153
-rw-r--r--xsd-tests/cxx/tree/naming/java/test.xsd (renamed from tests/cxx/tree/naming/java/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/naming/knr/buildfile25
-rw-r--r--xsd-tests/cxx/tree/naming/knr/driver.cxx154
-rw-r--r--xsd-tests/cxx/tree/naming/knr/test.xsd (renamed from tests/cxx/tree/naming/knr/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/order/buildfile37
-rw-r--r--xsd-tests/cxx/tree/order/driver.cxx64
-rw-r--r--xsd-tests/cxx/tree/order/output (renamed from tests/cxx/tree/order/output)0
-rw-r--r--xsd-tests/cxx/tree/order/test.xml (renamed from tests/cxx/tree/order/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/order/test.xsd (renamed from tests/cxx/tree/order/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/buildfile25
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx85
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/test.xml (renamed from tests/cxx/tree/polymorphism/comparison/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/comparison/test.xsd (renamed from tests/cxx/tree/polymorphism/comparison/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/buildfile26
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx34
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/output (renamed from tests/cxx/tree/polymorphism/ostream/output)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/test.xml (renamed from tests/cxx/tree/polymorphism/ostream/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/ostream/test.xsd (renamed from tests/cxx/tree/polymorphism/ostream/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/buildfile25
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx35
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/output (renamed from tests/cxx/tree/polymorphism/same-type/output)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/test.xml (renamed from tests/cxx/tree/polymorphism/same-type/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/polymorphism/same-type/test.xsd (renamed from tests/cxx/tree/polymorphism/same-type/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/prefix/.gitignore2
-rw-r--r--xsd-tests/cxx/tree/prefix/bar.xsd (renamed from tests/cxx/tree/prefix/bar.xsd)0
-rw-r--r--xsd-tests/cxx/tree/prefix/buildfile31
-rw-r--r--xsd-tests/cxx/tree/prefix/driver.cxx34
-rw-r--r--xsd-tests/cxx/tree/prefix/foo.xsd (renamed from tests/cxx/tree/prefix/foo.xsd)0
-rw-r--r--xsd-tests/cxx/tree/prefix/output (renamed from tests/cxx/tree/prefix/output)0
-rw-r--r--xsd-tests/cxx/tree/prefix/test.xml (renamed from tests/cxx/tree/prefix/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/prefix/test.xsd (renamed from tests/cxx/tree/prefix/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/test-template/buildfile23
-rw-r--r--xsd-tests/cxx/tree/test-template/driver.cxx35
-rw-r--r--xsd-tests/cxx/tree/test-template/output (renamed from tests/cxx/tree/test-template/output)0
-rw-r--r--xsd-tests/cxx/tree/test-template/test.xml (renamed from tests/cxx/tree/test-template/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/test-template/test.xsd (renamed from tests/cxx/tree/test-template/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/types-only/buildfile20
-rw-r--r--xsd-tests/cxx/tree/types-only/driver.cxx30
-rw-r--r--xsd-tests/cxx/tree/types-only/test.xsd (renamed from tests/cxx/tree/types-only/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/union/ctor/buildfile22
-rw-r--r--xsd-tests/cxx/tree/union/ctor/driver.cxx30
-rw-r--r--xsd-tests/cxx/tree/union/ctor/test.xsd (renamed from tests/cxx/tree/union/ctor/test.xsd)0
-rw-r--r--xsd-tests/cxx/tree/wildcard/buildfile27
-rw-r--r--xsd-tests/cxx/tree/wildcard/driver.cxx203
-rw-r--r--xsd-tests/cxx/tree/wildcard/output (renamed from tests/cxx/tree/wildcard/output)0
-rw-r--r--xsd-tests/cxx/tree/wildcard/test.xml (renamed from tests/cxx/tree/wildcard/test.xml)0
-rw-r--r--xsd-tests/cxx/tree/wildcard/test.xsd (renamed from tests/cxx/tree/wildcard/test.xsd)0
-rw-r--r--xsd-tests/failed/.gitignore1
-rw-r--r--xsd-tests/failed/buildfile27
-rw-r--r--xsd-tests/failed/driver.cxx9
-rw-r--r--xsd-tests/failed/test-00.xsd (renamed from tests/failed/test-00.xsd)0
-rw-r--r--xsd-tests/manifest15
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/buildfile22
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/driver.cxx9
-rw-r--r--xsd-tests/morphing/anonymous/attribute-group/test.xsd (renamed from tests/morphing/anonymous/attribute-group/test.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/basic/buildfile22
-rw-r--r--xsd-tests/morphing/anonymous/basic/driver.cxx9
-rw-r--r--xsd-tests/morphing/anonymous/basic/test.xsd (renamed from tests/morphing/anonymous/test-000.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/.gitignore2
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile27
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx10
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/includee.xsd (renamed from tests/morphing/anonymous/cyclic-inclusion/includee.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/cyclic-inclusion/includer.xsd (renamed from tests/morphing/anonymous/cyclic-inclusion/includer.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/group/buildfile22
-rw-r--r--xsd-tests/morphing/anonymous/group/driver.cxx9
-rw-r--r--xsd-tests/morphing/anonymous/group/test.xsd (renamed from tests/morphing/anonymous/group/test.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/unstable/.gitignore1
-rw-r--r--xsd-tests/morphing/anonymous/unstable/buildfile31
-rw-r--r--xsd-tests/morphing/anonymous/unstable/includee-1.xsd (renamed from tests/morphing/anonymous/unstable/includee-1.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/unstable/includee-2.xsd14
-rw-r--r--xsd-tests/morphing/anonymous/unstable/includer.xsd (renamed from tests/morphing/anonymous/unstable/includer.xsd)0
-rw-r--r--xsd-tests/morphing/anonymous/unstable/testscript11
-rw-r--r--xsd-tests/processing/inheritance/.gitignore3
-rw-r--r--xsd-tests/processing/inheritance/buildfile36
-rw-r--r--xsd-tests/processing/inheritance/driver.cxx.in9
-rw-r--r--xsd-tests/processing/inheritance/test-000.xsd (renamed from tests/processing/inheritance/test-000.xsd)0
-rw-r--r--xsd-tests/processing/inheritance/test-001.xsd (renamed from tests/processing/inheritance/test-001.xsd)0
-rw-r--r--xsd-tests/schema/anonymous/buildfile22
-rw-r--r--xsd-tests/schema/anonymous/driver.cxx9
-rw-r--r--xsd-tests/schema/anonymous/test.xsd (renamed from tests/schema/anonymous/test.xsd)0
-rw-r--r--xsd-tests/schema/any-attribute/buildfile12
-rw-r--r--xsd-tests/schema/any-attribute/test.xsd (renamed from tests/schema/any-attribute/test.xsd)0
-rw-r--r--xsd-tests/schema/any-attribute/testscript8
-rw-r--r--xsd-tests/schema/any-type/buildfile24
-rw-r--r--xsd-tests/schema/any-type/driver.cxx9
-rw-r--r--xsd-tests/schema/any-type/test.xsd (renamed from tests/schema/any-type/test.xsd)0
-rw-r--r--xsd-tests/schema/any/.gitignore5
-rw-r--r--xsd-tests/schema/any/buildfile47
-rw-r--r--xsd-tests/schema/any/driver.cxx.in9
-rw-r--r--xsd-tests/schema/any/fail.xsd (renamed from tests/schema/any/fail.xsd)0
-rw-r--r--xsd-tests/schema/any/test.xsd (renamed from tests/schema/any/test.xsd)0
-rw-r--r--xsd-tests/schema/attribute-group/.gitignore1
-rw-r--r--xsd-tests/schema/attribute-group/buildfile22
-rw-r--r--xsd-tests/schema/attribute-group/driver.cxx9
-rw-r--r--xsd-tests/schema/attribute-group/global.xsd (renamed from tests/schema/attribute-group/global.xsd)0
-rw-r--r--xsd-tests/schema/attribute/.gitignore3
-rw-r--r--xsd-tests/schema/attribute/buildfile27
-rw-r--r--xsd-tests/schema/attribute/driver.cxx11
-rw-r--r--xsd-tests/schema/attribute/global.xsd (renamed from tests/schema/attribute/global.xsd)0
-rw-r--r--xsd-tests/schema/attribute/local.xsd (renamed from tests/schema/attribute/local.xsd)0
-rw-r--r--xsd-tests/schema/attribute/ref.xsd42
-rw-r--r--xsd-tests/schema/cardinality/buildfile22
-rw-r--r--xsd-tests/schema/cardinality/driver.cxx9
-rw-r--r--xsd-tests/schema/cardinality/test.xsd (renamed from tests/schema/cardinality/test.xsd)0
-rw-r--r--xsd-tests/schema/chameleon/.gitignore1
-rw-r--r--xsd-tests/schema/chameleon/buildfile27
-rw-r--r--xsd-tests/schema/chameleon/driver.cxx10
-rw-r--r--xsd-tests/schema/chameleon/includer.xsd (renamed from tests/schema/chameleon/includer.xsd)0
-rw-r--r--xsd-tests/schema/chameleon/schemas/.gitignore1
-rw-r--r--xsd-tests/schema/chameleon/schemas/includee.xsd (renamed from tests/schema/chameleon/schemas/includee.xsd)0
-rw-r--r--xsd-tests/schema/enumeration/buildfile22
-rw-r--r--xsd-tests/schema/enumeration/driver.cxx9
-rw-r--r--xsd-tests/schema/enumeration/test.xsd (renamed from tests/schema/enumeration/test.xsd)0
-rw-r--r--xsd-tests/schema/forward/buildfile22
-rw-r--r--xsd-tests/schema/forward/driver.cxx9
-rw-r--r--xsd-tests/schema/forward/test.xsd (renamed from tests/schema/forward/test.xsd)0
-rw-r--r--xsd-tests/schema/group/.gitignore1
-rw-r--r--xsd-tests/schema/group/buildfile27
-rw-r--r--xsd-tests/schema/group/driver.cxx10
-rw-r--r--xsd-tests/schema/group/global.xsd (renamed from tests/schema/group/global.xsd)0
-rw-r--r--xsd-tests/schema/group/test.xsd (renamed from tests/schema/group/test.xsd)0
-rw-r--r--xsd-tests/schema/import/.gitignore1
-rw-r--r--xsd-tests/schema/import/buildfile27
-rw-r--r--xsd-tests/schema/import/driver.cxx9
-rw-r--r--xsd-tests/schema/import/importer.xsd (renamed from tests/schema/import/importer.xsd)0
-rw-r--r--xsd-tests/schema/import/schemas/.gitignore1
-rw-r--r--xsd-tests/schema/import/schemas/importee.xsd (renamed from tests/schema/import/schemas/importee.xsd)0
-rw-r--r--xsd-tests/schema/include/.gitignore1
-rw-r--r--xsd-tests/schema/include/buildfile27
-rw-r--r--xsd-tests/schema/include/driver.cxx9
-rw-r--r--xsd-tests/schema/include/includer.xsd (renamed from tests/schema/include/includer.xsd)0
-rw-r--r--xsd-tests/schema/include/schemas/.gitignore1
-rw-r--r--xsd-tests/schema/include/schemas/includee.xsd (renamed from tests/schema/include/schemas/includee.xsd)0
-rw-r--r--xsd-tests/schema/inheritance/.gitignore1
-rw-r--r--xsd-tests/schema/inheritance/buildfile30
-rw-r--r--xsd-tests/schema/inheritance/cycle.xsd (renamed from tests/schema/inheritance/cycle.xsd)0
-rw-r--r--xsd-tests/schema/inheritance/sourced-forward/.gitignore1
-rw-r--r--xsd-tests/schema/inheritance/sourced-forward/includee.xsd (renamed from tests/schema/inheritance/sourced-forward/includee.xsd)0
-rw-r--r--xsd-tests/schema/inheritance/sourced-forward/includer.xsd (renamed from tests/schema/inheritance/sourced-forward/includer.xsd)0
-rw-r--r--xsd-tests/schema/inheritance/testscript8
-rw-r--r--xsd-tests/schema/list/anonymous/test.xsd (renamed from tests/schema/list/anonymous/test.xsd)0
-rw-r--r--xsd-tests/schema/list/any-simple-type/test.xsd (renamed from tests/schema/list/any-simple-type/test.xsd)0
-rw-r--r--xsd-tests/schema/list/buildfile31
-rw-r--r--xsd-tests/schema/list/test.xsd (renamed from tests/schema/list/test.xsd)0
-rw-r--r--xsd-tests/schema/list/testscript8
-rw-r--r--xsd-tests/schema/no-namespace/buildfile22
-rw-r--r--xsd-tests/schema/no-namespace/driver.cxx9
-rw-r--r--xsd-tests/schema/no-namespace/test.xsd (renamed from tests/schema/no-namespace/test.xsd)0
-rw-r--r--xsd-tests/schema/recursive/buildfile22
-rw-r--r--xsd-tests/schema/recursive/driver.cxx9
-rw-r--r--xsd-tests/schema/recursive/test.xsd (renamed from tests/schema/recursive/test.xsd)0
-rw-r--r--xsd-tests/schema/ref-type/invalid/buildfile12
-rw-r--r--xsd-tests/schema/ref-type/invalid/invalid-0.xsd (renamed from tests/schema/ref-type/invalid-0.xsd)0
-rw-r--r--xsd-tests/schema/ref-type/invalid/invalid-1.xsd (renamed from tests/schema/ref-type/invalid-1.xsd)0
-rw-r--r--xsd-tests/schema/ref-type/invalid/testscript16
-rw-r--r--xsd-tests/schema/ref-type/valid/.gitignore6
-rw-r--r--xsd-tests/schema/ref-type/valid/buildfile35
-rw-r--r--xsd-tests/schema/ref-type/valid/driver.cxx.in9
-rw-r--r--xsd-tests/schema/ref-type/valid/idref.xsd (renamed from tests/schema/ref-type/idref.xsd)0
-rw-r--r--xsd-tests/schema/ref-type/valid/idrefs.xsd (renamed from tests/schema/ref-type/idrefs.xsd)0
-rw-r--r--xsd-tests/schema/restriction/buildfile22
-rw-r--r--xsd-tests/schema/restriction/driver.cxx9
-rw-r--r--xsd-tests/schema/restriction/test.xsd (renamed from tests/schema/restriction/test.xsd)0
-rw-r--r--xsd-tests/schema/union/buildfile22
-rw-r--r--xsd-tests/schema/union/driver.cxx9
-rw-r--r--xsd-tests/schema/union/test.xsd (renamed from tests/schema/union/test.xsd)0
-rw-r--r--xsd/.gitignore19
l---------xsd/FLOSSE1
l---------xsd/GPLv21
-rw-r--r--xsd/INSTALL6
l---------xsd/LICENSE1
-rw-r--r--xsd/NEWS (renamed from NEWS)0
-rw-r--r--xsd/README (renamed from README)0
-rw-r--r--xsd/build/.gitignore3
-rw-r--r--xsd/build/bootstrap.build9
-rw-r--r--xsd/build/export.build9
-rw-r--r--xsd/build/root.build37
-rw-r--r--xsd/buildfile8
-rw-r--r--xsd/cxx/elements.cxx1319
-rw-r--r--xsd/cxx/elements.hxx626
-rw-r--r--xsd/cxx/literal-map.cxx261
-rw-r--r--xsd/cxx/literal-map.hxx19
-rw-r--r--xsd/cxx/option-types.cxx47
-rw-r--r--xsd/cxx/option-types.hxx34
-rw-r--r--xsd/cxx/options.cli550
-rw-r--r--xsd/cxx/parser/attribute-validation-source.cxx412
-rw-r--r--xsd/cxx/parser/attribute-validation-source.hxx18
-rw-r--r--xsd/cxx/parser/characters-validation-source.cxx73
-rw-r--r--xsd/cxx/parser/characters-validation-source.hxx18
-rw-r--r--xsd/cxx/parser/driver-source.cxx775
-rw-r--r--xsd/cxx/parser/driver-source.hxx18
-rw-r--r--xsd/cxx/parser/element-validation-source.cxx1600
-rw-r--r--xsd/cxx/parser/element-validation-source.hxx18
-rw-r--r--xsd/cxx/parser/elements.cxx247
-rw-r--r--xsd/cxx/parser/elements.hxx315
-rw-r--r--xsd/cxx/parser/generator.cxx1099
-rw-r--r--xsd/cxx/parser/generator.hxx45
-rw-r--r--xsd/cxx/parser/impl-header.cxx232
-rw-r--r--xsd/cxx/parser/impl-header.hxx18
-rw-r--r--xsd/cxx/parser/impl-source.cxx384
-rw-r--r--xsd/cxx/parser/impl-source.hxx18
-rw-r--r--xsd/cxx/parser/name-processor.cxx1175
-rw-r--r--xsd/cxx/parser/name-processor.hxx30
-rw-r--r--xsd/cxx/parser/options.cli147
-rw-r--r--xsd/cxx/parser/parser-forward.cxx110
-rw-r--r--xsd/cxx/parser/parser-forward.hxx18
-rw-r--r--xsd/cxx/parser/parser-header.cxx1440
-rw-r--r--xsd/cxx/parser/parser-header.hxx18
-rw-r--r--xsd/cxx/parser/parser-inline.cxx399
-rw-r--r--xsd/cxx/parser/parser-inline.hxx18
-rw-r--r--xsd/cxx/parser/parser-source.cxx957
-rw-r--r--xsd/cxx/parser/parser-source.hxx18
-rw-r--r--xsd/cxx/parser/print-impl-common.hxx641
-rw-r--r--xsd/cxx/parser/state-processor.cxx319
-rw-r--r--xsd/cxx/parser/state-processor.hxx25
-rw-r--r--xsd/cxx/parser/type-processor.cxx347
-rw-r--r--xsd/cxx/parser/type-processor.hxx31
-rw-r--r--xsd/cxx/parser/validator.cxx718
-rw-r--r--xsd/cxx/parser/validator.hxx30
-rw-r--r--xsd/cxx/tree/counter.cxx260
-rw-r--r--xsd/cxx/tree/counter.hxx25
-rw-r--r--xsd/cxx/tree/default-value.cxx1273
-rw-r--r--xsd/cxx/tree/default-value.hxx355
-rw-r--r--xsd/cxx/tree/elements.cxx1409
-rw-r--r--xsd/cxx/tree/elements.hxx2118
-rw-r--r--xsd/cxx/tree/fundamental-header.hxx1335
-rw-r--r--xsd/cxx/tree/generator.cxx1227
-rw-r--r--xsd/cxx/tree/generator.hxx44
-rw-r--r--xsd/cxx/tree/name-processor.cxx2399
-rw-r--r--xsd/cxx/tree/name-processor.hxx28
-rw-r--r--xsd/cxx/tree/options.cli479
-rw-r--r--xsd/cxx/tree/order-processor.cxx243
-rw-r--r--xsd/cxx/tree/order-processor.hxx29
-rw-r--r--xsd/cxx/tree/parser-header.cxx472
-rw-r--r--xsd/cxx/tree/parser-header.hxx19
-rw-r--r--xsd/cxx/tree/parser-source.cxx541
-rw-r--r--xsd/cxx/tree/parser-source.hxx18
-rw-r--r--xsd/cxx/tree/polymorphism-processor.cxx740
-rw-r--r--xsd/cxx/tree/polymorphism-processor.hxx30
-rw-r--r--xsd/cxx/tree/serialization-header.cxx579
-rw-r--r--xsd/cxx/tree/serialization-header.hxx18
-rw-r--r--xsd/cxx/tree/serialization-source.cxx1468
-rw-r--r--xsd/cxx/tree/serialization-source.hxx18
-rw-r--r--xsd/cxx/tree/stream-extraction-source.cxx864
-rw-r--r--xsd/cxx/tree/stream-extraction-source.hxx18
-rw-r--r--xsd/cxx/tree/stream-header.cxx181
-rw-r--r--xsd/cxx/tree/stream-header.hxx18
-rw-r--r--xsd/cxx/tree/stream-insertion-header.cxx178
-rw-r--r--xsd/cxx/tree/stream-insertion-header.hxx18
-rw-r--r--xsd/cxx/tree/stream-insertion-source.cxx623
-rw-r--r--xsd/cxx/tree/stream-insertion-source.hxx18
-rw-r--r--xsd/cxx/tree/stream-source.cxx496
-rw-r--r--xsd/cxx/tree/stream-source.hxx18
-rw-r--r--xsd/cxx/tree/tree-forward.cxx325
-rw-r--r--xsd/cxx/tree/tree-forward.hxx18
-rw-r--r--xsd/cxx/tree/tree-header.cxx4299
-rw-r--r--xsd/cxx/tree/tree-header.hxx18
-rw-r--r--xsd/cxx/tree/tree-inline.cxx1161
-rw-r--r--xsd/cxx/tree/tree-inline.hxx18
-rw-r--r--xsd/cxx/tree/tree-source.cxx3900
-rw-r--r--xsd/cxx/tree/tree-source.hxx18
-rw-r--r--xsd/cxx/tree/validator.cxx671
-rw-r--r--xsd/cxx/tree/validator.hxx29
-rw-r--r--xsd/doc/.gitignore2
-rw-r--r--xsd/doc/buildfile187
-rw-r--r--xsd/doc/custom-literals.xsd (renamed from doc/custom-literals.xsd)0
-rw-r--r--xsd/doc/cxx/.gitignore2
-rw-r--r--xsd/doc/cxx/parser/guide/.gitignore2
-rw-r--r--xsd/doc/cxx/parser/guide/figure-1.png (renamed from doc/cxx/parser/guide/figure-1.png)bin34195 -> 34195 bytes
-rw-r--r--xsd/doc/cxx/parser/guide/figure-1.svg (renamed from doc/cxx/parser/guide/figure-1.svg)0
-rw-r--r--xsd/doc/cxx/parser/guide/guide.html2ps.in65
-rw-r--r--xsd/doc/cxx/parser/guide/index.xhtml.in4164
-rw-r--r--xsd/doc/cxx/tree/guide/.gitignore2
-rw-r--r--xsd/doc/cxx/tree/guide/guide.html2ps.in65
-rw-r--r--xsd/doc/cxx/tree/guide/index.xhtml.in2738
-rw-r--r--xsd/doc/cxx/tree/manual/.gitignore2
-rw-r--r--xsd/doc/cxx/tree/manual/index.xhtml.in6826
-rw-r--r--xsd/doc/cxx/tree/manual/manual.html2ps.in66
-rw-r--r--xsd/doc/default.css (renamed from doc/default.css)0
-rw-r--r--xsd/doc/xsd-epilogue.1 (renamed from doc/xsd-epilogue.1)0
-rw-r--r--xsd/doc/xsd-epilogue.xhtml (renamed from doc/xsd-epilogue.xhtml)0
-rw-r--r--xsd/doc/xsd-parser-header.1 (renamed from doc/xsd-parser-header.1)0
-rw-r--r--xsd/doc/xsd-parser-header.xhtml (renamed from doc/xsd-parser-header.xhtml)0
-rw-r--r--xsd/doc/xsd-prologue.1119
-rw-r--r--xsd/doc/xsd-prologue.xhtml123
-rw-r--r--xsd/doc/xsd-tree-header.1 (renamed from doc/xsd-tree-header.1)0
-rw-r--r--xsd/doc/xsd-tree-header.xhtml (renamed from doc/xsd-tree-header.xhtml)0
-rw-r--r--xsd/elements.hxx125
-rw-r--r--xsd/makefile190
-rw-r--r--xsd/manifest23
-rw-r--r--xsd/options-parser.hxx29
-rw-r--r--xsd/options.cli312
-rw-r--r--xsd/processing/cardinality/processor.cxx407
-rw-r--r--xsd/processing/cardinality/processor.hxx28
-rw-r--r--xsd/processing/inheritance/processor.cxx492
-rw-r--r--xsd/processing/inheritance/processor.hxx28
-rw-r--r--xsd/type-map/lexer.cxx131
-rw-r--r--xsd/type-map/lexer.hxx74
-rw-r--r--xsd/type-map/parser.cxx279
-rw-r--r--xsd/type-map/parser.hxx41
-rw-r--r--xsd/type-map/type-map.hxx178
-rw-r--r--xsd/types.hxx19
-rw-r--r--xsd/xsd.cxx1126
-rw-r--r--xsd/xsd.hxx24
-rw-r--r--xsd/xsd/.gitignore3
-rw-r--r--xsd/xsd/buildfile68
-rw-r--r--xsd/xsd/cxx/elements.cxx1322
-rw-r--r--xsd/xsd/cxx/elements.hxx626
-rw-r--r--xsd/xsd/cxx/literal-map.cxx261
-rw-r--r--xsd/xsd/cxx/literal-map.hxx19
-rw-r--r--xsd/xsd/cxx/option-types.cxx47
-rw-r--r--xsd/xsd/cxx/option-types.hxx34
-rw-r--r--xsd/xsd/cxx/options.cli550
-rw-r--r--xsd/xsd/cxx/parser/attribute-validation-source.cxx412
-rw-r--r--xsd/xsd/cxx/parser/attribute-validation-source.hxx18
-rw-r--r--xsd/xsd/cxx/parser/characters-validation-source.cxx73
-rw-r--r--xsd/xsd/cxx/parser/characters-validation-source.hxx18
-rw-r--r--xsd/xsd/cxx/parser/driver-source.cxx775
-rw-r--r--xsd/xsd/cxx/parser/driver-source.hxx18
-rw-r--r--xsd/xsd/cxx/parser/element-validation-source.cxx1600
-rw-r--r--xsd/xsd/cxx/parser/element-validation-source.hxx18
-rw-r--r--xsd/xsd/cxx/parser/elements.cxx247
-rw-r--r--xsd/xsd/cxx/parser/elements.hxx315
-rw-r--r--xsd/xsd/cxx/parser/generator.cxx1099
-rw-r--r--xsd/xsd/cxx/parser/generator.hxx45
-rw-r--r--xsd/xsd/cxx/parser/impl-header.cxx232
-rw-r--r--xsd/xsd/cxx/parser/impl-header.hxx18
-rw-r--r--xsd/xsd/cxx/parser/impl-source.cxx384
-rw-r--r--xsd/xsd/cxx/parser/impl-source.hxx18
-rw-r--r--xsd/xsd/cxx/parser/name-processor.cxx1175
-rw-r--r--xsd/xsd/cxx/parser/name-processor.hxx30
-rw-r--r--xsd/xsd/cxx/parser/options.cli147
-rw-r--r--xsd/xsd/cxx/parser/parser-forward.cxx110
-rw-r--r--xsd/xsd/cxx/parser/parser-forward.hxx18
-rw-r--r--xsd/xsd/cxx/parser/parser-header.cxx1440
-rw-r--r--xsd/xsd/cxx/parser/parser-header.hxx18
-rw-r--r--xsd/xsd/cxx/parser/parser-inline.cxx399
-rw-r--r--xsd/xsd/cxx/parser/parser-inline.hxx18
-rw-r--r--xsd/xsd/cxx/parser/parser-source.cxx957
-rw-r--r--xsd/xsd/cxx/parser/parser-source.hxx18
-rw-r--r--xsd/xsd/cxx/parser/print-impl-common.hxx641
-rw-r--r--xsd/xsd/cxx/parser/state-processor.cxx319
-rw-r--r--xsd/xsd/cxx/parser/state-processor.hxx25
-rw-r--r--xsd/xsd/cxx/parser/type-processor.cxx347
-rw-r--r--xsd/xsd/cxx/parser/type-processor.hxx31
-rw-r--r--xsd/xsd/cxx/parser/validator.cxx718
-rw-r--r--xsd/xsd/cxx/parser/validator.hxx30
-rw-r--r--xsd/xsd/cxx/tree/counter.cxx260
-rw-r--r--xsd/xsd/cxx/tree/counter.hxx25
-rw-r--r--xsd/xsd/cxx/tree/default-value.cxx1273
-rw-r--r--xsd/xsd/cxx/tree/default-value.hxx355
-rw-r--r--xsd/xsd/cxx/tree/elements.cxx1409
-rw-r--r--xsd/xsd/cxx/tree/elements.hxx2118
-rw-r--r--xsd/xsd/cxx/tree/fundamental-header.hxx1335
-rw-r--r--xsd/xsd/cxx/tree/generator.cxx1227
-rw-r--r--xsd/xsd/cxx/tree/generator.hxx44
-rw-r--r--xsd/xsd/cxx/tree/name-processor.cxx2399
-rw-r--r--xsd/xsd/cxx/tree/name-processor.hxx28
-rw-r--r--xsd/xsd/cxx/tree/options.cli479
-rw-r--r--xsd/xsd/cxx/tree/order-processor.cxx243
-rw-r--r--xsd/xsd/cxx/tree/order-processor.hxx29
-rw-r--r--xsd/xsd/cxx/tree/parser-header.cxx472
-rw-r--r--xsd/xsd/cxx/tree/parser-header.hxx19
-rw-r--r--xsd/xsd/cxx/tree/parser-source.cxx541
-rw-r--r--xsd/xsd/cxx/tree/parser-source.hxx18
-rw-r--r--xsd/xsd/cxx/tree/polymorphism-processor.cxx740
-rw-r--r--xsd/xsd/cxx/tree/polymorphism-processor.hxx30
-rw-r--r--xsd/xsd/cxx/tree/serialization-header.cxx579
-rw-r--r--xsd/xsd/cxx/tree/serialization-header.hxx18
-rw-r--r--xsd/xsd/cxx/tree/serialization-source.cxx1468
-rw-r--r--xsd/xsd/cxx/tree/serialization-source.hxx18
-rw-r--r--xsd/xsd/cxx/tree/stream-extraction-source.cxx864
-rw-r--r--xsd/xsd/cxx/tree/stream-extraction-source.hxx18
-rw-r--r--xsd/xsd/cxx/tree/stream-header.cxx181
-rw-r--r--xsd/xsd/cxx/tree/stream-header.hxx18
-rw-r--r--xsd/xsd/cxx/tree/stream-insertion-header.cxx178
-rw-r--r--xsd/xsd/cxx/tree/stream-insertion-header.hxx18
-rw-r--r--xsd/xsd/cxx/tree/stream-insertion-source.cxx623
-rw-r--r--xsd/xsd/cxx/tree/stream-insertion-source.hxx18
-rw-r--r--xsd/xsd/cxx/tree/stream-source.cxx496
-rw-r--r--xsd/xsd/cxx/tree/stream-source.hxx18
-rw-r--r--xsd/xsd/cxx/tree/tree-forward.cxx325
-rw-r--r--xsd/xsd/cxx/tree/tree-forward.hxx18
-rw-r--r--xsd/xsd/cxx/tree/tree-header.cxx4299
-rw-r--r--xsd/xsd/cxx/tree/tree-header.hxx18
-rw-r--r--xsd/xsd/cxx/tree/tree-inline.cxx1161
-rw-r--r--xsd/xsd/cxx/tree/tree-inline.hxx18
-rw-r--r--xsd/xsd/cxx/tree/tree-source.cxx3900
-rw-r--r--xsd/xsd/cxx/tree/tree-source.hxx18
-rw-r--r--xsd/xsd/cxx/tree/validator.cxx671
-rw-r--r--xsd/xsd/cxx/tree/validator.hxx29
-rw-r--r--xsd/xsd/elements.hxx125
-rw-r--r--xsd/xsd/options-parser.hxx29
-rw-r--r--xsd/xsd/options.cli315
-rw-r--r--xsd/xsd/processing/cardinality/processor.cxx407
-rw-r--r--xsd/xsd/processing/cardinality/processor.hxx28
-rw-r--r--xsd/xsd/processing/inheritance/processor.cxx492
-rw-r--r--xsd/xsd/processing/inheritance/processor.hxx28
-rw-r--r--xsd/xsd/type-map/lexer.cxx131
-rw-r--r--xsd/xsd/type-map/lexer.hxx74
-rw-r--r--xsd/xsd/type-map/parser.cxx279
-rw-r--r--xsd/xsd/type-map/parser.hxx41
-rw-r--r--xsd/xsd/type-map/type-map.hxx178
-rw-r--r--xsd/xsd/types.hxx19
-rw-r--r--xsd/xsd/version.hxx.in55
-rw-r--r--xsd/xsd/xsd.cxx1144
-rw-r--r--xsd/xsd/xsd.hxx24
1852 files changed, 90638 insertions, 160627 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1631641
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,19 @@
+# This is a good default: files that are auto-detected by git to be text are
+# converted to the platform-native line ending (LF on Unix, CRLF on Windows)
+# in the working tree and to LF in the repository.
+#
+* text=auto
+
+# Use `eol=crlf` for files that should have the CRLF line ending both in the
+# working tree (even on Unix) and in the repository.
+#
+#*.bat text eol=crlf
+
+# Use `eol=lf` for files that should have the LF line ending both in the
+# working tree (even on Windows) and in the repository.
+#
+#*.sh text eol=lf
+
+# Use `binary` to make sure certain files are never auto-detected as text.
+#
+#*.png binary
diff --git a/.gitignore b/.gitignore
index 0ac4cf2..13d880b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,25 +1 @@
-# Compiler/linker output.
-#
-*.o
-*.o.d
-*.so
-*.a
-*.l
-*.l.cpp-options
-
-# Generated documentation.
-#
-*.pdf
-*.ps
-
-# Generated build system files.
-#
-*-dynamic.make
-
-# Generated .gitignore files.
-#
-.gitignore
-
-# Convenience symlink to the XSD binary built in a separate directory.
-#
-xsd/xsd
+.bdep/
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 5926538..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,71 +0,0 @@
-Compiler Prerequisites
-
- build-time:
-
- - g++ >= 3.4.3 http://gcc.gnu.org
- - build >= 0.3.10 https://www.codesynthesis.com/projects/build/
- - cli >= 1.2.0 https://www.codesynthesis.com/projects/cli/
-
- run-time:
-
- - libxerces-c >= 3.0.0 http://xerces.apache.org/xerces-c/
- - libcutl >= 1.8.0 https://www.codesynthesis.com/projects/libcutl/
- - libxsd-frontend >= 2.0.0 https://www.codesynthesis.com/projects/libxsd-frontend/
-
-
-Generated Code Prerequisites
-
- build-time:
-
- - libxsd (header-only XSD runtime library, part of the XSD distribution)
-
- run-time:
-
- - libxerces-c >= 3.0.0 (C++/Tree and C++/Parser mappings)
- http://xerces.apache.org/xerces-c/
-
- - libexpat >= 1.95.8 (C++/Parser mapping, alternative to libxerces-c)
- http://www.libexpat.org
-
-
-Building XSD
-
- First build (and optionally install) all the prerequisites listed above.
- Alternatively, you can use the xsd+dep package that includes all the
- prerequisites (except g++ and libxerces-c) and can be built with a
- single 'make' invocation.
-
- Once the prerequisites are ready, to build the XSD compiler in source
- directory simply run 'make'. You can also build in a separate directory,
- for example:
-
- $ mkdir xsd-i686-pc-linux-gnu
- $ cd xsd-i686-pc-linux-gnu
- $ make -f ../xsd-x.y.z/makefile
-
-
-Installing XSD
-
- To install XSD, run 'make install'. Use the install_prefix command
- line variable to specify installation location (default is /usr/local),
- for example:
-
- $ make install_prefix=/usr install
-
- You can fine-tune the installation locations with the following make
- variables:
-
- install_prefix default is /usr/local
- install_data_prefix default is install_prefix
- install_exec_prefix default is install_prefix
-
- install_bin_dir default is install_exec_prefix/bin
- install_sbin_dir default is install_exec_prefix/sbin
- install_lib_dir default is install_exec_prefix/lib
-
- install_data_dir default is install_data_prefix/share
- install_inc_dir default is install_data_prefix/include
-
- install_doc_dir default is install_data_dir/doc
- install_man_dir default is install_data_dir/man
- install_info_dir default is install_data_dir/info
diff --git a/LICENSE b/LICENSE
index 7bd52e7..1a691ad 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009-2020 Code Synthesis Tools CC.
+Copyright (c) 2005-2021 Code Synthesis Tools CC.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
diff --git a/build/bootstrap.make b/build/bootstrap.make
deleted file mode 100644
index da317c3..0000000
--- a/build/bootstrap.make
+++ /dev/null
@@ -1,101 +0,0 @@
-# file : build/bootstrap.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-project_name := xsd
-
-# First try to include the bundled bootstrap.make if it exist. If that
-# fails, let make search for the external bootstrap.make.
-#
-build := build-0.3
-
--include $(dir $(lastword $(MAKEFILE_LIST)))../../$(build)/bootstrap.make
-
-ifeq ($(patsubst %build/bootstrap.make,,$(lastword $(MAKEFILE_LIST))),)
-include $(build)/bootstrap.make
-endif
-
-def_goal := $(.DEFAULT_GOAL)
-
-# Configuration
-#
-$(call include,$(scf_root)/configuration.make)
-
-# Include C++ configuration. We need to know if we are using the generic
-# C++ compiler in which case we need to compensate for missing dependency
-# auto-generation (see below).
-#
-$(call include,$(bld_root)/cxx/configuration.make)
-
-# Aliases
-#
-.PHONY: $(out_base)/ \
- $(out_base)/.test \
- $(out_base)/.install \
- $(out_base)/.dist \
- $(out_base)/.dist-win \
- $(out_base)/.dist-common \
- $(out_base)/.clean
-
-ifdef %interactive%
-
-.PHONY: test install dist dist-win clean
-
-test: $(out_base)/.test
-install: $(out_base)/.install
-dist: $(out_base)/.dist
-dist-win: $(out_base)/.dist-win
-clean: $(out_base)/.clean
-
-endif
-
-
-# Make sure the distribution prefix is set if the goal is dist or dist-win.
-#
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win),)
-ifeq ($(dist_prefix),)
-$(error dist_prefix is not set)
-endif
-endif
-
-# If we don't have dependency auto-generation then we need to manually
-# make sure that generated files are generated before C++ file are
-# compiler. To do this we make the object files ($2) depend in order-
-# only on generated files ($3).
-#
-ifeq ($(cxx_id),generic)
-
-define include-dep
-$(if $2,$(eval $2: | $3))
-endef
-
-else
-
-define include-dep
-$(call -include,$1)
-endef
-
-endif
-
-# Don't include dependency info for certain targets.
-#
-ifneq ($(filter $(MAKECMDGOALS),clean disfigure),)
-include-dep =
-endif
-
-
-# For dist, install don't include dependencies in examples, and tests
-# since we might be cross-compiling.
-#
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-
-ifneq ($(subst $(src_root)/tests/,,$(src_base)),$(src_base))
-include-dep =
-endif
-
-ifneq ($(subst $(src_root)/examples/,,$(src_base)),$(src_base))
-include-dep =
-endif
-
-endif
-
-.DEFAULT_GOAL := $(def_goal)
diff --git a/build/configuration-rules.make b/build/configuration-rules.make
deleted file mode 100644
index e5e2b08..0000000
--- a/build/configuration-rules.make
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : build/configuration-rules.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-$(dcf_root)/configuration-dynamic.make: | $(dcf_root)/.
- $(call message,,$(scf_root)/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $$1,rm -f $$1,$(dcf_root)/configuration-dynamic.make)
-
-endif
-
-ifeq ($(.DEFAULT_GOAL),$(dcf_root)/configuration-dynamic.make)
-.DEFAULT_GOAL :=
-endif
diff --git a/build/configuration.make b/build/configuration.make
deleted file mode 100644
index fe7f42d..0000000
--- a/build/configuration.make
+++ /dev/null
@@ -1,30 +0,0 @@
-# file : build/configuration.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/configuration-rules.make,$(dcf_root))
-
-# Dynamic configuration.
-#
-xsd_with_zlib :=
-xsd_with_ace :=
-xsd_with_xdr :=
-xsd_with_xqilla :=
-xsd_with_boost_date_time :=
-xsd_with_boost_serialization :=
-
-$(call -include,$(dcf_root)/configuration-dynamic.make)
-
-ifdef xsd_with_zlib
-
-$(out_root)/%: xsd_with_zlib := $(xsd_with_zlib)
-$(out_root)/%: xsd_with_ace := $(xsd_with_ace)
-$(out_root)/%: xsd_with_xdr := $(xsd_with_xdr)
-$(out_root)/%: xsd_with_xqilla := $(xsd_with_xqilla)
-$(out_root)/%: xsd_with_boost_date_time := $(xsd_with_boost_date_time)
-$(out_root)/%: xsd_with_boost_serialization := $(xsd_with_boost_serialization)
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/configure b/build/configure
deleted file mode 100755
index 7e3ac79..0000000
--- a/build/configure
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/configure
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-# $1 out file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo
-$echo "configuring '$project_name'"
-$echo
-$echo
-
-$echo
-$echo "Would you like to build optional parts of '$project_name' that require"
-$echo "the 'zlib' library?"
-$echo
-
-with_zlib=`read_y_n n`
-
-$echo
-$echo "Would you like to build optional parts of '$project_name' that require"
-$echo "the 'ACE' library?"
-$echo
-
-with_ace=`read_y_n n`
-
-$echo
-$echo "Would you like to build optional parts of '$project_name' that require"
-$echo "the 'XDR' library (part of the system in most GNU/Linux and"
-$echo "UNIX distributions)?"
-$echo
-
-with_xdr=`read_y_n n`
-
-$echo
-$echo "Would you like to build optional parts of '$project_name' that require"
-$echo "the boost 'serialization' library?"
-$echo
-
-with_boost_serialization=`read_y_n n`
-
-$echo
-$echo "Would you like to build optional parts of '$project_name' that require"
-$echo "the boost 'date_time' library?"
-$echo
-
-with_boost_date_time=`read_y_n n`
-
-$echo
-$echo "Would you like to build optional parts of '$project_name' that require"
-$echo "the XQilla library?"
-$echo
-
-with_xqilla=`read_y_n n`
-
-echo "xsd_with_zlib := $with_zlib" >$1
-echo "xsd_with_ace := $with_ace" >>$1
-echo "xsd_with_xdr := $with_xdr" >>$1
-echo "xsd_with_xqilla := $with_xqilla" >>$1
-echo "xsd_with_boost_date_time := $with_boost_date_time" >>$1
-echo "xsd_with_boost_serialization := $with_boost_serialization" >>$1
diff --git a/build/import/cli/cli-cxx.make b/build/import/cli/cli-cxx.make
deleted file mode 100644
index 9bdf238..0000000
--- a/build/import/cli/cli-cxx.make
+++ /dev/null
@@ -1,47 +0,0 @@
-# file : build/import/cli/cli-cxx.make
-# license : MIT; see accompanying LICENSE file
-
-# Here we are operating in the importing project's space, not in
-# cli's.
-#
-
-# Get the C++ file extensions.
-#
-$(call include,$(bld_root)/cxx/configuration-static.make)
-
-cli_pattern := \
-$(out_base)/%.$(cxx_s_suffix) \
-$(out_base)/%.$(cxx_h_suffix) \
-$(out_base)/%.$(cxx_i_suffix)
-
-$(cli_pattern): cli_options := \
---hxx-suffix .$(cxx_h_suffix) \
---ixx-suffix .$(cxx_i_suffix) \
---cxx-suffix .$(cxx_s_suffix)
-
-.PRECIOUS: $(cli_pattern)
-
-ifeq ($(out_base),$(src_base))
-
-$(cli_pattern): $(src_base)/%.cli
- $(call message,cli $<,$(cli) $(cli_options) --output-dir $(dir $@) $<)
-
-else
-
-$(cli_pattern): $(src_base)/%.cli | $$(dir $$@).
- $(call message,cli $<,$(cli) $(cli_options) --output-dir $(dir $@) $<)
-
-$(cli_pattern): $(out_base)/%.cli | $$(dir $$@).
- $(call message,cli $<,$(cli) $(cli_options) --output-dir $(dir $@) $<)
-endif
-
-.PHONY: $(out_base)/%.cxx.cli.clean
-
-$(out_base)/%.cxx.cli.clean: cxx_s_suffix := $(cxx_s_suffix)
-$(out_base)/%.cxx.cli.clean: cxx_h_suffix := $(cxx_h_suffix)
-$(out_base)/%.cxx.cli.clean: cxx_i_suffix := $(cxx_i_suffix)
-
-$(out_base)/%.cxx.cli.clean:
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.cli.clean=.$(cxx_s_suffix)))
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.cli.clean=.$(cxx_h_suffix)))
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.cli.clean=.$(cxx_i_suffix)))
diff --git a/build/import/cli/configuration-rules.make b/build/import/cli/configuration-rules.make
deleted file mode 100644
index 6355000..0000000
--- a/build/import/cli/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/cli/configuration-rules.make
-# license : MIT; see accompanying LICENSE file
-
-$(dcf_root)/import/cli/configuration-dynamic.make: | $(dcf_root)/import/cli/.
- $(call message,,$(scf_root)/import/cli/configure $@)
-
-ifndef %foreign%
-
-$(dcf_root)/.disfigure::
- $(call message,rm $(dcf_root)/import/cli/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/cli/configuration-dynamic.make)
-
-endif
diff --git a/build/import/cli/configure b/build/import/cli/configure
deleted file mode 100755
index 2a1fde4..0000000
--- a/build/import/cli/configure
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/cli/configure
-# license : MIT; see accompanying LICENSE file
-
-
-# $1 - out file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'cli' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed "
-$echo "version of 'cli' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-
-if [ "$installed" = "n" ]; then
-
-$echo
-$echo "Please enter the src_root for 'cli'."
-$echo
-
-src_root=`read_path --directory --exist`
-
-$echo
-$echo "Please enter the out_root for 'cli'."
-$eche
-
-out_root=`read_path --directory $src_root`
-
-fi
-
-echo cli_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
-echo src_root := $src_root >>$1
-echo scf_root := \$\(src_root\)/build >>$1
-echo out_root := $out_root >>$1
-
-fi
diff --git a/build/import/cli/stub.make b/build/import/cli/stub.make
deleted file mode 100644
index 741b371..0000000
--- a/build/import/cli/stub.make
+++ /dev/null
@@ -1,28 +0,0 @@
-# file : build/import/cli/stub.make
-# license : MIT; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/cli/configuration-rules.make,$(dcf_root))
-
-cli_installed :=
-
-$(call -include,$(dcf_root)/import/cli/configuration-dynamic.make)
-
-ifdef cli_installed
-
-ifeq ($(cli_installed),y)
-
-$(call export,cli: cli,cli-rules: $(scf_root)/import/cli/cli-cxx.make)
-
-else
-
-# Include export stub.
-#
-$(call include,$(scf_root)/export/cli/stub.make)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libace/configuration-rules.make b/build/import/libace/configuration-rules.make
deleted file mode 100644
index 380e849..0000000
--- a/build/import/libace/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libace/configuration-rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libace/configuration-dynamic.make: | $(dcf_root)/import/libace/.
- $(call message,,$(scf_root)/import/libace/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libace/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libace/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libace/configure b/build/import/libace/configure
deleted file mode 100755
index 36aec69..0000000
--- a/build/import/libace/configure
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libace/configure
-# license : GNU GPL v2; see accompanying LICENSE file
-
-
-# $1 - out config file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'ACE' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed version"
-$echo "of 'ACE' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-type=
-
-if [ "$installed" = "n" ]; then
-
- $echo
- $echo "Please enter the 'ACE' root directory (ACE_ROOT)."
- $echo
-
- root=`read_path --directory --exist`
-
- $echo
- $echo "Please select the library type you would like to use:"
- $echo
- $echo "(1) archive"
- $echo "(2) shared object"
- $echo
-
- type=`read_option "archive shared" "shared"`
-
-fi
-
-echo libace_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
- echo libace_root := $root >>$1
- echo libace_type := $type >>$1
-
-fi
diff --git a/build/import/libace/rules.make b/build/import/libace/rules.make
deleted file mode 100644
index f183051..0000000
--- a/build/import/libace/rules.make
+++ /dev/null
@@ -1,27 +0,0 @@
-# file : build/import/libace/rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libace/%: root := $(libace_root)
-
-ifeq ($(libace_type),archive)
-
-$(dcf_root)/import/libace/ace.l: $(libace_root)/lib/libACE.a
- @echo $< >$@
-else
-
-$(dcf_root)/import/libace/ace.l: $(libace_root)/lib/libACE.so
- @echo $< >$@
- @echo rpath:$(root)/lib >>$@
-endif
-
-$(dcf_root)/import/libace/ace.l.cpp-options:
- @echo include: -I$(root) >$@
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libace/ace.l,\
-rm -f $(dcf_root)/import/libace/ace.l)
- $(call message,,rm -f $(dcf_root)/import/libace/ace.l.cpp-options)
-
-endif
diff --git a/build/import/libace/stub.make b/build/import/libace/stub.make
deleted file mode 100644
index fba22d5..0000000
--- a/build/import/libace/stub.make
+++ /dev/null
@@ -1,30 +0,0 @@
-# file : build/import/libace/stub.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libace/configuration-rules.make,$(dcf_root))
-
-libace_installed :=
-
-$(call -include,$(dcf_root)/import/libace/configuration-dynamic.make)
-
-ifdef libace_installed
-
-ifeq ($(libace_installed),y)
-
-$(call export,l: -lACE,cpp-options: )
-
-else
-
-$(call include-once,$(scf_root)/import/libace/rules.make,$(dcf_root))
-
-$(call export,\
- l: $(dcf_root)/import/libace/ace.l,\
- cpp-options: $(dcf_root)/import/libace/ace.l.cpp-options)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libace/version b/build/import/libace/version
deleted file mode 100644
index 0d91a54..0000000
--- a/build/import/libace/version
+++ /dev/null
@@ -1 +0,0 @@
-0.3.0
diff --git a/build/import/libboost/configuration-rules.make b/build/import/libboost/configuration-rules.make
deleted file mode 100644
index dba014c..0000000
--- a/build/import/libboost/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libboost/configuration-rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libboost/configuration-dynamic.make: | $(dcf_root)/import/libboost/.
- $(call message,,$(scf_root)/import/libboost/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libboost/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libboost/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libboost/configure b/build/import/libboost/configure
deleted file mode 100755
index 84d03b2..0000000
--- a/build/import/libboost/configure
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libboost/configure
-# license : GNU GPL v2; see accompanying LICENSE file
-
-
-# $1 - out config file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'boost libraries' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed version"
-$echo "of 'boost libraries' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-if [ "$installed" = "n" ]; then
-
- $echo
- $echo "Please enter the 'boost' root directory."
- $echo
-
- root=`read_path --directory --exist`
-
- $echo
- $echo "Please select the library type you would like to use:"
- $echo
- $echo "(1) archive"
- $echo "(2) shared object"
- $echo
-
- type=`read_option "archive shared" "shared"`
-fi
-
-$echo
-$echo "Link explicitly to the boost system library? This library"
-$echo "is available since boost 1.35.0 and linking to it explicitly"
-$echo "may be required by newer linkers."
-$echo
-
-link_system=`read_y_n y`
-
-$echo
-$echo "Please enter optional suffix that may be embedded into the"
-$echo "boost library names. For example, if your library names are in"
-$echo "the libboost_regex-gcc41-mt-d.so form, then enter -gcc41-mt-d"
-$echo "Otherwise leave this field blank."
-$echo
-
-suffix=
-read -e -p "[]: " suffix
-
-echo libboost_installed := $installed >$1
-echo libboost_suffix := $suffix >>$1
-echo libboost_system := $link_system >>$1
-
-if [ "$installed" = "n" ]; then
-
- echo libboost_root := $root >>$1
- echo libboost_type := $type >>$1
-
-fi
diff --git a/build/import/libboost/date-time/rules.make b/build/import/libboost/date-time/rules.make
deleted file mode 100644
index abc8819..0000000
--- a/build/import/libboost/date-time/rules.make
+++ /dev/null
@@ -1,49 +0,0 @@
-# file : build/import/libboost/date-time/rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libboost/%: root := $(libboost_root)
-
-$(dcf_root)/import/libboost/date-time/date-time.l: \
- | $(dcf_root)/import/libboost/date-time/.
-
-ifeq ($(libboost_type),archive)
-
-ifeq ($(libboost_system),y)
-$(dcf_root)/import/libboost/date-time/date-time.l: \
- $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).a \
- $(libboost_root)/stage/lib/libboost_system$(libboost_suffix).a
-else
-$(dcf_root)/import/libboost/date-time/date-time.l: \
- $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).a
-endif
- @echo $^ >$@
-
-else
-
-ifeq ($(libboost_system),y)
-$(dcf_root)/import/libboost/date-time/date-time.l: \
- $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).so \
- $(libboost_root)/stage/lib/libboost_system$(libboost_suffix).so
-else
-$(dcf_root)/import/libboost/date-time/date-time.l: \
- $(libboost_root)/stage/lib/libboost_date_time$(libboost_suffix).so
-endif
- @echo $^ >$@
- @echo rpath:$(root)/stage/lib >>$@
-
-endif
-
-
-$(dcf_root)/import/libboost/date-time/date-time.l.cpp-options: \
- | $(dcf_root)/import/libboost/date-time/.
- @echo include: -I$(root) >$@
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libboost/date-time/date-time.l,\
-rm -f $(dcf_root)/import/libboost/date-time/date-time.l)
- $(call message,,\
-rm -f $(dcf_root)/import/libboost/date-time/date-time.l.cpp-options)
-
-endif
diff --git a/build/import/libboost/date-time/stub.make b/build/import/libboost/date-time/stub.make
deleted file mode 100644
index 6f3aad2..0000000
--- a/build/import/libboost/date-time/stub.make
+++ /dev/null
@@ -1,34 +0,0 @@
-# file : build/import/libboost/date-time/stub.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libboost/configuration-rules.make,$(dcf_root))
-
-libboost_installed :=
-
-$(call -include,$(dcf_root)/import/libboost/configuration-dynamic.make)
-
-ifdef libboost_installed
-
-ifeq ($(libboost_installed),y)
-
-ifeq ($(libboost_system),y)
-$(call export,l: -lboost_date_time$(libboost_suffix) -lboost_system$(libboost_suffix),cpp_options: )
-else
-$(call export,l: -lboost_date_time$(libboost_suffix),cpp_options: )
-endif
-
-else
-
-$(call include-once,$(scf_root)/import/libboost/date-time/rules.make,$(dcf_root))
-
-$(call export,\
- l: $(dcf_root)/import/libboost/date-time/date-time.l,\
- cpp-options: $(dcf_root)/import/libboost/date-time/date-time.l.cpp-options)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libboost/serialization/rules.make b/build/import/libboost/serialization/rules.make
deleted file mode 100644
index f69c8bb..0000000
--- a/build/import/libboost/serialization/rules.make
+++ /dev/null
@@ -1,48 +0,0 @@
-# file : build/import/libboost/serialization/rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libboost/%: root := $(libboost_root)
-
-$(dcf_root)/import/libboost/serialization/serialization.l: \
- | $(dcf_root)/import/libboost/serialization/.
-
-ifeq ($(libboost_type),archive)
-
-ifeq ($(libboost_system),y)
-$(dcf_root)/import/libboost/serialization/serialization.l: \
- $(libboost_root)/stage/lib/libboost_serialization$(libboost_suffix).a \
- $(libboost_root)/stage/lib/libboost_system$(libboost_suffix).a
-else
-$(dcf_root)/import/libboost/serialization/serialization.l: \
- $(libboost_root)/stage/lib/libboost_serialization$(libboost_suffix).a
-endif
- @echo $^ >$@
-
-else
-
-ifeq ($(libboost_system),y)
-$(dcf_root)/import/libboost/serialization/serialization.l: \
- $(libboost_root)/stage/lib/libboost_serialization$(libboost_suffix).so \
- $(libboost_root)/stage/lib/libboost_system$(libboost_suffix).so
-else
-$(dcf_root)/import/libboost/serialization/serialization.l: \
- $(libboost_root)/stage/lib/libboost_serialization$(libboost_suffix).so
-endif
- @echo $^ >$@
- @echo rpath:$(root)/stage/lib >>$@
-
-endif
-
-
-$(dcf_root)/import/libboost/serialization/serialization.l.cpp-options: \
- | $(dcf_root)/import/libboost/serialization/.
- @echo include: -I$(root) >$@
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libboost/serialization/serialization.l,\
-rm -f $(dcf_root)/import/libboost/serialization/serialization.l)
- $(call message,,rm -f $(dcf_root)/import/libboost/serialization/serialization.l.cpp-options)
-
-endif
diff --git a/build/import/libboost/serialization/stub.make b/build/import/libboost/serialization/stub.make
deleted file mode 100644
index abb992a..0000000
--- a/build/import/libboost/serialization/stub.make
+++ /dev/null
@@ -1,34 +0,0 @@
-# file : build/import/libboost/serialization/stub.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libboost/configuration-rules.make,$(dcf_root))
-
-libboost_installed :=
-
-$(call -include,$(dcf_root)/import/libboost/configuration-dynamic.make)
-
-ifdef libboost_installed
-
-ifeq ($(libboost_installed),y)
-
-ifeq ($(libboost_system),y)
-$(call export,l: -lboost_serialization$(libboost_suffix) -lboost_system$(libboost_suffix),cpp_options: )
-else
-$(call export,l: -lboost_serialization$(libboost_suffix),cpp_options: )
-endif
-
-else
-
-$(call include-once,$(scf_root)/import/libboost/serialization/rules.make,$(dcf_root))
-
-$(call export,\
- l: $(dcf_root)/import/libboost/serialization/serialization.l,\
- cpp-options: $(dcf_root)/import/libboost/serialization/serialization.l.cpp-options)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libboost/version b/build/import/libboost/version
deleted file mode 100644
index faef31a..0000000
--- a/build/import/libboost/version
+++ /dev/null
@@ -1 +0,0 @@
-0.7.0
diff --git a/build/import/libcutl/configuration-rules.make b/build/import/libcutl/configuration-rules.make
deleted file mode 100644
index 4559510..0000000
--- a/build/import/libcutl/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libcutl/configuration-rules.make
-# license : MIT; see accompanying LICENSE file
-
-$(dcf_root)/import/libcutl/configuration-dynamic.make: | $(dcf_root)/import/libcutl/.
- $(call message,,$(scf_root)/import/libcutl/configure $@)
-
-ifndef %foreign%
-
-$(dcf_root)/.disfigure::
- $(call message,rm $(dcf_root)/import/libcutl/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libcutl/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libcutl/configure b/build/import/libcutl/configure
deleted file mode 100755
index 5c182e2..0000000
--- a/build/import/libcutl/configure
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libcutl/configure
-# license : MIT; see accompanying LICENSE file
-
-
-# $1 - out file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'libcutl' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed "
-$echo "version of 'libcutl' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-
-if [ "$installed" = "n" ]; then
-
-$echo
-$echo "Please enter the src_root for 'libcutl'."
-$echo
-
-src_root=`read_path --directory --exist`
-
-$echo
-$echo "Please enter the out_root for 'libcutl'."
-$echo
-
-out_root=`read_path --directory $src_root`
-
-fi
-
-echo libcutl_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
-echo src_root := $src_root >>$1
-echo scf_root := \$\(src_root\)/build >>$1
-echo out_root := $out_root >>$1
-
-fi
diff --git a/build/import/libcutl/stub.make b/build/import/libcutl/stub.make
deleted file mode 100644
index 11876f2..0000000
--- a/build/import/libcutl/stub.make
+++ /dev/null
@@ -1,28 +0,0 @@
-# file : build/import/libcutl/stub.make
-# license : MIT; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libcutl/configuration-rules.make,$(dcf_root))
-
-libcutl_installed :=
-
-$(call -include,$(dcf_root)/import/libcutl/configuration-dynamic.make)
-
-ifdef libcutl_installed
-
-ifeq ($(libcutl_installed),y)
-
-$(call export,l: -lcutl,cpp-options: )
-
-else
-
-# Include export stub.
-#
-$(call include,$(scf_root)/export/libcutl/stub.make)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libxerces-c/configuration-rules.make b/build/import/libxerces-c/configuration-rules.make
deleted file mode 100644
index bda0a59..0000000
--- a/build/import/libxerces-c/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libxerces-c/configuration-rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libxerces-c/configuration-dynamic.make: | $(dcf_root)/import/libxerces-c/.
- $(call message,,$(scf_root)/import/libxerces-c/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libxerces-c/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libxerces-c/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libxerces-c/configure b/build/import/libxerces-c/configure
deleted file mode 100755
index 3db09e5..0000000
--- a/build/import/libxerces-c/configure
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libxerces-c/configure
-# license : GNU GPL v2; see accompanying LICENSE file
-
-
-# $1 - out config file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'libxerces-c' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed version"
-$echo "of 'libxerces-c' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-type=
-
-if [ "$installed" = "n" ]; then
-
- version=
-
- while [ -z "$version" ]; do
-
- $echo
- $echo "Please enter the 'libxerces-c' root directory."
- $echo
-
- root=`read_path --directory --exist`
-
- version=`sed -e 's/^VER=\([^_]*\)_\([^_]*\)_\([^_]*\)[ ]*$/\1.\2.\3/' \
--e t -e d $root/version.incl 2>/dev/null`
-
- if [ $? != 0 -o -z "$version" ]; then
-
- version=
- echo "Unable to read version information from $root/version.incl"
- fi
- done
-
- $echo
- $echo "Please select the library type you would like to use:"
- $echo
- $echo "(1) archive"
- $echo "(2) shared object"
- $echo
-
- type=`read_option "archive shared" "shared"`
-
-fi
-
-echo libxerces_c_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
- echo libxerces_c_root := $root >>$1
- echo libxerces_c_type := $type >>$1
- echo libxerces_c_version := $version >>$1
-
-fi
diff --git a/build/import/libxerces-c/rules.make b/build/import/libxerces-c/rules.make
deleted file mode 100644
index b094d22..0000000
--- a/build/import/libxerces-c/rules.make
+++ /dev/null
@@ -1,50 +0,0 @@
-# file : build/import/libxerces-c/rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libxerces-c/%: root := $(libxerces_c_root)
-
-ifneq ($(filter 3.%,$(libxerces_c_version)),)
-
-# 3.x.y
-#
-ifeq ($(libxerces_c_type),archive)
-
-$(dcf_root)/import/libxerces-c/xerces-c.l: $(libxerces_c_root)/src/.libs/libxerces-c.a
- @echo $< >$@
-else
-
-$(dcf_root)/import/libxerces-c/xerces-c.l: $(libxerces_c_root)/src/.libs/libxerces-c.so
- @echo $< >$@
- @echo rpath:$(root)/src/.libs >>$@
-endif
-
-$(dcf_root)/import/libxerces-c/xerces-c.l.cpp-options:
- @echo include: -I$(root)/src >$@
-else
-
-# 2.x.y
-#
-ifeq ($(libxerces_c_type),archive)
-
-$(dcf_root)/import/libxerces-c/xerces-c.l: $(libxerces_c_root)/lib/libxerces-c.a
- @echo $< >$@
-else
-
-$(dcf_root)/import/libxerces-c/xerces-c.l: $(libxerces_c_root)/lib/libxerces-c.so
- @echo $< >$@
- @echo rpath:$(root)/lib >>$@
-endif
-
-$(dcf_root)/import/libxerces-c/xerces-c.l.cpp-options:
- @echo include: -I$(root)/include >$@
-endif
-
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libxerces-c/xerces-c.l,\
-rm -f $(dcf_root)/import/libxerces-c/xerces-c.l)
- $(call message,,rm -f $(dcf_root)/import/libxerces-c/xerces-c.l.cpp-options)
-
-endif
diff --git a/build/import/libxerces-c/stub.make b/build/import/libxerces-c/stub.make
deleted file mode 100644
index f5bb440..0000000
--- a/build/import/libxerces-c/stub.make
+++ /dev/null
@@ -1,30 +0,0 @@
-# file : build/import/libxerces-c/stub.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libxerces-c/configuration-rules.make,$(dcf_root))
-
-libxerces_c_installed :=
-
-$(call -include,$(dcf_root)/import/libxerces-c/configuration-dynamic.make)
-
-ifdef libxerces_c_installed
-
-ifeq ($(libxerces_c_installed),y)
-
-$(call export,l: -lxerces-c,cpp-options: )
-
-else
-
-$(call include-once,$(scf_root)/import/libxerces-c/rules.make,$(dcf_root))
-
-$(call export,\
- l: $(dcf_root)/import/libxerces-c/xerces-c.l,\
- cpp-options: $(dcf_root)/import/libxerces-c/xerces-c.l.cpp-options)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libxerces-c/version b/build/import/libxerces-c/version
deleted file mode 100644
index a918a2a..0000000
--- a/build/import/libxerces-c/version
+++ /dev/null
@@ -1 +0,0 @@
-0.6.0
diff --git a/build/import/libxqilla/configuration-rules.make b/build/import/libxqilla/configuration-rules.make
deleted file mode 100644
index c0e636e..0000000
--- a/build/import/libxqilla/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libxqilla/configuration-rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libxqilla/configuration-dynamic.make: | $(dcf_root)/import/libxqilla/.
- $(call message,,$(scf_root)/import/libxqilla/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libxqilla/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libxqilla/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libxqilla/configure b/build/import/libxqilla/configure
deleted file mode 100755
index 5d21907..0000000
--- a/build/import/libxqilla/configure
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libxqilla/configure
-# license : GNU GPL v2; see accompanying LICENSE file
-
-
-# $1 - out config file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'libxqilla' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed version"
-$echo "of 'libxqilla' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-type=
-
-if [ "$installed" = "n" ]; then
-
- $echo
- $echo "Please enter the 'libxqilla' root directory."
- $echo
-
- root=`read_path --directory --exist`
-
- $echo
- $echo "Please select the library type you would like to use:"
- $echo
- $echo "(1) archive"
- $echo "(2) shared object"
- $echo
-
- type=`read_option "archive shared" "shared"`
-fi
-
-echo libxqilla_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
- echo libxqilla_root := $root >>$1
- echo libxqilla_type := $type >>$1
-
-fi
diff --git a/build/import/libxqilla/rules.make b/build/import/libxqilla/rules.make
deleted file mode 100644
index d8a2c7a..0000000
--- a/build/import/libxqilla/rules.make
+++ /dev/null
@@ -1,28 +0,0 @@
-# file : build/import/libxqilla/rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libxqilla/%: root := $(libxqilla_root)
-
-ifeq ($(libxqilla_type),archive)
-
-$(dcf_root)/import/libxqilla/xqilla.l: $(libxqilla_root)/.libs/libxqilla.a
- @echo $< >$@
-else
-
-$(dcf_root)/import/libxqilla/xqilla.l: $(libxqilla_root)/.libs/libxqilla.so
- @echo $< >$@
- @echo rpath:$(root)/.libs >>$@
-endif
-
-$(dcf_root)/import/libxqilla/xqilla.l.cpp-options:
- @echo include: -I$(root)/include >$@
-
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libxqilla/xqilla.l,\
-rm -f $(dcf_root)/import/libxqilla/xqilla.l)
- $(call message,,rm -f $(dcf_root)/import/libxqilla/xqilla.l.cpp-options)
-
-endif
diff --git a/build/import/libxqilla/stub.make b/build/import/libxqilla/stub.make
deleted file mode 100644
index caccf97..0000000
--- a/build/import/libxqilla/stub.make
+++ /dev/null
@@ -1,30 +0,0 @@
-# file : build/import/libxqilla/stub.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libxqilla/configuration-rules.make,$(dcf_root))
-
-libxqilla_installed :=
-
-$(call -include,$(dcf_root)/import/libxqilla/configuration-dynamic.make)
-
-ifdef libxqilla_installed
-
-ifeq ($(libxqilla_installed),y)
-
-$(call export,l: -lxqilla,cpp-options: )
-
-else
-
-$(call include-once,$(scf_root)/import/libxqilla/rules.make,$(dcf_root))
-
-$(call export,\
- l: $(dcf_root)/import/libxqilla/xqilla.l,\
- cpp-options: $(dcf_root)/import/libxqilla/xqilla.l.cpp-options)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libxqilla/version b/build/import/libxqilla/version
deleted file mode 100644
index 6e8bf73..0000000
--- a/build/import/libxqilla/version
+++ /dev/null
@@ -1 +0,0 @@
-0.1.0
diff --git a/build/import/libxsd-frontend/configuration-rules.make b/build/import/libxsd-frontend/configuration-rules.make
deleted file mode 100644
index b0b16e5..0000000
--- a/build/import/libxsd-frontend/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libxsd-frontend/configuration-rules.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-$(dcf_root)/import/libxsd-frontend/configuration-dynamic.make: | $(dcf_root)/import/libxsd-frontend/.
- $(call message,,$(scf_root)/import/libxsd-frontend/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libxsd-frontend/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libxsd-frontend/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libxsd-frontend/configure b/build/import/libxsd-frontend/configure
deleted file mode 100755
index 1908830..0000000
--- a/build/import/libxsd-frontend/configure
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libxsd-frontend/configure
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-
-# $1 - out file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'libxsd-frontend' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed "
-$echo "version of 'libxsd-frontend' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-
-if [ "$installed" = "n" ]; then
-
-$echo
-$echo "Please enter the src_root for 'libxsd-frontend'."
-$echo
-
-src_root=`read_path --directory --exist`
-
-$echo
-$echo "Please enter the out_root for 'libxsd-frontend'."
-$echo
-
-out_root=`read_path --directory $src_root`
-
-fi
-
-echo libxsd_frontend_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
-echo src_root := $src_root >>$1
-echo scf_root := \$\(src_root\)/build >>$1
-echo out_root := $out_root >>$1
-
-fi
diff --git a/build/import/libxsd-frontend/stub.make b/build/import/libxsd-frontend/stub.make
deleted file mode 100644
index 9bf00e5..0000000
--- a/build/import/libxsd-frontend/stub.make
+++ /dev/null
@@ -1,28 +0,0 @@
-# file : build/import/libxsd-frontend/stub.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libxsd-frontend/configuration-rules.make,$(dcf_root))
-
-libxsd_frontend_installed :=
-
-$(call -include,$(dcf_root)/import/libxsd-frontend/configuration-dynamic.make)
-
-ifdef libxsd_frontend_installed
-
-ifeq ($(libxsd_frontend_installed),y)
-
-$(call export,l: -lxsd-frontend -lcutl -lxerces-c,cpp_options: )
-
-else
-
-# Include export stub.
-#
-$(call include,$(scf_root)/export/libxsd-frontend/stub.make)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libz/configuration-rules.make b/build/import/libz/configuration-rules.make
deleted file mode 100644
index deabba0..0000000
--- a/build/import/libz/configuration-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : build/import/libz/configuration-rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libz/configuration-dynamic.make: | $(dcf_root)/import/libz/.
- $(call message,,$(scf_root)/import/libz/configure $@)
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libz/configuration-dynamic.make,\
-rm -f $(dcf_root)/import/libz/configuration-dynamic.make)
-
-endif
diff --git a/build/import/libz/configure b/build/import/libz/configure
deleted file mode 100755
index a36fca3..0000000
--- a/build/import/libz/configure
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /usr/bin/env bash
-
-# file : build/import/libz/configure
-# license : GNU GPL v2; see accompanying LICENSE file
-
-
-# $1 - out config file
-#
-# bld_root - build root
-# project_name - project name
-#
-
-source $bld_root/dialog.bash
-
-
-$echo
-$echo "Configuring external dependency on 'zlib' for '$project_name'."
-$echo
-
-$echo
-$echo "Would you like to configure dependency on the installed version"
-$echo "of 'zlib' as opposed to the development build?"
-$echo
-
-installed=`read_y_n y`
-
-path=
-type=
-
-if [ "$installed" = "n" ]; then
-
- $echo
- $echo "Please enter the 'zlib' root directory."
- $echo
-
- root=`read_path --directory --exist`
-
- $echo
- $echo "Please select the library type you would like to use:"
- $echo
- $echo "(1) archive"
- $echo "(2) shared object"
- $echo
-
- type=`read_option "archive shared" "shared"`
-
-fi
-
-echo libz_installed := $installed >$1
-
-if [ "$installed" = "n" ]; then
-
- echo libz_root := $root >>$1
- echo libz_type := $type >>$1
-
-fi
diff --git a/build/import/libz/rules.make b/build/import/libz/rules.make
deleted file mode 100644
index 5720a5e..0000000
--- a/build/import/libz/rules.make
+++ /dev/null
@@ -1,27 +0,0 @@
-# file : build/import/libz/rules.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(dcf_root)/import/libz/%: root := $(libz_root)
-
-ifeq ($(libz_type),archive)
-
-$(dcf_root)/import/libz/z.l: $(libz_root)/libz.a
- @echo $< >$@
-else
-
-$(dcf_root)/import/libz/z.l: $(libz_root)/libz.so
- @echo $< >$@
- @echo rpath:$(root) >>$@
-endif
-
-$(dcf_root)/import/libz/z.l.cpp-options:
- @echo include: -I$(root) >$@
-
-ifndef %foreign%
-
-disfigure::
- $(call message,rm $(dcf_root)/import/libz/z.l,\
-rm -f $(dcf_root)/import/libz/z.l)
- $(call message,,rm -f $(dcf_root)/import/libz/z.l.cpp-options)
-
-endif
diff --git a/build/import/libz/stub.make b/build/import/libz/stub.make
deleted file mode 100644
index a50f288..0000000
--- a/build/import/libz/stub.make
+++ /dev/null
@@ -1,30 +0,0 @@
-# file : build/import/libz/stub.make
-# license : GNU GPL v2; see accompanying LICENSE file
-
-$(call include-once,$(scf_root)/import/libz/configuration-rules.make,$(dcf_root))
-
-libz_installed :=
-
-$(call -include,$(dcf_root)/import/libz/configuration-dynamic.make)
-
-ifdef libz_installed
-
-ifeq ($(libz_installed),y)
-
-$(call export,l: -lz,cpp-options: )
-
-else
-
-$(call include-once,$(scf_root)/import/libz/rules.make,$(dcf_root))
-
-$(call export,\
- l: $(dcf_root)/import/libz/z.l,\
- cpp-options: $(dcf_root)/import/libz/z.l.cpp-options)
-
-endif
-
-else
-
-.NOTPARALLEL:
-
-endif
diff --git a/build/import/libz/version b/build/import/libz/version
deleted file mode 100644
index 6e8bf73..0000000
--- a/build/import/libz/version
+++ /dev/null
@@ -1 +0,0 @@
-0.1.0
diff --git a/build/xsd/parser/xsd-cxx.make b/build/xsd/parser/xsd-cxx.make
deleted file mode 100644
index 62a4826..0000000
--- a/build/xsd/parser/xsd-cxx.make
+++ /dev/null
@@ -1,75 +0,0 @@
-# file : build/xsd/parser/xsd-cxx.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#@@ Need to use extensions from cxx config.
-#
-
-# C++/Parser mapping.
-#
-ifeq ($(xsd_parser_skel_suffix),)
-xsd_parser_skel_suffix := -pskel
-endif
-
-xsd_parser_pattern := \
-$(out_base)/%$(xsd_parser_skel_suffix).cxx \
-$(out_base)/%$(xsd_parser_skel_suffix).hxx \
-$(out_base)/%$(xsd_parser_skel_suffix).ixx
-
-ifneq ($(xsd_parser_impl_suffix),)
-xsd_parser_pattern += \
-$(out_base)/%$(xsd_parser_impl_suffix).cxx \
-$(out_base)/%$(xsd_parser_impl_suffix).hxx \
-$(out_base)/%-driver.cxx
-endif
-
-
-$(xsd_parser_pattern): xsd := xsd
-$(xsd_parser_pattern): xsd_command := cxx-parser
-
-ops := --generate-inline --skel-file-suffix $(xsd_parser_skel_suffix)
-
-ifneq ($(xsd_pimpl_suffix),)
-ops += --impl-file-suffix $(xsd_parser_impl_suffix)
-endif
-
-$(xsd_parser_pattern): xsd_options := $(ops)
-
-
-.PRECIOUS: $(xsd_parser_pattern)
-
-ifeq ($(out_base),$(src_base))
-
-$(xsd_parser_pattern): $(src_base)/%.xsd
- $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-
-else
-
-$(xsd_parser_pattern): $(src_base)/%.xsd | $$(dir $$@).
- $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-
-$(xsd_parser_pattern): $(out_base)/%.xsd | $$(dir $$@).
- $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-
-endif
-
-
-.PHONY: $(out_base)/%$(xsd_parser_skel_suffix).cxx.xsd.clean
-
-$(out_base)/%$(xsd_parser_skel_suffix).cxx.xsd.clean:
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.xsd.clean=.cxx))
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.xsd.clean=.hxx))
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.xsd.clean=.ixx))
-
-ifneq ($(xsd_parser_impl_suffix),)
-.PHONY: $(out_base)/%$(xsd_parser_impl_suffix).cxx.xsd.clean
-
-$(out_base)/%$(xsd_parser_impl_suffix).cxx.xsd.clean:
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.xsd.clean=.cxx))
- $(call message,rm $$1,rm -f $$1,$(@:.cxx.xsd.clean=.hxx))
- $(call message,rm $$1,rm -f $$1,$(out_base)/$*-driver.cxx)
-endif
-
-# Reset the config variables so they won't take effect in other places.
-#
-xsd_parser_skel_suffix :=
-xsd_parser_impl_suffix :=
diff --git a/build/xsd/tree/xsd-cxx.make b/build/xsd/tree/xsd-cxx.make
deleted file mode 100644
index 3ca45d1..0000000
--- a/build/xsd/tree/xsd-cxx.make
+++ /dev/null
@@ -1,46 +0,0 @@
-# file : build/xsd/tree/xsd-cxx.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#@@ Need to use extensions from cxx config.
-#
-
-# C++/Tree mapping.
-#
-xsd_tree_pattern := \
-$(out_base)/%$(xsd_tree_suffix).cxx \
-$(out_base)/%$(xsd_tree_suffix).hxx \
-$(out_base)/%$(xsd_tree_suffix).ixx \
-$(out_base)/%$(xsd_tree_suffix)-fwd.hxx
-
-$(xsd_tree_pattern): xsd := xsd
-$(xsd_tree_pattern): xsd_command := cxx-tree
-$(xsd_tree_pattern): xsd_options := --generate-inline
-
-.PRECIOUS: $(xsd_tree_pattern)
-
-ifeq ($(out_base),$(src_base))
-
-$(xsd_tree_pattern): $(src_base)/%.xsd
- $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-
-else
-
-$(xsd_tree_pattern): $(src_base)/%.xsd | $$(dir $$@).
- $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-
-$(xsd_tree_pattern): $(out_base)/%.xsd | $$(dir $$@).
- $(call message,xsd $<,$(xsd) $(xsd_command) $(xsd_options) --output-dir $(dir $@) $<)
-
-endif
-
-.PHONY: $(out_base)/%$(xsd_tree_suffix).cxx.xsd.clean
-
-$(out_base)/%$(xsd_tree_suffix).cxx.xsd.clean:
- $(call message,rm $(@:.cxx.xsd.clean=.cxx),rm -f $(@:.cxx.xsd.clean=.cxx))
- $(call message,rm $(@:.cxx.xsd.clean=.hxx),rm -f $(@:.cxx.xsd.clean=.hxx))
- $(call message,rm $(@:.cxx.xsd.clean=.ixx),rm -f $(@:.cxx.xsd.clean=.ixx))
- $(call message,rm $(@:.cxx.xsd.clean=-fwd.hxx),rm -f $(@:.cxx.xsd.clean=-fwd.hxx))
-
-# Reset the config variables so they won't take effect in other places.
-#
-xsd_tree_suffix :=
diff --git a/buildfile b/buildfile
new file mode 100644
index 0000000..856a678
--- /dev/null
+++ b/buildfile
@@ -0,0 +1,7 @@
+# file : buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Glue buildfile that "pulls" all the packages.
+
+import pkgs = */
+./: $pkgs
diff --git a/dist/README-UNIX b/dist/README-UNIX
deleted file mode 100644
index 9632744..0000000
--- a/dist/README-UNIX
+++ /dev/null
@@ -1,82 +0,0 @@
-This package contains precompiled binaries of CodeSynthesis XSD, a
-W3C XML Schema to C++ Data Binding compiler. For more information
-about XSD visit
-
-https://www.codesynthesis.com/products/xsd/
-
-This README file describes how to start using XSD in UNIX or
-UNIX-like (for example, Cygwin/Mingw) environments.
-
-
-Prerequisites
--------------
-
-The XSD runtime library and the generated code depend on the underlying
-XML parser which can be Xerces-C++ for the C++/Tree mapping and Xerces-C++
-or Expat for the C++/Parser mapping.
-
-Xerces-C++ can be obtained from http://xerces.apache.org/xerces-c/. Most
-GNU/Linux distributions provide precompiled binary packages for Xerces-C++.
-You can also download precompiled Xerces-C++ libraries for a wide range of
-platforms and compilers from http://xerces.apache.org/xerces-c/download.cgi
-
-Expat can be obtained from http://www.libexpat.org/. Most GNU/Linux
-distributions provide precompiled binary packages for Expat.
-
-
-Building Examples
------------------
-
-To build examples you will need GNU make. All examples in the examples/
-directory come with simple makefiles. For instance, to build a hello
-example in examples/cxx/tree you could execute the following commands:
-
-$ cd examples/cxx/tree/hello
-$ make
-
-The following make variables affect the compilation process and can
-be overridden from the command line:
-
-CXX - C++ compiler, by default 'g++'
-CXXFLAGS - C++ options
-CPPFLAGS - C/C++ Preprocessor options
-
-LIBS - Libraries to link with, by default '-lxerces-c' for the
- C++/Tree examples and either '-lxerces-c' or '-lexpat' for
- the C++/Parser examples, depending on XML_PARSER
-LDFLAGS - Linker options
-
-XSD - XSD compiler, by default path to the XSD binary
-XSDFLAGS - XSD options
-
-WITH_ZLIB - Set this variable to 1 if you would like to build examples
- that depend on the zlib library
-
-WITH_ACE - Set this variable to 1 if you would like to build examples
- that depend on the ACE library
-
-WITH_XDR - Set this variable to 1 if you would like to build examples
- that depend on the XDR API (available out of the box on
- most GNU/Linux and UNIX systems)
-
-WITH_BOOST - Set this variable to 1 if you would like to build examples
- that depend on the Boost date_time and serialization
- libraries
-
-WITH_XQILLA - Set this variable to 1 if you would like to build examples
- that depend on the XQilla library (XPath 2)
-
-Additionally, makefiles for the C++/Parser examples (examples/cxx/parser/)
-allow you to choose the underlying XML parser:
-
-XML_PARSER - Underlying XML parser, can be 'xerces' (default) or 'expat'
-
-
-For instance, if you would like to build an example using g++-4.0 instead
-of the default g++ and would like to use Xerces-C++ from ~/xerces-c instead
-of the default, system-wide installation, you could execute the following
-command:
-
-$ make CXX=g++-4.0 \
- CPPFLAGS="-I ~/xerces-c/include" \
- LDFLAGS="-L ~/xerces-c/lib"
diff --git a/dist/README-WINDOWS b/dist/README-WINDOWS
deleted file mode 100644
index da44e79..0000000
--- a/dist/README-WINDOWS
+++ /dev/null
@@ -1,192 +0,0 @@
-This package contains precompiled binaries of CodeSynthesis XSD, a
-W3C XML Schema to C++ Data Binding compiler, built for Microsoft
-Windows. For more information about XSD visit
-
-https://www.codesynthesis.com/products/xsd/
-
-This README file describes how to start using XSD in the Microsoft
-Windows environment with Visual Studio 2005 (8.0), Visual Studio 2008
-(9.0), and Visual Studio 2010 (10.0), Visual Studio 2012 (11.0), and
-Visual Studio 2013 (12.0).
-
-
-Prerequisites
--------------
-
-The XSD runtime library and the generated code depend on the Xerces-C++
-XML parser which you can obtain from http://xerces.apache.org/xerces-c/.
-You can also download precompiled Xerces-C++ libraries for Windows from:
-
-http://xerces.apache.org/xerces-c/download.cgi
-
-Note that the above download page may not contain Xerces-C++ libraries
-for the latest Visual Studio releases. The Windows Installer package
-(.msi) for XSD contains Xerces-C++ libraries for all of the above-
-mentioned Visual Studio versions.
-
-
-Environment
------------
-
-Before you can start building examples or your applications that use XSD
-you need to set include, library and executable search paths in the Visual
-Studio IDE and the System Environment.
-
-1. Setting up Xerces-C++
-
- First you need to set up Xerces-C++ include and library search paths.
- If you already have Xerces-C++ set up in your development environment,
- you can skip to the next step. Here we assume that your Xerces-C++ path
- is C:\projects\xerces-c-x.y.z. If you have Xerces-C++ in a different
- place, you will need to adjust the paths below accordingly.
-
-
- a) For Visual Studio 2005 (8.0) and Visual Studio 2008 (9.0):
-
- In the Visual Studio IDE, select "Tools"/"Options"/"Projects and
- Solution"/"VC++ Directories".
-
- Then, in the "Show directories for" field, select "Include files" and
- create a new entry with the value "C:\projects\xerces-c-x.y.z\include".
-
- After that, in the "Show directories for" field, select "Library files"
- and create a new entry with the value "C:\projects\xerces-c-x.y.z\lib".
-
- After that, in the "Show directories for" field, select "Executable files"
- and create a new entry with the value "C:\projects\xerces-c-x.y.z\bin".
-
- If you are building the 64-bit version of your application, repeat the
- above steps for the 64-bit version of Xerces-C++ while selecting x64
- in the "Platform" drop-down list in the VC++ Directories dialog (Visual
- Studio keeps a separate set of paths for each platform).
-
- For Visual Studio 2010-2013 (10.0-12.0):
-
- 1. Open an existing or create a new C++ project (you can open one of
- the example solutions that come with XSD).
-
- 2. Open the Property Manager view by selecting "View"->"Property
- Manager" (or "View"->"Other Windows"->"Property Manager") menu
- action.
-
- 3. Expand the property hierarchy for the project and find the
- Microsoft.Cpp.Win32.user property sheet.
-
- 4. Right click on Microsoft.Cpp.Win32.user and select the "Properties"
- menu action.
-
- 5. Select the VC++ Directories tab.
-
- 6. Add the "C:\projects\xerces-c-x.y.z\include" path to the "Include
- Directories" field (the paths are separated by a semicolon).
-
- 7. Add the "C:\projects\xerces-c-x.y.z\lib" path to the "Library
- Directories" field.
-
- 8. Add the "C:\projects\xerces-c-x.y.z\bin" path to the "Executable
- Directories" field.
-
- 9. Click Ok to close the dialog and then click the Save button at the
- top of the Property Manager view to save Microsoft.Cpp.Win32.user.
-
- If you are building the 64-bit version of your application, repeat
- the above steps for the 64-bit version of Xerces-C++ but using the
- Microsoft.Cpp.x64.user property sheet (Visual Studio keeps a separate
- set of paths for each platform).
-
-
- b) In the Control Panel, choose "System" and select the "Advanced" tab.
- Click on the "Environment Variables" button. In the "System Variables"
- list, select "Path" and add (via "Edit" button) the
- ";C:\projects\xerces-c-x.y.z\bin" path at the end.
-
-
-2. Setting up XSD
-
- Now you need to set up XSD executable and include search paths. Here we
- assume that your XSD path is C:\projects\xsd-x.y.z. If you have XSD in
- a different place, you will need to adjust the paths below accordingly.
-
- For Visual Studio 2005 (8.0) and Visual Studio 2008 (9.0):
-
- In the Visual Studio IDE, select "Tools"/"Options"/"Projects and
- Solution"/"VC++ Directories".
-
- Then, in the "Show directories for" field, select "Include files" and
- create a new entry with the value "C:\projects\xsd-x.y.z\libxsd".
-
- After that, in the "Show directories for" field, select "Executable
- files" and create a new entry with the value "C:\projects\xsd-x.y.z\bin".
- Make sure it is the first line in the list of directories (use the
- "Up" button to move the new entry up, if necessary).
-
- If you are building the 64-bit version of your application, repeat the
- above steps using the same paths while selecting x64 in the "Platform"
- drop-down list in the VC++ Directories dialog (Visual Studio keeps a
- separate set of paths for each platform).
-
- For Visual Studio 2010 (10.0):
-
- 1. Open an existing or create a new C++ project (you can open one of
- the example solutions that come with XSD).
-
- 2. Open the Property Manager view by selecting "View"->"Property
- Manager" (or "View"->"Other Windows"->"Property Manager") menu
- action.
-
- 3. Expand the property hierarchy for the project and find the
- Microsoft.Cpp.Win32.user property sheet.
-
- 4. Right click on Microsoft.Cpp.Win32.user and select the "Properties"
- menu action.
-
- 5. Select the VC++ Directories tab.
-
- 6. Add the "C:\projects\xsd-x.y.z\libxsd" path to the "Include
- Directories" field (the paths are separated by a semicolon).
-
- 7. Add the "C:\projects\xsd-x.y.z\bin" path to the "Executable
- Directories" field and make sure it is the first path in the
- the list of directories.
-
- 8. Click Ok to close the dialog and then click the Save button at the
- top of the Property Manager view to save Microsoft.Cpp.Win32.user.
-
- If you are building the 64-bit version of your application, repeat the
- above steps using the same paths but using the Microsoft.Cpp.x64.user
- property sheet (Visual Studio keeps a separate set of paths for each
- platform).
-
-
-3. Restart the Visual Studio IDE.
-
-
-Building Examples
------------------
-
-Now you are ready to build examples. Simply open the solution file
-found in the examples\cxx\tree (C++/Tree mapping examples) or
-examples\cxx\parser (C++/Parser examples) directories.
-
-Some of the examples depend on additional third-party libraries or
-show a specific feature of XSD and are not included in the solutions
-above. They come with their individual solution files:
-
-examples/cxx/tree/embedded - example of schema embedding
-examples/cxx/tree/custom - examples of type customization
-examples/cxx/tree/custom/calendar - depends on the Boost date_time library
-examples/cxx/tree/compression - depends on the zlib library
-examples/cxx/tree/binary/boost - depends on the Boost serialization library
-examples/cxx/tree/binary/cdr - depends on the ACE library
-examples/cxx/tree/binary/xdr - requires a third-party XDR library
-examples/cxx/tree/xpath - depends on the XQilla library (XPath 2)
-
-
-Using XSD in Your Projects
---------------------------
-
-For various ways to integrate the XSD compiler with the Visual Studio IDE
-as well as other Visual Studio-specific topics, refer to the Using XSD with
-Microsoft Visual Studio Wiki page:
-
-http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio
diff --git a/dist/etc/vc-1x.0/xsd-cxx-parser.props b/dist/etc/vc-1x.0/xsd-cxx-parser.props
deleted file mode 100644
index b167a38..0000000
--- a/dist/etc/vc-1x.0/xsd-cxx-parser.props
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup
- Condition="'$(CXX_Parser_Mapping_RuleBeforeTargets)' == '' and '$(CXX_Parser_Mapping_RuleAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
- <CXX_Parser_Mapping_RuleBeforeTargets>Midl</CXX_Parser_Mapping_RuleBeforeTargets>
- <CXX_Parser_Mapping_RuleAfterTargets>CustomBuild</CXX_Parser_Mapping_RuleAfterTargets>
- </PropertyGroup>
- <PropertyGroup>
- <CXX_Parser_Mapping_RuleDependsOn
- Condition="'$(ConfigurationType)' != 'Makefile'">_SelectedFiles;$(CXX_Parser_Mapping_RuleDependsOn)</CXX_Parser_Mapping_RuleDependsOn>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <CXX_Parser_Mapping_Rule>
- <ProprietaryLicense>False</ProprietaryLicense>
- <GenInline>False</GenInline>
- <GenValidation>False</GenValidation>
- <SupValidation>False</SupValidation>
- <GenPolymorphic>False</GenPolymorphic>
- <OutDir>.</OutDir>
- <HeaderSuffix>.hxx</HeaderSuffix>
- <SourceSuffix>.cxx</SourceSuffix>
- <InlineSuffix>.ixx</InlineSuffix>
- <SkelFileSuffix>-pskel</SkelFileSuffix>
- <SkelTypeSuffix>_pskel</SkelTypeSuffix>
- <CharType>0</CharType>
- <CharEncoding>0</CharEncoding>
- <XMLParser>0</XMLParser>
- <CommandLineTemplate>xsd.exe cxx-parser [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
- <ExecutionDescription>xsd cxx-parser %(Identity)</ExecutionDescription>
- <ShowOnlyRuleProperties>false</ShowOnlyRuleProperties>
- </CXX_Parser_Mapping_Rule>
- </ItemDefinitionGroup>
-</Project>
diff --git a/dist/etc/vc-1x.0/xsd-cxx-parser.targets b/dist/etc/vc-1x.0/xsd-cxx-parser.targets
deleted file mode 100644
index 62ad2b2..0000000
--- a/dist/etc/vc-1x.0/xsd-cxx-parser.targets
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <PropertyPageSchema
- Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
- <AvailableItemName
- Include="CXX_Parser_Mapping_Rule">
- <Targets>XsdCompile</Targets>
- </AvailableItemName>
- </ItemGroup>
- <UsingTask
- TaskName="CXX_Parser_Mapping_Rule"
- TaskFactory="XamlTaskFactory"
- AssemblyName="Microsoft.Build.Tasks.v4.0">
- <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
- </UsingTask>
- <Target
- Name="XsdCompile"
- BeforeTargets="$(CXX_Parser_Mapping_RuleBeforeTargets)"
- AfterTargets="$(CXX_Parser_Mapping_RuleAfterTargets)"
- Condition="'@(CXX_Parser_Mapping_Rule)' != ''"
- DependsOnTargets="$(CXX_Parser_Mapping_RuleDependsOn);XsdOutputDir"
- Outputs="%(CXX_Parser_Mapping_Rule.OutDir)\%(CXX_Parser_Mapping_Rule.Filename)%(CXX_Parser_Mapping_Rule.SkelFileSuffix)%(CXX_Parser_Mapping_Rule.HeaderSuffix);%(CXX_Parser_Mapping_Rule.OutDir)\%(CXX_Parser_Mapping_Rule.Filename)%(CXX_Parser_Mapping_Rule.SkelFileSuffix)%(CXX_Parser_Mapping_Rule.SourceSuffix)"
- Inputs="%(CXX_Parser_Mapping_Rule.Identity);%(CXX_Parser_Mapping_Rule.AdditionalDependencies);$(MSBuildProjectFile)">
- <ItemGroup
- Condition="'@(SelectedFiles)' != ''">
- <CXX_Parser_Mapping_Rule
- Remove="@(CXX_Parser_Mapping_Rule)"
- Condition="'%(Identity)' != '@(SelectedFiles)'" />
- </ItemGroup>
- <ItemGroup>
- <CXX_Parser_Mapping_Rule_tlog
- Include="%(CXX_Parser_Mapping_Rule.OutDir)\%(CXX_Parser_Mapping_Rule.Filename)%(CXX_Parser_Mapping_Rule.SkelFileSuffix)%(CXX_Parser_Mapping_Rule.HeaderSuffix);%(CXX_Parser_Mapping_Rule.OutDir)\%(CXX_Parser_Mapping_Rule.Filename)%(CXX_Parser_Mapping_Rule.SkelFileSuffix)%(CXX_Parser_Mapping_Rule.SourceSuffix)"
- Condition="'%(CXX_Parser_Mapping_Rule.OutDir)\%(CXX_Parser_Mapping_Rule.Filename)%(CXX_Parser_Mapping_Rule.SkelFileSuffix)%(CXX_Parser_Mapping_Rule.HeaderSuffix);%(CXX_Parser_Mapping_Rule.OutDir)\%(CXX_Parser_Mapping_Rule.Filename)%(CXX_Parser_Mapping_Rule.SkelFileSuffix)%(CXX_Parser_Mapping_Rule.SourceSuffix)' != '' and '%(CXX_Parser_Mapping_Rule.ExcludedFromBuild)' != 'true'">
- <Source>@(CXX_Parser_Mapping_Rule, '|')</Source>
- </CXX_Parser_Mapping_Rule_tlog>
- </ItemGroup>
- <Message
- Importance="High"
- Text="%(CXX_Parser_Mapping_Rule.ExecutionDescription)" />
- <WriteLinesToFile
- Condition="'@(CXX_Parser_Mapping_Rule_tlog)' != '' and '%(CXX_Parser_Mapping_Rule_tlog.ExcludedFromBuild)' != 'true'"
- File="$(IntDir)$(ProjectName).write.1.tlog"
- Lines="^%(CXX_Parser_Mapping_Rule_tlog.Source);@(CXX_Parser_Mapping_Rule_tlog-&gt;'%(Fullpath)')" />
- <CXX_Parser_Mapping_Rule
- Condition="'@(CXX_Parser_Mapping_Rule)' != '' and '%(CXX_Parser_Mapping_Rule.ExcludedFromBuild)' != 'true'"
- CommandLineTemplate="%(CXX_Parser_Mapping_Rule.CommandLineTemplate)"
- ProprietaryLicense="%(CXX_Parser_Mapping_Rule.ProprietaryLicense)"
- GenInline="%(CXX_Parser_Mapping_Rule.GenInline)"
- GenValidation="%(CXX_Parser_Mapping_Rule.GenValidation)"
- SupValidation="%(CXX_Parser_Mapping_Rule.SupValidation)"
- GenPolymorphic="%(CXX_Parser_Mapping_Rule.GenPolymorphic)"
- OutDir="%(CXX_Parser_Mapping_Rule.OutDir)"
- HeaderSuffix="%(CXX_Parser_Mapping_Rule.HeaderSuffix)"
- SourceSuffix="%(CXX_Parser_Mapping_Rule.SourceSuffix)"
- InlineSuffix="%(CXX_Parser_Mapping_Rule.InlineSuffix)"
- SkelFileSuffix="%(CXX_Parser_Mapping_Rule.SkelFileSuffix)"
- NamespaceMap="%(CXX_Parser_Mapping_Rule.NamespaceMap)"
- TypeMap="%(CXX_Parser_Mapping_Rule.TypeMap)"
- SkelTypeSuffix="%(CXX_Parser_Mapping_Rule.SkelTypeSuffix)"
- ExportSymbol="%(CXX_Parser_Mapping_Rule.ExportSymbol)"
- HxxPrologue="%(CXX_Parser_Mapping_Rule.HxxPrologue)"
- HxxEpilogue="%(CXX_Parser_Mapping_Rule.HxxEpilogue)"
- CharType="%(CXX_Parser_Mapping_Rule.CharType)"
- CharEncoding="%(CXX_Parser_Mapping_Rule.CharEncoding)"
- XMLParser="%(CXX_Parser_Mapping_Rule.XMLParser)"
- AdditionalOptions="%(CXX_Parser_Mapping_Rule.AdditionalOptions)"
- Inputs="%(CXX_Parser_Mapping_Rule.Identity)" />
- </Target>
- <Target
- Name="XsdClean"
- BeforeTargets="CoreCppClean"
- AfterTargets="_PrepareForClean"
- Condition="'@(CXX_Parser_Mapping_Rule)' != ''">
- <PropertyGroup>
- <XsdCleanFilePatternsToDelete>@(CXX_Parser_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Parser_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Parser_Mapping_Rule->Metadata('SkelFileSuffix')->Distinct())@(CXX_Parser_Mapping_Rule->Metadata('HeaderSuffix')->Distinct());@(CXX_Parser_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Parser_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Parser_Mapping_Rule->Metadata('SkelFileSuffix')->Distinct())@(CXX_Parser_Mapping_Rule->Metadata('SourceSuffix')->Distinct());@(CXX_Parser_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Parser_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Parser_Mapping_Rule->Metadata('SkelFileSuffix')->Distinct())@(CXX_Parser_Mapping_Rule->Metadata('InlineSuffix')->Distinct());</XsdCleanFilePatternsToDelete>
- </PropertyGroup>
- <ItemGroup>
- <CoreCppClean>
- <FilePatternsToDelete
- Condition="'%(CoreCppClean.FilePatternsToDelete)' != ''">%(CoreCppClean.FilePatternsToDelete);$(XsdCleanFilePatternsToDelete)</FilePatternsToDelete>
- <FilePatternsToDelete
- Condition="'%(CoreCppClean.FilePatternsToDelete)' == ''">$(XsdCleanFilePatternsToDelete)</FilePatternsToDelete>
- </CoreCppClean>
- </ItemGroup>
- </Target>
- <Target
- Name="XsdOutputDir"
- Condition="'@(CXX_Parser_Mapping_Rule)' != ''">
- <MakeDir Directories="@(CXX_Parser_Mapping_Rule->Metadata('OutDir')->Distinct()->ClearMetadata())" />
- </Target>
-</Project>
diff --git a/dist/etc/vc-1x.0/xsd-cxx-parser.xml b/dist/etc/vc-1x.0/xsd-cxx-parser.xml
deleted file mode 100644
index 37202c6..0000000
--- a/dist/etc/vc-1x.0/xsd-cxx-parser.xml
+++ /dev/null
@@ -1,284 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback">
- <Rule
- Name="CXX_Parser_Mapping_Rule"
- PageTemplate="tool"
- DisplayName="C++/Parser Mapping"
- Order="200">
- <Rule.DataSource>
- <DataSource
- Persistence="ProjectFile"
- ItemType="CXX_Parser_Mapping_Rule" />
- </Rule.DataSource>
- <Rule.Categories>
- <Category
- Name="General">
- <Category.DisplayName>
- <sys:String>General</sys:String>
- </Category.DisplayName>
- </Category>
- <Category
- Name="Command Line"
- Subtype="CommandLine">
- <Category.DisplayName>
- <sys:String>Command Line</sys:String>
- </Category.DisplayName>
- </Category>
- </Rule.Categories>
- <StringListProperty
- Name="Inputs"
- Category="Command Line"
- IsRequired="true"
- Switch=" ">
- <StringListProperty.DataSource>
- <DataSource
- Persistence="ProjectFile"
- ItemType="CXX_Parser_Mapping_Rule"
- SourceType="Item" />
- </StringListProperty.DataSource>
- </StringListProperty>
- <BoolProperty
- Name="ProprietaryLicense"
- Subcategory="Licensing"
- HelpContext="0"
- DisplayName="Proprietary License"
- Description="Indicate that the generated code is licensed under a proprietary license instead of the GPL."
- Switch="--proprietary-license" />
- <BoolProperty
- Name="GenInline"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Inline"
- Description="Generate simple functions inline. This option triggers creation of the inline file."
- Switch="--generate-inline" />
- <BoolProperty
- Name="GenValidation"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Validation Code"
- Description="Generate validation code which ensures that instance documents conform to the schema. This is the default for the Expat XML parser."
- Switch="--generate-validation" />
- <BoolProperty
- Name="SupValidation"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Suppress Validation Code"
- Description="Suppress generation of validation code. This is the default for the Xerces-C++ XML parser."
- Switch="--suppress-validation" />
- <BoolProperty
- Name="GenPolymorphic"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Polymorphic"
- Description="Generate polymorphism-aware code. Specify this option if you use substitution groups or xsi:type."
- Switch="--generate-polymorphic" />
- <StringProperty
- Name="OutDir"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="Output Directory"
- Description="Output directory for the generated files"
- Switch="--output-dir &quot;[value]&quot;" />
- <StringProperty
- Name="HeaderSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Header Suffix "
- Description="Generated C++ header file suffix"
- Switch="--hxx-suffix &quot;[value]&quot;" />
- <StringProperty
- Name="SourceSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Source Suffix"
- Description="Generated C++ source file suffix"
- Switch="--cxx-suffix &quot;[value]&quot;" />
- <StringProperty
- Name="InlineSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Inline Suffix"
- Description="Generated C++ inline file suffix"
- Switch="--ixx-suffix &quot;[value]&quot;" />
- <StringProperty
- Name="SkelFileSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="Parser Skeleton File Suffix"
- Description="Use the provided suffix to construct the names of generated parser skeleton file."
- Switch="--skel-file-suffix &quot;[value]&quot;" />
- <StringListProperty
- Name="NamespaceMap"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Namespace Map"
- Description="Map XML Schema namespaces to C++ namespaces by specifying a semicolon-separated list of mapping rules in the form &lt;xml-ns&gt;=&lt;cxx-ns&gt; where &lt;xml-ns&gt; stands for an XML Schema namespace and &lt;cxx-ns&gt; - for a C++ namespace."
- Switch="--namespace-map &quot;[value]&quot;" />
- <StringListProperty
- Name="TypeMap"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Type Map"
- Description="Specify type map files as a semicolon-separated list."
- Switch="--type-map &quot;[value]&quot;" />
- <StringProperty
- Name="SkelTypeSuffix"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Parser Skeleton Type Suffix"
- Description="Use the provided suffix to construct the names of generated parser skeletons."
- Switch="--skel-type-suffix &quot;[value]&quot;" />
- <StringListProperty
- Name="ExportSymbol"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Export Symbol"
- Description="Insert the specified symbol in places where DLL export/import control statements (__declspec(dllexport/dllimport)) are necessary."
- Switch="--export-symbol &quot;[value]&quot;" />
- <StringListProperty
- Name="HxxPrologue"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Header Prologue File"
- Description="Insert the contents of the file specified at the beginning of the header file."
- Switch="--hxx-prologue-file &quot;[value]&quot;" />
- <StringListProperty
- Name="HxxEpilogue"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Header Epilogue File"
- Description="Insert the contents of the file specified at the end of the header file."
- Switch="--hxx-epilogue-file &quot;[value]&quot;" />
- <EnumProperty
- Name="CharType"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Char Type"
- Description="Character type to be used in the generated code.">
- <EnumValue
- Name="0"
- DisplayName="char" />
- <EnumValue
- Name="1"
- DisplayName="wchar_t"
- Switch="--char-type wchar_t" />
- </EnumProperty>
- <EnumProperty
- Name="CharEncoding"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Char Encoding"
- Description="Character encoding to be used bu the generated code.">
- <EnumValue
- Name="0"
- DisplayName="UTF-8 (char)/UTF-16 (wchar_t)" />
- <EnumValue
- Name="1"
- DisplayName="ISO-8859-1"
- Switch="--char-encoding iso8859-1" />
- <EnumValue
- Name="2"
- DisplayName="Xerces-C++ local code page"
- Switch="--char-encoding lcp" />
- <EnumValue
- Name="3"
- DisplayName="Custom encoding"
- Switch="--char-encoding custom" />
- </EnumProperty>
- <EnumProperty
- Name="XMLParser"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Underlying XML Parser"
- Description="Use the specified parser as the underlying XML parser.">
- <EnumValue
- Name="0"
- DisplayName="xerces" />
- <EnumValue
- Name="1"
- DisplayName="expat"
- Switch="--xml-parser expat" />
- </EnumProperty>
- <StringProperty
- Name="CommandLineTemplate"
- DisplayName="Command Line"
- Visible="False"
- IncludeInCommandLine="False" />
- <DynamicEnumProperty
- Name="CXX_Parser_Mapping_RuleBeforeTargets"
- Category="General"
- EnumProvider="Targets"
- IncludeInCommandLine="False">
- <DynamicEnumProperty.DisplayName>
- <sys:String>Execute Before</sys:String>
- </DynamicEnumProperty.DisplayName>
- <DynamicEnumProperty.Description>
- <sys:String>Specifies the targets for the build customization to run before.</sys:String>
- </DynamicEnumProperty.Description>
- <DynamicEnumProperty.ProviderSettings>
- <NameValuePair
- Name="Exclude"
- Value="^CXX_Parser_Mapping_RuleBeforeTargets|^Compute" />
- </DynamicEnumProperty.ProviderSettings>
- <DynamicEnumProperty.DataSource>
- <DataSource
- Persistence="ProjectFile"
- HasConfigurationCondition="true" />
- </DynamicEnumProperty.DataSource>
- </DynamicEnumProperty>
- <DynamicEnumProperty
- Name="CXX_Parser_Mapping_RuleAfterTargets"
- Category="General"
- EnumProvider="Targets"
- IncludeInCommandLine="False">
- <DynamicEnumProperty.DisplayName>
- <sys:String>Execute After</sys:String>
- </DynamicEnumProperty.DisplayName>
- <DynamicEnumProperty.Description>
- <sys:String>Specifies the targets for the build customization to run after.</sys:String>
- </DynamicEnumProperty.Description>
- <DynamicEnumProperty.ProviderSettings>
- <NameValuePair
- Name="Exclude"
- Value="^CXX_Parser_Mapping_RuleAfterTargets|^Compute" />
- </DynamicEnumProperty.ProviderSettings>
- <DynamicEnumProperty.DataSource>
- <DataSource
- Persistence="ProjectFile"
- ItemType=""
- HasConfigurationCondition="true" />
- </DynamicEnumProperty.DataSource>
- </DynamicEnumProperty>
- <StringProperty
- Name="ExecutionDescription"
- DisplayName="Execution Description"
- Visible="False"
- IncludeInCommandLine="False" />
- <StringListProperty
- Name="AdditionalDependencies"
- DisplayName="Additional Dependencies"
- IncludeInCommandLine="False"
- Visible="true" />
- <StringProperty
- Subtype="AdditionalOptions"
- Name="AdditionalOptions"
- Category="Command Line">
- <StringProperty.DisplayName>
- <sys:String>Additional Options</sys:String>
- </StringProperty.DisplayName>
- <StringProperty.Description>
- <sys:String>Additional Options</sys:String>
- </StringProperty.Description>
- </StringProperty>
- </Rule>
- <ItemType
- Name="CXX_Parser_Mapping_Rule"
- DisplayName="C++/Parser Mapping" />
- <FileExtension
- Name="*.xsd"
- ContentType="CXX_Parser_Mapping_Rule" />
- <ContentType
- Name="CXX_Parser_Mapping_Rule"
- DisplayName="C++/Parser Mapping"
- ItemType="CXX_Parser_Mapping_Rule" />
-</ProjectSchemaDefinitions>
diff --git a/dist/etc/vc-1x.0/xsd-cxx-tree.props b/dist/etc/vc-1x.0/xsd-cxx-tree.props
deleted file mode 100644
index fc81c9b..0000000
--- a/dist/etc/vc-1x.0/xsd-cxx-tree.props
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup
- Condition="'$(CXX_Tree_Mapping_RuleBeforeTargets)' == '' and '$(CXX_Tree_Mapping_RuleAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
- <CXX_Tree_Mapping_RuleBeforeTargets>Midl</CXX_Tree_Mapping_RuleBeforeTargets>
- <CXX_Tree_Mapping_RuleAfterTargets>CustomBuild</CXX_Tree_Mapping_RuleAfterTargets>
- </PropertyGroup>
- <PropertyGroup>
- <CXX_Tree_Mapping_RuleDependsOn
- Condition="'$(ConfigurationType)' != 'Makefile'">_SelectedFiles;$(CXX_Tree_Mapping_RuleDependsOn)</CXX_Tree_Mapping_RuleDependsOn>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <CXX_Tree_Mapping_Rule>
- <ProprietaryLicense>False</ProprietaryLicense>
- <CxxStd>0</CxxStd>
- <GenInline>False</GenInline>
- <GenForward>False</GenForward>
- <GenSerialization>False</GenSerialization>
- <SupParsing>False</SupParsing>
- <GenPolymorphic>False</GenPolymorphic>
- <PolymorphicTypeAll>False</PolymorphicTypeAll>
- <GenOstream>False</GenOstream>
- <GenDoxygen>False</GenDoxygen>
- <GenComparison>False</GenComparison>
- <GenDefaultCtor>False</GenDefaultCtor>
- <GenFromBaseCtor>False</GenFromBaseCtor>
- <GenDetach>False</GenDetach>
- <GenWildcard>False</GenWildcard>
- <GenAnyType>False</GenAnyType>
- <GenElementType>False</GenElementType>
- <GenElementMap>False</GenElementMap>
- <GenIntellisense>False</GenIntellisense>
- <OutDir>.</OutDir>
- <HeaderSuffix>.hxx</HeaderSuffix>
- <SourceSuffix>.cxx</SourceSuffix>
- <InlineSuffix>.ixx</InlineSuffix>
- <ForwardSuffix>-fwd.hxx</ForwardSuffix>
- <CharType>0</CharType>
- <CharEncoding>0</CharEncoding>
- <TypeNaming>0</TypeNaming>
- <FunctionNaming>0</FunctionNaming>
- <CommandLineTemplate>xsd.exe cxx-tree [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
- <ExecutionDescription>xsd cxx-tree %(Identity)</ExecutionDescription>
- <ShowOnlyRuleProperties>false</ShowOnlyRuleProperties>
- </CXX_Tree_Mapping_Rule>
- </ItemDefinitionGroup>
-</Project>
diff --git a/dist/etc/vc-1x.0/xsd-cxx-tree.targets b/dist/etc/vc-1x.0/xsd-cxx-tree.targets
deleted file mode 100644
index 6156ec2..0000000
--- a/dist/etc/vc-1x.0/xsd-cxx-tree.targets
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <PropertyPageSchema
- Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
- <AvailableItemName
- Include="CXX_Tree_Mapping_Rule">
- <Targets>XsdCompile</Targets>
- </AvailableItemName>
- </ItemGroup>
- <UsingTask
- TaskName="CXX_Tree_Mapping_Rule"
- TaskFactory="XamlTaskFactory"
- AssemblyName="Microsoft.Build.Tasks.v4.0">
- <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
- </UsingTask>
- <Target
- Name="XsdCompile"
- BeforeTargets="$(CXX_Tree_Mapping_RuleBeforeTargets)"
- AfterTargets="$(CXX_Tree_Mapping_RuleAfterTargets)"
- Condition="'@(CXX_Tree_Mapping_Rule)' != ''"
- DependsOnTargets="$(CXX_Tree_Mapping_RuleDependsOn);XsdOutputDir"
- Outputs="%(CXX_Tree_Mapping_Rule.OutDir)\%(CXX_Tree_Mapping_Rule.Filename)%(CXX_Tree_Mapping_Rule.HeaderSuffix);%(CXX_Tree_Mapping_Rule.OutDir)\%(CXX_Tree_Mapping_Rule.Filename)%(CXX_Tree_Mapping_Rule.SourceSuffix)"
- Inputs="%(CXX_Tree_Mapping_Rule.Identity);%(CXX_Tree_Mapping_Rule.AdditionalDependencies);$(MSBuildProjectFile)">
- <ItemGroup
- Condition="'@(SelectedFiles)' != ''">
- <CXX_Tree_Mapping_Rule
- Remove="@(CXX_Tree_Mapping_Rule)"
- Condition="'%(Identity)' != '@(SelectedFiles)'" />
- </ItemGroup>
- <ItemGroup>
- <CXX_Tree_Mapping_Rule_tlog
- Include="%(CXX_Tree_Mapping_Rule.OutDir)\%(CXX_Tree_Mapping_Rule.Filename)%(CXX_Tree_Mapping_Rule.HeaderSuffix);%(CXX_Tree_Mapping_Rule.OutDir)\%(CXX_Tree_Mapping_Rule.Filename)%(CXX_Tree_Mapping_Rule.SourceSuffix)"
- Condition="'%(CXX_Tree_Mapping_Rule.OutDir)\%(CXX_Tree_Mapping_Rule.Filename)%(CXX_Tree_Mapping_Rule.HeaderSuffix);%(CXX_Tree_Mapping_Rule.OutDir)\%(CXX_Tree_Mapping_Rule.Filename)%(CXX_Tree_Mapping_Rule.SourceSuffix)' != '' and '%(CXX_Tree_Mapping_Rule.ExcludedFromBuild)' != 'true'">
- <Source>@(CXX_Tree_Mapping_Rule, '|')</Source>
- </CXX_Tree_Mapping_Rule_tlog>
- </ItemGroup>
- <Message
- Importance="High"
- Text="%(CXX_Tree_Mapping_Rule.ExecutionDescription)" />
- <WriteLinesToFile
- Condition="'@(CXX_Tree_Mapping_Rule_tlog)' != '' and '%(CXX_Tree_Mapping_Rule_tlog.ExcludedFromBuild)' != 'true'"
- File="$(IntDir)$(ProjectName).write.1.tlog"
- Lines="^%(CXX_Tree_Mapping_Rule_tlog.Source);@(CXX_Tree_Mapping_Rule_tlog-&gt;'%(Fullpath)')" />
- <CXX_Tree_Mapping_Rule
- Condition="'@(CXX_Tree_Mapping_Rule)' != '' and '%(CXX_Tree_Mapping_Rule.ExcludedFromBuild)' != 'true'"
- CommandLineTemplate="%(CXX_Tree_Mapping_Rule.CommandLineTemplate)"
- ProprietaryLicense="%(CXX_Tree_Mapping_Rule.ProprietaryLicense)"
- CxxStd="%(CXX_Tree_Mapping_Rule.CxxStd)"
- GenInline="%(CXX_Tree_Mapping_Rule.GenInline)"
- GenForward="%(CXX_Tree_Mapping_Rule.GenForward)"
- GenSerialization="%(CXX_Tree_Mapping_Rule.GenSerialization)"
- SupParsing="%(CXX_Tree_Mapping_Rule.SupParsing)"
- GenPolymorphic="%(CXX_Tree_Mapping_Rule.GenPolymorphic)"
- PolymorphicTypeAll="%(CXX_Tree_Mapping_Rule.PolymorphicTypeAll)"
- GenOstream="%(CXX_Tree_Mapping_Rule.GenOstream)"
- GenDoxygen="%(CXX_Tree_Mapping_Rule.GenDoxygen)"
- GenComparison="%(CXX_Tree_Mapping_Rule.GenComparison)"
- GenDefaultCtor="%(CXX_Tree_Mapping_Rule.GenDefaultCtor)"
- GenFromBaseCtor="%(CXX_Tree_Mapping_Rule.GenFromBaseCtor)"
- GenDetach="%(CXX_Tree_Mapping_Rule.GenDetach)"
- GenWildcard="%(CXX_Tree_Mapping_Rule.GenWildcard)"
- GenAnyType="%(CXX_Tree_Mapping_Rule.GenAnyType)"
- GenElementType="%(CXX_Tree_Mapping_Rule.GenElementType)"
- GenElementMap="%(CXX_Tree_Mapping_Rule.GenElementMap)"
- GenIntellisense="%(CXX_Tree_Mapping_Rule.GenIntellisense)"
- OutDir="%(CXX_Tree_Mapping_Rule.OutDir)"
- HeaderSuffix="%(CXX_Tree_Mapping_Rule.HeaderSuffix)"
- SourceSuffix="%(CXX_Tree_Mapping_Rule.SourceSuffix)"
- InlineSuffix="%(CXX_Tree_Mapping_Rule.InlineSuffix)"
- ForwardSuffix="%(CXX_Tree_Mapping_Rule.ForwardSuffix)"
- NamespaceMap="%(CXX_Tree_Mapping_Rule.NamespaceMap)"
- PolymorphicType="%(CXX_Tree_Mapping_Rule.PolymorphicType)"
- RootElement="%(CXX_Tree_Mapping_Rule.RootElement)"
- ExportSymbol="%(CXX_Tree_Mapping_Rule.ExportSymbol)"
- HxxPrologue="%(CXX_Tree_Mapping_Rule.HxxPrologue)"
- HxxEpilogue="%(CXX_Tree_Mapping_Rule.HxxEpilogue)"
- CharType="%(CXX_Tree_Mapping_Rule.CharType)"
- CharEncoding="%(CXX_Tree_Mapping_Rule.CharEncoding)"
- TypeNaming="%(CXX_Tree_Mapping_Rule.TypeNaming)"
- FunctionNaming="%(CXX_Tree_Mapping_Rule.FunctionNaming)"
- AdditionalOptions="%(CXX_Tree_Mapping_Rule.AdditionalOptions)"
- Inputs="%(CXX_Tree_Mapping_Rule.Identity)" />
- </Target>
- <Target
- Name="XsdClean"
- BeforeTargets="CoreCppClean"
- AfterTargets="_PrepareForClean"
- Condition="'@(CXX_Tree_Mapping_Rule)' != ''">
- <PropertyGroup>
- <XsdCleanFilePatternsToDelete>@(CXX_Tree_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Tree_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Tree_Mapping_Rule->Metadata('HeaderSuffix')->Distinct());@(CXX_Tree_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Tree_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Tree_Mapping_Rule->Metadata('SourceSuffix')->Distinct());@(CXX_Tree_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Tree_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Tree_Mapping_Rule->Metadata('InlineSuffix')->Distinct());@(CXX_Tree_Mapping_Rule->Metadata('OutDir')->Distinct())\@(CXX_Tree_Mapping_Rule->Metadata('Filename')->Distinct())@(CXX_Tree_Mapping_Rule->Metadata('ForwardSuffix')->Distinct())</XsdCleanFilePatternsToDelete>
- </PropertyGroup>
- <ItemGroup>
- <CoreCppClean>
- <FilePatternsToDelete
- Condition="'%(CoreCppClean.FilePatternsToDelete)' != ''">%(CoreCppClean.FilePatternsToDelete);$(XsdCleanFilePatternsToDelete)</FilePatternsToDelete>
- <FilePatternsToDelete
- Condition="'%(CoreCppClean.FilePatternsToDelete)' == ''">$(XsdCleanFilePatternsToDelete)</FilePatternsToDelete>
- </CoreCppClean>
- </ItemGroup>
- </Target>
- <Target
- Name="XsdOutputDir"
- Condition="'@(CXX_Tree_Mapping_Rule)' != ''">
- <MakeDir Directories="@(CXX_Tree_Mapping_Rule->Metadata('OutDir')->Distinct()->ClearMetadata())" />
- </Target>
-</Project>
diff --git a/dist/etc/vc-1x.0/xsd-cxx-tree.xml b/dist/etc/vc-1x.0/xsd-cxx-tree.xml
deleted file mode 100644
index e37eb1c..0000000
--- a/dist/etc/vc-1x.0/xsd-cxx-tree.xml
+++ /dev/null
@@ -1,411 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback">
- <Rule
- Name="CXX_Tree_Mapping_Rule"
- PageTemplate="tool"
- DisplayName="C++/Tree Mapping"
- Order="200">
- <Rule.DataSource>
- <DataSource
- Persistence="ProjectFile"
- ItemType="CXX_Tree_Mapping_Rule" />
- </Rule.DataSource>
- <Rule.Categories>
- <Category
- Name="General">
- <Category.DisplayName>
- <sys:String>General</sys:String>
- </Category.DisplayName>
- </Category>
- <Category
- Name="Command Line"
- Subtype="CommandLine">
- <Category.DisplayName>
- <sys:String>Command Line</sys:String>
- </Category.DisplayName>
- </Category>
- </Rule.Categories>
- <StringListProperty
- Name="Inputs"
- Category="Command Line"
- IsRequired="true"
- Switch=" ">
- <StringListProperty.DataSource>
- <DataSource
- Persistence="ProjectFile"
- ItemType="CXX_Tree_Mapping_Rule"
- SourceType="Item" />
- </StringListProperty.DataSource>
- </StringListProperty>
- <BoolProperty
- Name="ProprietaryLicense"
- Subcategory="Licensing"
- HelpContext="0"
- DisplayName="Proprietary License"
- Description="Indicate that the generated code is licensed under a proprietary license instead of the GPL."
- Switch="--proprietary-license" />
- <EnumProperty
- Name="CxxStd"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="C++ Standard"
- Description="C++ Standard the generated code should conform to.">
- <EnumValue
- Name="0"
- DisplayName="c++98" />
- <EnumValue
- Name="1"
- DisplayName="c++11"
- Switch="--std c++11" />
- </EnumProperty>
- <BoolProperty
- Name="GenInline"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Inline"
- Description="Generate simple functions inline. This option triggers creation of the inline file."
- Switch="--generate-inline" />
- <BoolProperty
- Name="GenForward"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Forward"
- Description="Generate a separate header file with forward declarations for the types being generated."
- Switch="--generate-forward" />
- <BoolProperty
- Name="GenSerialization"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Serialization"
- Description="Generate serialization functions. Serialization functions convert the object model back to XML."
- Switch="--generate-serialization" />
- <BoolProperty
- Name="SupParsing"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Suppress Parsing"
- Description="Suppress generation of the parsing functions and constructors."
- Switch="--suppress-parsing" />
- <BoolProperty
- Name="GenPolymorphic"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Polymorphic"
- Description="Generate polymorphism-aware code. Specify this option if you use substitution groups or xsi:type."
- Switch="--generate-polymorphic" />
- <BoolProperty
- Name="PolymorphicTypeAll"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="All Types Polymorphic"
- Description="Indicate that all types should be treated as polymorphic."
- Switch="--polymorphic-type-all" />
- <BoolProperty
- Name="GenOstream"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Ostream"
- Description="Generate ostream insertion operators for generated types. This allows to easily print a fragment or the whole object model for debugging or logging."
- Switch="--generate-ostream" />
- <BoolProperty
- Name="GenDoxygen"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Doxygen"
- Description="Generate documentation comments suitable for extraction by the Doxygen documentation system."
- Switch="--generate-doxygen" />
- <BoolProperty
- Name="GenComparison"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Comparison"
- Description="Generate comparison operators for complex types."
- Switch="--generate-comparison" />
- <BoolProperty
- Name="GenDefaultCtor"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Default Constructors"
- Description="Generate default constructors even for types that have required members."
- Switch="--generate-default-ctor" />
- <BoolProperty
- Name="GenFromBaseCtor"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate From-Base Constructors"
- Description="Generate constructors that expect an instance of a base type followed by all required members."
- Switch="--generate-from-base-ctor" />
- <BoolProperty
- Name="GenDetach"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Detach"
- Description="Generate detach functions for required elements and attributes."
- Switch="--generate-detach" />
- <BoolProperty
- Name="GenWildcard"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Wildcard"
- Description="Generate accessors and modifiers as well as parsing and serialization code for XML Schema wildcards (any and anyAttribute)."
- Switch="--generate-wildcard" />
- <BoolProperty
- Name="GenAnyType"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate anyType"
- Description="Extract and store content of the XML Schema anyType type as a DOM fragment."
- Switch="--generate-any-type" />
- <BoolProperty
- Name="GenElementType"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Element Types"
- Description="Generate types instead of parsing and serialization functions for root elements."
- Switch="--generate-element-type" />
- <BoolProperty
- Name="GenElementMap"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate Element Map"
- Description="Generate a root element map that allows uniform parsing and serialization of multiple root elements."
- Switch="--generate-element-map" />
- <BoolProperty
- Name="GenIntellisense"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Generate IntelliSense"
- Description="Generate workarounds for IntelliSense bugs in Visual Studio 2005 (8.0)."
- Switch="--generate-intellisense" />
- <StringProperty
- Name="OutDir"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="Output Directory"
- Description="Output directory for the generated files"
- Switch="--output-dir &quot;[value]&quot;" />
- <StringProperty
- Name="HeaderSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Header Suffix "
- Description="Generated C++ header file suffix"
- Switch="--hxx-suffix &quot;[value]&quot;" />
- <StringProperty
- Name="SourceSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Source Suffix"
- Description="Generated C++ source file suffix"
- Switch="--cxx-suffix &quot;[value]&quot;" />
- <StringProperty
- Name="InlineSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Inline Suffix"
- Description="Generated C++ inline file suffix"
- Switch="--ixx-suffix &quot;[value]&quot;" />
- <StringProperty
- Name="ForwardSuffix"
- Subcategory="Output"
- HelpContext="0"
- DisplayName="C++ Forward Declaration Suffix"
- Description="Generated C++ forward declaration file suffix"
- Switch="--fwd-suffix &quot;[value]&quot;" />
- <StringListProperty
- Name="NamespaceMap"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Namespace Map"
- Description="Map XML Schema namespaces to C++ namespaces by specifying a semicolon-separated list of mapping rules in the form &lt;xml-ns&gt;=&lt;cxx-ns&gt; where &lt;xml-ns&gt; stands for an XML Schema namespace and &lt;cxx-ns&gt; - for a C++ namespace."
- Switch="--namespace-map &quot;[value]&quot;" />
- <StringListProperty
- Name="PolymorphicType"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Polymorphic Types"
- Description="Treat specified semicolon-separated list of types as roots of polymorphic type hierarchies."
- Switch="--polymorphic-type &quot;[value]&quot;" />
- <StringListProperty
- Name="RootElement"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Root Element"
- Description="Treat only specified semicolon-separated list of elements as document roots."
- Switch="--root-element &quot;[value]&quot;" />
- <StringListProperty
- Name="ExportSymbol"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Export Symbol"
- Description="Insert the specified symbol in places where DLL export/import control statements (__declspec(dllexport/dllimport)) are necessary."
- Switch="--export-symbol &quot;[value]&quot;" />
- <StringListProperty
- Name="HxxPrologue"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Header Prologue File"
- Description="Insert the contents of the file specified at the beginning of the header file."
- Switch="--hxx-prologue-file &quot;[value]&quot;" />
- <StringListProperty
- Name="HxxEpilogue"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Header Epilogue File"
- Description="Insert the contents of the file specified at the end of the header file."
- Switch="--hxx-epilogue-file &quot;[value]&quot;" />
- <EnumProperty
- Name="CharType"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Char Type"
- Description="Character type to be used in the generated code.">
- <EnumValue
- Name="0"
- DisplayName="char" />
- <EnumValue
- Name="1"
- DisplayName="wchar_t"
- Switch="--char-type wchar_t" />
- </EnumProperty>
- <EnumProperty
- Name="CharEncoding"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Char Encoding"
- Description="Character encoding to be used bu the generated code.">
- <EnumValue
- Name="0"
- DisplayName="UTF-8 (char)/UTF-16 (wchar_t)" />
- <EnumValue
- Name="1"
- DisplayName="ISO-8859-1"
- Switch="--char-encoding iso8859-1" />
- <EnumValue
- Name="2"
- DisplayName="Xerces-C++ local code page"
- Switch="--char-encoding lcp" />
- <EnumValue
- Name="3"
- DisplayName="Custom encoding"
- Switch="--char-encoding custom" />
- </EnumProperty>
- <EnumProperty
- Name="TypeNaming"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Type Naming"
- Description="Specify the type naming convention that should be used in the generated code.">
- <EnumValue
- Name="0"
- DisplayName="K&amp;R" />
- <EnumValue
- Name="1"
- DisplayName="Java"
- Switch="--type-naming java" />
- <EnumValue
- Name="2"
- DisplayName="Upper Camel Case"
- Switch="--type-naming ucc" />
- </EnumProperty>
- <EnumProperty
- Name="FunctionNaming"
- Category="Code Generation"
- HelpContext="0"
- DisplayName="Function Naming"
- Description="Specify the function naming convention that should be used in the generated code.">
- <EnumValue
- Name="0"
- DisplayName="K&amp;R" />
- <EnumValue
- Name="1"
- DisplayName="Java"
- Switch="--function-naming java" />
- <EnumValue
- Name="2"
- DisplayName="Lower Camel Case"
- Switch="--function-naming lcc" />
- </EnumProperty>
- <StringProperty
- Name="CommandLineTemplate"
- DisplayName="Command Line"
- Visible="False"
- IncludeInCommandLine="False" />
- <DynamicEnumProperty
- Name="CXX_Tree_Mapping_RuleBeforeTargets"
- Category="General"
- EnumProvider="Targets"
- IncludeInCommandLine="False">
- <DynamicEnumProperty.DisplayName>
- <sys:String>Execute Before</sys:String>
- </DynamicEnumProperty.DisplayName>
- <DynamicEnumProperty.Description>
- <sys:String>Specifies the targets for the build customization to run before.</sys:String>
- </DynamicEnumProperty.Description>
- <DynamicEnumProperty.ProviderSettings>
- <NameValuePair
- Name="Exclude"
- Value="^CXX_Tree_Mapping_RuleBeforeTargets|^Compute" />
- </DynamicEnumProperty.ProviderSettings>
- <DynamicEnumProperty.DataSource>
- <DataSource
- Persistence="ProjectFile"
- HasConfigurationCondition="true" />
- </DynamicEnumProperty.DataSource>
- </DynamicEnumProperty>
- <DynamicEnumProperty
- Name="CXX_Tree_Mapping_RuleAfterTargets"
- Category="General"
- EnumProvider="Targets"
- IncludeInCommandLine="False">
- <DynamicEnumProperty.DisplayName>
- <sys:String>Execute After</sys:String>
- </DynamicEnumProperty.DisplayName>
- <DynamicEnumProperty.Description>
- <sys:String>Specifies the targets for the build customization to run after.</sys:String>
- </DynamicEnumProperty.Description>
- <DynamicEnumProperty.ProviderSettings>
- <NameValuePair
- Name="Exclude"
- Value="^CXX_Tree_Mapping_RuleAfterTargets|^Compute" />
- </DynamicEnumProperty.ProviderSettings>
- <DynamicEnumProperty.DataSource>
- <DataSource
- Persistence="ProjectFile"
- ItemType=""
- HasConfigurationCondition="true" />
- </DynamicEnumProperty.DataSource>
- </DynamicEnumProperty>
- <StringProperty
- Name="ExecutionDescription"
- DisplayName="Execution Description"
- Visible="False"
- IncludeInCommandLine="False" />
- <StringListProperty
- Name="AdditionalDependencies"
- DisplayName="Additional Dependencies"
- IncludeInCommandLine="False"
- Visible="true" />
- <StringProperty
- Subtype="AdditionalOptions"
- Name="AdditionalOptions"
- Category="Command Line">
- <StringProperty.DisplayName>
- <sys:String>Additional Options</sys:String>
- </StringProperty.DisplayName>
- <StringProperty.Description>
- <sys:String>Additional Options</sys:String>
- </StringProperty.Description>
- </StringProperty>
- </Rule>
- <ItemType
- Name="CXX_Tree_Mapping_Rule"
- DisplayName="C++/Tree Mapping" />
- <FileExtension
- Name="*.xsd"
- ContentType="CXX_Tree_Mapping_Rule" />
- <ContentType
- Name="CXX_Tree_Mapping_Rule"
- DisplayName="C++/Tree Mapping"
- ItemType="CXX_Tree_Mapping_Rule" />
-</ProjectSchemaDefinitions>
diff --git a/dist/etc/vc-8.0/xsd-cxx-parser.rules b/dist/etc/vc-8.0/xsd-cxx-parser.rules
deleted file mode 100644
index a94a3ea..0000000
--- a/dist/etc/vc-8.0/xsd-cxx-parser.rules
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="CodeSynthesis XSD Compiler C++/Parser Mapping Rules"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="C++/Parser Mapping Rule"
- DisplayName="C++/Parser Mapping Rule"
- CommandLine="xsd.exe cxx-parser [AllOptions] [AdditionalOptions] [Inputs]"
- Outputs="[$OutDir]\$(InputName)[$SkelFileSuffix][$HeaderSuffix];[$OutDir]\$(InputName)[$SkelFileSuffix][$SourceSuffix]"
- FileExtensions="*.xsd"
- ExecutionDescription="xsd cxx-parser [Inputs]"
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <StringProperty
- Name="OutDir"
- DisplayName="Output Directory"
- Category="Output"
- Description="Output directory for the generated files"
- Switch="--output-dir [value]"
- DefaultValue="."
- />
- <BooleanProperty
- Name="ProprietaryLicense"
- DisplayName="Proprietary License"
- Category="Licensing"
- Description="Indicate that the generated code is licensed under a proprietary license instead of the GPL."
- Switch="--proprietary-license"
- />
- <StringProperty
- Name="HeaderSuffix"
- DisplayName="C++ Header Suffix "
- Category="Output"
- Description="Generated C++ header file suffix"
- Switch="--hxx-suffix [value]"
- DefaultValue=".hxx"
- />
- <StringProperty
- Name="SourceSuffix"
- DisplayName="C++ Source Suffix"
- Category="Output"
- Description="Generated C++ source file suffix"
- Switch="--cxx-suffix [value]"
- DefaultValue=".cxx"
- />
- <StringProperty
- Name="InlineSuffix"
- DisplayName="C++ Inline Suffix"
- Category="Output"
- Description="Generated C++ inline file suffix"
- Switch="--ixx-suffix [value]"
- DefaultValue=".ixx"
- />
- <StringProperty
- Name="SkelFileSuffix"
- DisplayName="Parser Skeleton File Suffix"
- PropertyPageName="Output"
- Description="Use the provided suffix to construct the names of generated parser skeleton file."
- Switch="--skel-file-suffix [value]"
- DefaultValue="-pskel"
- />
- <EnumProperty
- Name="CharType"
- DisplayName="Char Type"
- PropertyPageName="Code Generation"
- Description="Character type to be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="char"
- />
- <EnumValue
- Value="1"
- Switch="--char-type wchar_t"
- DisplayName="wchar_t"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="CharEncoding"
- DisplayName="Char Encoding"
- PropertyPageName="Code Generation"
- Description="Character encoding to be used bu the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="UTF-8 (char)/UTF-16 (wchar_t)"
- />
- <EnumValue
- Value="1"
- Switch="--char-encoding iso8859-1"
- DisplayName="ISO-8859-1"
- />
- <EnumValue
- Value="2"
- Switch="--char-encoding lcp"
- DisplayName="Xerces-C++ local code page"
- />
- <EnumValue
- Value="3"
- Switch="--char-encoding custom"
- DisplayName="Custom encoding"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="XMLParser"
- DisplayName="Underlying XML Parser"
- PropertyPageName="Code Generation"
- Description="Use the specified parser as the underlying XML parser."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="xerces"
- />
- <EnumValue
- Value="1"
- Switch="--xml-parser expat"
- DisplayName="expat"
- />
- </Values>
- </EnumProperty>
- <StringProperty
- Name="NamespaceMap"
- DisplayName="Namespace Map"
- PropertyPageName="Code Generation"
- Description="Map XML Schema namespaces to C++ namespaces by specifying a comma-separated list of mapping rules in the form &lt;xml-ns&gt;=&lt;cxx-ns&gt; where &lt;xml-ns&gt; stands for an XML Schema namespace and &lt;cxx-ns&gt; - for a C++ namespace."
- Switch="--namespace-map [value]"
- Delimited="true"
- Delimiters=","
- />
- <StringProperty
- Name="TypeMap"
- DisplayName="Type Map"
- PropertyPageName="Code Generation"
- Description="Specify type map files as a comma-separated list."
- Switch="--type-map [value]"
- Delimited="true"
- Delimiters=","
- />
- <BooleanProperty
- Name="GenInline"
- DisplayName="Generate Inline"
- PropertyPageName="Code Generation"
- Description="Generate simple functions inline. This option triggers creation of the inline file."
- Switch="--generate-inline"
- />
- <BooleanProperty
- Name="GenValidation"
- DisplayName="Generate Validation Code"
- PropertyPageName="Code Generation"
- Description="Generate validation code which ensures that instance documents conform to the schema. This is the default for the Expat XML parser."
- Switch="--generate-validation"
- />
- <BooleanProperty
- Name="SupValidation"
- DisplayName="Suppress Validation Code"
- PropertyPageName="Code Generation"
- Description="Suppress generation of validation code. This is the default for the Xerces-C++ XML parser."
- Switch="--suppress-validation"
- />
- <BooleanProperty
- Name="GenPolymorphic"
- DisplayName="Generate Polymorphic"
- PropertyPageName="Code Generation"
- Description="Generate polymorphism-aware code. Specify this option if you use substitution groups or xsi:type."
- Switch="--generate-polymorphic"
- />
- <StringProperty
- Name="SkelTypeSuffix"
- DisplayName="Parser Skeleton Type Suffix"
- PropertyPageName="Code Generation"
- Description="Use the provided suffix to construct the names of generated parser skeletons."
- Switch="--skel-type-suffix [value]"
- DefaultValue="_pskel"
- />
- <StringProperty
- Name="ExportSymbol"
- DisplayName="Export Symbol"
- PropertyPageName="Code Generation"
- Description="Insert the specified symbol in places where DLL export/import control statements (__declspec(dllexport/dllimport)) are necessary."
- Switch="--export-symbol [value]"
- />
- <StringProperty
- Name="HxxPrologue"
- DisplayName="Header Prologue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the beginning of the header file."
- Switch="--hxx-prologue-file [value]"
- />
- <StringProperty
- Name="HxxEpilogue"
- DisplayName="Header Epilogue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the end of the header file."
- Switch="--hxx-epilogue-file [value]"
- />
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
diff --git a/dist/etc/vc-8.0/xsd-cxx-tree.rules b/dist/etc/vc-8.0/xsd-cxx-tree.rules
deleted file mode 100644
index b3e921a..0000000
--- a/dist/etc/vc-8.0/xsd-cxx-tree.rules
+++ /dev/null
@@ -1,320 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="CodeSynthesis XSD Compiler C++/Tree Mapping Rules"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="C++/Tree Mapping Rule"
- DisplayName="C++/Tree Mapping Rule"
- CommandLine="xsd.exe cxx-tree [AllOptions] [AdditionalOptions] [Inputs]"
- Outputs="[$OutDir]\$(InputName)[$HeaderSuffix];[$OutDir]\$(InputName)[$SourceSuffix]"
- FileExtensions="*.xsd"
- ExecutionDescription="xsd cxx-tree [Inputs]"
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <StringProperty
- Name="OutDir"
- DisplayName="Output Directory"
- Category="Output"
- Description="Output directory for the generated files"
- Switch="--output-dir [value]"
- DefaultValue="."
- />
- <BooleanProperty
- Name="ProprietaryLicense"
- DisplayName="Proprietary License"
- Category="Licensing"
- Description="Indicate that the generated code is licensed under a proprietary license instead of the GPL."
- Switch="--proprietary-license"
- />
- <StringProperty
- Name="HeaderSuffix"
- DisplayName="C++ Header Suffix "
- Category="Output"
- Description="Generated C++ header file suffix"
- Switch="--hxx-suffix [value]"
- DefaultValue=".hxx"
- />
- <StringProperty
- Name="SourceSuffix"
- DisplayName="C++ Source Suffix"
- Category="Output"
- Description="Generated C++ source file suffix"
- Switch="--cxx-suffix [value]"
- DefaultValue=".cxx"
- />
- <StringProperty
- Name="InlineSuffix"
- DisplayName="C++ Inline Suffix"
- Category="Output"
- Description="Generated C++ inline file suffix"
- Switch="--ixx-suffix [value]"
- DefaultValue=".ixx"
- />
- <StringProperty
- Name="ForwardSuffix"
- DisplayName="C++ Forward Declaration Suffix"
- Category="Output"
- Description="Generated C++ forward declaration file suffix"
- Switch="--fwd-suffix [value]"
- DefaultValue="-fwd.hxx"
- />
- <EnumProperty
- Name="CharType"
- DisplayName="Char Type"
- PropertyPageName="Code Generation"
- Description="Character type to be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="char"
- />
- <EnumValue
- Value="1"
- Switch="--char-type wchar_t"
- DisplayName="wchar_t"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="CharEncoding"
- DisplayName="Char Encoding"
- PropertyPageName="Code Generation"
- Description="Character encoding to be used bu the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="UTF-8 (char)/UTF-16 (wchar_t)"
- />
- <EnumValue
- Value="1"
- Switch="--char-encoding iso8859-1"
- DisplayName="ISO-8859-1"
- />
- <EnumValue
- Value="2"
- Switch="--char-encoding lcp"
- DisplayName="Xerces-C++ local code page"
- />
- <EnumValue
- Value="3"
- Switch="--char-encoding custom"
- DisplayName="Custom encoding"
- />
- </Values>
- </EnumProperty>
- <StringProperty
- Name="NamespaceMap"
- DisplayName="Namespace Map"
- PropertyPageName="Code Generation"
- Description="Map XML Schema namespaces to C++ namespaces by specifying a comma-separated list of mapping rules in the form &lt;xml-ns&gt;=&lt;cxx-ns&gt; where &lt;xml-ns&gt; stands for an XML Schema namespace and &lt;cxx-ns&gt; - for a C++ namespace."
- Switch="--namespace-map [value]"
- Delimited="true"
- Delimiters=","
- />
- <BooleanProperty
- Name="GenInline"
- DisplayName="Generate Inline"
- PropertyPageName="Code Generation"
- Description="Generate simple functions inline. This option triggers creation of the inline file."
- Switch="--generate-inline"
- />
- <BooleanProperty
- Name="GenForward"
- DisplayName="Generate Forward"
- PropertyPageName="Code Generation"
- Description="Generate a separate header file with forward declarations for the types being generated."
- Switch="--generate-forward"
- />
- <BooleanProperty
- Name="GenSerialization"
- DisplayName="Generate Serialization"
- PropertyPageName="Code Generation"
- Description="Generate serialization functions. Serialization functions convert the object model back to XML."
- Switch="--generate-serialization"
- />
- <BooleanProperty
- Name="SupParsing"
- DisplayName="Suppress Parsing"
- PropertyPageName="Code Generation"
- Description="Suppress generation of the parsing functions and constructors."
- Switch="--suppress-parsing"
- />
- <BooleanProperty
- Name="GenPolymorphic"
- DisplayName="Generate Polymorphic"
- PropertyPageName="Code Generation"
- Description="Generate polymorphism-aware code. Specify this option if you use substitution groups or xsi:type."
- Switch="--generate-polymorphic"
- />
- <StringProperty
- Name="PolymorphicType"
- DisplayName="Polymorphic Types"
- PropertyPageName="Code Generation"
- Description="Treat specified comma-separated list of types as roots of polymorphic type hierarchies."
- Switch="--polymorphic-type [value]"
- Delimited="true"
- Delimiters=","
- />
- <BooleanProperty
- Name="PolymorphicTypeAll"
- DisplayName="All Types Polymorphic"
- PropertyPageName="Code Generation"
- Description="Indicate that all types should be treated as polymorphic."
- Switch="--polymorphic-type-all"
- />
- <BooleanProperty
- Name="GenOstream"
- DisplayName="Generate Ostream"
- PropertyPageName="Code Generation"
- Description="Generate ostream insertion operators for generated types. This allows to easily print a fragment or the whole object model for debugging or logging."
- Switch="--generate-ostream"
- />
- <BooleanProperty
- Name="GenDoxygen"
- DisplayName="Generate Doxygen"
- PropertyPageName="Code Generation"
- Description="Generate documentation comments suitable for extraction by the Doxygen documentation system."
- Switch="--generate-doxygen"
- />
- <BooleanProperty
- Name="GenComparison"
- DisplayName="Generate Comparison"
- PropertyPageName="Code Generation"
- Description="Generate comparison operators for complex types."
- Switch="--generate-comparison"
- />
- <BooleanProperty
- Name="GenDefaultCtor"
- DisplayName="Generate Default Constructors"
- PropertyPageName="Code Generation"
- Description="Generate default constructors even for types that have required members."
- Switch="--generate-default-ctor"
- />
- <BooleanProperty
- Name="GenFromBaseCtor"
- DisplayName="Generate From-Base Constructors"
- PropertyPageName="Code Generation"
- Description="Generate constructors that expect an instance of a base type followed by all required members."
- Switch="--generate-from-base-ctor"
- />
- <BooleanProperty
- Name="GenDetach"
- DisplayName="Generate Detach"
- PropertyPageName="Code Generation"
- Description="Generate detach functions for required elements and attributes."
- Switch="--generate-detach"
- />
- <BooleanProperty
- Name="GenWildcard"
- DisplayName="Generate Wildcard"
- PropertyPageName="Code Generation"
- Description="Generate accessors and modifiers as well as parsing and serialization code for XML Schema wildcards (any and anyAttribute)."
- Switch="--generate-wildcard"
- />
- <BooleanProperty
- Name="GenElementType"
- DisplayName="Generate Element Types"
- PropertyPageName="Code Generation"
- Description="Generate types instead of parsing and serialization functions for root elements."
- Switch="--generate-element-type"
- />
- <BooleanProperty
- Name="GenElementMap"
- DisplayName="Generate Element Map"
- PropertyPageName="Code Generation"
- Description="Generate a root element map that allows uniform parsing and serialization of multiple root elements."
- Switch="--generate-element-map"
- />
- <BooleanProperty
- Name="GenIntellisense"
- DisplayName="Generate IntelliSense"
- PropertyPageName="Code Generation"
- Description="Generate workarounds for IntelliSense bugs in Visual Studio 2005 (8.0)."
- Switch="--generate-intellisense"
- DefaultValue="true"
- />
- <EnumProperty
- Name="TypeNaming"
- DisplayName="Type Naming"
- PropertyPageName="Code Generation"
- Description="Specify the type naming convention that should be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="K&amp;R"
- />
- <EnumValue
- Value="1"
- Switch="--type-naming java"
- DisplayName="Java"
- />
- <EnumValue
- Value="2"
- Switch="--type-naming ucc"
- DisplayName="Upper Camel Case"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="FunctionNaming"
- DisplayName="Function Naming"
- PropertyPageName="Code Generation"
- Description="Specify the function naming convention that should be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="K&amp;R"
- />
- <EnumValue
- Value="1"
- Switch="--function-naming java"
- DisplayName="Java"
- />
- <EnumValue
- Value="2"
- Switch="--function-naming lcc"
- DisplayName="Lower Camel Case"
- />
- </Values>
- </EnumProperty>
- <StringProperty
- Name="RootElement"
- DisplayName="Root Element"
- PropertyPageName="Code Generation"
- Description="Treat only specified comma-separated list of elements as document roots."
- Switch="--root-element [value]"
- Delimited="true"
- Delimiters=","
- />
- <StringProperty
- Name="ExportSymbol"
- DisplayName="Export Symbol"
- PropertyPageName="Code Generation"
- Description="Insert the specified symbol in places where DLL export/import control statements (__declspec(dllexport/dllimport)) are necessary."
- Switch="--export-symbol [value]"
- />
- <StringProperty
- Name="HxxPrologue"
- DisplayName="Header Prologue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the beginning of the header file."
- Switch="--hxx-prologue-file [value]"
- />
- <StringProperty
- Name="HxxEpilogue"
- DisplayName="Header Epilogue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the end of the header file."
- Switch="--hxx-epilogue-file [value]"
- />
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
diff --git a/dist/etc/vc-9.0/xsd-cxx-parser.rules b/dist/etc/vc-9.0/xsd-cxx-parser.rules
deleted file mode 100644
index a94a3ea..0000000
--- a/dist/etc/vc-9.0/xsd-cxx-parser.rules
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="CodeSynthesis XSD Compiler C++/Parser Mapping Rules"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="C++/Parser Mapping Rule"
- DisplayName="C++/Parser Mapping Rule"
- CommandLine="xsd.exe cxx-parser [AllOptions] [AdditionalOptions] [Inputs]"
- Outputs="[$OutDir]\$(InputName)[$SkelFileSuffix][$HeaderSuffix];[$OutDir]\$(InputName)[$SkelFileSuffix][$SourceSuffix]"
- FileExtensions="*.xsd"
- ExecutionDescription="xsd cxx-parser [Inputs]"
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <StringProperty
- Name="OutDir"
- DisplayName="Output Directory"
- Category="Output"
- Description="Output directory for the generated files"
- Switch="--output-dir [value]"
- DefaultValue="."
- />
- <BooleanProperty
- Name="ProprietaryLicense"
- DisplayName="Proprietary License"
- Category="Licensing"
- Description="Indicate that the generated code is licensed under a proprietary license instead of the GPL."
- Switch="--proprietary-license"
- />
- <StringProperty
- Name="HeaderSuffix"
- DisplayName="C++ Header Suffix "
- Category="Output"
- Description="Generated C++ header file suffix"
- Switch="--hxx-suffix [value]"
- DefaultValue=".hxx"
- />
- <StringProperty
- Name="SourceSuffix"
- DisplayName="C++ Source Suffix"
- Category="Output"
- Description="Generated C++ source file suffix"
- Switch="--cxx-suffix [value]"
- DefaultValue=".cxx"
- />
- <StringProperty
- Name="InlineSuffix"
- DisplayName="C++ Inline Suffix"
- Category="Output"
- Description="Generated C++ inline file suffix"
- Switch="--ixx-suffix [value]"
- DefaultValue=".ixx"
- />
- <StringProperty
- Name="SkelFileSuffix"
- DisplayName="Parser Skeleton File Suffix"
- PropertyPageName="Output"
- Description="Use the provided suffix to construct the names of generated parser skeleton file."
- Switch="--skel-file-suffix [value]"
- DefaultValue="-pskel"
- />
- <EnumProperty
- Name="CharType"
- DisplayName="Char Type"
- PropertyPageName="Code Generation"
- Description="Character type to be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="char"
- />
- <EnumValue
- Value="1"
- Switch="--char-type wchar_t"
- DisplayName="wchar_t"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="CharEncoding"
- DisplayName="Char Encoding"
- PropertyPageName="Code Generation"
- Description="Character encoding to be used bu the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="UTF-8 (char)/UTF-16 (wchar_t)"
- />
- <EnumValue
- Value="1"
- Switch="--char-encoding iso8859-1"
- DisplayName="ISO-8859-1"
- />
- <EnumValue
- Value="2"
- Switch="--char-encoding lcp"
- DisplayName="Xerces-C++ local code page"
- />
- <EnumValue
- Value="3"
- Switch="--char-encoding custom"
- DisplayName="Custom encoding"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="XMLParser"
- DisplayName="Underlying XML Parser"
- PropertyPageName="Code Generation"
- Description="Use the specified parser as the underlying XML parser."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="xerces"
- />
- <EnumValue
- Value="1"
- Switch="--xml-parser expat"
- DisplayName="expat"
- />
- </Values>
- </EnumProperty>
- <StringProperty
- Name="NamespaceMap"
- DisplayName="Namespace Map"
- PropertyPageName="Code Generation"
- Description="Map XML Schema namespaces to C++ namespaces by specifying a comma-separated list of mapping rules in the form &lt;xml-ns&gt;=&lt;cxx-ns&gt; where &lt;xml-ns&gt; stands for an XML Schema namespace and &lt;cxx-ns&gt; - for a C++ namespace."
- Switch="--namespace-map [value]"
- Delimited="true"
- Delimiters=","
- />
- <StringProperty
- Name="TypeMap"
- DisplayName="Type Map"
- PropertyPageName="Code Generation"
- Description="Specify type map files as a comma-separated list."
- Switch="--type-map [value]"
- Delimited="true"
- Delimiters=","
- />
- <BooleanProperty
- Name="GenInline"
- DisplayName="Generate Inline"
- PropertyPageName="Code Generation"
- Description="Generate simple functions inline. This option triggers creation of the inline file."
- Switch="--generate-inline"
- />
- <BooleanProperty
- Name="GenValidation"
- DisplayName="Generate Validation Code"
- PropertyPageName="Code Generation"
- Description="Generate validation code which ensures that instance documents conform to the schema. This is the default for the Expat XML parser."
- Switch="--generate-validation"
- />
- <BooleanProperty
- Name="SupValidation"
- DisplayName="Suppress Validation Code"
- PropertyPageName="Code Generation"
- Description="Suppress generation of validation code. This is the default for the Xerces-C++ XML parser."
- Switch="--suppress-validation"
- />
- <BooleanProperty
- Name="GenPolymorphic"
- DisplayName="Generate Polymorphic"
- PropertyPageName="Code Generation"
- Description="Generate polymorphism-aware code. Specify this option if you use substitution groups or xsi:type."
- Switch="--generate-polymorphic"
- />
- <StringProperty
- Name="SkelTypeSuffix"
- DisplayName="Parser Skeleton Type Suffix"
- PropertyPageName="Code Generation"
- Description="Use the provided suffix to construct the names of generated parser skeletons."
- Switch="--skel-type-suffix [value]"
- DefaultValue="_pskel"
- />
- <StringProperty
- Name="ExportSymbol"
- DisplayName="Export Symbol"
- PropertyPageName="Code Generation"
- Description="Insert the specified symbol in places where DLL export/import control statements (__declspec(dllexport/dllimport)) are necessary."
- Switch="--export-symbol [value]"
- />
- <StringProperty
- Name="HxxPrologue"
- DisplayName="Header Prologue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the beginning of the header file."
- Switch="--hxx-prologue-file [value]"
- />
- <StringProperty
- Name="HxxEpilogue"
- DisplayName="Header Epilogue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the end of the header file."
- Switch="--hxx-epilogue-file [value]"
- />
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
diff --git a/dist/etc/vc-9.0/xsd-cxx-tree.rules b/dist/etc/vc-9.0/xsd-cxx-tree.rules
deleted file mode 100644
index d82d618..0000000
--- a/dist/etc/vc-9.0/xsd-cxx-tree.rules
+++ /dev/null
@@ -1,319 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="CodeSynthesis XSD Compiler C++/Tree Mapping Rules"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="C++/Tree Mapping Rule"
- DisplayName="C++/Tree Mapping Rule"
- CommandLine="xsd.exe cxx-tree [AllOptions] [AdditionalOptions] [Inputs]"
- Outputs="[$OutDir]\$(InputName)[$HeaderSuffix];[$OutDir]\$(InputName)[$SourceSuffix]"
- FileExtensions="*.xsd"
- ExecutionDescription="xsd cxx-tree [Inputs]"
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <StringProperty
- Name="OutDir"
- DisplayName="Output Directory"
- Category="Output"
- Description="Output directory for the generated files"
- Switch="--output-dir [value]"
- DefaultValue="."
- />
- <BooleanProperty
- Name="ProprietaryLicense"
- DisplayName="Proprietary License"
- Category="Licensing"
- Description="Indicate that the generated code is licensed under a proprietary license instead of the GPL."
- Switch="--proprietary-license"
- />
- <StringProperty
- Name="HeaderSuffix"
- DisplayName="C++ Header Suffix "
- Category="Output"
- Description="Generated C++ header file suffix"
- Switch="--hxx-suffix [value]"
- DefaultValue=".hxx"
- />
- <StringProperty
- Name="SourceSuffix"
- DisplayName="C++ Source Suffix"
- Category="Output"
- Description="Generated C++ source file suffix"
- Switch="--cxx-suffix [value]"
- DefaultValue=".cxx"
- />
- <StringProperty
- Name="InlineSuffix"
- DisplayName="C++ Inline Suffix"
- Category="Output"
- Description="Generated C++ inline file suffix"
- Switch="--ixx-suffix [value]"
- DefaultValue=".ixx"
- />
- <StringProperty
- Name="ForwardSuffix"
- DisplayName="C++ Forward Declaration Suffix"
- Category="Output"
- Description="Generated C++ forward declaration file suffix"
- Switch="--fwd-suffix [value]"
- DefaultValue="-fwd.hxx"
- />
- <EnumProperty
- Name="CharType"
- DisplayName="Char Type"
- PropertyPageName="Code Generation"
- Description="Character type to be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="char"
- />
- <EnumValue
- Value="1"
- Switch="--char-type wchar_t"
- DisplayName="wchar_t"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="CharEncoding"
- DisplayName="Char Encoding"
- PropertyPageName="Code Generation"
- Description="Character encoding to be used bu the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="UTF-8 (char)/UTF-16 (wchar_t)"
- />
- <EnumValue
- Value="1"
- Switch="--char-encoding iso8859-1"
- DisplayName="ISO-8859-1"
- />
- <EnumValue
- Value="2"
- Switch="--char-encoding lcp"
- DisplayName="Xerces-C++ local code page"
- />
- <EnumValue
- Value="3"
- Switch="--char-encoding custom"
- DisplayName="Custom encoding"
- />
- </Values>
- </EnumProperty>
- <StringProperty
- Name="NamespaceMap"
- DisplayName="Namespace Map"
- PropertyPageName="Code Generation"
- Description="Map XML Schema namespaces to C++ namespaces by specifying a comma-separated list of mapping rules in the form &lt;xml-ns&gt;=&lt;cxx-ns&gt; where &lt;xml-ns&gt; stands for an XML Schema namespace and &lt;cxx-ns&gt; - for a C++ namespace."
- Switch="--namespace-map [value]"
- Delimited="true"
- Delimiters=","
- />
- <BooleanProperty
- Name="GenInline"
- DisplayName="Generate Inline"
- PropertyPageName="Code Generation"
- Description="Generate simple functions inline. This option triggers creation of the inline file."
- Switch="--generate-inline"
- />
- <BooleanProperty
- Name="GenForward"
- DisplayName="Generate Forward"
- PropertyPageName="Code Generation"
- Description="Generate a separate header file with forward declarations for the types being generated."
- Switch="--generate-forward"
- />
- <BooleanProperty
- Name="GenSerialization"
- DisplayName="Generate Serialization"
- PropertyPageName="Code Generation"
- Description="Generate serialization functions. Serialization functions convert the object model back to XML."
- Switch="--generate-serialization"
- />
- <BooleanProperty
- Name="SupParsing"
- DisplayName="Suppress Parsing"
- PropertyPageName="Code Generation"
- Description="Suppress generation of the parsing functions and constructors."
- Switch="--suppress-parsing"
- />
- <BooleanProperty
- Name="GenPolymorphic"
- DisplayName="Generate Polymorphic"
- PropertyPageName="Code Generation"
- Description="Generate polymorphism-aware code. Specify this option if you use substitution groups or xsi:type."
- Switch="--generate-polymorphic"
- />
- <StringProperty
- Name="PolymorphicType"
- DisplayName="Polymorphic Types"
- PropertyPageName="Code Generation"
- Description="Treat specified comma-separated list of types as roots of polymorphic type hierarchies."
- Switch="--polymorphic-type [value]"
- Delimited="true"
- Delimiters=","
- />
- <BooleanProperty
- Name="PolymorphicTypeAll"
- DisplayName="All Types Polymorphic"
- PropertyPageName="Code Generation"
- Description="Indicate that all types should be treated as polymorphic."
- Switch="--polymorphic-type-all"
- />
- <BooleanProperty
- Name="GenOstream"
- DisplayName="Generate Ostream"
- PropertyPageName="Code Generation"
- Description="Generate ostream insertion operators for generated types. This allows to easily print a fragment or the whole object model for debugging or logging."
- Switch="--generate-ostream"
- />
- <BooleanProperty
- Name="GenDoxygen"
- DisplayName="Generate Doxygen"
- PropertyPageName="Code Generation"
- Description="Generate documentation comments suitable for extraction by the Doxygen documentation system."
- Switch="--generate-doxygen"
- />
- <BooleanProperty
- Name="GenComparison"
- DisplayName="Generate Comparison"
- PropertyPageName="Code Generation"
- Description="Generate comparison operators for complex types."
- Switch="--generate-comparison"
- />
- <BooleanProperty
- Name="GenDefaultCtor"
- DisplayName="Generate Default Constructors"
- PropertyPageName="Code Generation"
- Description="Generate default constructors even for types that have required members."
- Switch="--generate-default-ctor"
- />
- <BooleanProperty
- Name="GenFromBaseCtor"
- DisplayName="Generate From-Base Constructors"
- PropertyPageName="Code Generation"
- Description="Generate constructors that expect an instance of a base type followed by all required members."
- Switch="--generate-from-base-ctor"
- />
- <BooleanProperty
- Name="GenDetach"
- DisplayName="Generate Detach"
- PropertyPageName="Code Generation"
- Description="Generate detach functions for required elements and attributes."
- Switch="--generate-detach"
- />
- <BooleanProperty
- Name="GenWildcard"
- DisplayName="Generate Wildcard"
- PropertyPageName="Code Generation"
- Description="Generate accessors and modifiers as well as parsing and serialization code for XML Schema wildcards (any and anyAttribute)."
- Switch="--generate-wildcard"
- />
- <BooleanProperty
- Name="GenElementType"
- DisplayName="Generate Element Types"
- PropertyPageName="Code Generation"
- Description="Generate types instead of parsing and serialization functions for root elements."
- Switch="--generate-element-type"
- />
- <BooleanProperty
- Name="GenElementMap"
- DisplayName="Generate Element Map"
- PropertyPageName="Code Generation"
- Description="Generate a root element map that allows uniform parsing and serialization of multiple root elements."
- Switch="--generate-element-map"
- />
- <BooleanProperty
- Name="GenIntellisense"
- DisplayName="Generate IntelliSense"
- PropertyPageName="Code Generation"
- Description="Generate workarounds for IntelliSense bugs in Visual Studio 2005 (8.0)."
- Switch="--generate-intellisense"
- />
- <EnumProperty
- Name="TypeNaming"
- DisplayName="Type Naming"
- PropertyPageName="Code Generation"
- Description="Specify the type naming convention that should be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="K&amp;R"
- />
- <EnumValue
- Value="1"
- Switch="--type-naming java"
- DisplayName="Java"
- />
- <EnumValue
- Value="2"
- Switch="--type-naming ucc"
- DisplayName="Upper Camel Case"
- />
- </Values>
- </EnumProperty>
- <EnumProperty
- Name="FunctionNaming"
- DisplayName="Function Naming"
- PropertyPageName="Code Generation"
- Description="Specify the function naming convention that should be used in the generated code."
- >
- <Values>
- <EnumValue
- Value="0"
- DisplayName="K&amp;R"
- />
- <EnumValue
- Value="1"
- Switch="--function-naming java"
- DisplayName="Java"
- />
- <EnumValue
- Value="2"
- Switch="--function-naming lcc"
- DisplayName="Lower Camel Case"
- />
- </Values>
- </EnumProperty>
- <StringProperty
- Name="RootElement"
- DisplayName="Root Element"
- PropertyPageName="Code Generation"
- Description="Treat only specified comma-separated list of elements as document roots."
- Switch="--root-element [value]"
- Delimited="true"
- Delimiters=","
- />
- <StringProperty
- Name="ExportSymbol"
- DisplayName="Export Symbol"
- PropertyPageName="Code Generation"
- Description="Insert the specified symbol in places where DLL export/import control statements (__declspec(dllexport/dllimport)) are necessary."
- Switch="--export-symbol [value]"
- />
- <StringProperty
- Name="HxxPrologue"
- DisplayName="Header Prologue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the beginning of the header file."
- Switch="--hxx-prologue-file [value]"
- />
- <StringProperty
- Name="HxxEpilogue"
- DisplayName="Header Epilogue File"
- PropertyPageName="Code Generation"
- Description="Insert the contents of the file specified at the end of the header file."
- Switch="--hxx-epilogue-file [value]"
- />
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
diff --git a/dist/examples/build/cxx/compilers.make b/dist/examples/build/cxx/compilers.make
deleted file mode 100644
index a3a97be..0000000
--- a/dist/examples/build/cxx/compilers.make
+++ /dev/null
@@ -1,117 +0,0 @@
-# file : examples/build/cxx/compilers.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-CXX := g++
-
-cxx_sign := $(shell t=`$(CXX) -V 2>&1`; if test $$? -eq 0; then echo $$t; fi)
-
-ifeq ($(cxx_sign),)
-cxx_sign := $(shell t=`$(CXX) --version 2>&1`; if test $$? -eq 0; then echo $$t; fi)
-endif
-
-# IBM XL C++ V7.0 returns error code when called with the -qversion option. This
-# complicates our life quite a bit.
-#
-ifeq ($(cxx_sign),)
-cxx_sign := $(shell t=`$(CXX) -qversion 2>/dev/null`; echo $$t)
-ifneq ($(shell echo '$(cxx_sign)' | sed -e 's/^.*IBM XL C\/C.. .*$$//'),)
-cxx_sign :=
-endif
-endif
-
-cxx_id :=
-
-ifneq ($(cxx_sign),)
-
-# GNU g++ (g++)
-#
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^[^ ]* (GCC) .*$$//'),)
-cxx_id := gnu
-endif
-endif
-
-# g++ 4.3 removed GCC for some reason so check for g++ also.
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^g++.*$$//'),)
-cxx_id := gnu
-endif
-endif
-
-# Clang
-#
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^.*clang.*$$//'),)
-cxx_id := clang
-endif
-endif
-
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^.*Clang.*$$//'),)
-cxx_id := clang
-endif
-endif
-
-# Sun C++ (CC)
-#
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^[^ ]* Sun C.. .*$$//'),)
-cxx_id := sun
-endif
-endif
-
-
-# HP C++ (aCC)
-#
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^[^ ]* HP aC..\/ANSI C .* A\.06\..*$$//'),)
-cxx_id := hp
-endif
-endif
-
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^[^ ]* HP C\/aC.. .* A\.06\..*$$//'),)
-cxx_id := hp
-endif
-endif
-
-# Intel C++ (icpc)
-#
-
-# 9.x
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^Intel(R) C.. .*$$//'),)
-cxx_id := intel
-endif
-endif
-
-# 8.x
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^8\..$$//'),)
-cxx_id := intel
-endif
-endif
-
-
-# IBM XL C++
-#
-ifeq ($(cxx_id),)
-ifeq ($(shell echo '$(cxx_sign)' | sed -e 's/^.*IBM XL C\/C.. .*$$//'),)
-cxx_id := ibm
-endif
-endif
-
-
-# Unknown
-#
-ifeq ($(cxx_id),)
-$(warning unknown C++ compiler signature '$(cxx_sign)', continuing anyway)
-endif
-
-
-else
-$(warning unable to obtain compiler signature for '$(CXX)', continuing anyway)
-endif
-
-#$(warning $(cxx_sign))
-#$(warning $(cxx_id))
diff --git a/dist/examples/build/cxx/rules.make b/dist/examples/build/cxx/rules.make
deleted file mode 100644
index 9f31128..0000000
--- a/dist/examples/build/cxx/rules.make
+++ /dev/null
@@ -1,57 +0,0 @@
-# file : examples/build/cxx/rules.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(root)/build/cxx/compilers.make
-
-
-# GNU g++
-#
-ifeq ($(cxx_id),gnu)
- CXXFLAGS := -W -Wall -O3
-endif
-
-# Clang
-#
-ifeq ($(cxx_id),clang)
- CXXFLAGS := -W -O3
-endif
-
-# Intel C++
-#
-ifeq ($(cxx_id),intel)
- CXXFLAGS := -w1 -O2
-endif
-
-
-# Sun C++
-#
-ifeq ($(cxx_id),sun)
- CXXFLAGS := -O
-endif
-
-
-# HP aCC
-#
-ifeq ($(cxx_id),hp)
-
- # By default Xerces-C++ is built with -mt for aCC.
- # 2334 no suitable copy constructor (e.g., for std::auto_ptr)
- #
- CXXFLAGS := -Aa -O -mt +W2334
-endif
-
-
-# IBM XL C++
-#
-ifeq ($(cxx_id),ibm)
- CXXFLAGS := -qrtti -O
-endif
-
-
-# Rules.
-#
-%.o: %.cxx
- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
-
-%: %.o
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
diff --git a/dist/examples/build/xsd/common.make b/dist/examples/build/xsd/common.make
deleted file mode 100644
index ccd5a42..0000000
--- a/dist/examples/build/xsd/common.make
+++ /dev/null
@@ -1,9 +0,0 @@
-# file : examples/build/xsd/common.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-XSD := $(shell if test -x $(root)/../bin/xsd; \
- then echo $(root)/../bin/xsd; \
- else echo xsd; fi)
-
-override CPPFLAGS += $(shell if test -d $(root)/../libxsd; \
- then echo -I$(root)/../libxsd; fi)
diff --git a/dist/examples/build/xsd/parser-rules.make b/dist/examples/build/xsd/parser-rules.make
deleted file mode 100644
index 13addaa..0000000
--- a/dist/examples/build/xsd/parser-rules.make
+++ /dev/null
@@ -1,21 +0,0 @@
-# file : examples/build/xsd/parser-rules.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(root)/build/xsd/common.make
-
-XML_PARSER := xerces
-
-ifeq ($(XML_PARSER),xerces)
-override LIBS := -lxerces-c $(LIBS)
-else
-override LIBS := -lexpat $(LIBS)
-endif
-
-override XSDFLAGS += --xml-parser $(XML_PARSER)
-
-# Rules.
-#
-.PRECIOUS: %-pskel.hxx %-pskel.ixx %-pskel.cxx
-
-%-pskel.hxx %-pskel.ixx %-pskel.cxx: %.xsd
- $(XSD) cxx-parser $(XSDFLAGS) $<
diff --git a/dist/examples/build/xsd/tree-rules.make b/dist/examples/build/xsd/tree-rules.make
deleted file mode 100644
index 2f188cc..0000000
--- a/dist/examples/build/xsd/tree-rules.make
+++ /dev/null
@@ -1,13 +0,0 @@
-# file : examples/build/xsd/tree-rules.make
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(root)/build/xsd/common.make
-
-override LIBS := -lxerces-c $(LIBS)
-
-# Rules.
-#
-.PRECIOUS: %.cxx %.hxx %.ixx
-
-%.cxx %.hxx %.ixx: %.xsd
- $(XSD) cxx-tree $(XSDFLAGS) $<
diff --git a/dist/examples/cxx/makefile b/dist/examples/cxx/makefile
deleted file mode 100644
index 4882e9a..0000000
--- a/dist/examples/cxx/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-dirs := parser tree
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- @$(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/cxx/parser/generated/generated-vc10.vcxproj b/dist/examples/cxx/parser/generated/generated-vc10.vcxproj
deleted file mode 100644
index c20e5be..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc10.vcxproj
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>generated</ProjectName>
- <ProjectGuid>{4277B39A-C9FB-4F10-8223-8DD38053EDA0}</ProjectGuid>
- <RootNamespace>generated</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="library-driver.cxx" />
- <ClCompile Include="library-pimpl.cxx" />
- <ClCompile Include="library-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx" />
- <ClInclude Include="library-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/generated/generated-vc10.vcxproj.filters b/dist/examples/cxx/parser/generated/generated-vc10.vcxproj.filters
deleted file mode 100644
index b2cc277..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc10.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6241A332-00FB-43D7-8E2D-4277B261F512}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{5F7B4073-4744-4C7E-9B74-B5B7D8628B23}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{64b9ddc3-e796-405a-84e3-6e33b610b7ba}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="library-driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/generated/generated-vc11.vcxproj b/dist/examples/cxx/parser/generated/generated-vc11.vcxproj
deleted file mode 100644
index 1df7dd5..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc11.vcxproj
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>generated</ProjectName>
- <ProjectGuid>{4277B39A-C9FB-4F10-8223-8DD38053EDA0}</ProjectGuid>
- <RootNamespace>generated</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="library-driver.cxx" />
- <ClCompile Include="library-pimpl.cxx" />
- <ClCompile Include="library-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx" />
- <ClInclude Include="library-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/generated/generated-vc11.vcxproj.filters b/dist/examples/cxx/parser/generated/generated-vc11.vcxproj.filters
deleted file mode 100644
index b2cc277..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc11.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6241A332-00FB-43D7-8E2D-4277B261F512}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{5F7B4073-4744-4C7E-9B74-B5B7D8628B23}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{64b9ddc3-e796-405a-84e3-6e33b610b7ba}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="library-driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/generated/generated-vc12.vcxproj b/dist/examples/cxx/parser/generated/generated-vc12.vcxproj
deleted file mode 100644
index 21bce27..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc12.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>generated</ProjectName>
- <ProjectGuid>{4277B39A-C9FB-4F10-8223-8DD38053EDA0}</ProjectGuid>
- <RootNamespace>generated</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="library-driver.cxx" />
- <ClCompile Include="library-pimpl.cxx" />
- <ClCompile Include="library-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx" />
- <ClInclude Include="library-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/generated/generated-vc12.vcxproj.filters b/dist/examples/cxx/parser/generated/generated-vc12.vcxproj.filters
deleted file mode 100644
index b2cc277..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc12.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6241A332-00FB-43D7-8E2D-4277B261F512}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{5F7B4073-4744-4C7E-9B74-B5B7D8628B23}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{64b9ddc3-e796-405a-84e3-6e33b610b7ba}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="library-driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/generated/generated-vc8.vcproj b/dist/examples/cxx/parser/generated/generated-vc8.vcproj
deleted file mode 100644
index ee4e0f6..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc8.vcproj
+++ /dev/null
@@ -1,427 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="generated"
- ProjectGUID="{4277B39A-C9FB-4F10-8223-8DD38053EDA0}"
- RootNamespace="generated"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{6241A332-00FB-43D7-8E2D-4277B261F512}"
- >
- <File
- RelativePath=".\library-driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{5F7B4073-4744-4C7E-9B74-B5B7D8628B23}"
- >
- <File
- RelativePath=".\library-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/generated/generated-vc9.vcproj b/dist/examples/cxx/parser/generated/generated-vc9.vcproj
deleted file mode 100644
index 2ffc6dd..0000000
--- a/dist/examples/cxx/parser/generated/generated-vc9.vcproj
+++ /dev/null
@@ -1,424 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="generated"
- ProjectGUID="{4277B39A-C9FB-4F10-8223-8DD38053EDA0}"
- RootNamespace="generated"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{6241A332-00FB-43D7-8E2D-4277B261F512}"
- >
- <File
- RelativePath=".\library-driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{5F7B4073-4744-4C7E-9B74-B5B7D8628B23}"
- >
- <File
- RelativePath=".\library-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-print-impl --generate-test-driver --force-overwrite library.xsd"
- Outputs="library-pskel.hxx;library-pskel.cxx;library-pimpl.hxx;library-pimpl.cxx;library-driver.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/generated/makefile b/dist/examples/cxx/parser/generated/makefile
deleted file mode 100644
index b7bb4b8..0000000
--- a/dist/examples/cxx/parser/generated/makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --generate-print-impl --generate-test-driver
-
-# If you are basing your own code on this example and make changes
-# to the sample implementation and/or test driver, make sure you
-# remove this option or your changes will be lost forever.
-#
-override XSDFLAGS += --force-overwrite
-
-# Build
-#
-library-driver: library-driver.o library-pskel.o library-pimpl.o
-
-library-driver.o: library-driver.cxx library-pimpl.hxx library-pskel.hxx
-library-pimpl.o: library-pimpl.cxx library-pimpl.hxx library-pskel.hxx
-library-pskel.o: library-pskel.cxx library-pskel.hxx
-
-library-pskel.hxx \
-library-pskel.cxx \
-library-pimpl.hxx \
-library-pimpl.cxx \
-library-driver.cxx : library.xsd
-
-# Change the pattern rule from parser-rules.make to include the sample
-# implementation and test driver.
-#
-.PRECIOUS: %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx %-driver.cxx
-
-%-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx %-driver.cxx: %.xsd
- $(XSD) cxx-parser $(XSDFLAGS) $<
-
-
-# Test.
-#
-.PHONY: test
-test: library-driver library.xml
- ./library-driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library-driver.?xx library-pimpl.?xx library-pskel.?xx
- rm -f library-driver.o library-pimpl.o library-pskel.o library-driver
diff --git a/dist/examples/cxx/parser/hello/hello-vc10.vcxproj b/dist/examples/cxx/parser/hello/hello-vc10.vcxproj
deleted file mode 100644
index 8478a29..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc10.vcxproj
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>hello</ProjectName>
- <ProjectGuid>{683E9D46-FCC7-4163-984B-9F399169CF7F}</ProjectGuid>
- <RootNamespace>hello</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="hello-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/hello/hello-vc10.vcxproj.filters b/dist/examples/cxx/parser/hello/hello-vc10.vcxproj.filters
deleted file mode 100644
index 26513bb..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E9BF8C86-0B39-4E45-81D2-35AD75F02C5C}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{3490E63E-27F8-4E29-996F-79F99714DDB3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{338ac052-a215-4fe4-a66b-f6be21b5ffa4}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hello-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/hello/hello-vc11.vcxproj b/dist/examples/cxx/parser/hello/hello-vc11.vcxproj
deleted file mode 100644
index 48a41ac..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc11.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>hello</ProjectName>
- <ProjectGuid>{683E9D46-FCC7-4163-984B-9F399169CF7F}</ProjectGuid>
- <RootNamespace>hello</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="hello-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/hello/hello-vc11.vcxproj.filters b/dist/examples/cxx/parser/hello/hello-vc11.vcxproj.filters
deleted file mode 100644
index 26513bb..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E9BF8C86-0B39-4E45-81D2-35AD75F02C5C}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{3490E63E-27F8-4E29-996F-79F99714DDB3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{338ac052-a215-4fe4-a66b-f6be21b5ffa4}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hello-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/hello/hello-vc12.vcxproj b/dist/examples/cxx/parser/hello/hello-vc12.vcxproj
deleted file mode 100644
index 22ac525..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc12.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>hello</ProjectName>
- <ProjectGuid>{683E9D46-FCC7-4163-984B-9F399169CF7F}</ProjectGuid>
- <RootNamespace>hello</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="hello-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">hello-pskel.hxx;hello-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/hello/hello-vc12.vcxproj.filters b/dist/examples/cxx/parser/hello/hello-vc12.vcxproj.filters
deleted file mode 100644
index 26513bb..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E9BF8C86-0B39-4E45-81D2-35AD75F02C5C}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{3490E63E-27F8-4E29-996F-79F99714DDB3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{338ac052-a215-4fe4-a66b-f6be21b5ffa4}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hello-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/hello/hello-vc8.vcproj b/dist/examples/cxx/parser/hello/hello-vc8.vcproj
deleted file mode 100644
index a19fb43..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc8.vcproj
+++ /dev/null
@@ -1,419 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="hello"
- ProjectGUID="{683E9D46-FCC7-4163-984B-9F399169CF7F}"
- RootNamespace="hello"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E9BF8C86-0B39-4E45-81D2-35AD75F02C5C}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\hello-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{3490E63E-27F8-4E29-996F-79F99714DDB3}"
- >
- <File
- RelativePath=".\hello-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\hello.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/hello/hello-vc9.vcproj b/dist/examples/cxx/parser/hello/hello-vc9.vcproj
deleted file mode 100644
index 9d0e755..0000000
--- a/dist/examples/cxx/parser/hello/hello-vc9.vcproj
+++ /dev/null
@@ -1,416 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="hello"
- ProjectGUID="{683E9D46-FCC7-4163-984B-9F399169CF7F}"
- RootNamespace="hello"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E9BF8C86-0B39-4E45-81D2-35AD75F02C5C}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\hello-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{3490E63E-27F8-4E29-996F-79F99714DDB3}"
- >
- <File
- RelativePath=".\hello-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\hello.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd cxx-parser hello.xsd"
- Outputs="hello-pskel.hxx;hello-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/hello/makefile b/dist/examples/cxx/parser/hello/makefile
deleted file mode 100644
index 5746c6f..0000000
--- a/dist/examples/cxx/parser/hello/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-
-# Build.
-#
-driver: driver.o hello-pskel.o
-
-driver.o: driver.cxx hello-pskel.hxx
-hello-pskel.o: hello-pskel.cxx hello-pskel.hxx
-
-hello-pskel.hxx hello-pskel.cxx: hello.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver hello.xml
- ./driver hello.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f hello-pskel.?xx hello-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/library/library-vc10.vcxproj b/dist/examples/cxx/parser/library/library-vc10.vcxproj
deleted file mode 100644
index c9046d7..0000000
--- a/dist/examples/cxx/parser/library/library-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>library</ProjectName>
- <ProjectGuid>{D66DAC4D-133C-4DB5-923F-C88A961C3C51}</ProjectGuid>
- <RootNamespace>library</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library-pimpl.cxx" />
- <ClCompile Include="library-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx" />
- <ClInclude Include="library-pskel.hxx" />
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library-pskel.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/library/library-vc10.vcxproj.filters b/dist/examples/cxx/parser/library/library-vc10.vcxproj.filters
deleted file mode 100644
index 30f473b..0000000
--- a/dist/examples/cxx/parser/library/library-vc10.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4044D311-878E-4632-B816-7810045EF3F1}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{4F90DEB0-060B-4976-949A-66FFB902F598}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{a31fd2f2-4ce6-4ee0-962d-68d213bc7b1b}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8e9fd809-af45-49e4-95b8-d2becff77db5}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="library-pskel.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/library/library-vc11.vcxproj b/dist/examples/cxx/parser/library/library-vc11.vcxproj
deleted file mode 100644
index daa5ef3..0000000
--- a/dist/examples/cxx/parser/library/library-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>library</ProjectName>
- <ProjectGuid>{D66DAC4D-133C-4DB5-923F-C88A961C3C51}</ProjectGuid>
- <RootNamespace>library</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library-pimpl.cxx" />
- <ClCompile Include="library-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx" />
- <ClInclude Include="library-pskel.hxx" />
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library-pskel.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/library/library-vc11.vcxproj.filters b/dist/examples/cxx/parser/library/library-vc11.vcxproj.filters
deleted file mode 100644
index 30f473b..0000000
--- a/dist/examples/cxx/parser/library/library-vc11.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4044D311-878E-4632-B816-7810045EF3F1}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{4F90DEB0-060B-4976-949A-66FFB902F598}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{a31fd2f2-4ce6-4ee0-962d-68d213bc7b1b}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8e9fd809-af45-49e4-95b8-d2becff77db5}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="library-pskel.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/library/library-vc12.vcxproj b/dist/examples/cxx/parser/library/library-vc12.vcxproj
deleted file mode 100644
index 345226f..0000000
--- a/dist/examples/cxx/parser/library/library-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>library</ProjectName>
- <ProjectGuid>{D66DAC4D-133C-4DB5-923F-C88A961C3C51}</ProjectGuid>
- <RootNamespace>library</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library-pimpl.cxx" />
- <ClCompile Include="library-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx" />
- <ClInclude Include="library-pskel.hxx" />
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library-pskel.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-inline --type-map library.map library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library-pskel.hxx;library-pskel.ixx;library-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/library/library-vc12.vcxproj.filters b/dist/examples/cxx/parser/library/library-vc12.vcxproj.filters
deleted file mode 100644
index 30f473b..0000000
--- a/dist/examples/cxx/parser/library/library-vc12.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4044D311-878E-4632-B816-7810045EF3F1}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{4F90DEB0-060B-4976-949A-66FFB902F598}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{a31fd2f2-4ce6-4ee0-962d-68d213bc7b1b}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8e9fd809-af45-49e4-95b8-d2becff77db5}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="library-pskel.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/library/library-vc8.vcproj b/dist/examples/cxx/parser/library/library-vc8.vcproj
deleted file mode 100644
index f5bb549..0000000
--- a/dist/examples/cxx/parser/library/library-vc8.vcproj
+++ /dev/null
@@ -1,440 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="library"
- ProjectGUID="{D66DAC4D-133C-4DB5-923F-C88A961C3C51}"
- RootNamespace="library"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4044D311-878E-4632-B816-7810045EF3F1}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{4F90DEB0-060B-4976-949A-66FFB902F598}"
- >
- <File
- RelativePath=".\library-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\library-pskel.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/library/library-vc9.vcproj b/dist/examples/cxx/parser/library/library-vc9.vcproj
deleted file mode 100644
index 1348f83..0000000
--- a/dist/examples/cxx/parser/library/library-vc9.vcproj
+++ /dev/null
@@ -1,437 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="library"
- ProjectGUID="{D66DAC4D-133C-4DB5-923F-C88A961C3C51}"
- RootNamespace="library"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4044D311-878E-4632-B816-7810045EF3F1}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{4F90DEB0-060B-4976-949A-66FFB902F598}"
- >
- <File
- RelativePath=".\library-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\library-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\library-pskel.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-parser --generate-inline --type-map library.map library.xsd"
- Outputs="library-pskel.hxx;library-pskel.ixx;library-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/library/makefile b/dist/examples/cxx/parser/library/makefile
deleted file mode 100644
index f96353b..0000000
--- a/dist/examples/cxx/parser/library/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --generate-inline --type-map library.map
-
-# Build
-#
-driver: driver.o library-pskel.o library-pimpl.o
-
-driver.o: driver.cxx library-pimpl.hxx library-pskel.hxx library.hxx
-library-pimpl.o: library-pimpl.cxx library-pimpl.hxx library-pskel.hxx library.hxx
-library-pskel.o: library-pskel.cxx library-pskel.hxx library.hxx
-
-library-pskel.hxx library-pskel.ixx library-pskel.cxx: library.xsd library.map
-
-
-# Test.
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library-pskel.?xx library-pimpl.o library-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/makefile b/dist/examples/cxx/parser/makefile
deleted file mode 100644
index b778cbd..0000000
--- a/dist/examples/cxx/parser/makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-dirs := generated hello library mixin mixed multiroot performance \
-polymorphism polyroot wildcard
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- @$(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/cxx/parser/mixed/makefile b/dist/examples/cxx/parser/mixed/makefile
deleted file mode 100644
index edd28b2..0000000
--- a/dist/examples/cxx/parser/mixed/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --type-map text.map
-
-# Build.
-#
-driver: driver.o text-pskel.o
-
-driver.o: driver.cxx text-pskel.hxx anchor.hxx
-text-pskel.o: text-pskel.cxx text-pskel.hxx anchor.hxx
-
-text-pskel.hxx text-pskel.cxx: text.xsd text.map
-
-
-# Test.
-#
-.PHONY: test
-test: driver text.xml
- ./driver text.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f text-pskel.?xx text-pskel.o driver.o driver
-
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj b/dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj
deleted file mode 100644
index d940e8d..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{304FD6A7-6C73-41C3-B489-97FD5E635CCB}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="anchor.hxx" />
- <ClInclude Include="text-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj.filters b/dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj.filters
deleted file mode 100644
index 9d5bb36..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc10.vcxproj.filters
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8E9A9B27-1882-4B49-9451-345FEED45AEE}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{0BDCEBD5-F78D-437D-BED5-4507831FA9E8}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{748ddcb3-bd88-48b4-b396-d1d3fef8a4e6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="anchor.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="text-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj b/dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj
deleted file mode 100644
index 00b00a2..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{304FD6A7-6C73-41C3-B489-97FD5E635CCB}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="anchor.hxx" />
- <ClInclude Include="text-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj.filters b/dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj.filters
deleted file mode 100644
index 9d5bb36..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc11.vcxproj.filters
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8E9A9B27-1882-4B49-9451-345FEED45AEE}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{0BDCEBD5-F78D-437D-BED5-4507831FA9E8}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{748ddcb3-bd88-48b4-b396-d1d3fef8a4e6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="anchor.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="text-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj b/dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj
deleted file mode 100644
index d9e63ed..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{304FD6A7-6C73-41C3-B489-97FD5E635CCB}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="anchor.hxx" />
- <ClInclude Include="text-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map text.map text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text-pskel.hxx;text-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj.filters b/dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj.filters
deleted file mode 100644
index 9d5bb36..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc12.vcxproj.filters
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8E9A9B27-1882-4B49-9451-345FEED45AEE}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{0BDCEBD5-F78D-437D-BED5-4507831FA9E8}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{748ddcb3-bd88-48b4-b396-d1d3fef8a4e6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="anchor.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="text-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc8.vcproj b/dist/examples/cxx/parser/mixed/mixed-vc8.vcproj
deleted file mode 100644
index 91906be..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mixed"
- ProjectGUID="{304FD6A7-6C73-41C3-B489-97FD5E635CCB}"
- RootNamespace="mixed"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{8E9A9B27-1882-4B49-9451-345FEED45AEE}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\text-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{0BDCEBD5-F78D-437D-BED5-4507831FA9E8}"
- >
- <File
- RelativePath=".\anchor.hxx"
- >
- </File>
- <File
- RelativePath=".\text-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\text.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/mixed/mixed-vc9.vcproj b/dist/examples/cxx/parser/mixed/mixed-vc9.vcproj
deleted file mode 100644
index f2eb5f1..0000000
--- a/dist/examples/cxx/parser/mixed/mixed-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="mixed"
- ProjectGUID="{304FD6A7-6C73-41C3-B489-97FD5E635CCB}"
- RootNamespace="mixed"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{8E9A9B27-1882-4B49-9451-345FEED45AEE}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\text-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{0BDCEBD5-F78D-437D-BED5-4507831FA9E8}"
- >
- <File
- RelativePath=".\anchor.hxx"
- >
- </File>
- <File
- RelativePath=".\text-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\text.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd cxx-parser --type-map text.map text.xsd"
- Outputs="text-pskel.hxx;text-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/mixin/makefile b/dist/examples/cxx/parser/mixin/makefile
deleted file mode 100644
index 551519d..0000000
--- a/dist/examples/cxx/parser/mixin/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --type-map schema.map
-
-
-# Build.
-#
-driver: driver.o schema-pskel.o
-
-driver.o: driver.cxx schema-pskel.hxx types.hxx
-schema-pskel.o: schema-pskel.cxx schema-pskel.hxx types.hxx
-
-schema-pskel.hxx schema-pskel.cxx: schema.xsd schema.map
-
-# Test.
-#
-.PHONY: test
-test: driver instance.xml
- ./driver instance.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f schema-pskel.?xx schema-pskel.o driver.o driver
-
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj b/dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj
deleted file mode 100644
index 729240e..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixin</ProjectName>
- <ProjectGuid>{8CCA6181-F2CE-4E5E-A20E-4E1E53A35125}</ProjectGuid>
- <RootNamespace>mixin</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="schema-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="schema-pskel.hxx" />
- <ClInclude Include="types.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="schema.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj.filters b/dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj.filters
deleted file mode 100644
index 4fd62ea..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc10.vcxproj.filters
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4BF1C3D0-33B1-4924-9F8C-4DD7B7765D82}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{A4012AA7-A8FE-4CE8-9BB0-1DBA14C2CEAD}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{1772a873-01ce-415d-a4e7-b107ecfb3d0f}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="schema-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="schema-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="types.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="schema.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj b/dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj
deleted file mode 100644
index 7de773e..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixin</ProjectName>
- <ProjectGuid>{8CCA6181-F2CE-4E5E-A20E-4E1E53A35125}</ProjectGuid>
- <RootNamespace>mixin</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="schema-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="schema-pskel.hxx" />
- <ClInclude Include="types.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="schema.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj.filters b/dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj.filters
deleted file mode 100644
index 4fd62ea..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc11.vcxproj.filters
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4BF1C3D0-33B1-4924-9F8C-4DD7B7765D82}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{A4012AA7-A8FE-4CE8-9BB0-1DBA14C2CEAD}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{1772a873-01ce-415d-a4e7-b107ecfb3d0f}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="schema-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="schema-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="types.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="schema.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj b/dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj
deleted file mode 100644
index 83771b4..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixin</ProjectName>
- <ProjectGuid>{8CCA6181-F2CE-4E5E-A20E-4E1E53A35125}</ProjectGuid>
- <RootNamespace>mixin</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="schema-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="schema-pskel.hxx" />
- <ClInclude Include="types.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="schema.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd schema.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map schema.map schema.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">schema-pskel.hxx;schema-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj.filters b/dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj.filters
deleted file mode 100644
index 4fd62ea..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc12.vcxproj.filters
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4BF1C3D0-33B1-4924-9F8C-4DD7B7765D82}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{A4012AA7-A8FE-4CE8-9BB0-1DBA14C2CEAD}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{1772a873-01ce-415d-a4e7-b107ecfb3d0f}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="schema-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="schema-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="types.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="schema.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc8.vcproj b/dist/examples/cxx/parser/mixin/mixin-vc8.vcproj
deleted file mode 100644
index 384e122..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mixin"
- ProjectGUID="{8CCA6181-F2CE-4E5E-A20E-4E1E53A35125}"
- RootNamespace="mixin"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4BF1C3D0-33B1-4924-9F8C-4DD7B7765D82}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\schema-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{A4012AA7-A8FE-4CE8-9BB0-1DBA14C2CEAD}"
- >
- <File
- RelativePath=".\schema-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\types.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\schema.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/mixin/mixin-vc9.vcproj b/dist/examples/cxx/parser/mixin/mixin-vc9.vcproj
deleted file mode 100644
index 9cdccb3..0000000
--- a/dist/examples/cxx/parser/mixin/mixin-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="mixin"
- ProjectGUID="{8CCA6181-F2CE-4E5E-A20E-4E1E53A35125}"
- RootNamespace="mixin"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4BF1C3D0-33B1-4924-9F8C-4DD7B7765D82}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\schema-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{A4012AA7-A8FE-4CE8-9BB0-1DBA14C2CEAD}"
- >
- <File
- RelativePath=".\schema-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\types.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\schema.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd schema.xsd"
- CommandLine="xsd cxx-parser --type-map schema.map schema.xsd"
- Outputs="schema-pskel.hxx;schema-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/multiroot/makefile b/dist/examples/cxx/parser/multiroot/makefile
deleted file mode 100644
index c45e3f3..0000000
--- a/dist/examples/cxx/parser/multiroot/makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --type-map protocol.map
-
-# Build
-#
-driver: driver.o protocol-pskel.o protocol-pimpl.o
-
-driver.o: driver.cxx protocol-pimpl.hxx protocol-pskel.hxx protocol.hxx
-protocol-pimpl.o: protocol-pimpl.cxx protocol-pimpl.hxx protocol-pskel.hxx protocol.hxx
-protocol-pskel.o: protocol-pskel.cxx protocol-pskel.hxx protocol.hxx
-
-protocol-pskel.hxx protocol-pskel.cxx: protocol.xsd protocol.map
-
-
-# Test.
-#
-.PHONY: test
-test: driver balance.xml withdraw.xml deposit.xml
- ./driver balance.xml
- ./driver withdraw.xml
- ./driver deposit.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f protocol-pskel.?xx protocol-pimpl.o protocol-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj b/dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj
deleted file mode 100644
index dac752c..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>multiroot</ProjectName>
- <ProjectGuid>{3AC187DF-4FDF-40B7-9E12-002DC0A15EDB}</ProjectGuid>
- <RootNamespace>multiroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol-pimpl.cxx" />
- <ClCompile Include="protocol-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="protocol-pimpl.hxx" />
- <ClInclude Include="protocol-pskel.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj.filters b/dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj.filters
deleted file mode 100644
index 2b80057..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc10.vcxproj.filters
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{5CA12033-B9C7-4B8D-95C9-BC1D88DFB211}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{5F7258C7-69F9-44AC-8651-7ABC08C70815}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8a01b14f-5199-4686-a4e8-419ab31b3ea3}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="protocol-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj b/dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj
deleted file mode 100644
index 9a5497d..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>multiroot</ProjectName>
- <ProjectGuid>{3AC187DF-4FDF-40B7-9E12-002DC0A15EDB}</ProjectGuid>
- <RootNamespace>multiroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol-pimpl.cxx" />
- <ClCompile Include="protocol-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="protocol-pimpl.hxx" />
- <ClInclude Include="protocol-pskel.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj.filters b/dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj.filters
deleted file mode 100644
index 2b80057..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc11.vcxproj.filters
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{5CA12033-B9C7-4B8D-95C9-BC1D88DFB211}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{5F7258C7-69F9-44AC-8651-7ABC08C70815}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8a01b14f-5199-4686-a4e8-419ab31b3ea3}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="protocol-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj b/dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj
deleted file mode 100644
index a8a41dc..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>multiroot</ProjectName>
- <ProjectGuid>{3AC187DF-4FDF-40B7-9E12-002DC0A15EDB}</ProjectGuid>
- <RootNamespace>multiroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol-pimpl.cxx" />
- <ClCompile Include="protocol-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="protocol-pimpl.hxx" />
- <ClInclude Include="protocol-pskel.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --type-map protocol.map protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol-pskel.hxx;protocol-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj.filters b/dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj.filters
deleted file mode 100644
index 2b80057..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc12.vcxproj.filters
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{5CA12033-B9C7-4B8D-95C9-BC1D88DFB211}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{5F7258C7-69F9-44AC-8651-7ABC08C70815}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8a01b14f-5199-4686-a4e8-419ab31b3ea3}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="protocol-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc8.vcproj b/dist/examples/cxx/parser/multiroot/multiroot-vc8.vcproj
deleted file mode 100644
index a37ec06..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc8.vcproj
+++ /dev/null
@@ -1,435 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="multiroot"
- ProjectGUID="{3AC187DF-4FDF-40B7-9E12-002DC0A15EDB}"
- RootNamespace="multiroot"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{5CA12033-B9C7-4B8D-95C9-BC1D88DFB211}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{5F7258C7-69F9-44AC-8651-7ABC08C70815}"
- >
- <File
- RelativePath=".\protocol-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\protocol.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/multiroot/multiroot-vc9.vcproj b/dist/examples/cxx/parser/multiroot/multiroot-vc9.vcproj
deleted file mode 100644
index 75ef5e6..0000000
--- a/dist/examples/cxx/parser/multiroot/multiroot-vc9.vcproj
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="multiroot"
- ProjectGUID="{3AC187DF-4FDF-40B7-9E12-002DC0A15EDB}"
- RootNamespace="multiroot"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{5CA12033-B9C7-4B8D-95C9-BC1D88DFB211}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{5F7258C7-69F9-44AC-8651-7ABC08C70815}"
- >
- <File
- RelativePath=".\protocol-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\protocol.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-parser --type-map protocol.map protocol.xsd"
- Outputs="protocol-pskel.hxx;protocol-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/performance/makefile b/dist/examples/cxx/parser/performance/makefile
deleted file mode 100644
index a98e86a..0000000
--- a/dist/examples/cxx/parser/performance/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --generate-inline
-
-# Build.
-#
-driver: driver.o test-pskel.o time.o
-
-driver.o: driver.cxx test-pskel.hxx test-pskel.ixx time.hxx
-test-pskel.o: test-pskel.cxx test-pskel.hxx test-pskel.ixx
-time.o: time.cxx time.hxx
-
-test-pskel.hxx test-pskel.ixx test-pskel.cxx: test.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver test-50k.xml
- ./driver test-50k.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f test-pskel.?xx test-pskel.o driver.o time.o driver
diff --git a/dist/examples/cxx/parser/performance/performance-vc10.vcxproj b/dist/examples/cxx/parser/performance/performance-vc10.vcxproj
deleted file mode 100644
index 42bc963..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc10.vcxproj
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>performance</ProjectName>
- <ProjectGuid>{676CB1A8-1060-4B7F-86FA-5F8F01AB80BD}</ProjectGuid>
- <RootNamespace>performance</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="test-pskel.cxx" />
- <ClCompile Include="time.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test-pskel.hxx" />
- <ClInclude Include="time.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/performance/performance-vc10.vcxproj.filters b/dist/examples/cxx/parser/performance/performance-vc10.vcxproj.filters
deleted file mode 100644
index 43190f1..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc10.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{699BF138-9DA5-4EC4-9796-4033D1E443E8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6B5C0740-D0B1-4A08-8657-DA9977EBA68D}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{d885db2b-37d2-476b-964e-0f50c5f851d4}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="test-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="time.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="time.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/performance/performance-vc11.vcxproj b/dist/examples/cxx/parser/performance/performance-vc11.vcxproj
deleted file mode 100644
index 4d02641..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc11.vcxproj
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>performance</ProjectName>
- <ProjectGuid>{676CB1A8-1060-4B7F-86FA-5F8F01AB80BD}</ProjectGuid>
- <RootNamespace>performance</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="test-pskel.cxx" />
- <ClCompile Include="time.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test-pskel.hxx" />
- <ClInclude Include="time.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/performance/performance-vc11.vcxproj.filters b/dist/examples/cxx/parser/performance/performance-vc11.vcxproj.filters
deleted file mode 100644
index 43190f1..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc11.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{699BF138-9DA5-4EC4-9796-4033D1E443E8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6B5C0740-D0B1-4A08-8657-DA9977EBA68D}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{d885db2b-37d2-476b-964e-0f50c5f851d4}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="test-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="time.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="time.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/performance/performance-vc12.vcxproj b/dist/examples/cxx/parser/performance/performance-vc12.vcxproj
deleted file mode 100644
index b9bdd1c..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc12.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>performance</ProjectName>
- <ProjectGuid>{676CB1A8-1060-4B7F-86FA-5F8F01AB80BD}</ProjectGuid>
- <RootNamespace>performance</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="test-pskel.cxx" />
- <ClCompile Include="time.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test-pskel.hxx" />
- <ClInclude Include="time.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-inline test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test-pskel.hxx;test-pskel.ixx;test-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/performance/performance-vc12.vcxproj.filters b/dist/examples/cxx/parser/performance/performance-vc12.vcxproj.filters
deleted file mode 100644
index 43190f1..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc12.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{699BF138-9DA5-4EC4-9796-4033D1E443E8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6B5C0740-D0B1-4A08-8657-DA9977EBA68D}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{d885db2b-37d2-476b-964e-0f50c5f851d4}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="test-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="time.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="time.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/performance/performance-vc8.vcproj b/dist/examples/cxx/parser/performance/performance-vc8.vcproj
deleted file mode 100644
index 867ecbb..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc8.vcproj
+++ /dev/null
@@ -1,427 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="performance"
- ProjectGUID="{676CB1A8-1060-4B7F-86FA-5F8F01AB80BD}"
- RootNamespace="performance"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{699BF138-9DA5-4EC4-9796-4033D1E443E8}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\test-pskel.cxx"
- >
- </File>
- <File
- RelativePath=".\time.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{6B5C0740-D0B1-4A08-8657-DA9977EBA68D}"
- >
- <File
- RelativePath=".\test-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\time.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\test.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/performance/performance-vc9.vcproj b/dist/examples/cxx/parser/performance/performance-vc9.vcproj
deleted file mode 100644
index 3fd46c7..0000000
--- a/dist/examples/cxx/parser/performance/performance-vc9.vcproj
+++ /dev/null
@@ -1,424 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="performance"
- ProjectGUID="{676CB1A8-1060-4B7F-86FA-5F8F01AB80BD}"
- RootNamespace="performance"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{699BF138-9DA5-4EC4-9796-4033D1E443E8}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\test-pskel.cxx"
- >
- </File>
- <File
- RelativePath=".\time.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{6B5C0740-D0B1-4A08-8657-DA9977EBA68D}"
- >
- <File
- RelativePath=".\test-pskel.hxx"
- >
- </File>
- <File
- RelativePath=".\time.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\test.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-parser --generate-inline test.xsd"
- Outputs="test-pskel.hxx;test-pskel.ixx;test-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/polymorphism/makefile b/dist/examples/cxx/parser/polymorphism/makefile
deleted file mode 100644
index 935661d..0000000
--- a/dist/examples/cxx/parser/polymorphism/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --generate-polymorphic
-
-# Build
-#
-driver: driver.o supermen-pskel.o supermen-pimpl.o
-
-driver.o: driver.cxx supermen-pimpl.hxx supermen-pskel.hxx
-supermen-pimpl.o: supermen-pimpl.cxx supermen-pimpl.hxx supermen-pskel.hxx
-supermen-pskel.o: supermen-pskel.cxx supermen-pskel.hxx
-
-supermen-pskel.hxx supermen-pskel.cxx: supermen.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver supermen.xml
- ./driver supermen.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f supermen-pskel.?xx supermen-pimpl.o supermen-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj b/dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj
deleted file mode 100644
index 57c60a3..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polymorphism</ProjectName>
- <ProjectGuid>{E05F914A-490B-4780-9BAB-1ED225B3DBEE}</ProjectGuid>
- <RootNamespace>polymorphism</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen-pimpl.cxx" />
- <ClCompile Include="supermen-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx" />
- <ClInclude Include="supermen-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj.filters b/dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj.filters
deleted file mode 100644
index eb84ea1..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc10.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1B970E5F-EBC0-44A7-A542-7EBFADBF1573}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{B49CCB93-BC13-4222-A005-6785C8220E30}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{408b97b6-8a71-4f5b-976a-dc6c59b92362}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="supermen-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj b/dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj
deleted file mode 100644
index 19e2659..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polymorphism</ProjectName>
- <ProjectGuid>{E05F914A-490B-4780-9BAB-1ED225B3DBEE}</ProjectGuid>
- <RootNamespace>polymorphism</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen-pimpl.cxx" />
- <ClCompile Include="supermen-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx" />
- <ClInclude Include="supermen-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj.filters b/dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj.filters
deleted file mode 100644
index eb84ea1..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc11.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1B970E5F-EBC0-44A7-A542-7EBFADBF1573}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{B49CCB93-BC13-4222-A005-6785C8220E30}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{408b97b6-8a71-4f5b-976a-dc6c59b92362}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="supermen-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj b/dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj
deleted file mode 100644
index 775d69d..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polymorphism</ProjectName>
- <ProjectGuid>{E05F914A-490B-4780-9BAB-1ED225B3DBEE}</ProjectGuid>
- <RootNamespace>polymorphism</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen-pimpl.cxx" />
- <ClCompile Include="supermen-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx" />
- <ClInclude Include="supermen-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj.filters b/dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj.filters
deleted file mode 100644
index eb84ea1..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc12.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1B970E5F-EBC0-44A7-A542-7EBFADBF1573}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{B49CCB93-BC13-4222-A005-6785C8220E30}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{408b97b6-8a71-4f5b-976a-dc6c59b92362}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="supermen-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc8.vcproj b/dist/examples/cxx/parser/polymorphism/polymorphism-vc8.vcproj
deleted file mode 100644
index fb4f951..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc8.vcproj
+++ /dev/null
@@ -1,431 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="polymorphism"
- ProjectGUID="{E05F914A-490B-4780-9BAB-1ED225B3DBEE}"
- RootNamespace="polymorphism"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{1B970E5F-EBC0-44A7-A542-7EBFADBF1573}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{B49CCB93-BC13-4222-A005-6785C8220E30}"
- >
- <File
- RelativePath=".\supermen-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\supermen.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/polymorphism/polymorphism-vc9.vcproj b/dist/examples/cxx/parser/polymorphism/polymorphism-vc9.vcproj
deleted file mode 100644
index 9759681..0000000
--- a/dist/examples/cxx/parser/polymorphism/polymorphism-vc9.vcproj
+++ /dev/null
@@ -1,428 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="polymorphism"
- ProjectGUID="{E05F914A-490B-4780-9BAB-1ED225B3DBEE}"
- RootNamespace="polymorphism"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{1B970E5F-EBC0-44A7-A542-7EBFADBF1573}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{B49CCB93-BC13-4222-A005-6785C8220E30}"
- >
- <File
- RelativePath=".\supermen-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\supermen.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/polyroot/makefile b/dist/examples/cxx/parser/polyroot/makefile
deleted file mode 100644
index 487ad08..0000000
--- a/dist/examples/cxx/parser/polyroot/makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-override XSDFLAGS += --generate-polymorphic
-
-# Build
-#
-driver: driver.o supermen-pskel.o supermen-pimpl.o
-
-driver.o: driver.cxx supermen-pimpl.hxx supermen-pskel.hxx
-supermen-pimpl.o: supermen-pimpl.cxx supermen-pimpl.hxx supermen-pskel.hxx
-supermen-pskel.o: supermen-pskel.cxx supermen-pskel.hxx
-
-supermen-pskel.hxx supermen-pskel.cxx: supermen.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver person.xml superman.xml batman.xml
- ./driver person.xml
- ./driver superman.xml
- ./driver batman.xml
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f supermen-pskel.?xx supermen-pimpl.o supermen-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj b/dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj
deleted file mode 100644
index 897a3a1..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polyroot</ProjectName>
- <ProjectGuid>{FB2098FC-CE8C-4A6B-A064-E2705324A16A}</ProjectGuid>
- <RootNamespace>polyroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen-pimpl.cxx" />
- <ClCompile Include="supermen-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx" />
- <ClInclude Include="supermen-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj.filters b/dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj.filters
deleted file mode 100644
index 5b0ee29..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc10.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{00F2FCE3-0165-405E-B027-F51956F669D1}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6F6E09B9-C59E-45EE-BC77-C2F22039A485}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{91582f5b-59e2-4b82-9325-b99cf969649e}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="supermen-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj b/dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj
deleted file mode 100644
index 86427ed..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polyroot</ProjectName>
- <ProjectGuid>{FB2098FC-CE8C-4A6B-A064-E2705324A16A}</ProjectGuid>
- <RootNamespace>polyroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen-pimpl.cxx" />
- <ClCompile Include="supermen-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx" />
- <ClInclude Include="supermen-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj.filters b/dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj.filters
deleted file mode 100644
index 5b0ee29..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc11.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{00F2FCE3-0165-405E-B027-F51956F669D1}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6F6E09B9-C59E-45EE-BC77-C2F22039A485}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{91582f5b-59e2-4b82-9325-b99cf969649e}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="supermen-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj b/dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj
deleted file mode 100644
index 079305b..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polyroot</ProjectName>
- <ProjectGuid>{FB2098FC-CE8C-4A6B-A064-E2705324A16A}</ProjectGuid>
- <RootNamespace>polyroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen-pimpl.cxx" />
- <ClCompile Include="supermen-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx" />
- <ClInclude Include="supermen-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser --generate-polymorphic supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen-pskel.hxx;supermen-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj.filters b/dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj.filters
deleted file mode 100644
index 5b0ee29..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc12.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{00F2FCE3-0165-405E-B027-F51956F669D1}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6F6E09B9-C59E-45EE-BC77-C2F22039A485}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{91582f5b-59e2-4b82-9325-b99cf969649e}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pimpl.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen-pimpl.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="supermen-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc8.vcproj b/dist/examples/cxx/parser/polyroot/polyroot-vc8.vcproj
deleted file mode 100644
index 322f814..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc8.vcproj
+++ /dev/null
@@ -1,431 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="polyroot"
- ProjectGUID="{FB2098FC-CE8C-4A6B-A064-E2705324A16A}"
- RootNamespace="polyroot"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{00F2FCE3-0165-405E-B027-F51956F669D1}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{6F6E09B9-C59E-45EE-BC77-C2F22039A485}"
- >
- <File
- RelativePath=".\supermen-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\supermen.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/polyroot/polyroot-vc9.vcproj b/dist/examples/cxx/parser/polyroot/polyroot-vc9.vcproj
deleted file mode 100644
index fd72439..0000000
--- a/dist/examples/cxx/parser/polyroot/polyroot-vc9.vcproj
+++ /dev/null
@@ -1,428 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="polyroot"
- ProjectGUID="{FB2098FC-CE8C-4A6B-A064-E2705324A16A}"
- RootNamespace="polyroot"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{00F2FCE3-0165-405E-B027-F51956F669D1}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pimpl.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{6F6E09B9-C59E-45EE-BC77-C2F22039A485}"
- >
- <File
- RelativePath=".\supermen-pimpl.hxx"
- >
- </File>
- <File
- RelativePath=".\supermen-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\supermen.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd cxx-parser --generate-polymorphic supermen.xsd"
- Outputs="supermen-pskel.hxx;supermen-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/wildcard/makefile b/dist/examples/cxx/parser/wildcard/makefile
deleted file mode 100644
index 924e937..0000000
--- a/dist/examples/cxx/parser/wildcard/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/parser-rules.make
-
-
-# Build.
-#
-driver: driver.o email-pskel.o
-
-driver.o: driver.cxx email-pskel.hxx
-email-pskel.o: email-pskel.cxx email-pskel.hxx
-
-email-pskel.hxx email-pskel.cxx: email.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver email.xml
- ./driver email.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f email-pskel.?xx email-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj b/dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj
deleted file mode 100644
index adb99cb..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{9832425B-38D5-44EC-AED6-3ED4353B24EA}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="email-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj.filters b/dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj.filters
deleted file mode 100644
index 756239f..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{F05001BC-BAEB-4D9D-89E4-D19B208F34BF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{CDCB25B7-BCBA-4C74-828E-09B2D7860485}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{1b27359f-6508-4bb0-96ed-b5a3fdb228c6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="email-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj b/dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj
deleted file mode 100644
index e422655..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{9832425B-38D5-44EC-AED6-3ED4353B24EA}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="email-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj.filters b/dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj.filters
deleted file mode 100644
index 756239f..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{F05001BC-BAEB-4D9D-89E4-D19B208F34BF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{CDCB25B7-BCBA-4C74-828E-09B2D7860485}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{1b27359f-6508-4bb0-96ed-b5a3fdb228c6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="email-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj b/dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj
deleted file mode 100644
index e52e9dc..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{9832425B-38D5-44EC-AED6-3ED4353B24EA}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="email-pskel.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email-pskel.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-parser email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">email-pskel.hxx;email-pskel.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj.filters b/dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj.filters
deleted file mode 100644
index 756239f..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{F05001BC-BAEB-4D9D-89E4-D19B208F34BF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{CDCB25B7-BCBA-4C74-828E-09B2D7860485}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{1b27359f-6508-4bb0-96ed-b5a3fdb228c6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="email-pskel.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email-pskel.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc8.vcproj b/dist/examples/cxx/parser/wildcard/wildcard-vc8.vcproj
deleted file mode 100644
index c255eac..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc8.vcproj
+++ /dev/null
@@ -1,419 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="wildcard"
- ProjectGUID="{9832425B-38D5-44EC-AED6-3ED4353B24EA}"
- RootNamespace="wildcard"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{F05001BC-BAEB-4D9D-89E4-D19B208F34BF}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\email-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{CDCB25B7-BCBA-4C74-828E-09B2D7860485}"
- >
- <File
- RelativePath=".\email-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\email.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/parser/wildcard/wildcard-vc9.vcproj b/dist/examples/cxx/parser/wildcard/wildcard-vc9.vcproj
deleted file mode 100644
index e481e43..0000000
--- a/dist/examples/cxx/parser/wildcard/wildcard-vc9.vcproj
+++ /dev/null
@@ -1,416 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="wildcard"
- ProjectGUID="{9832425B-38D5-44EC-AED6-3ED4353B24EA}"
- RootNamespace="wildcard"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{F05001BC-BAEB-4D9D-89E4-D19B208F34BF}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\email-pskel.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{CDCB25B7-BCBA-4C74-828E-09B2D7860485}"
- >
- <File
- RelativePath=".\email-pskel.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\email.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-parser email.xsd"
- Outputs="email-pskel.hxx;email-pskel.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj b/dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj
deleted file mode 100644
index 8834226..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>boost</ProjectName>
- <ProjectGuid>{0C3A70E2-F673-46B7-B23D-9888266918D5}</ProjectGuid>
- <RootNamespace>boost</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="boost-archive-extraction.hxx" />
- <ClInclude Include="boost-archive-insertion.hxx" />
- <ClInclude Include="library-prologue.hxx" />
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj.filters b/dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj.filters
deleted file mode 100644
index edb71a3..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc10.vcxproj.filters
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{22FBBBBD-3A62-471C-867C-8B6F5B3531A9}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{BB6813A9-25E1-49A2-8FCC-FAC9FC4C27FB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{458e67fd-1629-41ef-9a2b-66709e69a9bf}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="boost-archive-extraction.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="boost-archive-insertion.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-prologue.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj b/dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj
deleted file mode 100644
index 73a65d5..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>boost</ProjectName>
- <ProjectGuid>{0C3A70E2-F673-46B7-B23D-9888266918D5}</ProjectGuid>
- <RootNamespace>boost</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="boost-archive-extraction.hxx" />
- <ClInclude Include="boost-archive-insertion.hxx" />
- <ClInclude Include="library-prologue.hxx" />
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj.filters b/dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj.filters
deleted file mode 100644
index edb71a3..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc11.vcxproj.filters
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{22FBBBBD-3A62-471C-867C-8B6F5B3531A9}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{BB6813A9-25E1-49A2-8FCC-FAC9FC4C27FB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{458e67fd-1629-41ef-9a2b-66709e69a9bf}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="boost-archive-extraction.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="boost-archive-insertion.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-prologue.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj b/dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj
deleted file mode 100644
index 8c7d2c5..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>boost</ProjectName>
- <ProjectGuid>{0C3A70E2-F673-46B7-B23D-9888266918D5}</ProjectGuid>
- <RootNamespace>boost</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="boost-archive-extraction.hxx" />
- <ClInclude Include="boost-archive-insertion.hxx" />
- <ClInclude Include="library-prologue.hxx" />
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj.filters b/dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj.filters
deleted file mode 100644
index edb71a3..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc12.vcxproj.filters
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{22FBBBBD-3A62-471C-867C-8B6F5B3531A9}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{BB6813A9-25E1-49A2-8FCC-FAC9FC4C27FB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{458e67fd-1629-41ef-9a2b-66709e69a9bf}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="boost-archive-extraction.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="boost-archive-insertion.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-prologue.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc8.vcproj b/dist/examples/cxx/tree/binary/boost/boost-vc8.vcproj
deleted file mode 100644
index 82d23ae..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc8.vcproj
+++ /dev/null
@@ -1,435 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="boost"
- ProjectGUID="{0C3A70E2-F673-46B7-B23D-9888266918D5}"
- RootNamespace="boost"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{22FBBBBD-3A62-471C-867C-8B6F5B3531A9}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{BB6813A9-25E1-49A2-8FCC-FAC9FC4C27FB}"
- >
- <File
- RelativePath=".\boost-archive-extraction.hxx"
- >
- </File>
- <File
- RelativePath=".\boost-archive-insertion.hxx"
- >
- </File>
- <File
- RelativePath=".\library-prologue.hxx"
- >
- </File>
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/binary/boost/boost-vc9.vcproj b/dist/examples/cxx/tree/binary/boost/boost-vc9.vcproj
deleted file mode 100644
index f5369af..0000000
--- a/dist/examples/cxx/tree/binary/boost/boost-vc9.vcproj
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="boost"
- ProjectGUID="{0C3A70E2-F673-46B7-B23D-9888266918D5}"
- RootNamespace="boost"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{22FBBBBD-3A62-471C-867C-8B6F5B3531A9}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{BB6813A9-25E1-49A2-8FCC-FAC9FC4C27FB}"
- >
- <File
- RelativePath=".\boost-archive-extraction.hxx"
- >
- </File>
- <File
- RelativePath=".\boost-archive-insertion.hxx"
- >
- </File>
- <File
- RelativePath=".\library-prologue.hxx"
- >
- </File>
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --hxx-prologue-file library-prologue.hxx --generate-insertion boost::archive::text_oarchive --generate-extraction boost::archive::text_iarchive library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/binary/boost/makefile b/dist/examples/cxx/tree/binary/boost/makefile
deleted file mode 100644
index 7c35f02..0000000
--- a/dist/examples/cxx/tree/binary/boost/makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-ostream \
---hxx-prologue-file library-prologue.hxx \
---generate-insertion boost::archive::text_oarchive \
---generate-extraction boost::archive::text_iarchive
-
-
-override LIBS += -lboost_serialization
-
-
-# Build.
-#
-driver: driver.o library.o
-
-library.o: library.cxx library.hxx boost-archive-insertion.hxx boost-archive-extraction.hxx
-driver.o: driver.cxx library.hxx boost-archive-insertion.hxx boost-archive-extraction.hxx
-
-library.cxx library.hxx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj b/dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj
deleted file mode 100644
index 5acfa0e..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>cdr</ProjectName>
- <ProjectGuid>{A8CC2814-5056-4953-8B4C-E52E72ADD36C}</ProjectGuid>
- <RootNamespace>cdr</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj.filters b/dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj.filters
deleted file mode 100644
index 92ff3ee..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{50AA6317-04BE-45AB-98DD-7A32AEB710CF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E740B51E-A619-4888-B6B9-566A3C77C60B}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{37283c57-4a32-48ed-823b-0efdf7cdcf51}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj b/dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj
deleted file mode 100644
index c87aa4b..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>cdr</ProjectName>
- <ProjectGuid>{A8CC2814-5056-4953-8B4C-E52E72ADD36C}</ProjectGuid>
- <RootNamespace>cdr</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj.filters b/dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj.filters
deleted file mode 100644
index 92ff3ee..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{50AA6317-04BE-45AB-98DD-7A32AEB710CF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E740B51E-A619-4888-B6B9-566A3C77C60B}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{37283c57-4a32-48ed-823b-0efdf7cdcf51}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj b/dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj
deleted file mode 100644
index e0d6496..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>cdr</ProjectName>
- <ProjectGuid>{A8CC2814-5056-4953-8B4C-E52E72ADD36C}</ProjectGuid>
- <RootNamespace>cdr</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;ACEd.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;ACE.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj.filters b/dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj.filters
deleted file mode 100644
index 92ff3ee..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{50AA6317-04BE-45AB-98DD-7A32AEB710CF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E740B51E-A619-4888-B6B9-566A3C77C60B}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{37283c57-4a32-48ed-823b-0efdf7cdcf51}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc8.vcproj b/dist/examples/cxx/tree/binary/cdr/cdr-vc8.vcproj
deleted file mode 100644
index d35171a..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="cdr"
- ProjectGUID="{A8CC2814-5056-4953-8B4C-E52E72ADD36C}"
- RootNamespace="cdr"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib ACEd.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib ACE.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib ACEd.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib ACE.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{50AA6317-04BE-45AB-98DD-7A32AEB710CF}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E740B51E-A619-4888-B6B9-566A3C77C60B}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/binary/cdr/cdr-vc9.vcproj b/dist/examples/cxx/tree/binary/cdr/cdr-vc9.vcproj
deleted file mode 100644
index f379d83..0000000
--- a/dist/examples/cxx/tree/binary/cdr/cdr-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="cdr"
- ProjectGUID="{A8CC2814-5056-4953-8B4C-E52E72ADD36C}"
- RootNamespace="cdr"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib ACEd.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib ACEd.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib ACE.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib ACE.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{50AA6317-04BE-45AB-98DD-7A32AEB710CF}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E740B51E-A619-4888-B6B9-566A3C77C60B}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/binary/cdr/makefile b/dist/examples/cxx/tree/binary/cdr/makefile
deleted file mode 100644
index a2d9848..0000000
--- a/dist/examples/cxx/tree/binary/cdr/makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-ostream --generate-insertion ACE_OutputCDR \
---generate-extraction ACE_InputCDR
-
-
-override LIBS += -lACE
-
-
-# Build.
-#
-driver: driver.o library.o
-
-library.o: library.cxx library.hxx
-driver.o: driver.cxx library.hxx
-
-library.cxx library.hxx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/binary/makefile b/dist/examples/cxx/tree/binary/makefile
deleted file mode 100644
index d337eb5..0000000
--- a/dist/examples/cxx/tree/binary/makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-dirs :=
-
-ifeq ($(WITH_BOOST),1)
-dirs += boost
-endif
-
-
-ifeq ($(WITH_ACE),1)
-dirs += cdr
-endif
-
-ifeq ($(WITH_XDR),1)
-dirs += xdr
-endif
-
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- @$(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/cxx/tree/binary/xdr/makefile b/dist/examples/cxx/tree/binary/xdr/makefile
deleted file mode 100644
index a9123d7..0000000
--- a/dist/examples/cxx/tree/binary/xdr/makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-ostream --generate-insertion XDR \
---generate-extraction XDR
-
-
-override LIBS += -lnsl
-
-
-# Build.
-#
-driver: driver.o library.o
-
-library.o: library.cxx library.hxx
-driver.o: driver.cxx library.hxx
-
-library.cxx library.hxx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj b/dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj
deleted file mode 100644
index a8cad53..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xdr</ProjectName>
- <ProjectGuid>{D9696808-1B73-43C9-A3BB-18DD29776EC5}</ProjectGuid>
- <RootNamespace>xdr</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj.filters b/dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj.filters
deleted file mode 100644
index c9e491f..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{C5A0E74B-63C1-41E3-B291-B85FCC86FDF7}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FC110C72-7935-49D5-B25E-F96C87BA49E4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b7ff65c1-ff9c-4e2d-869b-e4925d838adb}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj b/dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj
deleted file mode 100644
index 5c9f9d5..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xdr</ProjectName>
- <ProjectGuid>{D9696808-1B73-43C9-A3BB-18DD29776EC5}</ProjectGuid>
- <RootNamespace>xdr</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj.filters b/dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj.filters
deleted file mode 100644
index c9e491f..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{C5A0E74B-63C1-41E3-B291-B85FCC86FDF7}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FC110C72-7935-49D5-B25E-F96C87BA49E4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b7ff65c1-ff9c-4e2d-869b-e4925d838adb}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj b/dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj
deleted file mode 100644
index e3be342..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xdr</ProjectName>
- <ProjectGuid>{D9696808-1B73-43C9-A3BB-18DD29776EC5}</ProjectGuid>
- <RootNamespace>xdr</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj.filters b/dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj.filters
deleted file mode 100644
index c9e491f..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{C5A0E74B-63C1-41E3-B291-B85FCC86FDF7}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FC110C72-7935-49D5-B25E-F96C87BA49E4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b7ff65c1-ff9c-4e2d-869b-e4925d838adb}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc8.vcproj b/dist/examples/cxx/tree/binary/xdr/xdr-vc8.vcproj
deleted file mode 100644
index f83c026..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="xdr"
- ProjectGUID="{D9696808-1B73-43C9-A3BB-18DD29776EC5}"
- RootNamespace="xdr"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{C5A0E74B-63C1-41E3-B291-B85FCC86FDF7}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{FC110C72-7935-49D5-B25E-F96C87BA49E4}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/binary/xdr/xdr-vc9.vcproj b/dist/examples/cxx/tree/binary/xdr/xdr-vc9.vcproj
deleted file mode 100644
index 34ca6b4..0000000
--- a/dist/examples/cxx/tree/binary/xdr/xdr-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="xdr"
- ProjectGUID="{D9696808-1B73-43C9-A3BB-18DD29776EC5}"
- RootNamespace="xdr"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{C5A0E74B-63C1-41E3-B291-B85FCC86FDF7}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{FC110C72-7935-49D5-B25E-F96C87BA49E4}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-insertion XDR --generate-extraction XDR library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/caching/caching-vc10.vcxproj b/dist/examples/cxx/tree/caching/caching-vc10.vcxproj
deleted file mode 100644
index 7bb6670..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>caching</ProjectName>
- <ProjectGuid>{932D8CD0-4E11-4C3A-9084-4D30DE75C2B7}</ProjectGuid>
- <RootNamespace>caching</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/caching/caching-vc10.vcxproj.filters b/dist/examples/cxx/tree/caching/caching-vc10.vcxproj.filters
deleted file mode 100644
index 07ab0e9..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8953E6CC-4E46-4D97-9704-CE8F76672843}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{AA1A2DB4-3798-4A0C-9339-FAA57753A0AC}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{88b19602-75bf-44d6-a995-f5e213e36528}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/caching/caching-vc11.vcxproj b/dist/examples/cxx/tree/caching/caching-vc11.vcxproj
deleted file mode 100644
index 1e8d543..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>caching</ProjectName>
- <ProjectGuid>{932D8CD0-4E11-4C3A-9084-4D30DE75C2B7}</ProjectGuid>
- <RootNamespace>caching</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/caching/caching-vc11.vcxproj.filters b/dist/examples/cxx/tree/caching/caching-vc11.vcxproj.filters
deleted file mode 100644
index 07ab0e9..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8953E6CC-4E46-4D97-9704-CE8F76672843}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{AA1A2DB4-3798-4A0C-9339-FAA57753A0AC}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{88b19602-75bf-44d6-a995-f5e213e36528}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/caching/caching-vc12.vcxproj b/dist/examples/cxx/tree/caching/caching-vc12.vcxproj
deleted file mode 100644
index 304d2c2..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>caching</ProjectName>
- <ProjectGuid>{932D8CD0-4E11-4C3A-9084-4D30DE75C2B7}</ProjectGuid>
- <RootNamespace>caching</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/caching/caching-vc12.vcxproj.filters b/dist/examples/cxx/tree/caching/caching-vc12.vcxproj.filters
deleted file mode 100644
index 07ab0e9..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{8953E6CC-4E46-4D97-9704-CE8F76672843}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{AA1A2DB4-3798-4A0C-9339-FAA57753A0AC}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{88b19602-75bf-44d6-a995-f5e213e36528}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/caching/caching-vc8.vcproj b/dist/examples/cxx/tree/caching/caching-vc8.vcproj
deleted file mode 100644
index 3d75cb6..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="caching"
- ProjectGUID="{932D8CD0-4E11-4C3A-9084-4D30DE75C2B7}"
- RootNamespace="caching"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{8953E6CC-4E46-4D97-9704-CE8F76672843}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{AA1A2DB4-3798-4A0C-9339-FAA57753A0AC}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/caching/caching-vc9.vcproj b/dist/examples/cxx/tree/caching/caching-vc9.vcproj
deleted file mode 100644
index b356172..0000000
--- a/dist/examples/cxx/tree/caching/caching-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="caching"
- ProjectGUID="{932D8CD0-4E11-4C3A-9084-4D30DE75C2B7}"
- RootNamespace="caching"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{8953E6CC-4E46-4D97-9704-CE8F76672843}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{AA1A2DB4-3798-4A0C-9339-FAA57753A0AC}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/caching/makefile b/dist/examples/cxx/tree/caching/makefile
deleted file mode 100644
index d8d33fd..0000000
--- a/dist/examples/cxx/tree/caching/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-# Build.
-#
-driver: driver.o library.o
-
-library.o: library.cxx library.hxx
-driver.o: driver.cxx library.hxx
-
-library.cxx library.hxx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/compression/compression-vc10.vcxproj b/dist/examples/cxx/tree/compression/compression-vc10.vcxproj
deleted file mode 100644
index 0f084fb..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc10.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>compression</ProjectName>
- <ProjectGuid>{AA385EB4-7352-4865-9C5C-9F0DE7BA0060}</ProjectGuid>
- <RootNamespace>compression</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- <ClCompile Include="compressed-format-target.cxx" />
- <ClCompile Include="compressed-input-source.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- <ClInclude Include="compressed-format-target.hxx" />
- <ClInclude Include="compressed-input-source.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/compression/compression-vc10.vcxproj.filters b/dist/examples/cxx/tree/compression/compression-vc10.vcxproj.filters
deleted file mode 100644
index 0156a51..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc10.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E38C94E8-B473-4B88-9C42-BD34C81BC24B}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{408177AE-D480-4933-AED3-705D39F15C9F}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{0e78ae69-359d-42ea-8a3c-c60040f3aa2c}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="compressed-format-target.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="compressed-input-source.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="compressed-format-target.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="compressed-input-source.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/compression/compression-vc11.vcxproj b/dist/examples/cxx/tree/compression/compression-vc11.vcxproj
deleted file mode 100644
index 76c9887..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc11.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>compression</ProjectName>
- <ProjectGuid>{AA385EB4-7352-4865-9C5C-9F0DE7BA0060}</ProjectGuid>
- <RootNamespace>compression</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- <ClCompile Include="compressed-format-target.cxx" />
- <ClCompile Include="compressed-input-source.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- <ClInclude Include="compressed-format-target.hxx" />
- <ClInclude Include="compressed-input-source.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/compression/compression-vc11.vcxproj.filters b/dist/examples/cxx/tree/compression/compression-vc11.vcxproj.filters
deleted file mode 100644
index 0156a51..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc11.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E38C94E8-B473-4B88-9C42-BD34C81BC24B}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{408177AE-D480-4933-AED3-705D39F15C9F}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{0e78ae69-359d-42ea-8a3c-c60040f3aa2c}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="compressed-format-target.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="compressed-input-source.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="compressed-format-target.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="compressed-input-source.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/compression/compression-vc12.vcxproj b/dist/examples/cxx/tree/compression/compression-vc12.vcxproj
deleted file mode 100644
index 1e7a3b7..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc12.vcxproj
+++ /dev/null
@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>compression</ProjectName>
- <ProjectGuid>{AA385EB4-7352-4865-9C5C-9F0DE7BA0060}</ProjectGuid>
- <RootNamespace>compression</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- <ClCompile Include="compressed-format-target.cxx" />
- <ClCompile Include="compressed-input-source.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- <ClInclude Include="compressed-format-target.hxx" />
- <ClInclude Include="compressed-input-source.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/compression/compression-vc12.vcxproj.filters b/dist/examples/cxx/tree/compression/compression-vc12.vcxproj.filters
deleted file mode 100644
index 0156a51..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc12.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E38C94E8-B473-4B88-9C42-BD34C81BC24B}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{408177AE-D480-4933-AED3-705D39F15C9F}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{0e78ae69-359d-42ea-8a3c-c60040f3aa2c}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="compressed-format-target.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="compressed-input-source.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="compressed-format-target.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="compressed-input-source.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/compression/compression-vc8.vcproj b/dist/examples/cxx/tree/compression/compression-vc8.vcproj
deleted file mode 100644
index 85b45d8..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc8.vcproj
+++ /dev/null
@@ -1,435 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="compression"
- ProjectGUID="{AA385EB4-7352-4865-9C5C-9F0DE7BA0060}"
- RootNamespace="compression"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E38C94E8-B473-4B88-9C42-BD34C81BC24B}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- <File
- RelativePath=".\compressed-format-target.cxx">
- </File>
- <File
- RelativePath=".\compressed-input-source.cxx">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{408177AE-D480-4933-AED3-705D39F15C9F}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- <File
- RelativePath=".\compressed-format-target.hxx">
- </File>
- <File
- RelativePath=".\compressed-input-source.hxx">
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-intellisense --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/compression/compression-vc9.vcproj b/dist/examples/cxx/tree/compression/compression-vc9.vcproj
deleted file mode 100644
index 92ea1da..0000000
--- a/dist/examples/cxx/tree/compression/compression-vc9.vcproj
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="compression"
- ProjectGUID="{AA385EB4-7352-4865-9C5C-9F0DE7BA0060}"
- RootNamespace="compression"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib zdll.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E38C94E8-B473-4B88-9C42-BD34C81BC24B}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- <File
- RelativePath=".\compressed-format-target.cxx">
- </File>
- <File
- RelativePath=".\compressed-input-source.cxx">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{408177AE-D480-4933-AED3-705D39F15C9F}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- <File
- RelativePath=".\compressed-format-target.hxx">
- </File>
- <File
- RelativePath=".\compressed-input-source.hxx">
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/compression/makefile b/dist/examples/cxx/tree/compression/makefile
deleted file mode 100644
index f55c6ad..0000000
--- a/dist/examples/cxx/tree/compression/makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-ostream --generate-serialization
-
-override LIBS += -lz
-
-# Build.
-#
-driver: driver.o library.o compressed-format-target.o compressed-input-source.o
-
-library.o: library.cxx library.hxx
-driver.o: driver.cxx library.hxx compressed-format-target.hxx \
-compressed-input-source.hxx
-compressed-format-target.o: compressed-format-target.cxx
-compressed-input-source.o: compressed-input-source.cxx
-
-library.cxx library.hxx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml.gz
- ./driver library.xml.gz
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx driver.o compressed-format-target.o \
-compressed-input-source.o driver out.xml.gz
-
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj b/dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj
deleted file mode 100644
index 5d66876..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>calendar</ProjectName>
- <ProjectGuid>{2DB41EF7-0BED-45BA-A311-44D2719BFE09}</ProjectGuid>
- <RootNamespace>calendar</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="calendar.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="xml-schema-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="calendar.hxx" />
- <ClInclude Include="xml-schema-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="calendar.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="calendar.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj.filters
deleted file mode 100644
index 943a2dc..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc10.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1F206676-7422-4DD5-94C3-7B9B2EC9C2D6}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8D4FED5E-FA2A-44AB-94AC-C8F302E2E1F3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{5c4bcf4f-9ad2-4a82-adfb-91528fe6f2e5}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{df5d1e63-29c7-4626-853a-34fc5c7f7443}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="calendar.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="xml-schema-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="calendar.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="calendar.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="calendar.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj b/dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj
deleted file mode 100644
index aea4aab..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>calendar</ProjectName>
- <ProjectGuid>{2DB41EF7-0BED-45BA-A311-44D2719BFE09}</ProjectGuid>
- <RootNamespace>calendar</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="calendar.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="xml-schema-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="calendar.hxx" />
- <ClInclude Include="xml-schema-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="calendar.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="calendar.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj.filters
deleted file mode 100644
index 943a2dc..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc11.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1F206676-7422-4DD5-94C3-7B9B2EC9C2D6}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8D4FED5E-FA2A-44AB-94AC-C8F302E2E1F3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{5c4bcf4f-9ad2-4a82-adfb-91528fe6f2e5}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{df5d1e63-29c7-4626-853a-34fc5c7f7443}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="calendar.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="xml-schema-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="calendar.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="calendar.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="calendar.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj b/dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj
deleted file mode 100644
index d259aa3..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj
+++ /dev/null
@@ -1,237 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>calendar</ProjectName>
- <ProjectGuid>{2DB41EF7-0BED-45BA-A311-44D2719BFE09}</ProjectGuid>
- <RootNamespace>calendar</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="calendar.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="xml-schema-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="calendar.hxx" />
- <ClInclude Include="xml-schema-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="calendar.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="calendar.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd calendar.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">calendar.hxx;calendar.ixx;calendar.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj.filters
deleted file mode 100644
index 943a2dc..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc12.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1F206676-7422-4DD5-94C3-7B9B2EC9C2D6}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8D4FED5E-FA2A-44AB-94AC-C8F302E2E1F3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{5c4bcf4f-9ad2-4a82-adfb-91528fe6f2e5}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{df5d1e63-29c7-4626-853a-34fc5c7f7443}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="calendar.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="xml-schema-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="calendar.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="calendar.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="calendar.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc8.vcproj b/dist/examples/cxx/tree/custom/calendar/calendar-vc8.vcproj
deleted file mode 100644
index ea4e64d..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc8.vcproj
+++ /dev/null
@@ -1,456 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="calendar"
- ProjectGUID="{2DB41EF7-0BED-45BA-A311-44D2719BFE09}"
- RootNamespace="calendar"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-intellisense --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-intellisense --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-intellisense --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-intellisense --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{1F206676-7422-4DD5-94C3-7B9B2EC9C2D6}"
- >
- <File
- RelativePath=".\calendar.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{8D4FED5E-FA2A-44AB-94AC-C8F302E2E1F3}"
- >
- <File
- RelativePath=".\calendar.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\calendar.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\calendar.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --extern-xml-schema xml-schema.xsd calendar.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --extern-xml-schema xml-schema.xsd calendar.xsd"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --extern-xml-schema xml-schema.xsd calendar.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --extern-xml-schema xml-schema.xsd calendar.xsd"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/calendar/calendar-vc9.vcproj b/dist/examples/cxx/tree/custom/calendar/calendar-vc9.vcproj
deleted file mode 100644
index 6f0186e..0000000
--- a/dist/examples/cxx/tree/custom/calendar/calendar-vc9.vcproj
+++ /dev/null
@@ -1,453 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="calendar"
- ProjectGUID="{2DB41EF7-0BED-45BA-A311-44D2719BFE09}"
- RootNamespace="calendar"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{1F206676-7422-4DD5-94C3-7B9B2EC9C2D6}"
- >
- <File
- RelativePath=".\calendar.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{8D4FED5E-FA2A-44AB-94AC-C8F302E2E1F3}"
- >
- <File
- RelativePath=".\calendar.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\calendar.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\calendar.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd calendar.xsd"
- CommandLine="xsd cxx-tree --generate-inline --extern-xml-schema xml-schema.xsd calendar.xsd"
- Outputs="calendar.hxx;calendar.ixx;calendar.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/calendar/makefile b/dist/examples/cxx/tree/custom/calendar/makefile
deleted file mode 100644
index 009d647..0000000
--- a/dist/examples/cxx/tree/custom/calendar/makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --extern-xml-schema xml-schema.xsd
-
-override LIBS += -lboost_date_time
-
-
-# Build.
-#
-driver: driver.o calendar.o xml-schema-custom.o
-
-driver.o: driver.cxx calendar.ixx calendar.hxx xml-schema.hxx xml-schema-custom.hxx
-calendar.o: calendar.cxx calendar.ixx calendar.hxx xml-schema.hxx xml-schema-custom.hxx
-xml-schema-custom.o: xml-schema.hxx xml-schema-custom.hxx
-
-calendar.cxx calendar.ixx calendar.hxx: calendar.xsd
-
-# Generate header for XML Schema namespace.
-#
-XML_SCHEMA_XSDFLAGS := --generate-xml-schema --custom-type date \
---hxx-epilogue '\#include "xml-schema-custom.hxx"'
-
-xml-schema.hxx:
- $(XSD) cxx-tree $(XML_SCHEMA_XSDFLAGS) xml-schema.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver calendar.xml
- ./driver calendar.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f xml-schema.hxx xml-schema-custom.o calendar.o calendar.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj b/dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj
deleted file mode 100644
index 3e7e6b4..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>comments</ProjectName>
- <ProjectGuid>{262E34D2-48D2-4657-9DB2-F01FFDCEA295}</ProjectGuid>
- <RootNamespace>comments</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people.cxx" />
- <ClCompile Include="xml-schema-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="people.hxx" />
- <ClInclude Include="xml-schema-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj.filters
deleted file mode 100644
index 934cabe..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc10.vcxproj.filters
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{97CD019E-CFDE-4879-AB8C-97DB3B526F92}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8E3E001B-1C7C-4383-A18D-B83AA525773F}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{07ed52c5-d0a0-4659-9a65-2ee052612d2c}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{515a4811-9a34-429e-9c6d-3b771934d8db}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="xml-schema-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj b/dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj
deleted file mode 100644
index b96f28e..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj
+++ /dev/null
@@ -1,235 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>comments</ProjectName>
- <ProjectGuid>{262E34D2-48D2-4657-9DB2-F01FFDCEA295}</ProjectGuid>
- <RootNamespace>comments</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people.cxx" />
- <ClCompile Include="xml-schema-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="people.hxx" />
- <ClInclude Include="xml-schema-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj.filters
deleted file mode 100644
index 934cabe..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc11.vcxproj.filters
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{97CD019E-CFDE-4879-AB8C-97DB3B526F92}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8E3E001B-1C7C-4383-A18D-B83AA525773F}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{07ed52c5-d0a0-4659-9a65-2ee052612d2c}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{515a4811-9a34-429e-9c6d-3b771934d8db}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="xml-schema-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj b/dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj
deleted file mode 100644
index e237ff8..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>comments</ProjectName>
- <ProjectGuid>{262E34D2-48D2-4657-9DB2-F01FFDCEA295}</ProjectGuid>
- <RootNamespace>comments</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue "#include \"xml-schema-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people.cxx" />
- <ClCompile Include="xml-schema-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="people.hxx" />
- <ClInclude Include="xml-schema-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj.filters
deleted file mode 100644
index 934cabe..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc12.vcxproj.filters
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{97CD019E-CFDE-4879-AB8C-97DB3B526F92}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{8E3E001B-1C7C-4383-A18D-B83AA525773F}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{07ed52c5-d0a0-4659-9a65-2ee052612d2c}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{515a4811-9a34-429e-9c6d-3b771934d8db}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="xml-schema-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc8.vcproj b/dist/examples/cxx/tree/custom/comments/comments-vc8.vcproj
deleted file mode 100644
index 2093acf..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc8.vcproj
+++ /dev/null
@@ -1,464 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="comments"
- ProjectGUID="{262E34D2-48D2-4657-9DB2-F01FFDCEA295}"
- RootNamespace="comments"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{97CD019E-CFDE-4879-AB8C-97DB3B526F92}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{8E3E001B-1C7C-4383-A18D-B83AA525773F}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\people.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd people.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd people.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/comments/comments-vc9.vcproj b/dist/examples/cxx/tree/custom/comments/comments-vc9.vcproj
deleted file mode 100644
index 43281c6..0000000
--- a/dist/examples/cxx/tree/custom/comments/comments-vc9.vcproj
+++ /dev/null
@@ -1,461 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="comments"
- ProjectGUID="{262E34D2-48D2-4657-9DB2-F01FFDCEA295}"
- RootNamespace="comments"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue &quot;#include \&quot;xml-schema-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{97CD019E-CFDE-4879-AB8C-97DB3B526F92}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{8E3E001B-1C7C-4383-A18D-B83AA525773F}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\people.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/comments/makefile b/dist/examples/cxx/tree/custom/comments/makefile
deleted file mode 100644
index 442ab86..0000000
--- a/dist/examples/cxx/tree/custom/comments/makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-serialization \
---extern-xml-schema xml-schema.xsd
-
-
-# Build.
-#
-driver: driver.o people.o xml-schema-custom.o dom-parse.o
-
-driver.o: driver.cxx dom-parse.hxx people.ixx people.hxx xml-schema.hxx xml-schema-custom.hxx
-people.o: people.cxx people.ixx people.hxx xml-schema.hxx xml-schema-custom.hxx
-xml-schema-custom.o: xml-schema.hxx xml-schema-custom.hxx
-dom-parse.o: dom-parse.cxx dom-parse.hxx
-
-people.cxx people.ixx people.hxx: people.xsd
-
-# Generate header for XML Schema namespace.
-#
-XML_SCHEMA_XSDFLAGS := --generate-xml-schema --generate-serialization \
---hxx-epilogue '\#include "xml-schema-custom.hxx"'
-
-ifneq ($(shell uname -o 2>&1),Msys)
-XML_SCHEMA_XSDFLAGS += --custom-type anyType=/type_base
-else
-# Prevent MSYS from converting / to Windows path.
-XML_SCHEMA_XSDFLAGS += --custom-type anyType=//type_base
-endif
-
-xml-schema.hxx:
- $(XSD) cxx-tree $(XML_SCHEMA_XSDFLAGS) xml-schema.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver people.xml
- ./driver people.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f xml-schema.hxx xml-schema-custom.o people.o people.?xx dom-parse.o driver.o driver
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj b/dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj
deleted file mode 100644
index e43ef84..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>contacts</ProjectName>
- <ProjectGuid>{9FB807C1-53EE-4E71-812F-89E8BE6FCB43}</ProjectGuid>
- <RootNamespace>contacts</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="contacts-custom.cxx" />
- <ClCompile Include="contacts.cxx" />
- <ClCompile Include="driver.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="contacts-custom.hxx" />
- <ClInclude Include="contacts.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="contacts.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="contacts.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj.filters
deleted file mode 100644
index 4435f19..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc10.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{2E28B5D5-6E1D-434A-BFE2-2162751B243B}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{92523A51-9884-450F-A581-5618AB14A9E3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{63214694-d62f-4e29-965b-bc5ecd1ac8b8}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8b44177f-b842-4c6c-bfb8-c25e433bc0a3}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="contacts-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="contacts.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="contacts-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="contacts.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="contacts.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="contacts.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj b/dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj
deleted file mode 100644
index 0059939..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>contacts</ProjectName>
- <ProjectGuid>{9FB807C1-53EE-4E71-812F-89E8BE6FCB43}</ProjectGuid>
- <RootNamespace>contacts</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="contacts-custom.cxx" />
- <ClCompile Include="contacts.cxx" />
- <ClCompile Include="driver.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="contacts-custom.hxx" />
- <ClInclude Include="contacts.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="contacts.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="contacts.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj.filters
deleted file mode 100644
index 4435f19..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc11.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{2E28B5D5-6E1D-434A-BFE2-2162751B243B}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{92523A51-9884-450F-A581-5618AB14A9E3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{63214694-d62f-4e29-965b-bc5ecd1ac8b8}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8b44177f-b842-4c6c-bfb8-c25e433bc0a3}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="contacts-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="contacts.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="contacts-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="contacts.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="contacts.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="contacts.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj b/dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj
deleted file mode 100644
index f955bda..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>contacts</ProjectName>
- <ProjectGuid>{9FB807C1-53EE-4E71-812F-89E8BE6FCB43}</ProjectGuid>
- <RootNamespace>contacts</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="contacts-custom.cxx" />
- <ClCompile Include="contacts.cxx" />
- <ClCompile Include="driver.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="contacts-custom.hxx" />
- <ClInclude Include="contacts.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="contacts.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="contacts.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd contacts.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue "#include \"contacts-custom.hxx\"" contacts.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">contacts.hxx;contacts.ixx;contacts.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj.filters
deleted file mode 100644
index 4435f19..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc12.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{2E28B5D5-6E1D-434A-BFE2-2162751B243B}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{92523A51-9884-450F-A581-5618AB14A9E3}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{63214694-d62f-4e29-965b-bc5ecd1ac8b8}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{8b44177f-b842-4c6c-bfb8-c25e433bc0a3}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="contacts-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="contacts.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="contacts-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="contacts.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="contacts.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="contacts.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc8.vcproj b/dist/examples/cxx/tree/custom/contacts/contacts-vc8.vcproj
deleted file mode 100644
index a7985ee..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc8.vcproj
+++ /dev/null
@@ -1,440 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="contacts"
- ProjectGUID="{9FB807C1-53EE-4E71-812F-89E8BE6FCB43}"
- RootNamespace="contacts"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{2E28B5D5-6E1D-434A-BFE2-2162751B243B}"
- >
- <File
- RelativePath=".\contacts-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\contacts.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{92523A51-9884-450F-A581-5618AB14A9E3}"
- >
- <File
- RelativePath=".\contacts-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\contacts.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\contacts.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\contacts.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-intellisense --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/contacts/contacts-vc9.vcproj b/dist/examples/cxx/tree/custom/contacts/contacts-vc9.vcproj
deleted file mode 100644
index 6305933..0000000
--- a/dist/examples/cxx/tree/custom/contacts/contacts-vc9.vcproj
+++ /dev/null
@@ -1,437 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="contacts"
- ProjectGUID="{9FB807C1-53EE-4E71-812F-89E8BE6FCB43}"
- RootNamespace="contacts"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{2E28B5D5-6E1D-434A-BFE2-2162751B243B}"
- >
- <File
- RelativePath=".\contacts-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\contacts.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{92523A51-9884-450F-A581-5618AB14A9E3}"
- >
- <File
- RelativePath=".\contacts-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\contacts.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\contacts.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\contacts.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd contacts.xsd"
- CommandLine="xsd cxx-tree --generate-inline --custom-type contact=/contact_base --hxx-epilogue &quot;#include \&quot;contacts-custom.hxx\&quot;&quot; contacts.xsd"
- Outputs="contacts.hxx;contacts.ixx;contacts.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/contacts/makefile b/dist/examples/cxx/tree/custom/contacts/makefile
deleted file mode 100644
index 37f895a..0000000
--- a/dist/examples/cxx/tree/custom/contacts/makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline \
---hxx-epilogue '\#include "contacts-custom.hxx"'
-
-ifneq ($(shell uname -o 2>&1),Msys)
-override XSDFLAGS += --custom-type contact=/contact_base
-else
-# Prevent MSYS from converting / to Windows path.
-override XSDFLAGS += --custom-type contact=//contact_base
-endif
-
-# Build.
-#
-driver: driver.o contacts.o contacts-custom.o
-
-contacts.o: contacts.cxx contacts.ixx contacts.hxx contacts-custom.hxx
-driver.o: driver.cxx contacts.ixx contacts.hxx contacts-custom.hxx
-contacts-custom.o: contacts-custom.cxx contacts.ixx contacts.hxx contacts-custom.hxx
-
-contacts.cxx contacts.hxx contacts.ixx: contacts.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver contacts.xml
- ./driver contacts.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f contacts-custom.o contacts.o contacts.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/custom/double/double-vc10.vcxproj b/dist/examples/cxx/tree/custom/double/double-vc10.vcxproj
deleted file mode 100644
index fcedc48..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc10.vcxproj
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>double</ProjectName>
- <ProjectGuid>{CCE6AE91-39AC-49B6-8763-742B65FCD92E}</ProjectGuid>
- <RootNamespace>double</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="order.cxx" />
- <ClCompile Include="double-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="order.hxx" />
- <ClInclude Include="double-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="order.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="order.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/double/double-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/double/double-vc10.vcxproj.filters
deleted file mode 100644
index b36f95b..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc10.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{9AB5F296-2836-4A71-A39E-8D63EECB86D8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{CDC85F55-DEE6-4EB3-9B72-1CBDDA21CFBE}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{69c0bc69-f38e-42f7-8c11-cd6c1a121574}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{bad36e63-36c2-4233-87a2-68af084d612a}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="order.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="double-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="order.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="double-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="order.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="order.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/double/double-vc11.vcxproj b/dist/examples/cxx/tree/custom/double/double-vc11.vcxproj
deleted file mode 100644
index eebb33b..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc11.vcxproj
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>double</ProjectName>
- <ProjectGuid>{CCE6AE91-39AC-49B6-8763-742B65FCD92E}</ProjectGuid>
- <RootNamespace>double</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="order.cxx" />
- <ClCompile Include="double-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="order.hxx" />
- <ClInclude Include="double-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="order.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="order.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/double/double-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/double/double-vc11.vcxproj.filters
deleted file mode 100644
index b36f95b..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc11.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{9AB5F296-2836-4A71-A39E-8D63EECB86D8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{CDC85F55-DEE6-4EB3-9B72-1CBDDA21CFBE}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{69c0bc69-f38e-42f7-8c11-cd6c1a121574}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{bad36e63-36c2-4233-87a2-68af084d612a}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="order.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="double-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="order.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="double-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="order.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="order.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/double/double-vc12.vcxproj b/dist/examples/cxx/tree/custom/double/double-vc12.vcxproj
deleted file mode 100644
index 537153e..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc12.vcxproj
+++ /dev/null
@@ -1,237 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>double</ProjectName>
- <ProjectGuid>{CCE6AE91-39AC-49B6-8763-742B65FCD92E}</ProjectGuid>
- <RootNamespace>double</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Message>xsd xml-schema.xsd</Message>
- <Command>xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue "#include \"double-custom.hxx\"" xml-schema.xsd</Command>
- </PreBuildEvent>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="order.cxx" />
- <ClCompile Include="double-custom.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="order.hxx" />
- <ClInclude Include="double-custom.hxx" />
- <ClInclude Include="xml-schema.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="order.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="order.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xml-schema.hxx;%(AdditionalInputs)</AdditionalInputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd order.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">order.hxx;order.ixx;order.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/double/double-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/double/double-vc12.vcxproj.filters
deleted file mode 100644
index b36f95b..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc12.vcxproj.filters
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{9AB5F296-2836-4A71-A39E-8D63EECB86D8}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{CDC85F55-DEE6-4EB3-9B72-1CBDDA21CFBE}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{69c0bc69-f38e-42f7-8c11-cd6c1a121574}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{bad36e63-36c2-4233-87a2-68af084d612a}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="order.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="double-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="order.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="double-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="xml-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="order.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="order.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/double/double-vc8.vcproj b/dist/examples/cxx/tree/custom/double/double-vc8.vcproj
deleted file mode 100644
index 39a1945..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc8.vcproj
+++ /dev/null
@@ -1,456 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="double"
- ProjectGUID="{CCE6AE91-39AC-49B6-8763-742B65FCD92E}"
- RootNamespace="double"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --generate-intellisense --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{9AB5F296-2836-4A71-A39E-8D63EECB86D8}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\order.cxx"
- >
- </File>
- <File
- RelativePath=".\double-custom.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{CDC85F55-DEE6-4EB3-9B72-1CBDDA21CFBE}"
- >
- <File
- RelativePath=".\order.hxx"
- >
- </File>
- <File
- RelativePath=".\double-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\order.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\order.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd order.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd order.xsd"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd order.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --extern-xml-schema xml-schema.xsd order.xsd"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/double/double-vc9.vcproj b/dist/examples/cxx/tree/custom/double/double-vc9.vcproj
deleted file mode 100644
index 8cb6e4e..0000000
--- a/dist/examples/cxx/tree/custom/double/double-vc9.vcproj
+++ /dev/null
@@ -1,453 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="double"
- ProjectGUID="{CCE6AE91-39AC-49B6-8763-742B65FCD92E}"
- RootNamespace="double"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- ExcludedFromBuild="false"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- Description="xsd xml-schema.xsd"
- CommandLine="xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type double=double --hxx-epilogue &quot;#include \&quot;double-custom.hxx\&quot;&quot; xml-schema.xsd"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{9AB5F296-2836-4A71-A39E-8D63EECB86D8}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\order.cxx"
- >
- </File>
- <File
- RelativePath=".\double-custom.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{CDC85F55-DEE6-4EB3-9B72-1CBDDA21CFBE}"
- >
- <File
- RelativePath=".\order.hxx"
- >
- </File>
- <File
- RelativePath=".\double-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\xml-schema.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\order.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\order.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd"
- AdditionalDependencies="xml-schema.hxx"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd order.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd order.xsd"
- Outputs="order.hxx;order.ixx;order.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/double/makefile b/dist/examples/cxx/tree/custom/double/makefile
deleted file mode 100644
index 9480279..0000000
--- a/dist/examples/cxx/tree/custom/double/makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-serialization \
---extern-xml-schema xml-schema.xsd
-
-
-# Build.
-#
-driver: driver.o order.o double-custom.o
-
-driver.o: driver.cxx order.ixx order.hxx xml-schema.hxx double-custom.hxx
-order.o: order.cxx order.ixx order.hxx xml-schema.hxx double-custom.hxx
-double-custom.o: xml-schema.hxx double-custom.hxx
-
-order.cxx order.ixx order.hxx: order.xsd
-
-# Generate header for XML Schema namespace.
-#
-XML_SCHEMA_XSDFLAGS := --generate-xml-schema --generate-serialization \
---custom-type double=double \
---hxx-epilogue '\#include "double-custom.hxx"'
-
-xml-schema.hxx:
- $(XSD) cxx-tree $(XML_SCHEMA_XSDFLAGS) xml-schema.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver
- ./driver
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f xml-schema.hxx double-custom.o order.o order.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/custom/makefile b/dist/examples/cxx/tree/custom/makefile
deleted file mode 100644
index 584f599..0000000
--- a/dist/examples/cxx/tree/custom/makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-dirs := comments contacts double mixed taxonomy wildcard
-
-ifeq ($(WITH_BOOST),1)
-dirs += calendar
-endif
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- @$(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/cxx/tree/custom/mixed/makefile b/dist/examples/cxx/tree/custom/mixed/makefile
deleted file mode 100644
index 9c7974d..0000000
--- a/dist/examples/cxx/tree/custom/mixed/makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-serialization \
---hxx-epilogue '\#include "people-custom.hxx"'
-
-ifneq ($(shell uname -o 2>&1),Msys)
-override XSDFLAGS += --custom-type bio=/bio_base
-else
-# Prevent MSYS from converting / to Windows path.
-override XSDFLAGS += --custom-type bio=//bio_base
-endif
-
-
-# Build.
-#
-driver: driver.o people.o people-custom.o
-
-people.o: people.cxx people.ixx people.hxx people-custom.hxx
-driver.o: driver.cxx people.ixx people.hxx people-custom.hxx
-people-custom.o: people-custom.cxx people.ixx people.hxx people-custom.hxx
-
-people.cxx people.hxx people.ixx: people.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver people.xml
- ./driver people.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f people-custom.o people.o people.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj b/dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj
deleted file mode 100644
index 86258d4..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{26CE0C08-7621-403A-88A7-206E64F32C66}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people-custom.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj.filters
deleted file mode 100644
index 1f317e1..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc10.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{CBA3D0E2-DDB8-4ABE-8B5A-7A28191CA323}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{54846A6A-25CD-4C8C-A5F1-2DAC77554F47}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{ba5c74eb-b935-4573-98b5-2987ed135ec6}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b02fd6d3-59e2-4819-9c5b-66ef2b5834a0}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj b/dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj
deleted file mode 100644
index 9afcc81..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{26CE0C08-7621-403A-88A7-206E64F32C66}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people-custom.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj.filters
deleted file mode 100644
index 1f317e1..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc11.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{CBA3D0E2-DDB8-4ABE-8B5A-7A28191CA323}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{54846A6A-25CD-4C8C-A5F1-2DAC77554F47}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{ba5c74eb-b935-4573-98b5-2987ed135ec6}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b02fd6d3-59e2-4819-9c5b-66ef2b5834a0}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj b/dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj
deleted file mode 100644
index a7b4f73..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{26CE0C08-7621-403A-88A7-206E64F32C66}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people-custom.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj.filters
deleted file mode 100644
index 1f317e1..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc12.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{CBA3D0E2-DDB8-4ABE-8B5A-7A28191CA323}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{54846A6A-25CD-4C8C-A5F1-2DAC77554F47}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{ba5c74eb-b935-4573-98b5-2987ed135ec6}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b02fd6d3-59e2-4819-9c5b-66ef2b5834a0}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc8.vcproj b/dist/examples/cxx/tree/custom/mixed/mixed-vc8.vcproj
deleted file mode 100644
index a02149b..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc8.vcproj
+++ /dev/null
@@ -1,440 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mixed"
- ProjectGUID="{26CE0C08-7621-403A-88A7-206E64F32C66}"
- RootNamespace="mixed"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{CBA3D0E2-DDB8-4ABE-8B5A-7A28191CA323}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{54846A6A-25CD-4C8C-A5F1-2DAC77554F47}"
- >
- <File
- RelativePath=".\people-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\people.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/mixed/mixed-vc9.vcproj b/dist/examples/cxx/tree/custom/mixed/mixed-vc9.vcproj
deleted file mode 100644
index 331c786..0000000
--- a/dist/examples/cxx/tree/custom/mixed/mixed-vc9.vcproj
+++ /dev/null
@@ -1,437 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="mixed"
- ProjectGUID="{26CE0C08-7621-403A-88A7-206E64F32C66}"
- RootNamespace="mixed"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{CBA3D0E2-DDB8-4ABE-8B5A-7A28191CA323}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{54846A6A-25CD-4C8C-A5F1-2DAC77554F47}"
- >
- <File
- RelativePath=".\people-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\people.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --custom-type bio=/bio_base --hxx-epilogue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/taxonomy/makefile b/dist/examples/cxx/tree/custom/taxonomy/makefile
deleted file mode 100644
index 11fa6ef..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-forward \
---generate-polymorphic \
---polymorphic-type person \
---custom-type "person=person_impl<person_base>/person_base" \
---custom-type "superman=superman_impl<superman_base>/superman_base" \
---custom-type "batman=batman_impl<batman_base>/batman_base" \
---fwd-prologue '\#include "people-custom-fwd.hxx"' \
---hxx-prologue '\#include "people-custom.hxx"'
-
-
-# Build.
-#
-driver: driver.o people.o people-custom.o
-
-people.o: people.cxx people.ixx people.hxx people-custom.hxx people-custom-fwd.hxx
-driver.o: driver.cxx people.ixx people.hxx people-custom.hxx people-custom-fwd.hxx
-people-custom.o: people-custom.cxx people.ixx people.hxx people-custom.hxx people-custom-fwd.hxx
-
-people.cxx people.ixx people.hxx people-fwd.hxx: people.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver people.xml
- ./driver people.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f people-custom.o people.o people-fwd.hxx people.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj
deleted file mode 100644
index 24040c6..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>taxonomy</ProjectName>
- <ProjectGuid>{B3108E70-7B4E-4DDA-8872-0DC4AFDCB2D9}</ProjectGuid>
- <RootNamespace>taxonomy</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people-custom.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom-fwd.hxx" />
- <ClInclude Include="people-custom.hxx" />
- <ClInclude Include="people-fwd.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj.filters
deleted file mode 100644
index 78058c3..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc10.vcxproj.filters
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E2FFBF97-01E8-483D-8B32-D8D6F065E4C7}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{0B3DDFAD-4254-48B9-BB24-1FC92DD1E7F6}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{a33f9d45-baba-483a-83c4-9421790f7d92}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{0c14530b-7a4b-4841-864e-e8da7ae18eea}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom-fwd.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people-fwd.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj
deleted file mode 100644
index f10b12a..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>taxonomy</ProjectName>
- <ProjectGuid>{B3108E70-7B4E-4DDA-8872-0DC4AFDCB2D9}</ProjectGuid>
- <RootNamespace>taxonomy</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people-custom.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom-fwd.hxx" />
- <ClInclude Include="people-custom.hxx" />
- <ClInclude Include="people-fwd.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj.filters
deleted file mode 100644
index 78058c3..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc11.vcxproj.filters
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E2FFBF97-01E8-483D-8B32-D8D6F065E4C7}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{0B3DDFAD-4254-48B9-BB24-1FC92DD1E7F6}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{a33f9d45-baba-483a-83c4-9421790f7d92}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{0c14530b-7a4b-4841-864e-e8da7ae18eea}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom-fwd.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people-fwd.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj
deleted file mode 100644
index c5579d9..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>taxonomy</ProjectName>
- <ProjectGuid>{B3108E70-7B4E-4DDA-8872-0DC4AFDCB2D9}</ProjectGuid>
- <RootNamespace>taxonomy</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people-custom.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom-fwd.hxx" />
- <ClInclude Include="people-custom.hxx" />
- <ClInclude Include="people-fwd.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type "person=person_impl&lt;person_base&gt;/person_base" --custom-type "superman=superman_impl&lt;superman_base&gt;/superman_base" --custom-type "batman=batman_impl&lt;batman_base&gt;/batman_base" --fwd-prologue "#include \"people-custom-fwd.hxx\"" --hxx-prologue "#include \"people-custom.hxx\"" people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people-fwd.hxx;people.hxx;people.ixx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj.filters
deleted file mode 100644
index 78058c3..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc12.vcxproj.filters
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E2FFBF97-01E8-483D-8B32-D8D6F065E4C7}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{0B3DDFAD-4254-48B9-BB24-1FC92DD1E7F6}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{a33f9d45-baba-483a-83c4-9421790f7d92}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{0c14530b-7a4b-4841-864e-e8da7ae18eea}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="people-custom-fwd.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people-fwd.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="people.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc8.vcproj b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc8.vcproj
deleted file mode 100644
index 74744f4..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc8.vcproj
+++ /dev/null
@@ -1,448 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="taxonomy"
- ProjectGUID="{B3108E70-7B4E-4DDA-8872-0DC4AFDCB2D9}"
- RootNamespace="taxonomy"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E2FFBF97-01E8-483D-8B32-D8D6F065E4C7}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{0B3DDFAD-4254-48B9-BB24-1FC92DD1E7F6}"
- >
- <File
- RelativePath=".\people-custom-fwd.hxx"
- >
- </File>
- <File
- RelativePath=".\people-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\people-fwd.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\people.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --generate-intellisense --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --generate-intellisense --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --generate-intellisense --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --generate-intellisense --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc9.vcproj b/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc9.vcproj
deleted file mode 100644
index 1ff90d3..0000000
--- a/dist/examples/cxx/tree/custom/taxonomy/taxonomy-vc9.vcproj
+++ /dev/null
@@ -1,445 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="taxonomy"
- ProjectGUID="{B3108E70-7B4E-4DDA-8872-0DC4AFDCB2D9}"
- RootNamespace="taxonomy"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E2FFBF97-01E8-483D-8B32-D8D6F065E4C7}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{0B3DDFAD-4254-48B9-BB24-1FC92DD1E7F6}"
- >
- <File
- RelativePath=".\people-custom-fwd.hxx"
- >
- </File>
- <File
- RelativePath=".\people-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\people-fwd.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\people.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-forward --generate-polymorphic --polymorphic-type person --custom-type &quot;person=person_impl&lt;person_base&gt;/person_base&quot; --custom-type &quot;superman=superman_impl&lt;superman_base&gt;/superman_base&quot; --custom-type &quot;batman=batman_impl&lt;batman_base&gt;/batman_base&quot; --fwd-prologue &quot;#include \&quot;people-custom-fwd.hxx\&quot;&quot; --hxx-prologue &quot;#include \&quot;people-custom.hxx\&quot;&quot; people.xsd"
- Outputs="people-fwd.hxx,people.hxx;people.ixx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/wildcard/makefile b/dist/examples/cxx/tree/custom/wildcard/makefile
deleted file mode 100644
index 7473f00..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-ostream \
---generate-serialization --hxx-epilogue '\#include "wildcard-custom.hxx"'
-
-ifneq ($(shell uname -o 2>&1),Msys)
-override XSDFLAGS += --custom-type data=/data_base
-else
-# Prevent MSYS from converting / to Windows path.
-override XSDFLAGS += --custom-type data=//data_base
-endif
-
-
-# Build.
-#
-driver: driver.o wildcard.o wildcard-custom.o
-
-wildcard.o: wildcard.cxx wildcard.ixx wildcard.hxx wildcard-custom.hxx
-driver.o: driver.cxx wildcard.ixx wildcard.hxx wildcard-custom.hxx
-wildcard-custom.o: wildcard-custom.cxx wildcard.ixx wildcard.hxx wildcard-custom.hxx
-
-wildcard.cxx wildcard.hxx wildcard.ixx: wildcard.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver wildcard.xml
- ./driver wildcard.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f wildcard-custom.o wildcard.o wildcard.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj
deleted file mode 100644
index 7076dd6..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{6CE6CDEC-F8DE-42D0-80F8-E71C0DD8F897}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="wildcard-custom.cxx" />
- <ClCompile Include="wildcard.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="wildcard-custom.hxx" />
- <ClInclude Include="wildcard.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="wildcard.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="wildcard.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj.filters b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj.filters
deleted file mode 100644
index b67a77a..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc10.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{426B0A1E-659E-40E5-B93B-EF76EBBE0C0A}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{42AF0399-9A66-43B2-94AA-DBF9BEEF1E92}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{0e336f4b-1f4c-4838-9a6a-183c80df8b67}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{228a47a0-93d7-4c99-9486-a589705ee401}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="wildcard-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="wildcard.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="wildcard-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="wildcard.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="wildcard.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="wildcard.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj
deleted file mode 100644
index da17a00..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{6CE6CDEC-F8DE-42D0-80F8-E71C0DD8F897}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="wildcard-custom.cxx" />
- <ClCompile Include="wildcard.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="wildcard-custom.hxx" />
- <ClInclude Include="wildcard.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="wildcard.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="wildcard.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj.filters b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj.filters
deleted file mode 100644
index b67a77a..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc11.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{426B0A1E-659E-40E5-B93B-EF76EBBE0C0A}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{42AF0399-9A66-43B2-94AA-DBF9BEEF1E92}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{0e336f4b-1f4c-4838-9a6a-183c80df8b67}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{228a47a0-93d7-4c99-9486-a589705ee401}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="wildcard-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="wildcard.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="wildcard-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="wildcard.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="wildcard.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="wildcard.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj
deleted file mode 100644
index a6ff440..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{6CE6CDEC-F8DE-42D0-80F8-E71C0DD8F897}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="wildcard-custom.cxx" />
- <ClCompile Include="wildcard.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="wildcard-custom.hxx" />
- <ClInclude Include="wildcard.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="wildcard.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="wildcard.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd wildcard.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue "#include \"wildcard-custom.hxx\"" wildcard.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">wildcard.hxx;wildcard.ixx;wildcard.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj.filters b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj.filters
deleted file mode 100644
index b67a77a..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc12.vcxproj.filters
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{426B0A1E-659E-40E5-B93B-EF76EBBE0C0A}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{42AF0399-9A66-43B2-94AA-DBF9BEEF1E92}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{0e336f4b-1f4c-4838-9a6a-183c80df8b67}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{228a47a0-93d7-4c99-9486-a589705ee401}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="wildcard-custom.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="wildcard.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="wildcard-custom.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="wildcard.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="wildcard.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="wildcard.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc8.vcproj b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc8.vcproj
deleted file mode 100644
index 917fddd..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc8.vcproj
+++ /dev/null
@@ -1,440 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="wildcard"
- ProjectGUID="{6CE6CDEC-F8DE-42D0-80F8-E71C0DD8F897}"
- RootNamespace="wildcard"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{426B0A1E-659E-40E5-B93B-EF76EBBE0C0A}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\wildcard-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\wildcard.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{42AF0399-9A66-43B2-94AA-DBF9BEEF1E92}"
- >
- <File
- RelativePath=".\wildcard-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\wildcard.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\wildcard.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\wildcard.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc9.vcproj b/dist/examples/cxx/tree/custom/wildcard/wildcard-vc9.vcproj
deleted file mode 100644
index 16cab0c..0000000
--- a/dist/examples/cxx/tree/custom/wildcard/wildcard-vc9.vcproj
+++ /dev/null
@@ -1,437 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="wildcard"
- ProjectGUID="{6CE6CDEC-F8DE-42D0-80F8-E71C0DD8F897}"
- RootNamespace="wildcard"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{426B0A1E-659E-40E5-B93B-EF76EBBE0C0A}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\wildcard-custom.cxx"
- >
- </File>
- <File
- RelativePath=".\wildcard.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{42AF0399-9A66-43B2-94AA-DBF9BEEF1E92}"
- >
- <File
- RelativePath=".\wildcard-custom.hxx"
- >
- </File>
- <File
- RelativePath=".\wildcard.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\wildcard.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\wildcard.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd wildcard.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --custom-type data=/data_base --hxx-epilogue &quot;#include \&quot;wildcard-custom.hxx\&quot;&quot; wildcard.xsd"
- Outputs="wildcard.hxx;wildcard.ixx;wildcard.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc10.sln b/dist/examples/cxx/tree/embedded/embedded-vc10.sln
deleted file mode 100644
index 0204487..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc10.sln
+++ /dev/null
@@ -1,38 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsdbin", "xsdbin-vc10.vcxproj", "{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "embedded", "embedded-vc10.vcxproj", "{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
-
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.ActiveCfg = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.Build.0 = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.ActiveCfg = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.Build.0 = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.ActiveCfg = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.Build.0 = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.ActiveCfg = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.Build.0 = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.ActiveCfg = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.Build.0 = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.ActiveCfg = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.Build.0 = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.ActiveCfg = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.Build.0 = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.ActiveCfg = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.Build.0 = Release|x64
-
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj b/dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj
deleted file mode 100644
index 859b20b..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>embedded</ProjectName>
- <ProjectGuid>{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}</ProjectGuid>
- <RootNamespace>embedded</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- <ClCompile Include="library-schema.cxx" />
- <ClCompile Include="grammar-input-stream.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- <ClInclude Include="library-schema.hxx" />
- <ClInclude Include="grammar-input-stream.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="xsdbin-vc10.vcxproj">
- <Project>{a3f6e060-d536-4a43-af4b-89063f65de91}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj.filters b/dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj.filters
deleted file mode 100644
index 42beedc..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc10.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1D046D9C-4D20-4084-A1F4-90488E0B0669}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E2D458FA-56FA-4268-998B-BF3934169712}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{a57574af-3c36-408f-9f8e-5140fe6abbf6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-schema.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="grammar-input-stream.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="grammar-input-stream.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc11.sln b/dist/examples/cxx/tree/embedded/embedded-vc11.sln
deleted file mode 100644
index dc8273d..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc11.sln
+++ /dev/null
@@ -1,38 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsdbin", "xsdbin-vc11.vcxproj", "{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "embedded", "embedded-vc11.vcxproj", "{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
-
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.ActiveCfg = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.Build.0 = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.ActiveCfg = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.Build.0 = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.ActiveCfg = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.Build.0 = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.ActiveCfg = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.Build.0 = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.ActiveCfg = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.Build.0 = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.ActiveCfg = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.Build.0 = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.ActiveCfg = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.Build.0 = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.ActiveCfg = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.Build.0 = Release|x64
-
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj b/dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj
deleted file mode 100644
index 4fcc53a..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>embedded</ProjectName>
- <ProjectGuid>{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}</ProjectGuid>
- <RootNamespace>embedded</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- <ClCompile Include="library-schema.cxx" />
- <ClCompile Include="grammar-input-stream.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- <ClInclude Include="library-schema.hxx" />
- <ClInclude Include="grammar-input-stream.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="xsdbin-vc11.vcxproj">
- <Project>{a3f6e060-d536-4a43-af4b-89063f65de91}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj.filters b/dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj.filters
deleted file mode 100644
index 42beedc..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc11.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1D046D9C-4D20-4084-A1F4-90488E0B0669}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E2D458FA-56FA-4268-998B-BF3934169712}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{a57574af-3c36-408f-9f8e-5140fe6abbf6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-schema.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="grammar-input-stream.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="grammar-input-stream.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc12.sln b/dist/examples/cxx/tree/embedded/embedded-vc12.sln
deleted file mode 100644
index 1a70889..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc12.sln
+++ /dev/null
@@ -1,40 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsdbin", "xsdbin-vc12.vcxproj", "{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "embedded", "embedded-vc12.vcxproj", "{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
-
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.ActiveCfg = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.Build.0 = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.ActiveCfg = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.Build.0 = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.ActiveCfg = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.Build.0 = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.ActiveCfg = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.Build.0 = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.ActiveCfg = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.Build.0 = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.ActiveCfg = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.Build.0 = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.ActiveCfg = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.Build.0 = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.ActiveCfg = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.Build.0 = Release|x64
-
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj b/dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj
deleted file mode 100644
index bc2682f..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>embedded</ProjectName>
- <ProjectGuid>{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}</ProjectGuid>
- <RootNamespace>embedded</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- <ClCompile Include="library-schema.cxx" />
- <ClCompile Include="grammar-input-stream.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- <ClInclude Include="library-schema.hxx" />
- <ClInclude Include="grammar-input-stream.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.cxx;library-schema.hxx;library-schema.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="xsdbin-vc12.vcxproj">
- <Project>{a3f6e060-d536-4a43-af4b-89063f65de91}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj.filters b/dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj.filters
deleted file mode 100644
index 42beedc..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc12.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{1D046D9C-4D20-4084-A1F4-90488E0B0669}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E2D458FA-56FA-4268-998B-BF3934169712}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{a57574af-3c36-408f-9f8e-5140fe6abbf6}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library-schema.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="grammar-input-stream.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="library-schema.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="grammar-input-stream.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc8.sln b/dist/examples/cxx/tree/embedded/embedded-vc8.sln
deleted file mode 100644
index 29a7c60..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc8.sln
+++ /dev/null
@@ -1,41 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsdbin", "xsdbin-vc8.vcproj", "{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "embedded", "embedded-vc8.vcproj", "{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
- ProjectSection(ProjectDependencies) = postProject
- {A3F6E060-D536-4A43-AF4B-89063F65DE91} = {A3F6E060-D536-4A43-AF4B-89063F65DE91}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- Debug|x64 = Debug|x64
- Release|x64 = Release|x64
-
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.ActiveCfg = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.Build.0 = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.ActiveCfg = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.Build.0 = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.ActiveCfg = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.Build.0 = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.ActiveCfg = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.Build.0 = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.ActiveCfg = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.Build.0 = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.ActiveCfg = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.Build.0 = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.ActiveCfg = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.Build.0 = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.ActiveCfg = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.Build.0 = Release|x64
-
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc8.vcproj b/dist/examples/cxx/tree/embedded/embedded-vc8.vcproj
deleted file mode 100644
index d0df22c..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc8.vcproj
+++ /dev/null
@@ -1,439 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="embedded"
- ProjectGUID="{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
- RootNamespace="embedded"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{1D046D9C-4D20-4084-A1F4-90488E0B0669}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- <File
- RelativePath=".\library-schema.cxx"
- >
- </File>
- <File
- RelativePath=".\grammar-input-stream.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E2D458FA-56FA-4268-998B-BF3934169712}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- <File
- RelativePath=".\library-schema.hxx"
- >
- </File>
- <File
- RelativePath=".\grammar-input-stream.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc9.sln b/dist/examples/cxx/tree/embedded/embedded-vc9.sln
deleted file mode 100644
index 96f10ed..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc9.sln
+++ /dev/null
@@ -1,41 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xsdbin", "xsdbin-vc9.vcproj", "{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "embedded", "embedded-vc9.vcproj", "{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
- ProjectSection(ProjectDependencies) = postProject
- {A3F6E060-D536-4A43-AF4B-89063F65DE91} = {A3F6E060-D536-4A43-AF4B-89063F65DE91}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
-
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.ActiveCfg = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|Win32.Build.0 = Debug|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.ActiveCfg = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Debug|x64.Build.0 = Debug|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.ActiveCfg = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|Win32.Build.0 = Release|Win32
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.ActiveCfg = Release|x64
- {A3F6E060-D536-4A43-AF4B-89063F65DE91}.Release|x64.Build.0 = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.ActiveCfg = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|Win32.Build.0 = Debug|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.ActiveCfg = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Debug|x64.Build.0 = Debug|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.ActiveCfg = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|Win32.Build.0 = Release|Win32
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.ActiveCfg = Release|x64
- {9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}.Release|x64.Build.0 = Release|x64
-
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/examples/cxx/tree/embedded/embedded-vc9.vcproj b/dist/examples/cxx/tree/embedded/embedded-vc9.vcproj
deleted file mode 100644
index bf5498c..0000000
--- a/dist/examples/cxx/tree/embedded/embedded-vc9.vcproj
+++ /dev/null
@@ -1,436 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="embedded"
- ProjectGUID="{9C8C2AA4-DF31-4884-B3B9-A6A36F3CB429}"
- RootNamespace="embedded"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{1D046D9C-4D20-4084-A1F4-90488E0B0669}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- <File
- RelativePath=".\library-schema.cxx"
- >
- </File>
- <File
- RelativePath=".\grammar-input-stream.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E2D458FA-56FA-4268-998B-BF3934169712}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- <File
- RelativePath=".\library-schema.hxx"
- >
- </File>
- <File
- RelativePath=".\grammar-input-stream.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree library.xsd &amp;&amp; xsdbin.exe library.xsd"
- Outputs="library.hxx;library.cxx;library-schema.hxx;library-schema.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/embedded/makefile b/dist/examples/cxx/tree/embedded/makefile
deleted file mode 100644
index 0879da9..0000000
--- a/dist/examples/cxx/tree/embedded/makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-# Build.
-#
-driver: driver.o library.o library-schema.o grammar-input-stream.o
-xsdbin: xsdbin.o
-
-library.o: library.cxx library.hxx
-driver.o: driver.cxx library.hxx library-schema.hxx
-library-schema.o: library-schema.cxx library-schema.hxx
-grammar-input-stream.o: grammar-input-stream.cxx grammar-input-stream.hxx
-
-library.cxx library.hxx: library.xsd
-library-schema.cxx library-schema.hxx: library.xsd
-
-.PRECIOUS: %-schema.cxx %-schema.hxx
-%-schema.cxx %-schema.hxx: %.xsd xsdbin
- ./xsdbin $<
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx library-schema.?xx driver.o \
-library-schema.o grammar-input-stream.o xsdbin.o xsdbin driver
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj b/dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj
deleted file mode 100644
index a57a876..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xsdbin</ProjectName>
- <ProjectGuid>{A3F6E060-D536-4A43-AF4B-89063F65DE91}</ProjectGuid>
- <RootNamespace>xsdbin</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsdbin</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)xsdbin.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)xsdbin.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="xsdbin.cxx" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj.filters b/dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj.filters
deleted file mode 100644
index 27abb01..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc10.vcxproj.filters
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{D9727125-E5B7-4777-8EB3-6EE957552516}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="xsdbin.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj b/dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj
deleted file mode 100644
index 1cfce63..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xsdbin</ProjectName>
- <ProjectGuid>{A3F6E060-D536-4A43-AF4B-89063F65DE91}</ProjectGuid>
- <RootNamespace>xsdbin</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsdbin</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)xsdbin.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)xsdbin.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="xsdbin.cxx" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj.filters b/dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj.filters
deleted file mode 100644
index 27abb01..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc11.vcxproj.filters
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{D9727125-E5B7-4777-8EB3-6EE957552516}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="xsdbin.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj b/dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj
deleted file mode 100644
index eb66e81..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj
+++ /dev/null
@@ -1,190 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xsdbin</ProjectName>
- <ProjectGuid>{A3F6E060-D536-4A43-AF4B-89063F65DE91}</ProjectGuid>
- <RootNamespace>xsdbin</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsdbin</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsdbin</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\xsdbin\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)xsdbin.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)xsdbin.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="xsdbin.cxx" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj.filters b/dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj.filters
deleted file mode 100644
index 27abb01..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc12.vcxproj.filters
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{D9727125-E5B7-4777-8EB3-6EE957552516}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="xsdbin.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc8.vcproj b/dist/examples/cxx/tree/embedded/xsdbin-vc8.vcproj
deleted file mode 100644
index 095024f..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc8.vcproj
+++ /dev/null
@@ -1,356 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="xsdbin"
- ProjectGUID="{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
- RootNamespace="xsdbin"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug\xsdbin"
- IntermediateDirectory="Debug\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/xsdbin.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release\xsdbin"
- IntermediateDirectory="Release\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/xsdbin.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{D9727125-E5B7-4777-8EB3-6EE957552516}"
- >
- <File
- RelativePath=".\xsdbin.cxx"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/embedded/xsdbin-vc9.vcproj b/dist/examples/cxx/tree/embedded/xsdbin-vc9.vcproj
deleted file mode 100644
index 1cb2ead..0000000
--- a/dist/examples/cxx/tree/embedded/xsdbin-vc9.vcproj
+++ /dev/null
@@ -1,353 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="xsdbin"
- ProjectGUID="{A3F6E060-D536-4A43-AF4B-89063F65DE91}"
- RootNamespace="xsdbin"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug\xsdbin"
- IntermediateDirectory="Debug\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/xsdbin.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/xsdbin.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release\xsdbin"
- IntermediateDirectory="Release\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\xsdbin"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="xsdbin.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{D9727125-E5B7-4777-8EB3-6EE957552516}"
- >
- <File
- RelativePath=".\xsdbin.cxx"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/hello/hello-vc10.vcxproj b/dist/examples/cxx/tree/hello/hello-vc10.vcxproj
deleted file mode 100644
index a9e0544..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>hello</ProjectName>
- <ProjectGuid>{538CCAB6-984B-4602-B0D0-985E8FD4FEB9}</ProjectGuid>
- <RootNamespace>hello</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="hello.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/hello/hello-vc10.vcxproj.filters b/dist/examples/cxx/tree/hello/hello-vc10.vcxproj.filters
deleted file mode 100644
index 732378a..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{D512D9C4-9DDD-4830-A487-1D87DB0643D5}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hello.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/hello/hello-vc11.vcxproj b/dist/examples/cxx/tree/hello/hello-vc11.vcxproj
deleted file mode 100644
index c3f4c4f..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>hello</ProjectName>
- <ProjectGuid>{538CCAB6-984B-4602-B0D0-985E8FD4FEB9}</ProjectGuid>
- <RootNamespace>hello</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="hello.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/hello/hello-vc11.vcxproj.filters b/dist/examples/cxx/tree/hello/hello-vc11.vcxproj.filters
deleted file mode 100644
index 732378a..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{D512D9C4-9DDD-4830-A487-1D87DB0643D5}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hello.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/hello/hello-vc12.vcxproj b/dist/examples/cxx/tree/hello/hello-vc12.vcxproj
deleted file mode 100644
index 031c47e..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>hello</ProjectName>
- <ProjectGuid>{538CCAB6-984B-4602-B0D0-985E8FD4FEB9}</ProjectGuid>
- <RootNamespace>hello</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="hello.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd hello.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree hello.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">hello.cxx;hello.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/hello/hello-vc12.vcxproj.filters b/dist/examples/cxx/tree/hello/hello-vc12.vcxproj.filters
deleted file mode 100644
index 732378a..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{D512D9C4-9DDD-4830-A487-1D87DB0643D5}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hello.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="hello.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="hello.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/hello/hello-vc8.vcproj b/dist/examples/cxx/tree/hello/hello-vc8.vcproj
deleted file mode 100644
index c961754..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="hello"
- ProjectGUID="{538CCAB6-984B-4602-B0D0-985E8FD4FEB9}"
- RootNamespace="hello"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\hello.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\hello.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\hello.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/hello/hello-vc9.vcproj b/dist/examples/cxx/tree/hello/hello-vc9.vcproj
deleted file mode 100644
index 20eed13..0000000
--- a/dist/examples/cxx/tree/hello/hello-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="hello"
- ProjectGUID="{538CCAB6-984B-4602-B0D0-985E8FD4FEB9}"
- RootNamespace="hello"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\hello.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\hello.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\hello.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd hello.xsd"
- CommandLine="xsd.exe cxx-tree hello.xsd"
- Outputs="hello.cxx;hello.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/hello/makefile b/dist/examples/cxx/tree/hello/makefile
deleted file mode 100644
index 7886049..0000000
--- a/dist/examples/cxx/tree/hello/makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-# Build.
-#
-driver: driver.o hello.o
-
-hello.o: hello.cxx hello.hxx
-driver.o: driver.cxx hello.hxx
-
-hello.cxx hello.hxx: hello.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver hello.xml
- ./driver hello.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f hello.o hello.?xx driver.o driver
-
diff --git a/dist/examples/cxx/tree/library/library-vc10.vcxproj b/dist/examples/cxx/tree/library/library-vc10.vcxproj
deleted file mode 100644
index 0d82e98..0000000
--- a/dist/examples/cxx/tree/library/library-vc10.vcxproj
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>library</ProjectName>
- <ProjectGuid>{D661AD5B-5FF4-4AFD-A656-429BA348E9EF}</ProjectGuid>
- <RootNamespace>library</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/library/library-vc10.vcxproj.filters b/dist/examples/cxx/tree/library/library-vc10.vcxproj.filters
deleted file mode 100644
index e5e21e6..0000000
--- a/dist/examples/cxx/tree/library/library-vc10.vcxproj.filters
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E7CF4BC5-B0CB-4799-B64E-5AF3B67A6F0E}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FDC2B8B2-1264-427A-9D4E-5577BF295A64}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{8b40f964-53f9-4b8c-a52b-3fbe8bcfe092}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{50e811c7-6a8b-428b-8c92-0fb6c830a337}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="library.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/library/library-vc11.vcxproj b/dist/examples/cxx/tree/library/library-vc11.vcxproj
deleted file mode 100644
index 498e9e9..0000000
--- a/dist/examples/cxx/tree/library/library-vc11.vcxproj
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>library</ProjectName>
- <ProjectGuid>{D661AD5B-5FF4-4AFD-A656-429BA348E9EF}</ProjectGuid>
- <RootNamespace>library</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/library/library-vc11.vcxproj.filters b/dist/examples/cxx/tree/library/library-vc11.vcxproj.filters
deleted file mode 100644
index e5e21e6..0000000
--- a/dist/examples/cxx/tree/library/library-vc11.vcxproj.filters
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E7CF4BC5-B0CB-4799-B64E-5AF3B67A6F0E}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FDC2B8B2-1264-427A-9D4E-5577BF295A64}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{8b40f964-53f9-4b8c-a52b-3fbe8bcfe092}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{50e811c7-6a8b-428b-8c92-0fb6c830a337}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="library.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/library/library-vc12.vcxproj b/dist/examples/cxx/tree/library/library-vc12.vcxproj
deleted file mode 100644
index 80fd4ae..0000000
--- a/dist/examples/cxx/tree/library/library-vc12.vcxproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>library</ProjectName>
- <ProjectGuid>{D661AD5B-5FF4-4AFD-A656-429BA348E9EF}</ProjectGuid>
- <RootNamespace>library</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="library.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="library.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd library.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">library.hxx;library.ixx;library.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/library/library-vc12.vcxproj.filters b/dist/examples/cxx/tree/library/library-vc12.vcxproj.filters
deleted file mode 100644
index e5e21e6..0000000
--- a/dist/examples/cxx/tree/library/library-vc12.vcxproj.filters
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{E7CF4BC5-B0CB-4799-B64E-5AF3B67A6F0E}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FDC2B8B2-1264-427A-9D4E-5577BF295A64}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{8b40f964-53f9-4b8c-a52b-3fbe8bcfe092}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{50e811c7-6a8b-428b-8c92-0fb6c830a337}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="library.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="library.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="library.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="library.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/library/library-vc8.vcproj b/dist/examples/cxx/tree/library/library-vc8.vcproj
deleted file mode 100644
index 79e3f7e..0000000
--- a/dist/examples/cxx/tree/library/library-vc8.vcproj
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="library"
- ProjectGUID="{D661AD5B-5FF4-4AFD-A656-429BA348E9EF}"
- RootNamespace="library"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E7CF4BC5-B0CB-4799-B64E-5AF3B67A6F0E}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{FDC2B8B2-1264-427A-9D4E-5577BF295A64}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\library.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization --generate-intellisense library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/library/library-vc9.vcproj b/dist/examples/cxx/tree/library/library-vc9.vcproj
deleted file mode 100644
index d616bff..0000000
--- a/dist/examples/cxx/tree/library/library-vc9.vcproj
+++ /dev/null
@@ -1,429 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="library"
- ProjectGUID="{D661AD5B-5FF4-4AFD-A656-429BA348E9EF}"
- RootNamespace="library"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{E7CF4BC5-B0CB-4799-B64E-5AF3B67A6F0E}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\library.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{FDC2B8B2-1264-427A-9D4E-5577BF295A64}"
- >
- <File
- RelativePath=".\library.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\library.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\library.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd library.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-ostream --generate-serialization library.xsd"
- Outputs="library.hxx;library.ixx;library.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/library/makefile b/dist/examples/cxx/tree/library/makefile
deleted file mode 100644
index 2f9bb6a..0000000
--- a/dist/examples/cxx/tree/library/makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-ostream --generate-serialization
-
-
-# Build.
-#
-driver: driver.o library.o
-
-library.o: library.cxx library.hxx library.ixx
-driver.o: driver.cxx library.hxx library.ixx
-
-library.cxx library.hxx library.ixx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx driver.o driver
-
diff --git a/dist/examples/cxx/tree/makefile b/dist/examples/cxx/tree/makefile
deleted file mode 100644
index 32b44de..0000000
--- a/dist/examples/cxx/tree/makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-dirs := binary caching embedded custom hello library messaging mixed \
-multiroot order performance polymorphism secure streaming wildcard
-
-ifeq ($(WITH_ZLIB),1)
-dirs += compression
-endif
-
-ifeq ($(WITH_XQILLA),1)
-dirs += xpath
-endif
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- @$(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/cxx/tree/messaging/makefile b/dist/examples/cxx/tree/messaging/makefile
deleted file mode 100644
index 0557a7c..0000000
--- a/dist/examples/cxx/tree/messaging/makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-override XSDFLAGS += --root-element-all --generate-element-type \
---generate-element-map --generate-serialization
-
-
-# Build.
-#
-driver: driver.o dom-parse.o dom-serialize.o protocol.o
-
-protocol.o: protocol.cxx protocol.hxx
-dom-parse.o: dom-parse.cxx dom-parse.hxx
-dom-serialize.o: dom-serialize.cxx dom-serialize.hxx
-driver.o: driver.cxx dom-parse.hxx dom-serialize.hxx protocol.hxx
-
-protocol.cxx protocol.hxx: protocol.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver balance.xml withdraw.xml deposit.xml
- ./driver balance.xml
- ./driver withdraw.xml
- ./driver deposit.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f protocol.o protocol.?xx dom-parse.o dom-serialize.o driver.o driver
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj b/dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj
deleted file mode 100644
index 6016f46..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>messaging</ProjectName>
- <ProjectGuid>{F7696252-45B5-438B-B14F-0510137704F0}</ProjectGuid>
- <RootNamespace>messaging</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="dom-serialize.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="dom-serialize.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj.filters b/dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj.filters
deleted file mode 100644
index c94955d..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc10.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0BA0A3D7-40AF-4307-8033-5BE39B33ABE5}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{F7AC5A29-8CF7-4882-89B6-1B5B81AA00F2}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{945e9234-36d7-4bbb-a5f2-97af87338c49}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="dom-serialize.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="dom-serialize.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj b/dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj
deleted file mode 100644
index d3403c2..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>messaging</ProjectName>
- <ProjectGuid>{F7696252-45B5-438B-B14F-0510137704F0}</ProjectGuid>
- <RootNamespace>messaging</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="dom-serialize.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="dom-serialize.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj.filters b/dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj.filters
deleted file mode 100644
index c94955d..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc11.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0BA0A3D7-40AF-4307-8033-5BE39B33ABE5}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{F7AC5A29-8CF7-4882-89B6-1B5B81AA00F2}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{945e9234-36d7-4bbb-a5f2-97af87338c49}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="dom-serialize.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="dom-serialize.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj b/dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj
deleted file mode 100644
index 35b8763..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj
+++ /dev/null
@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>messaging</ProjectName>
- <ProjectGuid>{F7696252-45B5-438B-B14F-0510137704F0}</ProjectGuid>
- <RootNamespace>messaging</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="dom-serialize.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="dom-serialize.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj.filters b/dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj.filters
deleted file mode 100644
index c94955d..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc12.vcxproj.filters
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0BA0A3D7-40AF-4307-8033-5BE39B33ABE5}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{F7AC5A29-8CF7-4882-89B6-1B5B81AA00F2}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{945e9234-36d7-4bbb-a5f2-97af87338c49}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="dom-serialize.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="dom-serialize.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc8.vcproj b/dist/examples/cxx/tree/messaging/messaging-vc8.vcproj
deleted file mode 100644
index f006365..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc8.vcproj
+++ /dev/null
@@ -1,439 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="messaging"
- ProjectGUID="{F7696252-45B5-438B-B14F-0510137704F0}"
- RootNamespace="messaging"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{0BA0A3D7-40AF-4307-8033-5BE39B33ABE5}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\dom-serialize.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{F7AC5A29-8CF7-4882-89B6-1B5B81AA00F2}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\dom-serialize.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\protocol.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/messaging/messaging-vc9.vcproj b/dist/examples/cxx/tree/messaging/messaging-vc9.vcproj
deleted file mode 100644
index debd0a3..0000000
--- a/dist/examples/cxx/tree/messaging/messaging-vc9.vcproj
+++ /dev/null
@@ -1,436 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="messaging"
- ProjectGUID="{F7696252-45B5-438B-B14F-0510137704F0}"
- RootNamespace="messaging"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{0BA0A3D7-40AF-4307-8033-5BE39B33ABE5}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\dom-serialize.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{F7AC5A29-8CF7-4882-89B6-1B5B81AA00F2}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\dom-serialize.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\protocol.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-element-type --generate-element-map --generate-serialization protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/mixed/makefile b/dist/examples/cxx/tree/mixed/makefile
deleted file mode 100644
index 594821c..0000000
--- a/dist/examples/cxx/tree/mixed/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-# Build.
-#
-driver: driver.o text.o
-
-text.o: text.cxx text.hxx
-driver.o: driver.cxx text.hxx
-
-text.cxx text.hxx: text.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver text.xml
- ./driver text.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f text.o text.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj b/dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj
deleted file mode 100644
index c625d2c..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{6EF7868E-AA58-4615-9C1A-06B010CB4209}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj.filters b/dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj.filters
deleted file mode 100644
index 992400e..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{590B5830-837E-4D7F-984C-173456EE7E70}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{3B7C0CD8-48D5-4244-A1FB-B60D510C2359}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{ba06cc21-c20a-4656-89ab-0a7b56f50871}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj b/dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj
deleted file mode 100644
index 1380e1c..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{6EF7868E-AA58-4615-9C1A-06B010CB4209}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj.filters b/dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj.filters
deleted file mode 100644
index 992400e..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{590B5830-837E-4D7F-984C-173456EE7E70}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{3B7C0CD8-48D5-4244-A1FB-B60D510C2359}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{ba06cc21-c20a-4656-89ab-0a7b56f50871}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj b/dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj
deleted file mode 100644
index 7726386..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>mixed</ProjectName>
- <ProjectGuid>{6EF7868E-AA58-4615-9C1A-06B010CB4209}</ProjectGuid>
- <RootNamespace>mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj.filters b/dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj.filters
deleted file mode 100644
index 992400e..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{590B5830-837E-4D7F-984C-173456EE7E70}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{3B7C0CD8-48D5-4244-A1FB-B60D510C2359}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{ba06cc21-c20a-4656-89ab-0a7b56f50871}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc8.vcproj b/dist/examples/cxx/tree/mixed/mixed-vc8.vcproj
deleted file mode 100644
index d446891..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mixed"
- ProjectGUID="{6EF7868E-AA58-4615-9C1A-06B010CB4209}"
- RootNamespace="mixed"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{590B5830-837E-4D7F-984C-173456EE7E70}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\text.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{3B7C0CD8-48D5-4244-A1FB-B60D510C2359}"
- >
- <File
- RelativePath=".\text.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\text.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/mixed/mixed-vc9.vcproj b/dist/examples/cxx/tree/mixed/mixed-vc9.vcproj
deleted file mode 100644
index 5c5843a..0000000
--- a/dist/examples/cxx/tree/mixed/mixed-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="mixed"
- ProjectGUID="{6EF7868E-AA58-4615-9C1A-06B010CB4209}"
- RootNamespace="mixed"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{590B5830-837E-4D7F-984C-173456EE7E70}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\text.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{3B7C0CD8-48D5-4244-A1FB-B60D510C2359}"
- >
- <File
- RelativePath=".\text.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\text.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/multiroot/makefile b/dist/examples/cxx/tree/multiroot/makefile
deleted file mode 100644
index d94da7f..0000000
--- a/dist/examples/cxx/tree/multiroot/makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-override XSDFLAGS += --root-element-all
-
-
-# Build.
-#
-driver: driver.o dom-parse.o protocol.o
-
-protocol.o: protocol.cxx protocol.hxx
-dom-parse.o: dom-parse.cxx dom-parse.hxx
-driver.o: driver.cxx dom-parse.hxx protocol.hxx
-
-protocol.cxx protocol.hxx: protocol.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver balance.xml withdraw.xml deposit.xml
- ./driver balance.xml
- ./driver withdraw.xml
- ./driver deposit.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f protocol.o protocol.?xx dom-parse.o driver.o driver
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj b/dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj
deleted file mode 100644
index 3a10c32..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>multiroot</ProjectName>
- <ProjectGuid>{1CFBC9C5-5F9C-4B60-A2A3-0A79BCDD2670}</ProjectGuid>
- <RootNamespace>multiroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj.filters b/dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj.filters
deleted file mode 100644
index 148c832..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc10.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{761DEBB9-455C-4599-A11D-66D602C486C3}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{AAF07268-FD5E-485F-8EB8-1AFDDE8BFD57}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{770136e0-0d08-4ab1-b67b-eabbde953e47}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj b/dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj
deleted file mode 100644
index 61c6a44..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>multiroot</ProjectName>
- <ProjectGuid>{1CFBC9C5-5F9C-4B60-A2A3-0A79BCDD2670}</ProjectGuid>
- <RootNamespace>multiroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj.filters b/dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj.filters
deleted file mode 100644
index 148c832..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc11.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{761DEBB9-455C-4599-A11D-66D602C486C3}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{AAF07268-FD5E-485F-8EB8-1AFDDE8BFD57}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{770136e0-0d08-4ab1-b67b-eabbde953e47}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj b/dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj
deleted file mode 100644
index 1b0e268..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>multiroot</ProjectName>
- <ProjectGuid>{1CFBC9C5-5F9C-4B60-A2A3-0A79BCDD2670}</ProjectGuid>
- <RootNamespace>multiroot</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="protocol.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="protocol.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd protocol.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --root-element-all protocol.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">protocol.hxx;protocol.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj.filters b/dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj.filters
deleted file mode 100644
index 148c832..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc12.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{761DEBB9-455C-4599-A11D-66D602C486C3}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{AAF07268-FD5E-485F-8EB8-1AFDDE8BFD57}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{770136e0-0d08-4ab1-b67b-eabbde953e47}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="protocol.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="protocol.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="protocol.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc8.vcproj b/dist/examples/cxx/tree/multiroot/multiroot-vc8.vcproj
deleted file mode 100644
index 54e196d..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc8.vcproj
+++ /dev/null
@@ -1,431 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="multiroot"
- ProjectGUID="{1CFBC9C5-5F9C-4B60-A2A3-0A79BCDD2670}"
- RootNamespace="multiroot"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{761DEBB9-455C-4599-A11D-66D602C486C3}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{AAF07268-FD5E-485F-8EB8-1AFDDE8BFD57}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\protocol.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all --generate-intellisense protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/multiroot/multiroot-vc9.vcproj b/dist/examples/cxx/tree/multiroot/multiroot-vc9.vcproj
deleted file mode 100644
index 95aa025..0000000
--- a/dist/examples/cxx/tree/multiroot/multiroot-vc9.vcproj
+++ /dev/null
@@ -1,428 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="multiroot"
- ProjectGUID="{1CFBC9C5-5F9C-4B60-A2A3-0A79BCDD2670}"
- RootNamespace="multiroot"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{761DEBB9-455C-4599-A11D-66D602C486C3}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\protocol.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{AAF07268-FD5E-485F-8EB8-1AFDDE8BFD57}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\protocol.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\protocol.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd protocol.xsd"
- CommandLine="xsd cxx-tree --root-element-all protocol.xsd"
- Outputs="protocol.hxx;protocol.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/order/element/makefile b/dist/examples/cxx/tree/order/element/makefile
deleted file mode 100644
index 31f5ec5..0000000
--- a/dist/examples/cxx/tree/order/element/makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-serialization --generate-wildcard --ordered-type batch
-
-
-# Build.
-#
-driver: driver.o transactions.o
-
-transactions.o: transactions.cxx transactions.hxx
-driver.o: driver.cxx transactions.hxx
-
-transactions.cxx transactions.hxx: transactions.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver transactions.xml
- ./driver transactions.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f transactions.o transactions.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj b/dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj
deleted file mode 100644
index 100f0e8..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>order-element</ProjectName>
- <ProjectGuid>{9488E872-8E09-4B68-9715-AF68534164C4}</ProjectGuid>
- <RootNamespace>order-element</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="transactions.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="transactions.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="transactions.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj.filters b/dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj.filters
deleted file mode 100644
index aefc2be..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{FF0C69B7-2DFB-402A-9AEB-A13D354EB9D2}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{9761A910-7322-4EBD-AD00-4FCC4C4F6586}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{2264FACD-618F-417C-B291-7E2A1BD11536}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="transactions.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="transactions.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="transactions.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj b/dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj
deleted file mode 100644
index da8304c..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>order-element</ProjectName>
- <ProjectGuid>{9488E872-8E09-4B68-9715-AF68534164C4}</ProjectGuid>
- <RootNamespace>order-element</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="transactions.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="transactions.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="transactions.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj.filters b/dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj.filters
deleted file mode 100644
index aefc2be..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{FF0C69B7-2DFB-402A-9AEB-A13D354EB9D2}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{9761A910-7322-4EBD-AD00-4FCC4C4F6586}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{2264FACD-618F-417C-B291-7E2A1BD11536}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="transactions.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="transactions.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="transactions.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj b/dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj
deleted file mode 100644
index 2364e27..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>order-element</ProjectName>
- <ProjectGuid>{9488E872-8E09-4B68-9715-AF68534164C4}</ProjectGuid>
- <RootNamespace>order-element</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="transactions.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="transactions.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="transactions.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd transactions.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">transactions.cxx;transactions.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj.filters b/dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj.filters
deleted file mode 100644
index aefc2be..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{FF0C69B7-2DFB-402A-9AEB-A13D354EB9D2}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{9761A910-7322-4EBD-AD00-4FCC4C4F6586}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{2264FACD-618F-417C-B291-7E2A1BD11536}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="transactions.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="transactions.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="transactions.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc8.vcproj b/dist/examples/cxx/tree/order/element/order-element-vc8.vcproj
deleted file mode 100644
index 06dd76d..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="order-element"
- ProjectGUID="{B6118FC1-3886-4F01-BECE-44B3BDD92CA6}"
- RootNamespace="order-element"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{084F9FF2-F141-40BC-8D7D-7A78CC6707B0}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\transactions.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{F9AFEC3B-B8A5-47F6-BD3B-316A28A94B1F}"
- >
- <File
- RelativePath=".\transactions.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\transactions.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/order/element/order-element-vc9.vcproj b/dist/examples/cxx/tree/order/element/order-element-vc9.vcproj
deleted file mode 100644
index 74a0266..0000000
--- a/dist/examples/cxx/tree/order/element/order-element-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="order-element"
- ProjectGUID="{06AAEF42-6C6F-4707-B82C-3962232A456E}"
- RootNamespace="order-element"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{A2B29337-F8F7-492A-A290-721BCAFA3B33}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\transactions.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{2ECA1E85-7EF7-4BE8-899C-5006EEBE3A9F}"
- >
- <File
- RelativePath=".\transactions.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\transactions.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd transactions.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-wildcard --ordered-type batch transactions.xsd"
- Outputs="transactions.cxx;transactions.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/order/makefile b/dist/examples/cxx/tree/order/makefile
deleted file mode 100644
index 2713b6e..0000000
--- a/dist/examples/cxx/tree/order/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-dirs := element mixed
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- @$(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/cxx/tree/order/mixed/makefile b/dist/examples/cxx/tree/order/mixed/makefile
deleted file mode 100644
index b7929d9..0000000
--- a/dist/examples/cxx/tree/order/mixed/makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-root := ../../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-serialization --ordered-type-mixed
-
-
-# Build.
-#
-driver: driver.o text.o
-
-text.o: text.cxx text.hxx
-driver.o: driver.cxx text.hxx
-
-text.cxx text.hxx: text.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver text.xml
- ./driver text.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f text.o text.?xx driver.o driver
-
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj b/dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj
deleted file mode 100644
index 69ed120..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>order-mixed</ProjectName>
- <ProjectGuid>{94A74673-C980-426B-B5BB-00744559EAD1}</ProjectGuid>
- <RootNamespace>order-mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj.filters b/dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj.filters
deleted file mode 100644
index 422115b..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{02F42C11-BDFB-4E9B-8E93-745AE1451A73}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{789E7294-E4D2-41DC-BDDA-4A333C3C2ED7}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{BF59FE93-D0AC-48C0-998A-7AB994AFD9FE}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj b/dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj
deleted file mode 100644
index 6f4ba84..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>order-mixed</ProjectName>
- <ProjectGuid>{94A74673-C980-426B-B5BB-00744559EAD1}</ProjectGuid>
- <RootNamespace>order-mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj.filters b/dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj.filters
deleted file mode 100644
index 422115b..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{02F42C11-BDFB-4E9B-8E93-745AE1451A73}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{789E7294-E4D2-41DC-BDDA-4A333C3C2ED7}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{BF59FE93-D0AC-48C0-998A-7AB994AFD9FE}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj b/dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj
deleted file mode 100644
index 7408bef..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>order-mixed</ProjectName>
- <ProjectGuid>{94A74673-C980-426B-B5BB-00744559EAD1}</ProjectGuid>
- <RootNamespace>order-mixed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="text.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">text.cxx;text.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd text.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">text.cxx;text.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj.filters b/dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj.filters
deleted file mode 100644
index 422115b..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{02F42C11-BDFB-4E9B-8E93-745AE1451A73}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{789E7294-E4D2-41DC-BDDA-4A333C3C2ED7}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{BF59FE93-D0AC-48C0-998A-7AB994AFD9FE}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="text.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="text.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="text.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc8.vcproj b/dist/examples/cxx/tree/order/mixed/order-mixed-vc8.vcproj
deleted file mode 100644
index 20cfe65..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="order-mixed"
- ProjectGUID="{84319CCF-087B-468D-ABA9-C8253098FAA0}"
- RootNamespace="order-mixed"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{D18F10AE-C028-4A42-AEA9-64D5307C758C}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\text.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E341B637-99E8-40BF-88C6-C8FDCB749474}"
- >
- <File
- RelativePath=".\text.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\text.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-intellisense --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/order/mixed/order-mixed-vc9.vcproj b/dist/examples/cxx/tree/order/mixed/order-mixed-vc9.vcproj
deleted file mode 100644
index c6861d9..0000000
--- a/dist/examples/cxx/tree/order/mixed/order-mixed-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="order-mixed"
- ProjectGUID="{B58CABEE-0A5C-43F3-B22B-53D060763B67}"
- RootNamespace="order-mixed"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{49DCF246-346C-4532-8D81-B3D8943C51A3}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\text.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{0317763E-1AA4-4187-8ED7-58C87F59E051}"
- >
- <File
- RelativePath=".\text.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\text.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd text.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --ordered-type-mixed text.xsd"
- Outputs="text.cxx;text.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/performance/makefile b/dist/examples/cxx/tree/performance/makefile
deleted file mode 100644
index 80bf4be..0000000
--- a/dist/examples/cxx/tree/performance/makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-serialization
-
-
-# Build.
-#
-driver: driver.o parsing.o serialization.o test.o time.o
-
-driver.o: driver.cxx
-test.o: test.cxx test.hxx test.ixx
-parsing.o: parsing.cxx test.hxx test.ixx time.hxx
-serialization.o: serialization.cxx test.hxx test.ixx time.hxx
-time.o: time.cxx time.hxx
-
-test.cxx test.hxx test.ixx: test.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver test-50k.xml
- ./driver test-50k.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f test.o test.?xx driver.o parsing.o serialization.o time.o driver
diff --git a/dist/examples/cxx/tree/performance/performance-vc10.vcxproj b/dist/examples/cxx/tree/performance/performance-vc10.vcxproj
deleted file mode 100644
index 6651012..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc10.vcxproj
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>performance</ProjectName>
- <ProjectGuid>{C60700D1-DB4B-4EFF-8EE9-97BD716BCB89}</ProjectGuid>
- <RootNamespace>performance</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="test.cxx" />
- <ClCompile Include="time.cxx" />
- <ClCompile Include="parsing.cxx" />
- <ClCompile Include="serialization.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test.hxx" />
- <ClInclude Include="time.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="test.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/performance/performance-vc10.vcxproj.filters b/dist/examples/cxx/tree/performance/performance-vc10.vcxproj.filters
deleted file mode 100644
index 6fc7fa3..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc10.vcxproj.filters
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4BF3D33D-891D-402D-A26F-AEBC35E127DE}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FD93B741-02F9-48B5-BE59-E5DD2C73CC7A}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{e0558eb1-4ecb-42e8-b50b-e07487e59072}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{47ef7335-e3a1-4832-bff0-c59ac4d25088}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="test.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="time.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parsing.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="serialization.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="time.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="test.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/performance/performance-vc11.vcxproj b/dist/examples/cxx/tree/performance/performance-vc11.vcxproj
deleted file mode 100644
index 8e3aa7c..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc11.vcxproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>performance</ProjectName>
- <ProjectGuid>{C60700D1-DB4B-4EFF-8EE9-97BD716BCB89}</ProjectGuid>
- <RootNamespace>performance</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="test.cxx" />
- <ClCompile Include="time.cxx" />
- <ClCompile Include="parsing.cxx" />
- <ClCompile Include="serialization.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test.hxx" />
- <ClInclude Include="time.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="test.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/performance/performance-vc11.vcxproj.filters b/dist/examples/cxx/tree/performance/performance-vc11.vcxproj.filters
deleted file mode 100644
index 6fc7fa3..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc11.vcxproj.filters
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4BF3D33D-891D-402D-A26F-AEBC35E127DE}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FD93B741-02F9-48B5-BE59-E5DD2C73CC7A}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{e0558eb1-4ecb-42e8-b50b-e07487e59072}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{47ef7335-e3a1-4832-bff0-c59ac4d25088}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="test.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="time.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parsing.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="serialization.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="time.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="test.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/performance/performance-vc12.vcxproj b/dist/examples/cxx/tree/performance/performance-vc12.vcxproj
deleted file mode 100644
index 38193f7..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc12.vcxproj
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>performance</ProjectName>
- <ProjectGuid>{C60700D1-DB4B-4EFF-8EE9-97BD716BCB89}</ProjectGuid>
- <RootNamespace>performance</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="test.cxx" />
- <ClCompile Include="time.cxx" />
- <ClCompile Include="parsing.cxx" />
- <ClCompile Include="serialization.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test.hxx" />
- <ClInclude Include="time.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="test.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd test.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization test.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">test.hxx;test.ixx;test.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/performance/performance-vc12.vcxproj.filters b/dist/examples/cxx/tree/performance/performance-vc12.vcxproj.filters
deleted file mode 100644
index 6fc7fa3..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc12.vcxproj.filters
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4BF3D33D-891D-402D-A26F-AEBC35E127DE}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{FD93B741-02F9-48B5-BE59-E5DD2C73CC7A}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{e0558eb1-4ecb-42e8-b50b-e07487e59072}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{47ef7335-e3a1-4832-bff0-c59ac4d25088}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="test.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="time.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parsing.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="serialization.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="test.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="time.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="test.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="test.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/performance/performance-vc8.vcproj b/dist/examples/cxx/tree/performance/performance-vc8.vcproj
deleted file mode 100644
index e49587d..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc8.vcproj
+++ /dev/null
@@ -1,445 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="performance"
- ProjectGUID="{C60700D1-DB4B-4EFF-8EE9-97BD716BCB89}"
- RootNamespace="performance"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4BF3D33D-891D-402D-A26F-AEBC35E127DE}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\test.cxx"
- >
- </File>
- <File
- RelativePath=".\time.cxx">
- </File>
- <File
- RelativePath=".\parsing.cxx">
- </File>
- <File
- RelativePath=".\serialization.cxx">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{FD93B741-02F9-48B5-BE59-E5DD2C73CC7A}"
- >
- <File
- RelativePath=".\test.hxx"
- >
- </File>
- <File
- RelativePath=".\time.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\test.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\test.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-intellisense test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/performance/performance-vc9.vcproj b/dist/examples/cxx/tree/performance/performance-vc9.vcproj
deleted file mode 100644
index fa23a74..0000000
--- a/dist/examples/cxx/tree/performance/performance-vc9.vcproj
+++ /dev/null
@@ -1,442 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="performance"
- ProjectGUID="{C60700D1-DB4B-4EFF-8EE9-97BD716BCB89}"
- RootNamespace="performance"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4BF3D33D-891D-402D-A26F-AEBC35E127DE}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\test.cxx"
- >
- </File>
- <File
- RelativePath=".\time.cxx">
- </File>
- <File
- RelativePath=".\parsing.cxx">
- </File>
- <File
- RelativePath=".\serialization.cxx">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{FD93B741-02F9-48B5-BE59-E5DD2C73CC7A}"
- >
- <File
- RelativePath=".\test.hxx"
- >
- </File>
- <File
- RelativePath=".\time.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\test.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\test.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd test.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization test.xsd"
- Outputs="test.hxx;test.ixx;test.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/polymorphism/makefile b/dist/examples/cxx/tree/polymorphism/makefile
deleted file mode 100644
index 282266e..0000000
--- a/dist/examples/cxx/tree/polymorphism/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-override XSDFLAGS += --generate-polymorphic --generate-serialization --root-element-last
-
-
-# Build.
-#
-driver: driver.o supermen.o
-
-supermen.o: supermen.cxx supermen.hxx
-driver.o: driver.cxx supermen.hxx
-
-supermen.cxx supermen.hxx: supermen.xsd
-
-
-# Test.
-#
-.PHONY: test
-test: driver supermen.xml
- ./driver supermen.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f supermen.o supermen.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj b/dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj
deleted file mode 100644
index 4a693ec..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polymorphism</ProjectName>
- <ProjectGuid>{03224289-FD3C-4A58-A6D7-E8D658B0E45A}</ProjectGuid>
- <RootNamespace>polymorphism</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj.filters b/dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj.filters
deleted file mode 100644
index 4459d2c..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc10.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{A02BB28E-3A7B-4E9E-A2AC-AA264C62525C}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6B2184D0-2125-48EB-AE80-64E24055DCE4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{e32c9352-17dd-4c6c-b9fa-fadaf6eee928}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj b/dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj
deleted file mode 100644
index d8f0aa0..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polymorphism</ProjectName>
- <ProjectGuid>{03224289-FD3C-4A58-A6D7-E8D658B0E45A}</ProjectGuid>
- <RootNamespace>polymorphism</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj.filters b/dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj.filters
deleted file mode 100644
index 4459d2c..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc11.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{A02BB28E-3A7B-4E9E-A2AC-AA264C62525C}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6B2184D0-2125-48EB-AE80-64E24055DCE4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{e32c9352-17dd-4c6c-b9fa-fadaf6eee928}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj b/dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj
deleted file mode 100644
index 040d657..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>polymorphism</ProjectName>
- <ProjectGuid>{03224289-FD3C-4A58-A6D7-E8D658B0E45A}</ProjectGuid>
- <RootNamespace>polymorphism</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="supermen.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd supermen.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">supermen.cxx;supermen.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj.filters b/dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj.filters
deleted file mode 100644
index 4459d2c..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc12.vcxproj.filters
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{A02BB28E-3A7B-4E9E-A2AC-AA264C62525C}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{6B2184D0-2125-48EB-AE80-64E24055DCE4}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{e32c9352-17dd-4c6c-b9fa-fadaf6eee928}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="supermen.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="supermen.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="supermen.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc8.vcproj b/dist/examples/cxx/tree/polymorphism/polymorphism-vc8.vcproj
deleted file mode 100644
index d146d0e..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc8.vcproj
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="polymorphism"
- ProjectGUID="{03224289-FD3C-4A58-A6D7-E8D658B0E45A}"
- RootNamespace="polymorphism"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{A02BB28E-3A7B-4E9E-A2AC-AA264C62525C}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{6B2184D0-2125-48EB-AE80-64E24055DCE4}"
- >
- <File
- RelativePath=".\supermen.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\supermen.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --generate-intellisense --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --generate-intellisense --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --generate-intellisense --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --generate-intellisense --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/polymorphism/polymorphism-vc9.vcproj b/dist/examples/cxx/tree/polymorphism/polymorphism-vc9.vcproj
deleted file mode 100644
index 3d56cf8..0000000
--- a/dist/examples/cxx/tree/polymorphism/polymorphism-vc9.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="polymorphism"
- ProjectGUID="{03224289-FD3C-4A58-A6D7-E8D658B0E45A}"
- RootNamespace="polymorphism"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{A02BB28E-3A7B-4E9E-A2AC-AA264C62525C}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\supermen.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{6B2184D0-2125-48EB-AE80-64E24055DCE4}"
- >
- <File
- RelativePath=".\supermen.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\supermen.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd supermen.xsd"
- CommandLine="xsd.exe cxx-tree --generate-polymorphic --generate-serialization --root-element-last supermen.xsd"
- Outputs="supermen.cxx;supermen.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/secure/makefile b/dist/examples/cxx/tree/secure/makefile
deleted file mode 100644
index 4898a10..0000000
--- a/dist/examples/cxx/tree/secure/makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-# Build.
-#
-driver: driver.o secure-dom-parser.o library.o
-
-library.o: library.cxx library.hxx
-secure-dom-parser.o: secure-dom-parser.cxx secure-dom-parser.hxx
-driver.o: driver.cxx secure-dom-parser.hxx library.hxx
-
-library.cxx library.hxx: library.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver library.xml
- ./driver library.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f library.o library.?xx secure-dom-parser.o driver.o driver
diff --git a/dist/examples/cxx/tree/streaming/makefile b/dist/examples/cxx/tree/streaming/makefile
deleted file mode 100644
index 4c7acd2..0000000
--- a/dist/examples/cxx/tree/streaming/makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-serialization
-
-
-# Build.
-#
-driver: driver.o parser.o serializer.o grammar-input-stream.o position.o
-
-position.o: position.cxx position.hxx
-driver.o: driver.cxx position.hxx parser.hxx serializer.hxx
-parser.o: parser.cxx parser.hxx
-serializer.o: serializer.cxx serializer.hxx
-grammar-input-stream.o: grammar-input-stream.cxx grammar-input-stream.hxx
-
-position.cxx position.hxx: position.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver position.xml
- ./driver position.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f position.o position.?xx parser.o serializer.o grammar-input-stream.o driver.o driver out.xml
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj b/dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj
deleted file mode 100644
index cf23e2a..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>streaming</ProjectName>
- <ProjectGuid>{3950B11C-AEB1-4E9C-BCB3-2E7133818C79}</ProjectGuid>
- <RootNamespace>streaming</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="position.cxx" />
- <ClCompile Include="parser.cxx" />
- <ClCompile Include="serializer.cxx" />
- <ClCompile Include="grammar-input-stream.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="position.hxx" />
- <ClInclude Include="parser.hxx" />
- <ClInclude Include="serializer.hxx" />
- <ClInclude Include="grammar-input-stream.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="position.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">position.cxx;position.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj.filters b/dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj.filters
deleted file mode 100644
index 3597703..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc10.vcxproj.filters
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4F684AD4-DFB2-4488-BA73-8625AECC91A3}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{94F3375D-5EB8-4D2C-8739-4D47E9AB7072}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b73125d6-60b1-4f32-9cfb-d11e709d0d14}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="position.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parser.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="serializer.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="grammar-input-stream.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="position.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="parser.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="serializer.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="grammar-input-stream.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="position.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj b/dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj
deleted file mode 100644
index 28f008c..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>streaming</ProjectName>
- <ProjectGuid>{3950B11C-AEB1-4E9C-BCB3-2E7133818C79}</ProjectGuid>
- <RootNamespace>streaming</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="position.cxx" />
- <ClCompile Include="parser.cxx" />
- <ClCompile Include="serializer.cxx" />
- <ClCompile Include="grammar-input-stream.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="position.hxx" />
- <ClInclude Include="parser.hxx" />
- <ClInclude Include="serializer.hxx" />
- <ClInclude Include="grammar-input-stream.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="position.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">position.cxx;position.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj.filters b/dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj.filters
deleted file mode 100644
index 3597703..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc11.vcxproj.filters
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4F684AD4-DFB2-4488-BA73-8625AECC91A3}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{94F3375D-5EB8-4D2C-8739-4D47E9AB7072}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b73125d6-60b1-4f32-9cfb-d11e709d0d14}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="position.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parser.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="serializer.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="grammar-input-stream.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="position.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="parser.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="serializer.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="grammar-input-stream.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="position.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj b/dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj
deleted file mode 100644
index 5e69c30..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>streaming</ProjectName>
- <ProjectGuid>{3950B11C-AEB1-4E9C-BCB3-2E7133818C79}</ProjectGuid>
- <RootNamespace>streaming</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="position.cxx" />
- <ClCompile Include="parser.cxx" />
- <ClCompile Include="serializer.cxx" />
- <ClCompile Include="grammar-input-stream.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="position.hxx" />
- <ClInclude Include="parser.hxx" />
- <ClInclude Include="serializer.hxx" />
- <ClInclude Include="grammar-input-stream.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="position.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">position.cxx;position.hxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd position.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd.exe cxx-tree --generate-serialization position.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">position.cxx;position.hxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj.filters b/dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj.filters
deleted file mode 100644
index 3597703..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc12.vcxproj.filters
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4F684AD4-DFB2-4488-BA73-8625AECC91A3}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{94F3375D-5EB8-4D2C-8739-4D47E9AB7072}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{b73125d6-60b1-4f32-9cfb-d11e709d0d14}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="position.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="parser.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="serializer.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="grammar-input-stream.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="position.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="parser.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="serializer.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="grammar-input-stream.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="position.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc8.vcproj b/dist/examples/cxx/tree/streaming/streaming-vc8.vcproj
deleted file mode 100644
index 354c0ff..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc8.vcproj
+++ /dev/null
@@ -1,441 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="streaming"
- ProjectGUID="{3950B11C-AEB1-4E9C-BCB3-2E7133818C79}"
- RootNamespace="streaming"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4F684AD4-DFB2-4488-BA73-8625AECC91A3}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\position.cxx"
- >
- </File>
- <File
- RelativePath=".\parser.cxx">
- </File>
- <File
- RelativePath=".\serializer.cxx">
- </File>
- <File
- RelativePath=".\grammar-input-stream.cxx">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{94F3375D-5EB8-4D2C-8739-4D47E9AB7072}"
- >
- <File
- RelativePath=".\position.hxx"
- >
- </File>
- <File
- RelativePath=".\parser.hxx">
- </File>
- <File
- RelativePath=".\serializer.hxx">
- </File>
- <File
- RelativePath=".\grammar-input-stream.hxx">
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\position.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/streaming/streaming-vc9.vcproj b/dist/examples/cxx/tree/streaming/streaming-vc9.vcproj
deleted file mode 100644
index e6b75f3..0000000
--- a/dist/examples/cxx/tree/streaming/streaming-vc9.vcproj
+++ /dev/null
@@ -1,438 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="streaming"
- ProjectGUID="{3950B11C-AEB1-4E9C-BCB3-2E7133818C79}"
- RootNamespace="streaming"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4F684AD4-DFB2-4488-BA73-8625AECC91A3}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\position.cxx"
- >
- </File>
- <File
- RelativePath=".\parser.cxx">
- </File>
- <File
- RelativePath=".\serializer.cxx">
- </File>
- <File
- RelativePath=".\grammar-input-stream.cxx">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{94F3375D-5EB8-4D2C-8739-4D47E9AB7072}"
- >
- <File
- RelativePath=".\position.hxx"
- >
- </File>
- <File
- RelativePath=".\parser.hxx">
- </File>
- <File
- RelativePath=".\serializer.hxx">
- </File>
- <File
- RelativePath=".\grammar-input-stream.hxx">
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\position.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd position.xsd"
- CommandLine="xsd.exe cxx-tree --generate-serialization position.xsd"
- Outputs="position.cxx;position.hxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/wildcard/makefile b/dist/examples/cxx/tree/wildcard/makefile
deleted file mode 100644
index 148b800..0000000
--- a/dist/examples/cxx/tree/wildcard/makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-
-override XSDFLAGS += --generate-inline --generate-serialization \
---generate-wildcard --root-element message
-
-
-# Build.
-#
-driver: driver.o email.o
-
-email.o: email.cxx email.hxx email.ixx
-driver.o: driver.cxx email.hxx email.ixx
-
-email.cxx email.hxx email.ixx: email.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver email.xml
- ./driver email.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f email.o email.?xx driver.o driver
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj b/dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj
deleted file mode 100644
index 6d5b02e..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{13C21A83-CC75-459E-9B01-E9EC36D1524B}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="email.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="email.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj.filters b/dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj.filters
deleted file mode 100644
index 541b946..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc10.vcxproj.filters
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{C8C63C87-F9B5-4EDF-B4BF-2701982EFCE6}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E8933542-EAF8-45F5-94AE-AE8D55E47565}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{79291748-08c5-4298-a090-a210ea0e7161}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{e83a7a6b-3537-4eea-bf81-494a6fcee412}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="email.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="email.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj b/dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj
deleted file mode 100644
index 8043842..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{13C21A83-CC75-459E-9B01-E9EC36D1524B}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="email.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="email.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj.filters b/dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj.filters
deleted file mode 100644
index 541b946..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc11.vcxproj.filters
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{C8C63C87-F9B5-4EDF-B4BF-2701982EFCE6}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E8933542-EAF8-45F5-94AE-AE8D55E47565}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{79291748-08c5-4298-a090-a210ea0e7161}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{e83a7a6b-3537-4eea-bf81-494a6fcee412}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="email.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="email.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj b/dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj
deleted file mode 100644
index e324659..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>wildcard</ProjectName>
- <ProjectGuid>{13C21A83-CC75-459E-9B01-E9EC36D1524B}</ProjectGuid>
- <RootNamespace>wildcard</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="email.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email.hxx" />
- </ItemGroup>
- <ItemGroup>
- <None Include="email.ixx" />
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd email.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">email.hxx;email.ixx;email.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj.filters b/dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj.filters
deleted file mode 100644
index 541b946..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc12.vcxproj.filters
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{C8C63C87-F9B5-4EDF-B4BF-2701982EFCE6}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{E8933542-EAF8-45F5-94AE-AE8D55E47565}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Inline Files">
- <UniqueIdentifier>{79291748-08c5-4298-a090-a210ea0e7161}</UniqueIdentifier>
- <Extensions>ixx</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{e83a7a6b-3537-4eea-bf81-494a6fcee412}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="email.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="email.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="email.ixx">
- <Filter>Inline Files</Filter>
- </None>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="email.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc8.vcproj b/dist/examples/cxx/tree/wildcard/wildcard-vc8.vcproj
deleted file mode 100644
index 046230a..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc8.vcproj
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="wildcard"
- ProjectGUID="{13C21A83-CC75-459E-9B01-E9EC36D1524B}"
- RootNamespace="wildcard"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{C8C63C87-F9B5-4EDF-B4BF-2701982EFCE6}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\email.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E8933542-EAF8-45F5-94AE-AE8D55E47565}"
- >
- <File
- RelativePath=".\email.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\email.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\email.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --generate-intellisense --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --generate-intellisense --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --generate-intellisense --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --generate-intellisense --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/wildcard/wildcard-vc9.vcproj b/dist/examples/cxx/tree/wildcard/wildcard-vc9.vcproj
deleted file mode 100644
index 08c2b1d..0000000
--- a/dist/examples/cxx/tree/wildcard/wildcard-vc9.vcproj
+++ /dev/null
@@ -1,429 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="wildcard"
- ProjectGUID="{13C21A83-CC75-459E-9B01-E9EC36D1524B}"
- RootNamespace="wildcard"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{C8C63C87-F9B5-4EDF-B4BF-2701982EFCE6}"
- >
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\email.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{E8933542-EAF8-45F5-94AE-AE8D55E47565}"
- >
- <File
- RelativePath=".\email.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Inline Files"
- Filter="ixx"
- >
- <File
- RelativePath=".\email.ixx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\email.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd email.xsd"
- CommandLine="xsd cxx-tree --generate-inline --generate-serialization --generate-wildcard --root-element message email.xsd"
- Outputs="email.hxx;email.ixx;email.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/xpath/makefile b/dist/examples/cxx/tree/xpath/makefile
deleted file mode 100644
index d5f2833..0000000
--- a/dist/examples/cxx/tree/xpath/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-root := ../../..
-
-include $(root)/build/cxx/rules.make
-include $(root)/build/xsd/tree-rules.make
-
-override LIBS += -lxqilla
-
-# Build.
-#
-driver: driver.o people.o dom-parse.o
-
-people.o: people.cxx people.hxx
-driver.o: driver.cxx people.hxx dom-parse.hxx
-people.o: dom-parse.cxx dom-parse.hxx
-
-people.cxx people.hxx: people.xsd
-
-
-# Test
-#
-.PHONY: test
-test: driver people.xml
- ./driver people.xml
-
-
-# Clean.
-#
-.PHONY: clean
-clean:
- rm -f people.o people.?xx driver.o dom-parse.o driver
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj b/dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj
deleted file mode 100644
index 60ef726..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xpath</ProjectName>
- <ProjectGuid>{EC26ACF9-0103-48D2-B7BA-0222C2175B28}</ProjectGuid>
- <RootNamespace>xpath</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;xqilla22d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;xqilla22d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;xqilla22.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;xqilla22.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj.filters b/dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj.filters
deleted file mode 100644
index d038587..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc10.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0A690AC0-4B5A-4FCA-B2CC-A61C00F01283}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{19387534-A72F-4C3F-A9FB-F5B8909AEB29}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{807745b4-2087-4ccb-8fdc-8160206a3042}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj b/dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj
deleted file mode 100644
index b758594..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xpath</ProjectName>
- <ProjectGuid>{EC26ACF9-0103-48D2-B7BA-0222C2175B28}</ProjectGuid>
- <RootNamespace>xpath</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;xqilla22d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;xqilla22d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;xqilla22.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;xqilla22.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj.filters b/dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj.filters
deleted file mode 100644
index d038587..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc11.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0A690AC0-4B5A-4FCA-B2CC-A61C00F01283}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{19387534-A72F-4C3F-A9FB-F5B8909AEB29}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{807745b4-2087-4ccb-8fdc-8160206a3042}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj b/dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj
deleted file mode 100644
index ff81b9e..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>xpath</ProjectName>
- <ProjectGuid>{EC26ACF9-0103-48D2-B7BA-0222C2175B28}</ProjectGuid>
- <RootNamespace>xpath</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <PlatformToolset>v120</PlatformToolset>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">driver</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">driver</TargetName>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;xqilla22d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3D.lib;xqilla22d.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)driver.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;xqilla22.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <RuntimeTypeInfo>true</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <SDLCheck>true</SDLCheck>
- </ClCompile>
- <Link>
- <AdditionalDependencies>xerces-c_3.lib;xqilla22.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(TargetPath)</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Console</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx" />
- <ClCompile Include="driver.cxx" />
- <ClCompile Include="people.cxx" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx" />
- <ClInclude Include="people.hxx" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">people.hxx;people.cxx;%(Outputs)</Outputs>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd people.xsd</Message>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">xsd cxx-tree people.xsd</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">people.hxx;people.cxx;%(Outputs)</Outputs>
- </CustomBuild>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj.filters b/dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj.filters
deleted file mode 100644
index d038587..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc12.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0A690AC0-4B5A-4FCA-B2CC-A61C00F01283}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{19387534-A72F-4C3F-A9FB-F5B8909AEB29}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Schema Files">
- <UniqueIdentifier>{807745b4-2087-4ccb-8fdc-8160206a3042}</UniqueIdentifier>
- <Extensions>xsd</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dom-parse.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="driver.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="people.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="dom-parse.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="people.hxx">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="Readme.txt" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="people.xsd">
- <Filter>Schema Files</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc8.vcproj b/dist/examples/cxx/tree/xpath/xpath-vc8.vcproj
deleted file mode 100644
index 3900265..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc8.vcproj
+++ /dev/null
@@ -1,431 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="xpath"
- ProjectGUID="{EC26ACF9-0103-48D2-B7BA-0222C2175B28}"
- RootNamespace="xpath"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib xqilla22d.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib xqilla22.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib xqilla22d.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib xqilla22.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{0A690AC0-4B5A-4FCA-B2CC-A61C00F01283}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{19387534-A72F-4C3F-A9FB-F5B8909AEB29}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree --generate-intellisense people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/cxx/tree/xpath/xpath-vc9.vcproj b/dist/examples/cxx/tree/xpath/xpath-vc9.vcproj
deleted file mode 100644
index b21a65e..0000000
--- a/dist/examples/cxx/tree/xpath/xpath-vc9.vcproj
+++ /dev/null
@@ -1,428 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="xpath"
- ProjectGUID="{EC26ACF9-0103-48D2-B7BA-0222C2175B28}"
- RootNamespace="xpath"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib xqilla22d.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3D.lib xqilla22d.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/driver.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib xqilla22.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="xerces-c_3.lib xqilla22.lib"
- OutputFile="$(OutDir)/driver.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{0A690AC0-4B5A-4FCA-B2CC-A61C00F01283}"
- >
- <File
- RelativePath=".\dom-parse.cxx"
- >
- </File>
- <File
- RelativePath=".\driver.cxx"
- >
- </File>
- <File
- RelativePath=".\people.cxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{19387534-A72F-4C3F-A9FB-F5B8909AEB29}"
- >
- <File
- RelativePath=".\dom-parse.hxx"
- >
- </File>
- <File
- RelativePath=".\people.hxx"
- >
- </File>
- </Filter>
- <Filter
- Name="Schema Files"
- Filter="xsd"
- >
- <File
- RelativePath=".\people.xsd"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="xsd people.xsd"
- CommandLine="xsd cxx-tree people.xsd"
- Outputs="people.hxx;people.cxx"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <File
- RelativePath=".\Readme.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/dist/examples/makefile b/dist/examples/makefile
deleted file mode 100644
index 5b8947e..0000000
--- a/dist/examples/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-dirs := cxx
-
-.PHONY: all $(dirs)
-
-all: $(dirs)
-
-$(dirs):
- $(MAKE) -C $@ $(MAKECMDGOALS)
-
-makefile: ;
-% :: $(dirs) ;
diff --git a/dist/examples/test.bat b/dist/examples/test.bat
deleted file mode 100644
index 1ca7779..0000000
--- a/dist/examples/test.bat
+++ /dev/null
@@ -1,73 +0,0 @@
-@echo off
-rem file : examples/test.bat
-rem license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-setlocal
-
-set "tests=__path__(dirs)"
-set "confs=__path__(configurations)"
-set "plats=__path__(platforms)"
-set "curdir=%CD%"
-set "topdir=%curdir%\..\.."
-set "failed="
-
-goto start
-
-rem
-rem %1 - test directory
-rem %2 - configuration
-rem %3 - platform
-rem
-:run_test
- cd %1
-
- if "_%3_" == "_Win32_" (
- set "dir=%2"
- ) else (
- set "dir=%3\%2"
- )
-
- if exist %dir%\driver.exe (
- echo %1\%3\%2
- call %topdir%\tester.bat %2 %3
- if errorlevel 1 (
- set "failed=%failed% %1\%3\%2"
- )
- )
-
- cd %curdir%
-goto :eof
-
-:start
-
-for %%t in (%tests%) do (
- for %%c in (%confs%) do (
- for %%p in (%plats%) do (
- call :run_test %%t %%c %%p
- )
- )
-)
-
-if not "_%failed%_" == "__" goto error
-
-echo.
-echo ALL EXAMPLES PASSED
-echo.
-goto end
-
-:usage
-echo.
-echo usage: test.bat
-echo.
-
-:error
-if not "_%failed%_" == "__" (
- echo.
- for %%t in (%failed%) do echo FAILED: %%t
- echo.
-)
-endlocal
-exit /b 1
-
-:end
-endlocal
diff --git a/dist/examples/tester.bat b/dist/examples/tester.bat
deleted file mode 100644
index 372d90a..0000000
--- a/dist/examples/tester.bat
+++ /dev/null
@@ -1,46 +0,0 @@
-@echo off
-rem file : examples/tester.bat
-rem license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-rem
-rem Run example. The example directory is the current directory.
-rem
-rem %1 configuration, for example, Debug or Release
-rem %2 platform, for example Win32 or x64
-rem
-
-setlocal
-
-if "_%DIFF%_" == "__" set DIFF=fc
-
-if "_%2_" == "_Win32_" (
- set "dir=%1"
-) else (
- set "dir=%2\%1"
-)
-
-rem Globbing returns files in alphabetic order. We also need to cover
-rem compressed XML files (.xml.gz).
-rem
-if exist *.xml* (
- for %%f in (*.xml*) do (
- if NOT "%%f" == "out.xml" (
- if NOT "%%f" == "out.xml.gz" (
- %dir%\driver.exe %%f
- if errorlevel 1 goto error
- )
- )
- )
-) else (
- %dir%\driver.exe
- if errorlevel 1 goto error
-)
-
-goto end
-
-:error
-endlocal
-exit /b 1
-
-:end
-endlocal
diff --git a/dist/template-vc10.sln b/dist/template-vc10.sln
deleted file mode 100644
index 9a5dc32..0000000
--- a/dist/template-vc10.sln
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-__projects__
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
-__solution_configurations__
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
-__project_configurations__
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/template-vc11.sln b/dist/template-vc11.sln
deleted file mode 100644
index 436eeea..0000000
--- a/dist/template-vc11.sln
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-__projects__
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
-__solution_configurations__
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
-__project_configurations__
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/template-vc12.sln b/dist/template-vc12.sln
deleted file mode 100644
index 446d701..0000000
--- a/dist/template-vc12.sln
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
-MinimumVisualStudioVersion = 10.0.40219.1
-__projects__
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
-__solution_configurations__
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
-__project_configurations__
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/template-vc8.sln b/dist/template-vc8.sln
deleted file mode 100644
index f38bad2..0000000
--- a/dist/template-vc8.sln
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-__projects__
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
-__solution_configurations__
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
-__project_configurations__
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/dist/template-vc9.sln b/dist/template-vc9.sln
deleted file mode 100644
index 2ec9432..0000000
--- a/dist/template-vc9.sln
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-__projects__
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
-__solution_configurations__
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
-__project_configurations__
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/doc/cxx/makefile b/doc/cxx/makefile
deleted file mode 100644
index 1395edc..0000000
--- a/doc/cxx/makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# file : doc/cxx/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-docs := parser tree
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(docs)))
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(docs)))
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(docs)))
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(docs)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(docs)))
-
-$(foreach m,$(docs),$(call import,$(src_base)/$m/makefile))
diff --git a/doc/cxx/parser/guide/guide.html2ps b/doc/cxx/parser/guide/guide.html2ps
deleted file mode 100644
index af5e0f2..0000000
--- a/doc/cxx/parser/guide/guide.html2ps
+++ /dev/null
@@ -1,65 +0,0 @@
-@html2ps {
- option {
- toc: hb;
- colour: 1;
- hyphenate: 1;
- titlepage: 1;
- }
-
- datefmt: "%B %Y";
-
- titlepage {
- content: "
-<div align=center>
- <h1><big>C++/Parser Mapping</big></h1>
- <h1><big>Getting Started Guide</big></h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
-</div>
- <p>Copyright &#169; 2009-2020 Code Synthesis Tools CC.</p>
-
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the
- <a href='https://www.codesynthesis.com/licenses/fdl-1.2.txt'>GNU Free
- Documentation License, version 1.2</a>; with no Invariant Sections,
- no Front-Cover Texts and no Back-Cover Texts.
- </p>
-
- <p>This document is available in the following formats:
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/index.xhtml'>XHTML</a>,
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.pdf'>PDF</a>, and
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.ps'>PostScript</a>.</p>";
- }
-
- toc {
- indent: 2em;
- }
-
- header {
- odd-right: $H;
- even-left: $H;
- }
-
- footer {
- odd-left: $D;
- odd-center: $T;
- odd-right: $N;
-
- even-left: $N;
- even-center: $T;
- even-right: $D;
- }
-}
-
-body {
- font-size: 12pt;
- text-align: justify;
-}
-
-pre {
- font-size: 10pt;
-}
diff --git a/doc/cxx/parser/guide/index.xhtml b/doc/cxx/parser/guide/index.xhtml
deleted file mode 100644
index 1399214..0000000
--- a/doc/cxx/parser/guide/index.xhtml
+++ /dev/null
@@ -1,4158 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head>
- <title>C++/Parser Mapping Getting Started Guide</title>
-
- <meta name="copyright" content="&#169; 2009-2020 Code Synthesis Tools CC"/>
- <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,parser,validation"/>
- <meta name="description" content="C++/Parser Mapping Getting Started Guide"/>
-
- <link rel="stylesheet" type="text/css" href="../../../default.css" />
-
-<style type="text/css">
- pre {
- padding : 0 0 0 0em;
- margin : 0em 0em 0em 0;
-
- font-size : 102%
- }
-
- body {
- min-width: 48em;
- }
-
- h1 {
- font-weight: bold;
- font-size: 200%;
- line-height: 1.2em;
- }
-
- h2 {
- font-weight : bold;
- font-size : 150%;
-
- padding-top : 0.8em;
- }
-
- h3 {
- font-size : 140%;
- padding-top : 0.8em;
- }
-
- /* Adjust indentation for three levels. */
- #container {
- max-width: 48em;
- }
-
- #content {
- padding: 0 0.1em 0 4em;
- /*background-color: red;*/
- }
-
- #content h1 {
- margin-left: -2.06em;
- }
-
- #content h2 {
- margin-left: -1.33em;
- }
-
- /* Title page */
-
- #titlepage {
- padding: 2em 0 1em 0;
- border-bottom: 1px solid black;
- }
-
- #titlepage .title {
- font-weight: bold;
- font-size: 200%;
- text-align: center;
- }
-
- #titlepage #first-title {
- padding: 1em 0 0.4em 0;
- }
-
- #titlepage #second-title {
- padding: 0.4em 0 2em 0;
- }
-
- /* Lists */
- ul.list li {
- padding-top : 0.3em;
- padding-bottom : 0.3em;
- }
-
- ol.steps {
- padding-left : 1.8em;
- }
-
- ol.steps li {
- padding-top : 0.3em;
- padding-bottom : 0.3em;
- }
-
-
- div.img {
- text-align: center;
- padding: 2em 0 2em 0;
- }
-
- /* */
- dl dt {
- padding : 0.8em 0 0 0;
- }
-
- /* Built-in table */
- #builtin {
- margin: 2em 0 2em 0;
-
- border-collapse : collapse;
- border : 1px solid;
- border-color : #000000;
-
- font-size : 11px;
- line-height : 14px;
- }
-
- #builtin th, #builtin td {
- border: 1px solid;
- padding : 0.9em 0.9em 0.7em 0.9em;
- }
-
- #builtin th {
- background : #cde8f6;
- }
-
- #builtin td {
- text-align: left;
- }
-
- /* XML Schema features table. */
- #features {
- margin: 2em 0 2em 0;
-
- border-collapse : collapse;
- border : 1px solid;
- border-color : #000000;
-
- font-size : 11px;
- line-height : 14px;
- }
-
- #features th, #features td {
- border: 1px solid;
- padding : 0.6em 0.6em 0.6em 0.6em;
- }
-
- #features th {
- background : #cde8f6;
- }
-
- #features td {
- text-align: left;
- }
-
-
- /* TOC */
- table.toc {
- border-style : none;
- border-collapse : separate;
- border-spacing : 0;
-
- margin : 0.2em 0 0.2em 0;
- padding : 0 0 0 0;
- }
-
- table.toc tr {
- padding : 0 0 0 0;
- margin : 0 0 0 0;
- }
-
- table.toc * td, table.toc * th {
- border-style : none;
- margin : 0 0 0 0;
- vertical-align : top;
- }
-
- table.toc * th {
- font-weight : normal;
- padding : 0em 0.1em 0em 0;
- text-align : left;
- white-space : nowrap;
- }
-
- table.toc * table.toc th {
- padding-left : 1em;
- }
-
- table.toc * td {
- padding : 0em 0 0em 0.7em;
- text-align : left;
- }
-</style>
-
-
-</head>
-
-<body>
-<div id="container">
- <div id="content">
-
- <div class="noprint">
-
- <div id="titlepage">
- <div class="title" id="first-title">C++/Parser Mapping</div>
- <div class="title" id="second-title">Getting Started Guide</div>
-
- <p>Copyright &#169; 2009-2020 Code Synthesis Tools CC.</p>
-
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the
- <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
- Documentation License, version 1.2</a>; with no Invariant Sections,
- no Front-Cover Texts and no Back-Cover Texts.
- </p>
-
- <p>This document is available in the following formats:
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/index.xhtml">XHTML</a>,
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.pdf">PDF</a>, and
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.ps">PostScript</a>.</p>
-
- </div>
-
- <h1>Table of Contents</h1>
-
- <table class="toc">
- <tr>
- <th></th><td><a href="#0">Preface</a>
- <table class="toc">
- <tr><th></th><td><a href="#0.1">About This Document</a></td></tr>
- <tr><th></th><td><a href="#0.2">More Information</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>1</th><td><a href="#1">Introduction</a>
- <table class="toc">
- <tr><th>1.1</th><td><a href="#1.1">Mapping Overview</a></td></tr>
- <tr><th>1.2</th><td><a href="#1.2">Benefits</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>2</th><td><a href="#2">Hello World Example</a>
- <table class="toc">
- <tr><th>2.1</th><td><a href="#2.1">Writing XML Document and Schema</a></td></tr>
- <tr><th>2.2</th><td><a href="#2.2">Translating Schema to C++</a></td></tr>
- <tr><th>2.3</th><td><a href="#2.3">Implementing Application Logic</a></td></tr>
- <tr><th>2.4</th><td><a href="#2.4">Compiling and Running</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>3</th><td><a href="#3">Parser Skeletons</a>
- <table class="toc">
- <tr><th>3.1</th><td><a href="#3.1">Implementing the Gender Parser</a></td></tr>
- <tr><th>3.2</th><td><a href="#3.2">Implementing the Person Parser</a></td></tr>
- <tr><th>3.3</th><td><a href="#3.3">Implementing the People Parser</a></td></tr>
- <tr><th>3.4</th><td><a href="#3.4">Connecting the Parsers Together</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>4</th><td><a href="#4">Type Maps</a>
- <table class="toc">
- <tr><th>4.1</th><td><a href="#4.1">Object Model</a></td></tr>
- <tr><th>4.2</th><td><a href="#4.2">Type Map File Format</a></td></tr>
- <tr><th>4.3</th><td><a href="#4.3">Parser Implementations</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>5</th><td><a href="#5">Mapping Configuration</a>
- <table class="toc">
- <tr><th>5.1</th><td><a href="#5.1">C++ Standard</a></td></tr>
- <tr><th>5.2</th><td><a href="#5.2">Character Type and Encoding</a></td></tr>
- <tr><th>5.3</th><td><a href="#5.3">Underlying XML Parser</a></td></tr>
- <tr><th>5.4</th><td><a href="#5.4">XML Schema Validation</a></td></tr>
- <tr><th>5.5</th><td><a href="#5.5">Support for Polymorphism</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>6</th><td><a href="#6">Built-In XML Schema Type Parsers</a>
- <table class="toc">
- <tr><th>6.1</th><td><a href="#6.1"><code>QName</code> Parser</a></td></tr>
- <tr><th>6.2</th><td><a href="#6.2"><code>NMTOKENS</code> and <code>IDREFS</code> Parsers</a></td></tr>
- <tr><th>6.3</th><td><a href="#6.3"><code>base64Binary</code> and <code>hexBinary</code> Parsers</a></td></tr>
- <tr><th>6.4</th><td><a href="#6.4">Time Zone Representation</a></td></tr>
- <tr><th>6.5</th><td><a href="#6.5"><code>date</code> Parser</a></td></tr>
- <tr><th>6.6</th><td><a href="#6.6"><code>dateTime</code> Parser</a></td></tr>
- <tr><th>6.7</th><td><a href="#6.7"><code>duration</code> Parser</a></td></tr>
- <tr><th>6.8</th><td><a href="#6.8"><code>gDay</code> Parser</a></td></tr>
- <tr><th>6.9</th><td><a href="#6.9"><code>gMonth</code> Parser</a></td></tr>
- <tr><th>6.10</th><td><a href="#6.10"><code>gMonthDay</code> Parser</a></td></tr>
- <tr><th>6.11</th><td><a href="#6.11"><code>gYear</code> Parser</a></td></tr>
- <tr><th>6.12</th><td><a href="#6.12"><code>gYearMonth</code> Parser</a></td></tr>
- <tr><th>6.13</th><td><a href="#6.13"><code>time</code> Parser</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>7</th><td><a href="#7">Document Parser and Error Handling</a>
- <table class="toc">
- <tr><th>7.1</th><td><a href="#7.1">Xerces-C++ Document Parser</a></td></tr>
- <tr><th>7.2</th><td><a href="#7.2">Expat Document Parser</a></td></tr>
- <tr><th>7.3</th><td><a href="#7.3">Error Handling</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th></th><td><a href="#A">Appendix A &mdash; Supported XML Schema Constructs</a></td>
- </tr>
-
- </table>
- </div>
-
- <h1><a name="0">Preface</a></h1>
-
- <h2><a name="0.1">About This Document</a></h2>
-
- <p>The goal of this document is to provide you with an understanding of
- the C++/Parser programming model and allow you to efficiently evaluate
- XSD against your project's technical requirements. As such, this
- document is intended for C++ developers and software architects
- who are looking for an XML processing solution. Prior experience
- with XML and C++ is required to understand this document. Basic
- understanding of XML Schema is advantageous but not expected
- or required.
- </p>
-
-
- <h2><a name="0.2">More Information</a></h2>
-
- <p>Beyond this guide, you may also find the following sources of
- information useful:</p>
-
- <ul class="list">
- <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a></li>
-
- <li>The <code>examples/cxx/parser/</code> directory in the XSD
- distribution contains a collection of examples and a README
- file with an overview of each example.</li>
-
- <li>The <code>README</code> file in the XSD distribution explains
- how to compile the examples on various platforms.</li>
-
- <li>The <a href="https://www.codesynthesis.com/mailman/listinfo/xsd-users">xsd-users</a>
- mailing list is the place to ask technical questions about XSD and the C++/Parser mapping.
- Furthermore, the <a href="https://www.codesynthesis.com/pipermail/xsd-users/">archives</a>
- may already have answers to some of your questions.</li>
-
- </ul>
-
- <!-- Introduction -->
-
- <h1><a name="1">1 Introduction</a></h1>
-
- <p>Welcome to CodeSynthesis XSD and the C++/Parser mapping. XSD is a
- cross-platform W3C XML Schema to C++ data binding compiler. C++/Parser
- is a W3C XML Schema to C++ mapping that represents an XML vocabulary
- as a set of parser skeletons which you can implement to perform XML
- processing as required by your application logic.
- </p>
-
- <h2><a name="1.1">1.1 Mapping Overview</a></h2>
-
- <p>The C++/Parser mapping provides event-driven, stream-oriented
- XML parsing, XML Schema validation, and C++ data binding. It was
- specifically designed and optimized for high performance and
- small footprint. Based on the static analysis of the schemas, XSD
- generates compact, highly-optimized hierarchical state machines
- that combine data extraction, validation, and even dispatching
- in a single step. As a result, the generated code is typically
- 2-10 times faster than general-purpose validating XML parsers
- while maintaining the lowest static and dynamic memory footprints.
- </p>
-
- <p>To speed up application development, the C++/Parser mapping
- can be instructed to generate sample parser implementations
- and a test driver which can then be filled with the application
- logic code. The mapping also provides a wide range of
- mechanisms for controlling and customizing the generated code.</p>
-
- <p>The next chapter shows how to create a simple application that uses
- the C++/Parser mapping to parse, validate, and extract data from a
- simple XML document. The following chapters show how to
- use the C++/Parser mapping in more detail.</p>
-
- <h2><a name="1.2">1.2 Benefits</a></h2>
-
- <p>Traditional XML access APIs such as Document Object Model (DOM)
- or Simple API for XML (SAX) have a number of drawbacks that
- make them less suitable for creating robust and maintainable
- XML processing applications. These drawbacks include:
- </p>
-
- <ul class="list">
- <li>Generic representation of XML in terms of elements, attributes,
- and text forces an application developer to write a substantial
- amount of bridging code that identifies and transforms pieces
- of information encoded in XML to a representation more suitable
- for consumption by the application logic.</li>
-
- <li>String-based flow control defers error detection to runtime.
- It also reduces code readability and maintainability.</li>
-
- <li>Lack of type safety because the data is represented
- as text.</li>
-
- <li>Resulting applications are hard to debug, change, and
- maintain.</li>
- </ul>
-
- <p>In contrast, statically-typed, vocabulary-specific parser
- skeletons produced by the C++/Parser mapping allow you to
- operate in your domain terms instead of the generic elements,
- attributes, and text. Static typing helps catch errors at
- compile-time rather than at run-time. Automatic code generation
- frees you for more interesting tasks (such as doing something
- useful with the information stored in the XML documents) and
- minimizes the effort needed to adapt your applications to
- changes in the document structure. To summarize, the C++/Parser
- mapping has the following key advantages over generic XML
- access APIs:</p>
-
- <ul class="list">
- <li><b>Ease of use.</b> The generated code hides all the complexity
- associated with recreating the document structure, maintaining the
- dispatch state, and converting the data from the text representation
- to data types suitable for manipulation by the application logic.
- Parser skeletons also provide a convenient mechanism for building
- custom in-memory representations.</li>
-
- <li><b>Natural representation.</b> The generated parser skeletons
- implement parser callbacks as virtual functions with names
- corresponding to elements and attributes in XML. As a result,
- you process the XML data using your domain vocabulary instead
- of generic elements, attributes, and text.
- </li>
-
- <li><b>Concise code.</b> With a separate parser skeleton for each
- XML Schema type, the application implementation is
- simpler and thus easier to read and understand.</li>
-
- <li><b>Safety.</b> The XML data is delivered to parser callbacks as
- statically typed objects. The parser callbacks themselves are virtual
- functions. This helps catch programming errors at compile-time
- rather than at runtime.</li>
-
- <li><b>Maintainability.</b> Automatic code generation minimizes the
- effort needed to adapt the application to changes in the
- document structure. With static typing, the C++ compiler
- can pin-point the places in the application code that need to be
- changed.</li>
-
- <li><b>Efficiency.</b> The generated parser skeletons combine
- data extraction, validation, and even dispatching in a single
- step. This makes them much more efficient than traditional
- architectures with separate stages for validation and data
- extraction/dispatch.</li>
- </ul>
-
- <!-- Hello World Parser -->
-
-
- <h1><a name="2">2 Hello World Example</a></h1>
-
- <p>In this chapter we will examine how to parse a very simple XML
- document using the XSD-generated C++/Parser skeletons.
- The code presented in this chapter is based on the <code>hello</code>
- example which can be found in the <code>examples/cxx/parser/</code>
- directory of the XSD distribution.</p>
-
- <h2><a name="2.1">2.1 Writing XML Document and Schema</a></h2>
-
- <p>First, we need to get an idea about the structure
- of the XML documents we are going to process. Our
- <code>hello.xml</code>, for example, could look like this:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;hello>
-
- &lt;greeting>Hello&lt;/greeting>
-
- &lt;name>sun&lt;/name>
- &lt;name>moon&lt;/name>
- &lt;name>world&lt;/name>
-
-&lt;/hello>
- </pre>
-
- <p>Then we can write a description of the above XML in the
- XML Schema language and save it into <code>hello.xsd</code>:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:complexType name="hello">
- &lt;xs:sequence>
- &lt;xs:element name="greeting" type="xs:string"/>
- &lt;xs:element name="name" type="xs:string" maxOccurs="unbounded"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:element name="hello" type="hello"/>
-
-&lt;/xs:schema>
- </pre>
-
- <p>Even if you are not familiar with XML Schema, it
- should be easy to connect declarations in <code>hello.xsd</code>
- to elements in <code>hello.xml</code>. The <code>hello</code> type
- is defined as a sequence of the nested <code>greeting</code> and
- <code>name</code> elements. Note that the term sequence in XML
- Schema means that elements should appear in a particular order
- as opposed to appearing multiple times. The <code>name</code>
- element has its <code>maxOccurs</code> property set to
- <code>unbounded</code> which means it can appear multiple times
- in an XML document. Finally, the globally-defined <code>hello</code>
- element prescribes the root element for our vocabulary. For an
- easily-approachable introduction to XML Schema refer to
- <a href="http://www.w3.org/TR/xmlschema-0/">XML Schema Part 0:
- Primer</a>.</p>
-
- <p>The above schema is a specification of our XML vocabulary; it tells
- everybody what valid documents of our XML-based language should look
- like. The next step is to compile this schema to generate
- the object model and parsing functions.</p>
-
- <h2><a name="2.2">2.2 Translating Schema to C++</a></h2>
-
- <p>Now we are ready to translate our <code>hello.xsd</code> to C++ parser
- skeletons. To do this we invoke the XSD compiler from a terminal
- (UNIX) or a command prompt (Windows):
- </p>
-
- <pre class="terminal">
-$ xsd cxx-parser --xml-parser expat hello.xsd
- </pre>
-
- <p>The <code>--xml-parser</code> option indicates that we want to
- use Expat as the underlying XML parser (see <a href="#5.3">Section
- 5.3, "Underlying XML Parser"</a>). The XSD compiler produces two
- C++ files: <code>hello-pskel.hxx</code> and <code>hello-pskel.cxx</code>.
- The following code fragment is taken from <code>hello-pskel.hxx</code>;
- it should give you an idea about what gets generated:
- </p>
-
- <pre class="c++">
-class hello_pskel
-{
-public:
- // Parser callbacks. Override them in your implementation.
- //
- virtual void
- pre ();
-
- virtual void
- greeting (const std::string&amp;);
-
- virtual void
- name (const std::string&amp;);
-
- virtual void
- post_hello ();
-
- // Parser construction API.
- //
- void
- greeting_parser (xml_schema::string_pskel&amp;);
-
- void
- name_parser (xml_schema::string_pskel&amp;);
-
- void
- parsers (xml_schema::string_pskel&amp; /* greeting */,
- xml_schema::string_pskel&amp; /* name */);
-
-private:
- ...
-};
- </pre>
-
- <p>The first four member functions shown above are called parser
- callbacks. You would normally override them in your implementation
- of the parser to do something useful. Let's go through all of
- them one by one.</p>
-
- <p>The <code>pre()</code> function is an initialization callback. It is
- called when a new element of type <code>hello</code> is about
- to be parsed. You would normally use this function to allocate a new
- instance of the resulting type or clear accumulators that are used
- to gather information during parsing. The default implementation
- of this function does nothing.</p>
-
- <p>The <code>post_hello()</code> function is a finalization callback. Its
- name is constructed by adding the parser skeleton name to the
- <code>post_</code> prefix. The finalization callback is called when
- parsing of the element is complete and the result, if any, should
- be returned. Note that in our case the return type of
- <code>post_hello()</code> is <code>void</code> which means there
- is nothing to return. More on parser return types later.
- </p>
-
- <p>You may be wondering why the finalization callback is called
- <code>post_hello()</code> instead of <code>post()</code> just
- like <code>pre()</code>. The reason for this is that
- finalization callbacks can have different return types and
- result in function signature clashes across inheritance
- hierarchies. To prevent this the signatures of finalization
- callbacks are made unique by adding the type name to their names.</p>
-
- <p>The <code>greeting()</code> and <code>name()</code> functions are
- called when the <code>greeting</code> and <code>name</code> elements
- have been parsed, respectively. Their arguments are of type
- <code>std::string</code> and contain the data extracted from XML.</p>
-
- <p>The last three functions are for connecting parsers to each other.
- For example, there is a predefined parser for built-in XML Schema type
- <code>string</code> in the XSD runtime. We will be using
- it to parse the contents of <code>greeting</code> and
- <code>name</code> elements, as shown in the next section.</p>
-
- <h2><a name="2.3">2.3 Implementing Application Logic</a></h2>
-
- <p>At this point we have all the parts we need to do something useful
- with the information stored in our XML document. The first step is
- to implement the parser:
- </p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include "hello-pskel.hxx"
-
-class hello_pimpl: public hello_pskel
-{
-public:
- virtual void
- greeting (const std::string&amp; g)
- {
- greeting_ = g;
- }
-
- virtual void
- name (const std::string&amp; n)
- {
- std::cout &lt;&lt; greeting_ &lt;&lt; ", " &lt;&lt; n &lt;&lt; "!" &lt;&lt; std::endl;
- }
-
-private:
- std::string greeting_;
-};
- </pre>
-
- <p>We left both <code>pre()</code> and <code>post_hello()</code> with the
- default implementations; we don't have anything to initialize or
- return. The rest is pretty straightforward: we store the greeting
- in a member variable and later, when parsing names, use it to
- say hello.</p>
-
- <p>An observant reader my ask what happens if the <code>name</code>
- element comes before <code>greeting</code>? Don't we need to
- make sure <code>greeting_</code> was initialized and report
- an error otherwise? The answer is no, we don't have to do
- any of this. The <code>hello_pskel</code> parser skeleton
- performs validation of XML according to the schema from which
- it was generated. As a result, it will check the order
- of the <code>greeting</code> and <code>name</code> elements
- and report an error if it is violated.</p>
-
- <p>Now it is time to put this parser implementation to work:</p>
-
- <pre class="c++">
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- // Construct the parser.
- //
- xml_schema::string_pimpl string_p;
- hello_pimpl hello_p;
-
- hello_p.greeting_parser (string_p);
- hello_p.name_parser (string_p);
-
- // Parse the XML instance.
- //
- xml_schema::document doc_p (hello_p, "hello");
-
- hello_p.pre ();
- doc_p.parse (argv[1]);
- hello_p.post_hello ();
- }
- catch (const xml_schema::exception&amp; e)
- {
- cerr &lt;&lt; e &lt;&lt; endl;
- return 1;
- }
-}
- </pre>
-
- <p>The first part of this code snippet instantiates individual parsers
- and assembles them into a complete vocabulary parser.
- <code>xml_schema::string_pimpl</code> is an implementation of a parser
- for built-in XML Schema type <code>string</code>. It is provided by
- the XSD runtime along with parsers for other built-in types (for
- more information on the built-in parsers see <a href="#6">Chapter 6,
- "Built-In XML Schema Type Parsers"</a>). We use <code>string_pimpl</code>
- to parse the <code>greeting</code> and <code>name</code> elements as
- indicated by the calls to <code>greeting_parser()</code> and
- <code>name_parser()</code>.
- </p>
-
- <p>Then we instantiate a document parser (<code>doc_p</code>). The
- first argument to its constructor is the parser for
- the root element (<code>hello_p</code> in our case). The
- second argument is the root element name.
- </p>
-
- <p>The final piece is the calls to <code>pre()</code>, <code>parse()</code>,
- and <code>post_hello()</code>. The call to <code>parse()</code>
- perform the actual XML parsing while the calls to <code>pre()</code> and
- <code>post_hello()</code> make sure that the parser for the root
- element can perform proper initialization and cleanup.</p>
-
- <p>While our parser implementation and test driver are pretty small and
- easy to write by hand, for bigger XML vocabularies it can be a
- substantial effort. To help with this task XSD can automatically
- generate sample parser implementations and a test driver from your
- schemas. You can request the generation of a sample implementation with
- empty function bodies by specifying the <code>--generate-noop-impl</code>
- option. Or you can generate a sample implementation that prints the
- data store in XML by using the <code>--generate-print-impl</code>
- option. To request the generation of a test driver you can use the
- <code>--generate-test-driver</code> option. For more information
- on these options refer to the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a>. The <code>'generated'</code> example
- in the XSD distribution shows the sample implementation generation
- feature in action.</p>
-
-
- <h2><a name="2.4">2.4 Compiling and Running</a></h2>
-
- <p>After saving all the parts from the previous section in
- <code>driver.cxx</code>, we are ready to compile our first
- application and run it on the test XML document. On a UNIX
- system this can be done with the following commands:
- </p>
-
- <pre class="terminal">
-$ c++ -I.../libxsd -c driver.cxx hello-pskel.cxx
-$ c++ -o driver driver.o hello-pskel.o -lexpat
-$ ./driver hello.xml
-Hello, sun!
-Hello, moon!
-Hello, world!
- </pre>
-
- <p>Here <code>.../libxsd</code> represents the path to the
- <code>libxsd</code> directory in the XSD distribution.
- We can also test the error handling. To test XML well-formedness
- checking, we can try to parse <code>hello-pskel.hxx</code>:</p>
-
- <pre class="terminal">
-$ ./driver hello-pskel.hxx
-hello-pskel.hxx:1:0: not well-formed (invalid token)
- </pre>
-
- <p>We can also try to parse a valid XML but not from our
- vocabulary, for example <code>hello.xsd</code>:</p>
-
- <pre class="terminal">
-$ ./driver hello.xsd
-hello.xsd:2:0: expected element 'hello' instead of
-'http://www.w3.org/2001/XMLSchema#schema'
- </pre>
-
-
- <!-- Chapater 3 -->
-
-
- <h1><a name="3">3 Parser Skeletons</a></h1>
-
- <p>As we have seen in the previous chapter, the XSD compiler generates
- a parser skeleton class for each type defined in XML Schema. In
- this chapter we will take a closer look at different functions
- that comprise a parser skeleton as well as the way to connect
- our implementations of these parser skeletons to create a complete
- parser.</p>
-
- <p>In this and subsequent chapters we will use the following schema
- that describes a collection of person records. We save it in
- <code>people.xsd</code>:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:simpleType name="gender">
- &lt;xs:restriction base="xs:string">
- &lt;xs:enumeration value="male"/>
- &lt;xs:enumeration value="female"/>
- &lt;/xs:restriction>
- &lt;/xs:simpleType>
-
- &lt;xs:complexType name="person">
- &lt;xs:sequence>
- &lt;xs:element name="first-name" type="xs:string"/>
- &lt;xs:element name="last-name" type="xs:string"/>
- &lt;xs:element name="gender" type="gender"/>
- &lt;xs:element name="age" type="xs:short"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:complexType name="people">
- &lt;xs:sequence>
- &lt;xs:element name="person" type="person" maxOccurs="unbounded"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:element name="people" type="people"/>
-
-&lt;/xs:schema>
- </pre>
-
- <p>A sample XML instance to go along with this schema is saved
- in <code>people.xml</code>:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;people>
- &lt;person>
- &lt;first-name>John&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>male&lt;/gender>
- &lt;age>32&lt;/age>
- &lt;/person>
- &lt;person>
- &lt;first-name>Jane&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>female&lt;/gender>
- &lt;age>28&lt;/age>
- &lt;/person>
-&lt;/people>
- </pre>
-
- <p>Compiling <code>people.xsd</code> with the XSD compiler results
- in three parser skeletons being generated: <code>gender_pskel</code>,
- <code>person_pskel</code>, and <code>people_pskel</code>. We are going
- to examine and implement each of them in the subsequent sections.</p>
-
- <h2><a name="3.1">3.1 Implementing the Gender Parser</a></h2>
-
- <p>The generated <code>gender_pskel</code> parser skeleton looks like
- this:</p>
-
- <pre class="c++">
-class gender_pskel: public virtual xml_schema::string_pskel
-{
-public:
- // Parser callbacks. Override them in your implementation.
- //
- virtual void
- pre ();
-
- virtual void
- post_gender ();
-};
- </pre>
-
- <p>Notice that <code>gender_pskel</code> inherits from
- <code>xml_schema::string_skel</code> which is a parser skeleton
- for built-in XML Schema type <code>string</code> and is
- predefined in the XSD runtime library. This is an example
- of the general rule that parser skeletons follow: if a type
- in XML Schema inherits from another then there will be an
- equivalent inheritance between the corresponding parser
- skeleton classes.</p>
-
- <p>The <code>pre()</code> and <code>post_gender()</code> callbacks
- should look familiar from the previous chapter. Let's now
- implement the parser. Our implementation will simply print
- the gender to <code>cout</code>:</p>
-
-
- <pre class="c++">
-class gender_pimpl: public gender_pskel,
- public xml_schema::string_pimpl
-{
-public:
- virtual void
- post_gender ()
- {
- std::string s = post_string ();
- cout &lt;&lt; "gender: " &lt;&lt; s &lt;&lt; endl;
- }
-};
- </pre>
-
- <p>While the code is quite short, there is a lot going on. First,
- notice that we are inheriting from <code>gender_pskel</code> <em>and</em>
- from <code>xml_schema::string_pimpl</code>. We've encountered
- <code>xml_schema::string_pimpl</code> already; it is an
- implementation of the <code>xml_schema::string_pskel</code> parser
- skeleton for built-in XML Schema type <code>string</code>.</p>
-
- <p>This is another common theme in the C++/Parser programming model:
- reusing implementations of the base parsers in the derived ones with
- the C++ mixin idiom. In our case, <code>string_pimpl</code> will
- do all the dirty work of extracting the data and we can just get
- it at the end with the call to <code>post_string()</code>.</p>
-
- <p>In case you are curious, here is what
- <code>xml_schema::string_pskel</code> and
- <code>xml_schema::string_pimpl</code> look like:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class string_pskel: public simple_content
- {
- public:
- virtual std::string
- post_string () = 0;
- };
-
- class string_pimpl: public virtual string_pskel
- {
- public:
- virtual void
- _pre ();
-
- virtual void
- _characters (const xml_schema::ro_string&amp;);
-
- virtual std::string
- post_string ();
-
- protected:
- std::string str_;
- };
-}
- </pre>
-
- <p>There are three new pieces in this code that we haven't seen yet.
- They are the <code>simple_content</code> class as well as
- the <code>_pre()</code> and <code>_characters()</code> functions.
- The <code>simple_content</code> class is defined in the XSD
- runtime and is a base class for all parser skeletons that conform
- to the simple content model in XML Schema. Types with the
- simple content model cannot have nested elements&mdash;only text
- and attributes. There is also the <code>complex_content</code>
- class which corresponds to the complex content mode (types with
- nested elements, for example, <code>person</code> from
- <code>people.xsd</code>).</p>
-
- <p>The <code>_pre()</code> function is a parser callback. Remember we
- talked about the <code>pre()</code> and <code>post_*()</code> callbacks
- in the previous chapter? There are actually two more callbacks
- with similar roles: <code>_pre()</code> and <code>_post ()</code>.
- As a result, each parser skeleton has four special callbacks:</p>
-
- <pre class="c++">
- virtual void
- pre ();
-
- virtual void
- _pre ();
-
- virtual void
- _post ();
-
- virtual void
- post_name ();
- </pre>
-
- <p><code>pre()</code> and <code>_pre()</code> are initialization
- callbacks. They get called in that order before a new instance of the type
- is about to be parsed. The difference between <code>pre()</code> and
- <code>_pre()</code> is conventional: <code>pre()</code> can
- be completely overridden by a derived parser. The derived
- parser can also override <code>_pre()</code> but has to always call
- the original version. This allows you to partition initialization
- into customizable and required parts.</p>
-
- <p>Similarly, <code>_post()</code> and <code>post_name()</code> are
- finalization callbacks with exactly the same semantics:
- <code>post_name()</code> can be completely overridden by the derived
- parser while the original <code>_post()</code> should always be called.
- </p>
-
- <p>The final bit we need to discuss in this section is the
- <code>_characters()</code> function. As you might have guessed, it
- is also a callback. A low-level one that delivers raw character content
- for the type being parsed. You will seldom need to use this callback
- directly. Using implementations for the built-in parsers provided by
- the XSD runtime is usually a simpler and more convenient
- alternative.</p>
-
- <p>At this point you might be wondering why some <code>post_*()</code>
- callbacks, for example <code>post_string()</code>, return some data
- while others, for example <code>post_gender()</code>, have
- <code>void</code> as a return type. This is a valid concern
- and it will be addressed in the next chapter.</p>
-
- <h2><a name="3.2">3.2 Implementing the Person Parser</a></h2>
-
- <p>The generated <code>person_pskel</code> parser skeleton looks like
- this:</p>
-
- <pre class="c++">
-class person_pskel: public xml_schema::complex_content
-{
-public:
- // Parser callbacks. Override them in your implementation.
- //
- virtual void
- pre ();
-
- virtual void
- first_name (const std::string&amp;);
-
- virtual void
- last_name (const std::string&amp;);
-
- virtual void
- gender ();
-
- virtual void
- age (short);
-
- virtual void
- post_person ();
-
- // Parser construction API.
- //
- void
- first_name_parser (xml_schema::string_pskel&amp;);
-
- void
- last_name_parser (xml_schema::string_pskel&amp;);
-
- void
- gender_parser (gender_pskel&amp;);
-
- void
- age_parser (xml_schema::short_pskel&amp;);
-
- void
- parsers (xml_schema::string_pskel&amp; /* first-name */,
- xml_schema::string_pskel&amp; /* last-name */,
- gender_pskel&amp; /* gender */,
- xml_schema::short_pskel&amp; /* age */);
-};
- </pre>
-
-
- <p>As you can see, we have a parser callback for each of the nested
- elements found in the <code>person</code> XML Schema type.
- The implementation of this parser is straightforward:</p>
-
- <pre class="c++">
-class person_pimpl: public person_pskel
-{
-public:
- virtual void
- first_name (const std::string&amp; n)
- {
- cout &lt;&lt; "first: " &lt;&lt; f &lt;&lt; endl;
- }
-
- virtual void
- last_name (const std::string&amp; l)
- {
- cout &lt;&lt; "last: " &lt;&lt; l &lt;&lt; endl;
- }
-
- virtual void
- age (short a)
- {
- cout &lt;&lt; "age: " &lt;&lt; a &lt;&lt; endl;
- }
-};
- </pre>
-
- <p>Notice that we didn't override the <code>gender()</code> callback
- because all the printing is done by <code>gender_pimpl</code>.</p>
-
-
- <h2><a name="3.3">3.3 Implementing the People Parser</a></h2>
-
- <p>The generated <code>people_pskel</code> parser skeleton looks like
- this:</p>
-
- <pre class="c++">
-class people_pskel: public xml_schema::complex_content
-{
-public:
- // Parser callbacks. Override them in your implementation.
- //
- virtual void
- pre ();
-
- virtual void
- person ();
-
- virtual void
- post_people ();
-
- // Parser construction API.
- //
- void
- person_parser (person_pskel&amp;);
-
- void
- parsers (person_pskel&amp; /* person */);
-};
- </pre>
-
- <p>The <code>person()</code> callback will be called after parsing each
- <code>person</code> element. While <code>person_pimpl</code> does
- all the printing, one useful thing we can do in this callback is to
- print an extra newline after each person record so that our
- output is more readable:</p>
-
- <pre class="c++">
-class people_pimpl: public people_pskel
-{
-public:
- virtual void
- person ()
- {
- cout &lt;&lt; endl;
- }
-};
- </pre>
-
- <p>Now it is time to put everything together.</p>
-
-
- <h2><a name="3.4">3.4 Connecting the Parsers Together</a></h2>
-
- <p>At this point we have all the individual parsers implemented
- and can proceed to assemble them into a complete parser
- for our XML vocabulary. The first step is to instantiate
- all the individual parsers that we will need:</p>
-
- <pre class="c++">
-xml_schema::short_pimpl short_p;
-xml_schema::string_pimpl string_p;
-
-gender_pimpl gender_p;
-person_pimpl person_p;
-people_pimpl people_p;
- </pre>
-
- <p>Notice that our schema uses two built-in XML Schema types:
- <code>string</code> for the <code>first-name</code> and
- <code>last-name</code> elements as well as <code>short</code>
- for <code>age</code>. We will use predefined parsers that
- come with the XSD runtime to handle these types. The next
- step is to connect all the individual parsers. We do this
- with the help of functions defined in the parser
- skeletons and marked with the "Parser Construction API"
- comment. One way to do it is to connect each individual
- parser by calling the <code>*_parser()</code> functions:</p>
-
- <pre class="c++">
-person_p.first_name_parser (string_p);
-person_p.last_name_parser (string_p);
-person_p.gender_parser (gender_p);
-person_p.age_parser (short_p);
-
-people_p.person_parser (person_p);
- </pre>
-
- <p>You might be wondering what happens if you do not provide
- a parser by not calling one of the <code>*_parser()</code> functions.
- In that case the corresponding XML content will be skipped,
- including validation. This is an efficient way to ignore parts
- of the document that you are not interested in.</p>
-
-
- <p>An alternative, shorter, way to connect the parsers is by using
- the <code>parsers()</code> functions which connects all the parsers
- for a given type at once:</p>
-
- <pre class="c++">
-person_p.parsers (string_p, string_p, gender_p, short_p);
-people_p.parsers (person_p);
- </pre>
-
- <p>The following figure illustrates the resulting connections. Notice
- the correspondence between return types of the <code>post_*()</code>
- functions and argument types of element callbacks that are connected
- by the arrows.</p>
-
- <!-- align=center is needed for html2ps -->
- <div class="img" align="center"><img src="figure-1.png"/></div>
-
- <p>The last step is the construction of the document parser and
- invocation of the complete parser on our sample XML instance:</p>
-
- <pre class="c++">
-xml_schema::document doc_p (people_p, "people");
-
-people_p.pre ();
-doc_p.parse ("people.xml");
-people_p.post_people ();
- </pre>
-
- <p>Let's consider <code>xml_schema::document</code> in
- more detail. While the exact definition of this class
- varies depending on the underlying parser selected,
- here is the common part:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class document
- {
- public:
- document (xml_schema::parser_base&amp;,
- const std::string&amp; root_element_name,
- bool polymorphic = false);
-
- document (xml_schema::parser_base&amp;,
- const std::string&amp; root_element_namespace,
- const std::string&amp; root_element_name,
- bool polymorphic = false);
-
- void
- parse (const std::string&amp; file);
-
- void
- parse (std::istream&amp;);
-
- ...
-
- };
-}
- </pre>
-
- <p><code>xml_schema::document</code> is a root parser for
- the vocabulary. The first argument to its constructors is the
- parser for the type of the root element (<code>people_impl</code>
- in our case). Because a type parser is only concerned with
- the element's content and not with the element's name, we need
- to specify the root element's name somewhere. That's
- what is passed as the second and third arguments to the
- <code>document</code>'s constructors.</p>
-
- <p>There are also two overloaded <code>parse()</code> functions
- defined in the <code>document</code> class (there are actually
- more but the others are specific to the underlying XML parser).
- The first version parses a local file identified by a name. The
- second version reads the data from an input stream. For more
- information on the <code>xml_schema::document</code> class
- refer to <a href="#7">Chapter 7, "Document Parser and Error
- Handling"</a>.</p>
-
- <p>Let's now consider a step-by-step list of actions that happen
- as we parse through <code>people.xml</code>. The content of
- <code>people.xml</code> is repeated below for convenience.</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;people>
- &lt;person>
- &lt;first-name>John&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>male&lt;/gender>
- &lt;age>32&lt;/age>
- &lt;/person>
- &lt;person>
- &lt;first-name>Jane&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>female&lt;/gender>
- &lt;age>28&lt;/age>
- &lt;/person>
-&lt;/people>
- </pre>
-
-
- <ol class="steps">
- <li><code>people_p.pre()</code> is called from
- <code>main()</code>. We did not provide any implementation
- for this callback so this call is a no-op.</li>
-
- <li><code>doc_p.parse("people.xml")</code> is called from
- <code>main()</code>. The parser opens the file and starts
- parsing its content.</li>
-
- <li>The parser encounters the root element. <code>doc_p</code>
- verifies that the root element is correct and calls
- <code>_pre()</code> on <code>people_p</code> which is also
- a no-op. Parsing is now delegated to <code>people_p</code>.</li>
-
- <li>The parser encounters the <code>person</code> element.
- <code>people_p</code> determines that <code>person_p</code>
- is responsible for parsing this element. <code>pre()</code>
- and <code>_pre()</code> callbacks are called on <code>person_p</code>.
- Parsing is now delegated to <code>person_p</code>.</li>
-
- <li>The parser encounters the <code>first-name</code> element.
- <code>person_p</code> determines that <code>string_p</code>
- is responsible for parsing this element. <code>pre()</code>
- and <code>_pre()</code> callbacks are called on <code>string_p</code>.
- Parsing is now delegated to <code>string_p</code>.</li>
-
- <li>The parser encounters character content consisting of
- <code>"John"</code>. The <code>_characters()</code> callback is
- called on <code>string_p</code>.</li>
-
- <li>The parser encounters the end of <code>first-name</code>
- element. The <code>_post()</code> and <code>post_string()</code>
- callbacks are called on <code>string_p</code>. The
- <code>first_name()</code> callback is called on <code>person_p</code>
- with the return value of <code>post_string()</code>. The
- <code>first_name()</code> implementation prints
- <code>"first: John"</code> to <code>cout</code>.
- Parsing is now returned to <code>person_p</code>.</li>
-
- <li>Steps analogous to 5-7 are performed for the <code>last-name</code>,
- <code>gender</code>, and <code>age</code> elements.</li>
-
- <li>The parser encounters the end of <code>person</code>
- element. The <code>_post()</code> and <code>post_person()</code>
- callbacks are called on <code>person_p</code>. The
- <code>person()</code> callback is called on <code>people_p</code>.
- The <code>person()</code> implementation prints a new line
- to <code>cout</code>. Parsing is now returned to
- <code>people_p</code>.</li>
-
- <li>Steps 4-9 are performed for the second <code>person</code>
- element.</li>
-
- <li>The parser encounters the end of <code>people</code>
- element. The <code>_post()</code> callback is called on
- <code>people_p</code>. The <code>doc_p.parse("people.xml")</code>
- call returns to <code>main()</code>.</li>
-
- <li><code>people_p.post_people()</code> is called from
- <code>main()</code> which is a no-op.</li>
-
- </ol>
-
-
- <!-- Chpater 4 -->
-
-
- <h1><a name="4">4 Type Maps</a></h1>
-
- <p>There are many useful things you can do inside parser callbacks as they
- are right now. There are, however, times when you want to propagate
- some information from one parser to another or to the caller of the
- parser. One common task that would greatly benefit from such a
- possibility is building a tree-like in-memory object model of the
- data stored in XML. During execution, each individual sub-parser
- would create a sub-tree and return it to its <em>parent</em> parser
- which can then incorporate this sub-tree into the whole tree.</p>
-
- <p>In this chapter we will discuss the mechanisms offered by the
- C++/Parser mapping for returning information from individual
- parsers and see how to use them to build an object model
- of our people vocabulary.</p>
-
- <h2><a name="4.1">4.1 Object Model</a></h2>
-
- <p>An object model for our person record example could
- look like this (saved in the <code>people.hxx</code> file):</p>
-
- <pre class="c++">
-#include &lt;string>
-#include &lt;vector>
-
-enum gender
-{
- male,
- female
-};
-
-class person
-{
-public:
- person (const std::string&amp; first,
- const std::string&amp; last,
- ::gender gender,
- short age)
- : first_ (first), last_ (last),
- gender_ (gender), age_ (age)
- {
- }
-
- const std::string&amp;
- first () const
- {
- return first_;
- }
-
- const std::string&amp;
- last () const
- {
- return last_;
- }
-
- ::gender
- gender () const
- {
- return gender_;
- }
-
- short
- age () const
- {
- return age_;
- }
-
-private:
- std::string first_;
- std::string last_;
- ::gender gender_;
- short age_;
-};
-
-typedef std::vector&lt;person> people;
- </pre>
-
- <p>While it is clear which parser is responsible for which part of
- the object model, it is not exactly clear how, for
- example, <code>gender_pimpl</code> will deliver <code>gender</code>
- to <code>person_pimpl</code>. You might have noticed that
- <code>string_pimpl</code> manages to deliver its value to the
- <code>first_name()</code> callback of <code>person_pimpl</code>. Let's
- see how we can utilize the same mechanism to propagate our
- own data.</p>
-
- <p>There is a way to tell the XSD compiler that you want to
- exchange data between parsers. More precisely, for each
- type defined in XML Schema, you can tell the compiler two things.
- First, the return type of the <code>post_*()</code> callback
- in the parser skeleton generated for this type. And, second,
- the argument type for callbacks corresponding to elements and
- attributes of this type. For example, for XML Schema type
- <code>gender</code> we can specify the return type for
- <code>post_gender()</code> in the <code>gender_pskel</code>
- skeleton and the argument type for the <code>gender()</code> callback
- in the <code>person_pskel</code> skeleton. As you might have guessed,
- the generated code will then pass the return value from the
- <code>post_*()</code> callback as an argument to the element or
- attribute callback.</p>
-
- <p>The way to tell the XSD compiler about these XML Schema to
- C++ mappings is with type map files. Here is a simple type
- map for the <code>gender</code> type from the previous paragraph:</p>
-
- <pre class="type-map">
-include "people.hxx";
-gender ::gender ::gender;
- </pre>
-
- <p>The first line indicates that the generated code must include
- <code>people.hxx</code> in order to get the definition for the
- <code>gender</code> type. The second line specifies that both
- argument and return types for the <code>gender</code>
- XML Schema type should be the <code>::gender</code> C++ enum
- (we use fully-qualified C++ names to avoid name clashes).
- The next section will describe the type map format in detail.
- We save this type map in <code>people.map</code> and
- then translate our schemas with the <code>--type-map</code>
- option to let the XSD compiler know about our type map:</p>
-
- <pre class="terminal">
-$ xsd cxx-parser --type-map people.map people.xsd
- </pre>
-
- <p>If we now look at the generated <code>people-pskel.hxx</code>,
- we will see the following changes in the <code>gender_pskel</code> and
- <code>person_pskel</code> skeletons:</p>
-
- <pre class="c++">
-#include "people.hxx"
-
-class gender_pskel: public virtual xml_schema::string_pskel
-{
- virtual ::gender
- post_gender () = 0;
-
- ...
-};
-
-class person_pskel: public xml_schema::complex_content
-{
- virtual void
- gender (::gender);
-
- ...
-};
- </pre>
-
- <p>Notice that <code>#include "people.hxx"</code> was added to
- the generated header file from the type map to provide the
- definition for the <code>gender</code> enum.</p>
-
- <h2><a name="4.2">4.2 Type Map File Format</a></h2>
-
- <p>Type map files are used to define a mapping between XML Schema
- and C++ types. The compiler uses this information
- to determine return types of <code>post_*()</code>
- callbacks in parser skeletons corresponding to XML Schema
- types as well as argument types for callbacks corresponding
- to elements and attributes of these types.</p>
-
- <p>The compiler has a set of predefined mapping rules that map
- the built-in XML Schema types to suitable C++ types (discussed
- below) and all other types to <code>void</code>.
- By providing your own type maps you can override these predefined
- rules. The format of the type map file is presented below:
- </p>
-
- <pre class="type-map">
-namespace &lt;schema-namespace> [&lt;cxx-namespace>]
-{
- (include &lt;file-name>;)*
- ([type] &lt;schema-type> &lt;cxx-ret-type> [&lt;cxx-arg-type>];)*
-}
- </pre>
-
- <p>Both <code><i>&lt;schema-namespace></i></code> and
- <code><i>&lt;schema-type></i></code> are regex patterns while
- <code><i>&lt;cxx-namespace></i></code>,
- <code><i>&lt;cxx-ret-type></i></code>, and
- <code><i>&lt;cxx-arg-type></i></code> are regex pattern
- substitutions. All names can be optionally enclosed in
- <code>" "</code>, for example, to include white-spaces.</p>
-
- <p><code><i>&lt;schema-namespace></i></code> determines XML
- Schema namespace. Optional <code><i>&lt;cxx-namespace></i></code>
- is prefixed to every C++ type name in this namespace declaration.
- <code><i>&lt;cxx-ret-type></i></code> is a C++ type name that is
- used as a return type for the <code>post_*()</code> callback.
- Optional <code><i>&lt;cxx-arg-type></i></code> is an argument
- type for callbacks corresponding to elements and attributes
- of this type. If <code><i>&lt;cxx-arg-type></i></code> is not
- specified, it defaults to <code><i>&lt;cxx-ret-type></i></code>
- if <code><i>&lt;cxx-ret-type></i></code> ends with <code>*</code> or
- <code>&amp;</code> (that is, it is a pointer or a reference) and
- <code>const&nbsp;<i>&lt;cxx-ret-type></i>&amp;</code>
- otherwise.
- <code><i>&lt;file-name></i></code> is a file name either in the
- <code>" "</code> or <code>&lt; ></code> format
- and is added with the <code>#include</code> directive to
- the generated code.</p>
-
- <p>The <code><b>#</b></code> character starts a comment that ends
- with a new line or end of file. To specify a name that contains
- <code><b>#</b></code> enclose it in <code><b>" "</b></code>.
- For example:</p>
-
- <pre>
-namespace http://www.example.com/xmlns/my my
-{
- include "my.hxx";
-
- # Pass apples by value.
- #
- apple apple;
-
- # Pass oranges as pointers.
- #
- orange orange_t*;
-}
- </pre>
-
- <p>In the example above, for the
- <code>http://www.example.com/xmlns/my#orange</code>
- XML Schema type, the <code>my::orange_t*</code> C++ type will
- be used as both return and argument types.</p>
-
- <p>Several namespace declarations can be specified in a single
- file. The namespace declaration can also be completely
- omitted to map types in a schema without a namespace. For
- instance:</p>
-
- <pre class="type-map">
-include "my.hxx";
-apple apple;
-
-namespace http://www.example.com/xmlns/my
-{
- orange "const orange_t*";
-}
- </pre>
-
- <p>The compiler has a number of predefined mapping rules for
- the built-in XML Schema types which can be presented as the
- following map files. The string-based XML Schema types are
- mapped to either <code>std::string</code> or
- <code>std::wstring</code> depending on the character type
- selected (see <a href="#5.2"> Section 5.2, "Character Type and
- Encoding"</a> for more information). The binary XML Schema
- types are mapped to either <code>std::auto_ptr&lt;xml_schema::buffer></code>
- or <code>std::unique_ptr&lt;xml_schema::buffer></code>
- depending on the C++ standard selected (C++98 or C++11,
- respectively; refer to the <code>--std</code> XSD compiler
- command line option for details).</p>
-
- <pre class="type-map">
-namespace http://www.w3.org/2001/XMLSchema
-{
- boolean bool bool;
-
- byte "signed char" "signed char";
- unsignedByte "unsigned char" "unsigned char";
-
- short short short;
- unsignedShort "unsigned short" "unsigned short";
-
- int int int;
- unsignedInt "unsigned int" "unsigned int";
-
- long "long long" "long long";
- unsignedLong "unsigned long long" "unsigned long long";
-
- integer "long long" "long long";
-
- negativeInteger "long long" "long long";
- nonPositiveInteger "long long" "long long";
-
- positiveInteger "unsigned long long" "unsigned long long";
- nonNegativeInteger "unsigned long long" "unsigned long long";
-
- float float float;
- double double double;
- decimal double double;
-
- string std::string;
- normalizedString std::string;
- token std::string;
- Name std::string;
- NMTOKEN std::string;
- NCName std::string;
- ID std::string;
- IDREF std::string;
- language std::string;
- anyURI std::string;
-
- NMTOKENS xml_schema::string_sequence;
- IDREFS xml_schema::string_sequence;
-
- QName xml_schema::qname;
-
- base64Binary std::[auto|unique]_ptr&lt;xml_schema::buffer>
- std::[auto|unique]_ptr&lt;xml_schema::buffer>;
- hexBinary std::[auto|unique]_ptr&lt;xml_schema::buffer>
- std::[auto|unique]_ptr&lt;xml_schema::buffer>;
-
- date xml_schema::date;
- dateTime xml_schema::date_time;
- duration xml_schema::duration;
- gDay xml_schema::gday;
- gMonth xml_schema::gmonth;
- gMonthDay xml_schema::gmonth_day;
- gYear xml_schema::gyear;
- gYearMonth xml_schema::gyear_month;
- time xml_schema::time;
-}
- </pre>
-
- <p>For more information about the mapping of the built-in XML Schema types
- to C++ types refer to <a href="#6">Chapter 6, "Built-In XML Schema Type
- Parsers"</a>. The last predefined rule maps anything that wasn't
- mapped by previous rules to <code>void</code>:</p>
-
- <pre class="type-map">
-namespace .*
-{
- .* void void;
-}
- </pre>
-
-
- <p>When you provide your own type maps with the
- <code>--type-map</code> option, they are evaluated first. This
- allows you to selectively override any of the predefined rules.
- Note also that if you change the mapping
- of a built-in XML Schema type then it becomes your responsibility
- to provide the corresponding parser skeleton and implementation
- in the <code>xml_schema</code> namespace. You can include the
- custom definitions into the generated header file using the
- <code>--hxx-prologue-*</code> options.</p>
-
- <h2><a name="4.3">4.3 Parser Implementations</a></h2>
-
- <p>With the knowledge from the previous section, we can proceed
- with creating a type map that maps types in the <code>people.xsd</code>
- schema to our object model classes in
- <code>people.hxx</code>. In fact, we already have the beginning
- of our type map file in <code>people.map</code>. Let's extend
- it with the rest of the types:</p>
-
- <pre class="type-map">
-include "people.hxx";
-
-gender ::gender ::gender;
-person ::person;
-people ::people;
- </pre>
-
- <p>There are a few things to note about this type map. We did not
- provide the argument types for <code>person</code> and
- <code>people</code> because the default constant reference is
- exactly what we need. We also did not provide any mappings
- for built-in XML Schema types <code>string</code> and
- <code>short</code> because they are handled by the predefined
- rules and we are happy with the result. Note also that
- all C++ types are fully qualified. This is done to avoid
- potential name conflicts in the generated code. Now we can
- recompile our schema and move on to implementing the parsers:</p>
-
- <pre class="terminal">
-$ xsd cxx-parser --xml-parser expat --type-map people.map people.xsd
- </pre>
-
- <p>Here is the implementation of our three parsers in full. One
- way to save typing when implementing your own parsers is
- to open the generated code and copy the signatures of parser
- callbacks into your code. Or you could always auto generate the
- sample implementations and fill them with your code.</p>
-
-
- <pre class="c++">
-#include "people-pskel.hxx"
-
-class gender_pimpl: public gender_pskel,
- public xml_schema::string_pimpl
-{
-public:
- virtual ::gender
- post_gender ()
- {
- return post_string () == "male" ? male : female;
- }
-};
-
-class person_pimpl: public person_pskel
-{
-public:
- virtual void
- first_name (const std::string&amp; f)
- {
- first_ = f;
- }
-
- virtual void
- last_name (const std::string&amp; l)
- {
- last_ = l;
- }
-
- virtual void
- gender (::gender g)
- {
- gender_ = g;
- }
-
- virtual void
- age (short a)
- {
- age_ = a;
- }
-
- virtual ::person
- post_person ()
- {
- return ::person (first_, last_, gender_, age_);
- }
-
-private:
- std::string first_;
- std::string last_;
- ::gender gender_;
- short age_;
-};
-
-class people_pimpl: public people_pskel
-{
-public:
- virtual void
- person (const ::person&amp; p)
- {
- people_.push_back (p);
- }
-
- virtual ::people
- post_people ()
- {
- ::people r;
- r.swap (people_);
- return r;
- }
-
-private:
- ::people people_;
-};
- </pre>
-
- <p>This code fragment should look familiar by now. Just note that
- all the <code>post_*()</code> callbacks now have return types instead
- of <code>void</code>. Here is the implementation of the test
- driver for this example:</p>
-
- <pre class="c++">
-#include &lt;iostream>
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- // Construct the parser.
- //
- xml_schema::short_pimpl short_p;
- xml_schema::string_pimpl string_p;
-
- gender_pimpl gender_p;
- person_pimpl person_p;
- people_pimpl people_p;
-
- person_p.parsers (string_p, string_p, gender_p, short_p);
- people_p.parsers (person_p);
-
- // Parse the document to obtain the object model.
- //
- xml_schema::document doc_p (people_p, "people");
-
- people_p.pre ();
- doc_p.parse (argv[1]);
- people ppl = people_p.post_people ();
-
- // Print the object model.
- //
- for (people::iterator i (ppl.begin ()); i != ppl.end (); ++i)
- {
- cout &lt;&lt; "first: " &lt;&lt; i->first () &lt;&lt; endl
- &lt;&lt; "last: " &lt;&lt; i->last () &lt;&lt; endl
- &lt;&lt; "gender: " &lt;&lt; (i->gender () == male ? "male" : "female") &lt;&lt; endl
- &lt;&lt; "age: " &lt;&lt; i->age () &lt;&lt; endl
- &lt;&lt; endl;
- }
-}
- </pre>
-
- <p>The parser creation and assembly part is exactly the same as in
- the previous chapter. The parsing part is a bit different:
- <code>post_people()</code> now has a return value which is the
- complete object model. We store it in the
- <code>ppl</code> variable. The last bit of the code simply iterates
- over the <code>people</code> vector and prints the information
- for each person. We save the last two code fragments to
- <code>driver.cxx</code> and proceed to compile and test
- our new application:</p>
-
-
- <pre class="terminal">
-$ c++ -I.../libxsd -c driver.cxx people-pskel.cxx
-$ c++ -o driver driver.o people-pskel.o -lexpat
-$ ./driver people.xml
-first: John
-last: Doe
-gender: male
-age: 32
-
-first: Jane
-last: Doe
-gender: female
-age: 28
- </pre>
-
-
- <!-- Mapping Configuration -->
-
-
- <h1><a name="5">5 Mapping Configuration</a></h1>
-
- <p>The C++/Parser mapping has a number of configuration parameters that
- determine the overall properties and behavior of the generated code.
- Configuration parameters are specified with the XSD command line
- options and include the C++ standard, the character type that is used
- by the generated code, the underlying XML parser, whether the XML Schema
- validation is performed in the generated code, and support for XML Schema
- polymorphism. This chapter describes these configuration
- parameters in more detail. For more ways to configure the generated
- code refer to the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a>.
- </p>
-
- <h2><a name="5.1">5.1 C++ Standard</a></h2>
-
- <p>The C++/Parser mapping provides support for ISO/IEC C++ 1998/2003 (C++98)
- and ISO/IEC C++ 2011 (C++11). To select the C++ standard for the
- generated code we use the <code>--std</code> XSD compiler command
- line option. While the majority of the examples in this guide use
- C++98, support for the new functionality and library components
- introduced in C++11 are discussed throughout the document.</p>
-
- <h2><a name="5.2">5.2 Character Type and Encoding</a></h2>
-
- <p>The C++/Parser mapping has built-in support for two character types:
- <code>char</code> and <code>wchar_t</code>. You can select the
- character type with the <code>--char-type</code> command line
- option. The default character type is <code>char</code>. The
- string-based built-in XML Schema types are returned as either
- <code>std::string</code> or <code>std::wstring</code> depending
- on the character type selected.</p>
-
- <p>Another aspect of the mapping that depends on the character type
- is character encoding. For the <code>char</code> character type
- the default encoding is UTF-8. Other supported encodings are
- ISO-8859-1, Xerces-C++ Local Code Page (LPC), as well as
- custom encodings. You can select which encoding should be used
- in the object model with the <code>--char-encoding</code> command
- line option.</p>
-
- <p>For the <code>wchar_t</code> character type the encoding is
- automatically selected between UTF-16 and UTF-32/UCS-4 depending
- on the size of the <code>wchar_t</code> type. On some platforms
- (for example, Windows with Visual C++ and AIX with IBM XL C++)
- <code>wchar_t</code> is 2 bytes long. For these platforms the
- encoding is UTF-16. On other platforms <code>wchar_t</code> is 4 bytes
- long and UTF-32/UCS-4 is used.</p>
-
- <p>Note also that the character encoding that is used in the object model
- is independent of the encodings used in input and output XML. In fact,
- all three (object mode, input XML, and output XML) can have different
- encodings.</p>
-
- <h2><a name="5.3">5.3 Underlying XML Parser</a></h2>
-
- <p>The C++/Parser mapping can be used with either Xerces-C++ or Expat
- as the underlying XML parser. You can select the XML parser with
- the <code>--xml-parser</code> command line option. Valid values
- for this option are <code>xerces</code> and <code>expat</code>.
- The default XML parser is Xerces-C++.</p>
-
- <p>The generated code is identical for both parsers except for the
- <code>xml_schema::document</code> class in which some of the
- <code>parse()</code> functions are parser-specific as described
- in <a href="#7">Chapter 7, "Document Parser and Error Handling"</a>.</p>
-
-
- <h2><a name="5.4">5.4 XML Schema Validation</a></h2>
-
- <p>The C++/Parser mapping provides support for validating a
- commonly-used subset of W3C XML Schema in the generated code.
- For the list of supported XML Schema constructs refer to
- <a href="#A">Appendix A, "Supported XML Schema Constructs"</a>.</p>
-
- <p>By default validation in the generated code is disabled if
- the underlying XML parser is validating (Xerces-C++) and
- enabled otherwise (Expat). See <a href="#5.3">Section 5.3,
- "Underlying XML Parser"</a> for more information about
- the underlying XML parser. You can override the default
- behavior with the <code>--generate-validation</code>
- and <code>--suppress-validation</code> command line options.</p>
-
-
- <h2><a name="5.5">5.5 Support for Polymorphism</a></h2>
-
- <p>By default the XSD compiler generates non-polymorphic code. If your
- vocabulary uses XML Schema polymorphism in the form of <code>xsi:type</code>
- and/or substitution groups, then you will need to compile your schemas
- with the <code>--generate-polymorphic</code> option to produce
- polymorphism-aware code as well as pass <code>true</code> as the last
- argument to the <code>xml_schema::document</code>'s constructors.</p>
-
- <p>When using the polymorphism-aware generated code, you can specify
- several parsers for a single element by passing a parser map
- instead of an individual parser to the parser connection function
- for the element. One of the parsers will then be looked up and used
- depending on the <code>xsi:type</code> attribute value or an element
- name from a substitution group. Consider the following schema as an
- example:</p>
-
- <pre class="xml">
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:complexType name="person">
- &lt;xs:sequence>
- &lt;xs:element name="name" type="xs:string"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;!-- substitution group root -->
- &lt;xs:element name="person" type="person"/>
-
- &lt;xs:complexType name="superman">
- &lt;xs:complexContent>
- &lt;xs:extension base="person">
- &lt;xs:attribute name="can-fly" type="xs:boolean"/>
- &lt;/xs:extension>
- &lt;/xs:complexContent>
- &lt;/xs:complexType>
-
- &lt;xs:element name="superman"
- type="superman"
- substitutionGroup="person"/>
-
- &lt;xs:complexType name="batman">
- &lt;xs:complexContent>
- &lt;xs:extension base="superman">
- &lt;xs:attribute name="wing-span" type="xs:unsignedInt"/>
- &lt;/xs:extension>
- &lt;/xs:complexContent>
- &lt;/xs:complexType>
-
- &lt;xs:element name="batman"
- type="batman"
- substitutionGroup="superman"/>
-
- &lt;xs:complexType name="supermen">
- &lt;xs:sequence>
- &lt;xs:element ref="person" maxOccurs="unbounded"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:element name="supermen" type="supermen"/>
-
-&lt;/xs:schema>
- </pre>
-
- <p>Conforming XML documents can use the <code>superman</code>
- and <code>batman</code> types in place of the <code>person</code>
- type either by specifying the type with the <code>xsi:type</code>
- attributes or by using the elements from the substitution
- group, for instance:</p>
-
-
- <pre class="xml">
-&lt;supermen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- &lt;person>
- &lt;name>John Doe&lt;/name>
- &lt;/person>
-
- &lt;superman can-fly="false">
- &lt;name>James "007" Bond&lt;/name>
- &lt;/superman>
-
- &lt;superman can-fly="true" wing-span="10" xsi:type="batman">
- &lt;name>Bruce Wayne&lt;/name>
- &lt;/superman>
-
-&lt;/supermen>
- </pre>
-
- <p>To print the data stored in such XML documents we can implement
- the parsers as follows:</p>
-
- <pre class="c++">
-class person_pimpl: public virtual person_pskel
-{
-public:
- virtual void
- pre ()
- {
- cout &lt;&lt; "starting to parse person" &lt;&lt; endl;
- }
-
- virtual void
- name (const std::string&amp; v)
- {
- cout &lt;&lt; "name: " &lt;&lt; v &lt;&lt; endl;
- }
-
- virtual void
- post_person ()
- {
- cout &lt;&lt; "finished parsing person" &lt;&lt; endl;
- }
-};
-
-class superman_pimpl: public virtual superman_pskel,
- public person_pimpl
-{
-public:
- virtual void
- pre ()
- {
- cout &lt;&lt; "starting to parse superman" &lt;&lt; endl;
- }
-
- virtual void
- can_fly (bool v)
- {
- cout &lt;&lt; "can-fly: " &lt;&lt; v &lt;&lt; endl;
- }
-
- virtual void
- post_person ()
- {
- post_superman ();
- }
-
- virtual void
- post_superman ()
- {
- cout &lt;&lt; "finished parsing superman" &lt;&lt; endl
- }
-};
-
-class batman_pimpl: public virtual batman_pskel,
- public superman_pimpl
-{
-public:
- virtual void
- pre ()
- {
- cout &lt;&lt; "starting to parse batman" &lt;&lt; endl;
- }
-
- virtual void
- wing_span (unsigned int v)
- {
- cout &lt;&lt; "wing-span: " &lt;&lt; v &lt;&lt; endl;
- }
-
- virtual void
- post_superman ()
- {
- post_batman ();
- }
-
- virtual void
- post_batman ()
- {
- cout &lt;&lt; "finished parsing batman" &lt;&lt; endl;
- }
-};
- </pre>
-
- <p>Note that because the derived type parsers (<code>superman_pskel</code>
- and <code>batman_pskel</code>) are called via the <code>person_pskel</code>
- interface, we have to override the <code>post_person()</code>
- virtual function in <code>superman_pimpl</code> to call
- <code>post_superman()</code> and the <code>post_superman()</code>
- virtual function in <code>batman_pimpl</code> to call
- <code>post_batman()</code>.</p>
-
- <p>The following code fragment shows how to connect the parsers together.
- Notice that for the <code>person</code> element in the <code>supermen_p</code>
- parser we specify a parser map instead of a specific parser and we pass
- <code>true</code> as the last argument to the document parser constructor
- to indicate that we are parsing potentially-polymorphic XML documents:</p>
-
- <pre class="c++">
-int
-main (int argc, char* argv[])
-{
- // Construct the parser.
- //
- xml_schema::string_pimpl string_p;
- xml_schema::boolean_pimpl boolean_p;
- xml_schema::unsigned_int_pimpl unsigned_int_p;
-
- person_pimpl person_p;
- superman_pimpl superman_p;
- batman_pimpl batman_p;
-
- xml_schema::parser_map_impl person_map;
- supermen_pimpl supermen_p;
-
- person_p.parsers (string_p);
- superman_p.parsers (string_p, boolean_p);
- batman_p.parsers (string_p, boolean_p, unsigned_int_p);
-
- // Here we are specifying a parser map which containes several
- // parsers that can be used to parse the person element.
- //
- person_map.insert (person_p);
- person_map.insert (superman_p);
- person_map.insert (batman_p);
-
- supermen_p.person_parser (person_map);
-
- // Parse the XML document. The last argument to the document's
- // constructor indicates that we are parsing polymorphic XML
- // documents.
- //
- xml_schema::document doc_p (supermen_p, "supermen", true);
-
- supermen_p.pre ();
- doc_p.parse (argv[1]);
- supermen_p.post_supermen ();
-}
- </pre>
-
- <p>When polymorphism-aware code is generated, each element's
- <code>*_parser()</code> function is overloaded to also accept
- an object of the <code>xml_schema::parser_map</code> type.
- For example, the <code>supermen_pskel</code> class from the
- above example looks like this:</p>
-
- <pre class="c++">
-class supermen_pskel: public xml_schema::parser_complex_content
-{
-public:
-
- ...
-
- // Parser construction API.
- //
- void
- parsers (person_pskel&amp;);
-
- // Individual element parsers.
- //
- void
- person_parser (person_pskel&amp;);
-
- void
- person_parser (const xml_schema::parser_map&amp;);
-
- ...
-};
- </pre>
-
- <p>Note that you can specify both the individual (static) parser and
- the parser map. The individual parser will be used when the static
- element type and the dynamic type of the object being parsed are
- the same. This is the case, for example, when there is no
- <code>xsi:type</code> attribute and the element hasn't been
- substituted. Because the individual parser for an element is
- cached and no map lookup is necessary, it makes sense to specify
- both the individual parser and the parser map when most of the
- objects being parsed are of the static type and optimal
- performance is important. The following code fragment shows
- how to change the above example to set both the individual
- parser and the parser map:</p>
-
- <pre class="c++">
-int
-main (int argc, char* argv[])
-{
- ...
-
- person_map.insert (superman_p);
- person_map.insert (batman_p);
-
- supermen_p.person_parser (person_p);
- supermen_p.person_parser (person_map);
-
- ...
-}
- </pre>
-
-
- <p>The <code>xml_schema::parser_map</code> interface and the
- <code>xml_schema::parser_map_impl</code> default implementation
- are presented below:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class parser_map
- {
- public:
- virtual parser_base*
- find (const ro_string* type) const = 0;
- };
-
- class parser_map_impl: public parser_map
- {
- public:
- void
- insert (parser_base&amp;);
-
- virtual parser_base*
- find (const ro_string* type) const;
-
- private:
- parser_map_impl (const parser_map_impl&amp;);
-
- parser_map_impl&amp;
- operator= (const parser_map_impl&amp;);
-
- ...
- };
-}
- </pre>
-
- <p>The <code>type</code> argument in the <code>find()</code> virtual
- function is the type name and namespace from the xsi:type attribute
- (the namespace prefix is resolved to the actual XML namespace)
- or the type of an element from the substitution group in the form
- <code>"&lt;name>&nbsp;&lt;namespace>"</code> with the space and the
- namespace part absent if the type does not have a namespace.
- You can obtain a parser's dynamic type in the same format
- using the <code>_dynamic_type()</code> function. The static
- type can be obtained by calling the static <code>_static_type()</code>
- function, for example <code>person_pskel::_static_type()</code>.
- Both functions return a C string (<code>const char*</code> or
- <code>const wchar_t*</code>, depending on the character type
- used) which is valid for as long as the application is running.
- The following example shows how we can implement our own parser
- map using <code>std::map</code>:</p>
-
-
- <pre class="c++">
-#include &lt;map>
-#include &lt;string>
-
-class parser_map: public xml_schema::parser_map
-{
-public:
- void
- insert (xml_schema::parser_base&amp; p)
- {
- map_[p._dynamic_type ()] = &amp;p;
- }
-
- virtual xml_schema::parser_base*
- find (const xml_schema::ro_string* type) const
- {
- map::const_iterator i = map_.find (type);
- return i != map_.end () ? i->second : 0;
- }
-
-private:
- typedef std::map&lt;std::string, xml_schema::parser_base*> map;
- map map_;
-};
- </pre>
-
- <p>Most of code presented in this section is taken from the
- <code>polymorphism</code> example which can be found in the
- <code>examples/cxx/parser/</code> directory of the XSD distribution.
- Handling of <code>xsi:type</code> and substitution groups when used
- on root elements requires a number of special actions as shown in
- the <code>polyroot</code> example.</p>
-
-
- <!-- Built-in XML Schema Type Parsers -->
-
-
- <h1><a name="6">6 Built-In XML Schema Type Parsers</a></h1>
-
- <p>The XSD runtime provides parser implementations for all built-in
- XML Schema types as summarized in the following table. Declarations
- for these types are automatically included into each generated
- header file. As a result you don't need to include any headers
- to gain access to these parser implementations. Note that some
- parsers return either <code>std::string</code> or
- <code>std::wstring</code> depending on the character type selected.</p>
-
- <!-- border="1" is necessary for html2ps -->
- <table id="builtin" border="1">
- <tr>
- <th>XML Schema type</th>
- <th>Parser implementation in the <code>xml_schema</code> namespace</th>
- <th>Parser return type</th>
- </tr>
-
- <tr>
- <th colspan="3">anyType and anySimpleType types</th>
- </tr>
- <tr>
- <td><code>anyType</code></td>
- <td><code>any_type_pimpl</code></td>
- <td><code>void</code></td>
- </tr>
- <tr>
- <td><code>anySimpleType</code></td>
- <td><code>any_simple_type_pimpl</code></td>
- <td><code>void</code></td>
- </tr>
-
- <tr>
- <th colspan="3">fixed-length integral types</th>
- </tr>
- <!-- 8-bit -->
- <tr>
- <td><code>byte</code></td>
- <td><code>byte_pimpl</code></td>
- <td><code>signed&nbsp;char</code></td>
- </tr>
- <tr>
- <td><code>unsignedByte</code></td>
- <td><code>unsigned_byte_pimpl</code></td>
- <td><code>unsigned&nbsp;char</code></td>
- </tr>
-
- <!-- 16-bit -->
- <tr>
- <td><code>short</code></td>
- <td><code>short_pimpl</code></td>
- <td><code>short</code></td>
- </tr>
- <tr>
- <td><code>unsignedShort</code></td>
- <td><code>unsigned_short_pimpl</code></td>
- <td><code>unsigned&nbsp;short</code></td>
- </tr>
-
- <!-- 32-bit -->
- <tr>
- <td><code>int</code></td>
- <td><code>int_pimpl</code></td>
- <td><code>int</code></td>
- </tr>
- <tr>
- <td><code>unsignedInt</code></td>
- <td><code>unsigned_int_pimpl</code></td>
- <td><code>unsigned&nbsp;int</code></td>
- </tr>
-
- <!-- 64-bit -->
- <tr>
- <td><code>long</code></td>
- <td><code>long_pimpl</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>unsignedLong</code></td>
- <td><code>unsigned_long_pimpl</code></td>
- <td><code>unsigned&nbsp;long&nbsp;long</code></td>
- </tr>
-
- <tr>
- <th colspan="3">arbitrary-length integral types</th>
- </tr>
- <tr>
- <td><code>integer</code></td>
- <td><code>integer_pimpl</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>nonPositiveInteger</code></td>
- <td><code>non_positive_integer_pimpl</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>nonNegativeInteger</code></td>
- <td><code>non_negative_integer_pimpl</code></td>
- <td><code>unsigned long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>positiveInteger</code></td>
- <td><code>positive_integer_pimpl</code></td>
- <td><code>unsigned long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>negativeInteger</code></td>
- <td><code>negative_integer_pimpl</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
-
- <tr>
- <th colspan="3">boolean types</th>
- </tr>
- <tr>
- <td><code>boolean</code></td>
- <td><code>boolean_pimpl</code></td>
- <td><code>bool</code></td>
- </tr>
-
- <tr>
- <th colspan="3">fixed-precision floating-point types</th>
- </tr>
- <tr>
- <td><code>float</code></td>
- <td><code>float_pimpl</code></td>
- <td><code>float</code></td>
- </tr>
- <tr>
- <td><code>double</code></td>
- <td><code>double_pimpl</code></td>
- <td><code>double</code></td>
- </tr>
-
- <tr>
- <th colspan="3">arbitrary-precision floating-point types</th>
- </tr>
- <tr>
- <td><code>decimal</code></td>
- <td><code>decimal_pimpl</code></td>
- <td><code>double</code></td>
- </tr>
-
- <tr>
- <th colspan="3">string-based types</th>
- </tr>
- <tr>
- <td><code>string</code></td>
- <td><code>string_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
- <tr>
- <td><code>normalizedString</code></td>
- <td><code>normalized_string_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
- <tr>
- <td><code>token</code></td>
- <td><code>token_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
- <tr>
- <td><code>Name</code></td>
- <td><code>name_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
- <tr>
- <td><code>NMTOKEN</code></td>
- <td><code>nmtoken_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
- <tr>
- <td><code>NCName</code></td>
- <td><code>ncname_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
-
- <tr>
- <td><code>language</code></td>
- <td><code>language_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
-
- <tr>
- <th colspan="3">qualified name</th>
- </tr>
- <tr>
- <td><code>QName</code></td>
- <td><code>qname_pimpl</code></td>
- <td><code>xml_schema::qname</code><br/><a href="#6.1">Section 6.1,
- "<code>QName</code> Parser"</a></td>
- </tr>
-
- <tr>
- <th colspan="3">ID/IDREF types</th>
- </tr>
- <tr>
- <td><code>ID</code></td>
- <td><code>id_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
- <tr>
- <td><code>IDREF</code></td>
- <td><code>idref_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
-
- <tr>
- <th colspan="3">list types</th>
- </tr>
- <tr>
- <td><code>NMTOKENS</code></td>
- <td><code>nmtokens_pimpl</code></td>
- <td><code>xml_schema::string_sequence</code><br/><a href="#6.2">Section
- 6.2, "<code>NMTOKENS</code> and <code>IDREFS</code> Parsers"</a></td>
- </tr>
- <tr>
- <td><code>IDREFS</code></td>
- <td><code>idrefs_pimpl</code></td>
- <td><code>xml_schema::string_sequence</code><br/><a href="#6.2">Section
- 6.2, "<code>NMTOKENS</code> and <code>IDREFS</code> Parsers"</a></td>
- </tr>
-
- <tr>
- <th colspan="3">URI types</th>
- </tr>
- <tr>
- <td><code>anyURI</code></td>
- <td><code>uri_pimpl</code></td>
- <td><code>std::string</code> or <code>std::wstring</code></td>
- </tr>
-
- <tr>
- <th colspan="3">binary types</th>
- </tr>
- <tr>
- <td><code>base64Binary</code></td>
- <td><code>base64_binary_pimpl</code></td>
- <td><code>std::[auto|unique]_ptr&lt; xml_schema::buffer></code><br/>
- <a href="#6.3">Section 6.3, "<code>base64Binary</code> and
- <code>hexBinary</code> Parsers"</a></td>
- </tr>
- <tr>
- <td><code>hexBinary</code></td>
- <td><code>hex_binary_pimpl</code></td>
- <td><code>std::[auto|unique]_ptr&lt; xml_schema::buffer></code><br/>
- <a href="#6.3">Section 6.3, "<code>base64Binary</code> and
- <code>hexBinary</code> Parsers"</a></td>
- </tr>
-
- <tr>
- <th colspan="3">date/time types</th>
- </tr>
- <tr>
- <td><code>date</code></td>
- <td><code>date_pimpl</code></td>
- <td><code>xml_schema::date</code><br/><a href="#6.5">Section 6.5,
- "<code>date</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>dateTime</code></td>
- <td><code>date_time_pimpl</code></td>
- <td><code>xml_schema::date_time</code><br/><a href="#6.6">Section 6.6,
- "<code>dateTime</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>duration</code></td>
- <td><code>duration_pimpl</code></td>
- <td><code>xml_schema::duration</code><br/><a href="#6.7">Section 6.7,
- "<code>duration</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>gDay</code></td>
- <td><code>gday_pimpl</code></td>
- <td><code>xml_schema::gday</code><br/><a href="#6.8">Section 6.8,
- "<code>gDay</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>gMonth</code></td>
- <td><code>gmonth_pimpl</code></td>
- <td><code>xml_schema::gmonth</code><br/><a href="#6.9">Section 6.9,
- "<code>gMonth</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>gMonthDay</code></td>
- <td><code>gmonth_day_pimpl</code></td>
- <td><code>xml_schema::gmonth_day</code><br/><a href="#6.10">Section 6.10,
- "<code>gMonthDay</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>gYear</code></td>
- <td><code>gyear_pimpl</code></td>
- <td><code>xml_schema::gyear</code><br/><a href="#6.11">Section 6.11,
- "<code>gYear</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>gYearMonth</code></td>
- <td><code>gyear_month_pimpl</code></td>
- <td><code>xml_schema::gyear_month</code><br/><a href="#6.12">Section
- 6.12, "<code>gYearMonth</code> Parser"</a></td>
- </tr>
- <tr>
- <td><code>time</code></td>
- <td><code>time_pimpl</code></td>
- <td><code>xml_schema::time</code><br/><a href="#6.13">Section 6.13,
- "<code>time</code> Parser"</a></td>
- </tr>
-
- </table>
-
- <h2><a name="6.1">6.1 <code>QName</code> Parser</a></h2>
-
- <p>The return type of the <code>qname_pimpl</code> parser implementation
- is <code>xml_schema::qname</code> which represents an XML qualified
- name. Its interface is presented below.
- Note that the <code>std::string</code> type in the interface becomes
- <code>std::wstring</code> if the selected character type is
- <code>wchar_t</code>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class qname
- {
- public:
- explicit
- qname (const std::string&amp; name);
- qname (const std::string&amp; prefix, const std::string&amp; name);
-
- const std::string&amp;
- prefix () const;
-
- void
- prefix (const std::string&amp;);
-
- const std::string&amp;
- name () const;
-
- void
- name (const std::string&amp;);
- };
-
- bool
- operator== (const qname&amp;, const qname&amp;);
-
- bool
- operator!= (const qname&amp;, const qname&amp;);
-}
- </pre>
-
-
- <h2><a name="6.2">6.2 <code>NMTOKENS</code> and <code>IDREFS</code> Parsers</a></h2>
-
- <p>The return type of the <code>nmtokens_pimpl</code> and
- <code>idrefs_pimpl</code> parser implementations is
- <code>xml_schema::string_sequence</code> which represents a
- sequence of strings. Its interface is presented below.
- Note that the <code>std::string</code> type in the interface becomes
- <code>std::wstring</code> if the selected character type is
- <code>wchar_t</code>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class string_sequence: public std::vector&lt;std::string>
- {
- public:
- string_sequence ();
-
- explicit
- string_sequence (std::vector&lt;std::string>::size_type n,
- const std::string&amp; x = std::string ());
-
- template &lt;typename I>
- string_sequence (const I&amp; begin, const I&amp; end);
- };
-
- bool
- operator== (const string_sequence&amp;, const string_sequence&amp;);
-
- bool
- operator!= (const string_sequence&amp;, const string_sequence&amp;);
-}
- </pre>
-
-
- <h2><a name="6.3">6.3 <code>base64Binary</code> and <code>hexBinary</code> Parsers</a></h2>
-
- <p>The return type of the <code>base64_binary_pimpl</code> and
- <code>hex_binary_pimpl</code> parser implementations is either
- <code>std::auto_ptr&lt;xml_schema::buffer></code> (C++98) or
- <code>std::unique_ptr&lt;xml_schema::buffer></code> (C++11),
- depending on the C++ standard selected (<code>--std</code> XSD
- compiler option). The <code>xml_schema::buffer</code> type
- represents a binary buffer and its interface is presented below.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class buffer
- {
- public:
- typedef std::size_t size_t;
-
- class bounds {}; // Out of bounds exception.
-
- public:
- explicit
- buffer (size_t size = 0);
- buffer (size_t size, size_t capacity);
- buffer (const void* data, size_t size);
- buffer (const void* data, size_t size, size_t capacity);
- buffer (void* data,
- size_t size,
- size_t capacity,
- bool assume_ownership);
-
- public:
- buffer (const buffer&amp;);
-
- buffer&amp;
- operator= (const buffer&amp;);
-
- void
- swap (buffer&amp;);
-
- public:
- size_t
- capacity () const;
-
- bool
- capacity (size_t);
-
- public:
- size_t
- size () const;
-
- bool
- size (size_t);
-
- public:
- const char*
- data () const;
-
- char*
- data ();
-
- const char*
- begin () const;
-
- char*
- begin ();
-
- const char*
- end () const;
-
- char*
- end ();
- };
-
- bool
- operator== (const buffer&amp;, const buffer&amp;);
-
- bool
- operator!= (const buffer&amp;, const buffer&amp;);
-}
- </pre>
-
- <p>If the <code>assume_ownership</code> argument to the constructor
- is <code>true</code>, the instance assumes the ownership of the
- memory block pointed to by the <code>data</code> argument and will
- eventually release it by calling <code>operator delete()</code>. The
- <code>capacity()</code> and <code>size()</code> modifier functions
- return <code>true</code> if the underlying buffer has moved.
- </p>
-
- <p>The <code>bounds</code> exception is thrown if the constructor
- arguments violate the <code>(size&nbsp;&lt;=&nbsp;capacity)</code>
- constraint.</p>
-
-
- <h2><a name="6.4">6.4 Time Zone Representation</a></h2>
-
- <p>The <code>date</code>, <code>dateTime</code>, <code>gDay</code>,
- <code>gMonth</code>, <code>gMonthDay</code>, <code>gYear</code>,
- <code>gYearMonth</code>, and <code>time</code> XML Schema built-in
- types all include an optional time zone component. The following
- <code>xml_schema::time_zone</code> base class is used to represent
- this information:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class time_zone
- {
- public:
- time_zone ();
- time_zone (short hours, short minutes);
-
- bool
- zone_present () const;
-
- void
- zone_reset ();
-
- short
- zone_hours () const;
-
- void
- zone_hours (short);
-
- short
- zone_minutes () const;
-
- void
- zone_minutes (short);
- };
-
- bool
- operator== (const time_zone&amp;, const time_zone&amp;);
-
- bool
- operator!= (const time_zone&amp;, const time_zone&amp;);
-}
- </pre>
-
- <p>The <code>zone_present()</code> accessor function returns <code>true</code>
- if the time zone is specified. The <code>zone_reset()</code> modifier
- function resets the time zone object to the <em>not specified</em>
- state. If the time zone offset is negative then both hours and
- minutes components are represented as negative integers.</p>
-
-
- <h2><a name="6.5">6.5 <code>date</code> Parser</a></h2>
-
- <p>The return type of the <code>date_pimpl</code> parser implementation
- is <code>xml_schema::date</code> which represents a year, a day, and a month
- with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class date
- {
- public:
- date (int year, unsigned short month, unsigned short day);
- date (int year, unsigned short month, unsigned short day,
- short zone_hours, short zone_minutes);
-
- int
- year () const;
-
- void
- year (int);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
- };
-
- bool
- operator== (const date&amp;, const date&amp;);
-
- bool
- operator!= (const date&amp;, const date&amp;);
-}
- </pre>
-
- <h2><a name="6.6">6.6 <code>dateTime</code> Parser</a></h2>
-
- <p>The return type of the <code>date_time_pimpl</code> parser implementation
- is <code>xml_schema::date_time</code> which represents a year, a month, a day,
- hours, minutes, and seconds with an optional time zone. Its interface
- is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class date_time
- {
- public:
- date_time (int year, unsigned short month, unsigned short day,
- unsigned short hours, unsigned short minutes,
- double seconds);
-
- date_time (int year, unsigned short month, unsigned short day,
- unsigned short hours, unsigned short minutes,
- double seconds, short zone_hours, short zone_minutes);
-
- int
- year () const;
-
- void
- year (int);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
-
- unsigned short
- hours () const;
-
- void
- hours (unsigned short);
-
- unsigned short
- minutes () const;
-
- void
- minutes (unsigned short);
-
- double
- seconds () const;
-
- void
- seconds (double);
- };
-
- bool
- operator== (const date_time&amp;, const date_time&amp;);
-
- bool
- operator!= (const date_time&amp;, const date_time&amp;);
-}
- </pre>
-
- <h2><a name="6.7">6.7 <code>duration</code> Parser</a></h2>
-
- <p>The return type of the <code>duration_pimpl</code> parser implementation
- is <code>xml_schema::duration</code> which represents a potentially
- negative duration in the form of years, months, days, hours, minutes,
- and seconds. Its interface is presented below.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class duration
- {
- public:
- duration (bool negative,
- unsigned int years, unsigned int months, unsigned int days,
- unsigned int hours, unsigned int minutes, double seconds);
-
- bool
- negative () const;
-
- void
- negative (bool);
-
- unsigned int
- years () const;
-
- void
- years (unsigned int);
-
- unsigned int
- months () const;
-
- void
- months (unsigned int);
-
- unsigned int
- days () const;
-
- void
- days (unsigned int);
-
- unsigned int
- hours () const;
-
- void
- hours (unsigned int);
-
- unsigned int
- minutes () const;
-
- void
- minutes (unsigned int);
-
- double
- seconds () const;
-
- void
- seconds (double);
- };
-
- bool
- operator== (const duration&amp;, const duration&amp;);
-
- bool
- operator!= (const duration&amp;, const duration&amp;);
-}
- </pre>
-
-
- <h2><a name="6.8">6.8 <code>gDay</code> Parser</a></h2>
-
- <p>The return type of the <code>gday_pimpl</code> parser implementation
- is <code>xml_schema::gday</code> which represents a day of the month with
- an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class gday
- {
- public:
- explicit
- gday (unsigned short day);
- gday (unsigned short day, short zone_hours, short zone_minutes);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
- };
-
- bool
- operator== (const gday&amp;, const gday&amp;);
-
- bool
- operator!= (const gday&amp;, const gday&amp;);
-}
- </pre>
-
- <h2><a name="6.9">6.9 <code>gMonth</code> Parser</a></h2>
-
- <p>The return type of the <code>gmonth_pimpl</code> parser implementation
- is <code>xml_schema::gmonth</code> which represents a month of the year
- with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class gmonth
- {
- public:
- explicit
- gmonth (unsigned short month);
- gmonth (unsigned short month, short zone_hours, short zone_minutes);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
- };
-
- bool
- operator== (const gmonth&amp;, const gmonth&amp;);
-
- bool
- operator!= (const gmonth&amp;, const gmonth&amp;);
-}
- </pre>
-
- <h2><a name="6.10">6.10 <code>gMonthDay</code> Parser</a></h2>
-
- <p>The return type of the <code>gmonth_day_pimpl</code> parser implementation
- is <code>xml_schema::gmonth_day</code> which represents a day and a month
- of the year with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class gmonth_day
- {
- public:
- gmonth_day (unsigned short month, unsigned short day);
- gmonth_day (unsigned short month, unsigned short day,
- short zone_hours, short zone_minutes);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
- };
-
- bool
- operator== (const gmonth_day&amp;, const gmonth_day&amp;);
-
- bool
- operator!= (const gmonth_day&amp;, const gmonth_day&amp;);
-}
- </pre>
-
- <h2><a name="6.11">6.11 <code>gYear</code> Parser</a></h2>
-
- <p>The return type of the <code>gyear_pimpl</code> parser implementation
- is <code>xml_schema::gyear</code> which represents a year with
- an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class gyear
- {
- public:
- explicit
- gyear (int year);
- gyear (int year, short zone_hours, short zone_minutes);
-
- int
- year () const;
-
- void
- year (int);
- };
-
- bool
- operator== (const gyear&amp;, const gyear&amp;);
-
- bool
- operator!= (const gyear&amp;, const gyear&amp;);
-}
- </pre>
-
- <h2><a name="6.12">6.12 <code>gYearMonth</code> Parser</a></h2>
-
- <p>The return type of the <code>gyear_month_pimpl</code> parser implementation
- is <code>xml_schema::gyear_month</code> which represents a year and a month
- with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class gyear_month
- {
- public:
- gyear_month (int year, unsigned short month);
- gyear_month (int year, unsigned short month,
- short zone_hours, short zone_minutes);
-
- int
- year () const;
-
- void
- year (int);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
- };
-
- bool
- operator== (const gyear_month&amp;, const gyear_month&amp;);
-
- bool
- operator!= (const gyear_month&amp;, const gyear_month&amp;);
-}
- </pre>
-
-
- <h2><a name="6.13">6.13 <code>time</code> Parser</a></h2>
-
- <p>The return type of the <code>time_pimpl</code> parser implementation
- is <code>xml_schema::time</code> which represents hours, minutes,
- and seconds with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#6.4">Section 6.4, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class time
- {
- public:
- time (unsigned short hours, unsigned short minutes, double seconds);
- time (unsigned short hours, unsigned short minutes, double seconds,
- short zone_hours, short zone_minutes);
-
- unsigned short
- hours () const;
-
- void
- hours (unsigned short);
-
- unsigned short
- minutes () const;
-
- void
- minutes (unsigned short);
-
- double
- seconds () const;
-
- void
- seconds (double);
- };
-
- bool
- operator== (const time&amp;, const time&amp;);
-
- bool
- operator!= (const time&amp;, const time&amp;);
-}
- </pre>
-
-
- <!-- Error Handling -->
-
-
- <h1><a name="7">7 Document Parser and Error Handling</a></h1>
-
- <p>In this chapter we will discuss the <code>xml_schema::document</code>
- type as well as the error handling mechanisms provided by the mapping
- in more detail. As mentioned in <a href="#3.4">Section 3.4,
- "Connecting the Parsers Together"</a>, the interface of
- <code>xml_schema::document</code> depends on the underlying XML
- parser selected (<a href="#5.3">Section 5.3, "Underlying XML
- Parser"</a>). The following sections describe the
- <code>document</code> type interface for Xerces-C++ and
- Expat as underlying parsers.</p>
-
- <h2><a name="7.1">7.1 Xerces-C++ Document Parser</a></h2>
-
- <p>When Xerces-C++ is used as the underlying XML parser, the
- <code>document</code> type has the following interface. Note that
- if the character type is <code>wchar_t</code>, then the string type
- in the interface becomes <code>std::wstring</code>
- (see <a href="#5.2">Section 5.2, "Character Type and Encoding"</a>).</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class parser_base;
- class error_handler;
-
- class flags
- {
- public:
- // Do not validate XML documents with the Xerces-C++ validator.
- //
- static const unsigned long dont_validate;
-
- // Do not initialize the Xerces-C++ runtime.
- //
- static const unsigned long dont_initialize;
-
- // Disable handling of subsequent imports for the same namespace
- // in Xerces-C++ 3.1.0 and later.
- //
- static const unsigned long no_multiple_imports;
- };
-
- class properties
- {
- public:
- // Add a location for a schema with a target namespace.
- //
- void
- schema_location (const std::string&amp; namespace_,
- const std::string&amp; location);
-
- // Add a location for a schema without a target namespace.
- //
- void
- no_namespace_schema_location (const std::string&amp; location);
- };
-
- class document
- {
- public:
- document (parser_base&amp; root,
- const std::string&amp; root_element_name,
- bool polymorphic = false);
-
- document (parser_base&amp; root,
- const std::string&amp; root_element_namespace,
- const std::string&amp; root_element_name,
- bool polymorphic = false);
-
- public:
- // Parse URI or a local file.
- //
- void
- parse (const std::string&amp; uri,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse URI or a local file with a user-provided error_handler
- // object.
- //
- void
- parse (const std::string&amp; uri,
- error_handler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse URI or a local file with a user-provided ErrorHandler
- // object. Note that you must initialize the Xerces-C++ runtime
- // before calling this function.
- //
- void
- parse (const std::string&amp; uri,
- xercesc::ErrorHandler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse URI or a local file using a user-provided SAX2XMLReader
- // object. Note that you must initialize the Xerces-C++ runtime
- // before calling this function.
- //
- void
- parse (const std::string&amp; uri,
- xercesc::SAX2XMLReader&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- public:
- // Parse std::istream.
- //
- void
- parse (std::istream&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with a user-provided error_handler object.
- //
- void
- parse (std::istream&amp;,
- error_handler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with a user-provided ErrorHandler object.
- // Note that you must initialize the Xerces-C++ runtime before
- // calling this function.
- //
- void
- parse (std::istream&amp;,
- xercesc::ErrorHandler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream using a user-provided SAX2XMLReader object.
- // Note that you must initialize the Xerces-C++ runtime before
- // calling this function.
- //
- void
- parse (std::istream&amp;,
- xercesc::SAX2XMLReader&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- public:
- // Parse std::istream with a system id.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with a system id and a user-provided
- // error_handler object.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- error_handler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with a system id and a user-provided
- // ErrorHandler object. Note that you must initialize the
- // Xerces-C++ runtime before calling this function.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- xercesc::ErrorHandler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with a system id using a user-provided
- // SAX2XMLReader object. Note that you must initialize the
- // Xerces-C++ runtime before calling this function.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- xercesc::SAX2XMLReader&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- public:
- // Parse std::istream with system and public ids.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- const std::string&amp; public_id,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with system and public ids and a user-provided
- // error_handler object.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- const std::string&amp; public_id,
- error_handler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with system and public ids and a user-provided
- // ErrorHandler object. Note that you must initialize the Xerces-C++
- // runtime before calling this function.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- const std::string&amp; public_id,
- xercesc::ErrorHandler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse std::istream with system and public ids using a user-
- // provided SAX2XMLReader object. Note that you must initialize
- // the Xerces-C++ runtime before calling this function.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- const std::string&amp; public_id,
- xercesc::SAX2XMLReader&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- public:
- // Parse InputSource. Note that you must initialize the Xerces-C++
- // runtime before calling this function.
- //
- void
- parse (const xercesc::InputSource&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse InputSource with a user-provided error_handler object.
- // Note that you must initialize the Xerces-C++ runtime before
- // calling this function.
- //
- void
- parse (const xercesc::InputSource&amp;,
- error_handler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse InputSource with a user-provided ErrorHandler object.
- // Note that you must initialize the Xerces-C++ runtime before
- // calling this function.
- //
- void
- parse (const xercesc::InputSource&amp;,
- xercesc::ErrorHandler&amp;,
- flags = 0,
- const properties&amp; = properties ());
-
- // Parse InputSource using a user-provided SAX2XMLReader object.
- // Note that you must initialize the Xerces-C++ runtime before
- // calling this function.
- //
- void
- parse (const xercesc::InputSource&amp;,
- xercesc::SAX2XMLReader&amp;,
- flags = 0,
- const properties&amp; = properties ());
- };
-}
- </pre>
-
- <p>The <code>document</code> class is a root parser for
- the vocabulary. The first argument to its constructors is the
- parser for the type of the root element. The <code>parser_base</code>
- class is the base type for all parser skeletons. The second and
- third arguments to the <code>document</code>'s constructors are
- the root element's name and namespace. The last argument,
- <code>polymorphic</code>, specifies whether the XML documents
- being parsed use polymorphism. For more information on support
- for XML Schema polymorphism in the C++/Parser mapping refer
- to <a href="#5.5">Section 5.5, "Support for Polymorphism"</a>.</p>
-
- <p>The rest of the <code>document</code> interface consists of overloaded
- <code>parse()</code> functions. The last two arguments in each of these
- functions are <code>flags</code> and <code>properties</code>. The
- <code>flags</code> argument allows you to modify the default behavior
- of the parsing functions. The <code>properties</code> argument allows
- you to override the schema location attributes specified in XML
- documents. Note that the schema location paths are relative to an
- XML document unless they are complete URIs. For example if you want
- to use a local schema file then you will need to use a URI in the
- form <code>file:///absolute/path/to/your/schema</code>.</p>
-
- <p>A number of overloaded <code>parse()</code> functions have the
- <code>system_id</code> and <code>public_id</code> arguments. The
- system id is a <em>system</em> identifier of the resources being
- parsed (for example, URI or a full file path). The public id is a
- <em>public</em> identifier of the resource (for example, an
- application-specific name or a relative file path). The system id
- is used to resolve relative paths (for example, schema paths). In
- diagnostics messages the public id is used if it is available.
- Otherwise the system id is used.</p>
-
- <p>The error handling mechanisms employed by the <code>document</code>
- parser are described in <a href="#7.3">Section 7.3, "Error
- Handling"</a>.</p>
-
- <h2><a name="7.2">7.2 Expat Document Parser</a></h2>
-
- <p>When Expat is used as the underlying XML parser, the
- <code>document</code> type has the following interface. Note that
- if the character type is <code>wchar_t</code>, then the string type
- in the interface becomes <code>std::wstring</code>
- (see <a href="#5.2">Section 5.2, "Character Type and Encoding"</a>).</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class parser_base;
- class error_handler;
-
- class document
- {
- public:
- document (parser_base&amp;,
- const std::string&amp; root_element_name,
- bool polymorphic = false);
-
- document (parser_base&amp;,
- const std::string&amp; root_element_namespace,
- const std::string&amp; root_element_name,
- bool polymorphic = false);
-
- public:
- // Parse a local file. The file is accessed with std::ifstream
- // in binary mode. The std::ios_base::failure exception is used
- // to report io errors (badbit and failbit).
- void
- parse (const std::string&amp; file);
-
- // Parse a local file with a user-provided error_handler
- // object. The file is accessed with std::ifstream in binary
- // mode. The std::ios_base::failure exception is used to report
- // io errors (badbit and failbit).
- //
- void
- parse (const std::string&amp; file, error_handler&amp;);
-
- public:
- // Parse std::istream.
- //
- void
- parse (std::istream&amp;);
-
- // Parse std::istream with a user-provided error_handler object.
- //
- void
- parse (std::istream&amp;, error_handler&amp;);
-
- // Parse std::istream with a system id.
- //
- void
- parse (std::istream&amp;, const std::string&amp; system_id);
-
- // Parse std::istream with a system id and a user-provided
- // error_handler object.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- error_handler&amp;);
-
- // Parse std::istream with system and public ids.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- const std::string&amp; public_id);
-
- // Parse std::istream with system and public ids and a user-provided
- // error_handler object.
- //
- void
- parse (std::istream&amp;,
- const std::string&amp; system_id,
- const std::string&amp; public_id,
- error_handler&amp;);
-
- public:
- // Parse a chunk of input. You can call these functions multiple
- // times with the last call having the last argument true.
- //
- void
- parse (const void* data, std::size_t size, bool last);
-
- void
- parse (const void* data, std::size_t size, bool last,
- error_handler&amp;);
-
- void
- parse (const void* data, std::size_t size, bool last,
- const std::string&amp; system_id);
-
- void
- parse (const void* data, std::size_t size, bool last,
- const std::string&amp; system_id,
- error_handler&amp;);
-
- void
- parse (const void* data, std::size_t size, bool last,
- const std::string&amp; system_id,
- const std::string&amp; public_id);
-
- void
- parse (const void* data, std::size_t size, bool last,
- const std::string&amp; system_id,
- const std::string&amp; public_id,
- error_handler&amp;);
-
- public:
- // Low-level Expat-specific parsing API.
- //
- void
- parse_begin (XML_Parser);
-
- void
- parse_begin (XML_Parser, const std::string&amp; public_id);
-
- void
- parse_begin (XML_Parser, error_handler&amp;);
-
- void
- parse_begin (XML_Parser,
- const std::string&amp; public_id,
- error_handler&amp;);
- void
- parse_end ();
- };
-}
- </pre>
-
- <p>The <code>document</code> class is a root parser for
- the vocabulary. The first argument to its constructors is the
- parser for the type of the root element. The <code>parser_base</code>
- class is the base type for all parser skeletons. The second and
- third arguments to the <code>document</code>'s constructors are
- the root element's name and namespace. The last argument,
- <code>polymorphic</code>, specifies whether the XML documents
- being parsed use polymorphism. For more information on support
- for XML Schema polymorphism in the C++/Parser mapping refer
- to <a href="#5.5">Section 5.5, "Support for Polymorphism"</a>.</p>
-
- <p>A number of overloaded <code>parse()</code> functions have the
- <code>system_id</code> and <code>public_id</code> arguments. The
- system id is a <em>system</em> identifier of the resources being
- parsed (for example, URI or a full file path). The public id is a
- <em>public</em> identifier of the resource (for example, an
- application-specific name or a relative file path). The system id
- is used to resolve relative paths. In diagnostics messages the
- public id is used if it is available. Otherwise the system id
- is used.</p>
-
- <p>The <code>parse_begin()</code> and <code>parse_end()</code> functions
- present a low-level, Expat-specific parsing API for maximum control.
- A typical use-case would look like this (pseudo-code):</p>
-
- <pre class="c++">
-xxx_pimpl root_p;
-document doc_p (root_p, "root");
-
-root_p.pre ();
-doc_p.parse_begin (xml_parser, "file.xml");
-
-while (more_data_to_parse)
-{
- // Call XML_Parse or XML_ParseBuffer.
-
- if (status == XML_STATUS_ERROR)
- break;
-}
-
-// Call parse_end even in case of an error to translate
-// XML and Schema errors to exceptions or error_handler
-// calls.
-//
-doc.parse_end ();
-result_type result (root_p.post_xxx ());
- </pre>
-
- <p>Note that if your vocabulary uses XML namespaces, the
- <code>XML_ParserCreateNS()</code> functions should be used to create
- the XML parser. Space (<code>XML_Char (' ')</code>) should be used
- as a separator (the second argument to <code>XML_ParserCreateNS()</code>).
- </p>
-
- <p>The error handling mechanisms employed by the <code>document</code>
- parser are described in <a href="#7.3">Section 7.3, "Error
- Handling"</a>.</p>
-
-
- <h2><a name="7.3">7.3 Error Handling</a></h2>
-
- <p>There are three categories of errors that can result from running
- a parser on an XML document: System, XML, and Application.
- The System category contains memory allocation and file/stream
- operation errors. The XML category covers XML parsing and
- well-formedness checking as well as XML Schema validation errors.
- Finally, the Application category is for application logic errors
- that you may want to propagate from parser implementations to the
- caller of the parser.
- </p>
-
- <p>The System errors are mapped to the standard exceptions. The
- out of memory condition is indicated by throwing an instance
- of <code>std::bad_alloc</code>. The stream operation errors
- are reported either by throwing an instance of
- <code>std::ios_base::failure</code> if exceptions are enabled
- or by setting the stream state.</p>
-
- <p>Note that if you are parsing <code>std::istream</code> on
- which exceptions are not enabled, then you will need to
- check the stream state before calling the <code>post()</code>
- callback, as shown in the following example:</p>
-
- <pre class="c++">
-int
-main (int argc, char* argv[])
-{
- ...
-
- std::ifstream ifs (argv[1]);
-
- if (ifs.fail ())
- {
- cerr &lt;&lt; argv[1] &lt;&lt; ": unable to open" &lt;&lt; endl;
- return 1;
- }
-
- root_p.pre ();
- doc_p.parse (ifs);
-
- if (ifs.fail ())
- {
- cerr &lt;&lt; argv[1] &lt;&lt; ": io failure" &lt;&lt; endl;
- return 1;
- }
-
- result_type result (root_p.post_xxx ());
-}
- </pre>
-
- <p>The above example can be rewritten to use exceptions
- as shown below:</p>
-
- <pre class="c++">
-int
-main (int argc, char* argv[])
-{
- try
- {
- ...
-
- std::ifstream ifs;
- ifs.exceptions (std::ifstream::badbit | std::ifstream::failbit);
- ifs.open (argv[1]);
-
- root_p.pre ();
- doc_p.parse (ifs);
- result_type result (root_p.post_xxx ());
- }
- catch (const std::ifstream::failure&amp;)
- {
- cerr &lt;&lt; argv[1] &lt;&lt; ": unable to open or io failure" &lt;&lt; endl;
- return 1;
- }
-}
- </pre>
-
-
- <p>For reporting application errors from parsing callbacks, you
- can throw any exceptions of your choice. They are propagated to
- the caller of the parser without any alterations.</p>
-
- <p>The XML errors can be reported either by throwing the
- <code>xml_schema::parsing</code> exception or by a callback
- to the <code>xml_schema::error_handler</code> object (and
- <code>xercesc::ErrorHandler</code> object in case of Xerces-C++).</p>
-
- <p>The <code>xml_schema::parsing</code> exception contains
- a list of warnings and errors that were accumulated during
- parsing. Note that this exception is thrown only if there
- was an error. This makes it impossible to obtain warnings
- from an otherwise successful parsing using this mechanism.
- The following listing shows the definition of
- <code>xml_schema::parsing</code> exception. Note that if the
- character type is <code>wchar_t</code>, then the string type
- and output stream type in the definition become
- <code>std::wstring</code> and <code>std::wostream</code>,
- respectively (see <a href="#5.2">Section 5.2, "Character Type
- and Encoding"</a>).</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class exception: public std::exception
- {
- protected:
- virtual void
- print (std::ostream&amp;) const = 0;
- };
-
- inline std::ostream&amp;
- operator&lt;&lt; (std::ostream&amp; os, const exception&amp; e)
- {
- e.print (os);
- return os;
- }
-
-
- class severity
- {
- public:
- enum value
- {
- warning,
- error
- };
- };
-
-
- class error
- {
- public:
- error (xml_schema::severity,
- const std::string&amp; id,
- unsigned long line,
- unsigned long column,
- const std::string&amp; message);
-
- xml_schema::severity
- severity () const;
-
- const std::string&amp;
- id () const;
-
- unsigned long
- line () const;
-
- unsigned long
- column () const;
-
- const std::string&amp;
- message () const;
- };
-
- std::ostream&amp;
- operator&lt;&lt; (std::ostream&amp;, const error&amp;);
-
-
- class diagnostics: public std::vector&lt;error>
- {
- };
-
- std::ostream&amp;
- operator&lt;&lt; (std::ostream&amp;, const diagnostics&amp;);
-
-
- class parsing: public exception
- {
- public:
- parsing ();
- parsing (const xml_schema::diagnostics&amp;);
-
- const xml_schema::diagnostics&amp;
- diagnostics () const;
-
- virtual const char*
- what () const throw ();
-
- protected:
- virtual void
- print (std::ostream&amp;) const;
- };
-}
- </pre>
-
- <p>The following example shows how we can catch and print this
- exception. The code will print diagnostics messages one per line
- in case of an error.</p>
-
- <pre class="c++">
-int
-main (int argc, char* argv[])
-{
- try
- {
- // Parse.
- }
- catch (const xml_schema::parsing&amp; e)
- {
- cerr &lt;&lt; e &lt;&lt; endl;
- return 1;
- }
-}
- </pre>
-
- <p>With the <code>error_handler</code> approach the diagnostics
- messages are delivered as parsing progresses. The following
- listing presents the definition of the <code>error_handler</code>
- interface. Note that if the character type is <code>wchar_t</code>,
- then the string type in the interface becomes <code>std::wstring</code>
- (see <a href="#5.2">Section 5.2, "Character Type and Encoding"</a>).</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class error_handler
- {
- public:
- class severity
- {
- public:
- enum value
- {
- warning,
- error,
- fatal
- };
- };
-
- virtual bool
- handle (const std::string&amp; id,
- unsigned long line,
- unsigned long column,
- severity,
- const std::string&amp; message) = 0;
- };
-}
- </pre>
-
- <p>The return value of the <code>handle()</code> function indicates whether
- parsing should continue if possible. The error with the fatal severity
- level terminates the parsing process regardless of the returned value.
- At the end of the parsing process with an error that was reported via
- the <code>error_handler</code> object, an empty
- <code>xml_schema::parsing</code> exception is thrown to indicate
- the failure to the caller. You can alter this behavior by throwing
- your own exception from the <code>handle()</code> function.</p>
-
-
- <!-- Appendix A -->
-
-
- <h1><a name="A">Appendix A &mdash; Supported XML Schema Constructs</a></h1>
-
- <p>The C++/Parser mapping supports validation of the following W3C XML
- Schema constructs in the generated code.</p>
-
- <!-- border="1" is necessary for html2ps -->
- <table id="features" border="1">
- <tr><th>Construct</th><th>Notes</th></tr>
- <tr><th colspan="2">Structure</th></tr>
-
- <tr><td>element</td><td></td></tr>
- <tr><td>attribute</td><td></td></tr>
-
- <tr><td>any</td><td></td></tr>
- <tr><td>anyAttribute</td><td></td></tr>
-
- <tr><td>all</td><td></td></tr>
- <tr><td>sequence</td><td></td></tr>
- <tr><td>choice</td><td></td></tr>
-
- <tr><td>complex type, empty content</td><td></td></tr>
- <tr><td>complex type, mixed content</td><td></td></tr>
- <tr><td>complex type, simple content extension</td><td></td></tr>
- <tr><td>complex type, simple content restriction</td>
- <td>Simple type facets are not validated.</td></tr>
- <tr><td>complex type, complex content extension</td><td></td></tr>
- <tr><td>complex type, complex content restriction</td><td></td></tr>
-
- <tr><td>list</td><td></td></tr>
-
- <tr><th colspan="2">Datatypes</th></tr>
-
- <tr><td>byte</td><td></td></tr>
- <tr><td>unsignedByte</td><td></td></tr>
- <tr><td>short</td><td></td></tr>
- <tr><td>unsignedShort</td><td></td></tr>
- <tr><td>int</td><td></td></tr>
- <tr><td>unsignedInt</td><td></td></tr>
- <tr><td>long</td><td></td></tr>
- <tr><td>unsignedLong</td><td></td></tr>
- <tr><td>integer</td><td></td></tr>
- <tr><td>nonPositiveInteger</td><td></td></tr>
- <tr><td>nonNegativeInteger</td><td></td></tr>
- <tr><td>positiveInteger</td><td></td></tr>
- <tr><td>negativeInteger</td><td></td></tr>
-
- <tr><td>boolean</td><td></td></tr>
-
- <tr><td>float</td><td></td></tr>
- <tr><td>double</td><td></td></tr>
- <tr><td>decimal</td><td></td></tr>
-
- <tr><td>string</td><td></td></tr>
- <tr><td>normalizedString</td><td></td></tr>
- <tr><td>token</td><td></td></tr>
- <tr><td>Name</td><td></td></tr>
- <tr><td>NMTOKEN</td><td></td></tr>
- <tr><td>NCName</td><td></td></tr>
- <tr><td>language</td><td></td></tr>
- <tr><td>anyURI</td><td></td></tr>
-
- <tr><td>ID</td><td>Identity constraint is not enforced.</td></tr>
- <tr><td>IDREF</td><td>Identity constraint is not enforced.</td></tr>
-
- <tr><td>NMTOKENS</td><td></td></tr>
- <tr><td>IDREFS</td><td>Identity constraint is not enforced.</td></tr>
-
- <tr><td>QName</td><td></td></tr>
-
- <tr><td>base64Binary</td><td></td></tr>
- <tr><td>hexBinary</td><td></td></tr>
-
- <tr><td>date</td><td></td></tr>
- <tr><td>dateTime</td><td></td></tr>
- <tr><td>duration</td><td></td></tr>
- <tr><td>gDay</td><td></td></tr>
- <tr><td>gMonth</td><td></td></tr>
- <tr><td>gMonthDay</td><td></td></tr>
- <tr><td>gYear</td><td></td></tr>
- <tr><td>gYearMonth</td><td></td></tr>
- <tr><td>time</td><td></td></tr>
- </table>
-
-
- </div>
-</div>
-
-</body>
-</html>
diff --git a/doc/cxx/parser/guide/makefile b/doc/cxx/parser/guide/makefile
deleted file mode 100644
index 4fca5e9..0000000
--- a/doc/cxx/parser/guide/makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# file : doc/cxx/parser/guide/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(out_base)/cxx-parser-guide.ps $(out_base)/cxx-parser-guide.pdf
-
-$(out_base)/cxx-parser-guide.ps: $(src_base)/index.xhtml \
- $(src_base)/figure-1.png \
- $(src_base)/guide.html2ps \
- | $(out_base)/.
- $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<)
-
-$(out_base)/cxx-parser-guide.pdf: $(out_base)/cxx-parser-guide.ps | $(out_base)/.
- $(call message,ps2pdf $<,ps2pdf14 $< $@)
-
-# Install & Dist.
-#
-$(install): path := $(subst $(src_root)/doc/,,$(src_base))
-$(dist): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(out_base)/cxx-parser-guide.ps $(out_base)/cxx-parser-guide.pdf
- $(call install-data,$(src_base)/figure-1.png,$(install_doc_dir)/xsd/$(path)/figure-1.png)
- $(call install-data,$(src_base)/index.xhtml,$(install_doc_dir)/xsd/$(path)/index.xhtml)
- $(call install-data,$(out_base)/cxx-parser-guide.ps,$(install_doc_dir)/xsd/$(path)/cxx-parser-guide.ps)
- $(call install-data,$(out_base)/cxx-parser-guide.pdf,$(install_doc_dir)/xsd/$(path)/cxx-parser-guide.pdf)
-
-$(dist): $(out_base)/cxx-parser-guide.ps $(out_base)/cxx-parser-guide.pdf
- $(call install-data,$(src_base)/figure-1.png,$(dist_prefix)/$(path)/figure-1.png)
- $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml)
- $(call install-data,$(out_base)/cxx-parser-guide.ps,$(dist_prefix)/$(path)/cxx-parser-guide.ps)
- $(call install-data,$(out_base)/cxx-parser-guide.pdf,$(dist_prefix)/$(path)/cxx-parser-guide.pdf)
-
-$(dist-win): $(dist)
-
-
-# Clean
-#
-$(clean):
-ifneq ($(xsd_clean_gen),n)
- $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-parser-guide.ps)
- $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-parser-guide.pdf)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/install.make)
diff --git a/doc/cxx/parser/makefile b/doc/cxx/parser/makefile
deleted file mode 100644
index 7ed09eb..0000000
--- a/doc/cxx/parser/makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# file : doc/cxx/parser/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-docs := guide
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(docs)))
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(docs)))
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(docs)))
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(docs)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(docs)))
-
-$(foreach m,$(docs),$(call import,$(src_base)/$m/makefile))
diff --git a/doc/cxx/tree/guide/guide.html2ps b/doc/cxx/tree/guide/guide.html2ps
deleted file mode 100644
index 4606eb4..0000000
--- a/doc/cxx/tree/guide/guide.html2ps
+++ /dev/null
@@ -1,65 +0,0 @@
-@html2ps {
- option {
- toc: hb;
- colour: 1;
- hyphenate: 1;
- titlepage: 1;
- }
-
- datefmt: "%B %Y";
-
- titlepage {
- content: "
-<div align=center>
- <h1><big>C++/Tree Mapping</big></h1>
- <h1><big>Getting Started Guide</big></h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
-</div>
- <p>Copyright &#169; 2009-2020 Code Synthesis Tools CC.</p>
-
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the
- <a href='https://www.codesynthesis.com/licenses/fdl-1.2.txt'>GNU Free
- Documentation License, version 1.2</a>; with no Invariant Sections,
- no Front-Cover Texts and no Back-Cover Texts.
- </p>
-
- <p>This document is available in the following formats:
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/index.xhtml'>XHTML</a>,
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-parser-guide.pdf'>PDF</a>, and
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-parser-guide.ps'>PostScript</a>.</p>";
- }
-
- toc {
- indent: 2em;
- }
-
- header {
- odd-right: $H;
- even-left: $H;
- }
-
- footer {
- odd-left: $D;
- odd-center: $T;
- odd-right: $N;
-
- even-left: $N;
- even-center: $T;
- even-right: $D;
- }
-}
-
-body {
- font-size: 12pt;
- text-align: justify;
-}
-
-pre {
- font-size: 10pt;
-}
diff --git a/doc/cxx/tree/guide/index.xhtml b/doc/cxx/tree/guide/index.xhtml
deleted file mode 100644
index 6465776..0000000
--- a/doc/cxx/tree/guide/index.xhtml
+++ /dev/null
@@ -1,2732 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head>
- <title>C++/Tree Mapping Getting Started Guide</title>
-
- <meta name="copyright" content="&#169; 2009-2020 Code Synthesis Tools CC"/>
- <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,parsing,serialization,validation"/>
- <meta name="description" content="C++/Tree Mapping Getting Started Guide"/>
-
- <link rel="stylesheet" type="text/css" href="../../../default.css" />
-
-<style type="text/css">
- pre {
- padding : 0 0 0 0em;
- margin : 0em 0em 0em 0;
-
- font-size : 102%
- }
-
- body {
- min-width: 48em;
- }
-
- h1 {
- font-weight: bold;
- font-size: 200%;
- line-height: 1.2em;
- }
-
- h2 {
- font-weight : bold;
- font-size : 150%;
-
- padding-top : 0.8em;
- }
-
- h3 {
- font-size : 140%;
- padding-top : 0.8em;
- }
-
- /* Adjust indentation for three levels. */
- #container {
- max-width: 48em;
- }
-
- #content {
- padding: 0 0.1em 0 4em;
- /*background-color: red;*/
- }
-
- #content h1 {
- margin-left: -2.06em;
- }
-
- #content h2 {
- margin-left: -1.33em;
- }
-
- /* Title page */
-
- #titlepage {
- padding: 2em 0 1em 0;
- border-bottom: 1px solid black;
- }
-
- #titlepage .title {
- font-weight: bold;
- font-size: 200%;
- text-align: center;
- }
-
- #titlepage #first-title {
- padding: 1em 0 0.4em 0;
- }
-
- #titlepage #second-title {
- padding: 0.4em 0 2em 0;
- }
-
- /* Lists */
- ul.list li {
- padding-top : 0.3em;
- padding-bottom : 0.3em;
- }
-
- div.img {
- text-align: center;
- padding: 2em 0 2em 0;
- }
-
- /* */
- dl dt {
- padding : 0.8em 0 0 0;
- }
-
- /* Built-in table */
- #builtin {
- margin: 2em 0 2em 0;
-
- border-collapse : collapse;
- border : 1px solid;
- border-color : #000000;
-
- font-size : 11px;
- line-height : 14px;
- }
-
- #builtin th, #builtin td {
- border: 1px solid;
- padding : 0.9em 0.9em 0.7em 0.9em;
- }
-
- #builtin th {
- background : #cde8f6;
- }
-
- #builtin td {
- text-align: left;
- }
-
- /* TOC */
- table.toc {
- border-style : none;
- border-collapse : separate;
- border-spacing : 0;
-
- margin : 0.2em 0 0.2em 0;
- padding : 0 0 0 0;
- }
-
- table.toc tr {
- padding : 0 0 0 0;
- margin : 0 0 0 0;
- }
-
- table.toc * td, table.toc * th {
- border-style : none;
- margin : 0 0 0 0;
- vertical-align : top;
- }
-
- table.toc * th {
- font-weight : normal;
- padding : 0em 0.1em 0em 0;
- text-align : left;
- white-space : nowrap;
- }
-
- table.toc * table.toc th {
- padding-left : 1em;
- }
-
- table.toc * td {
- padding : 0em 0 0em 0.7em;
- text-align : left;
- }
-</style>
-
-
-</head>
-
-<body>
-<div id="container">
- <div id="content">
-
- <div class="noprint">
-
- <div id="titlepage">
- <div class="title" id="first-title">C++/Tree Mapping</div>
- <div class="title" id="second-title">Getting Started Guide</div>
-
- <p>Copyright &#169; 2009-2020 Code Synthesis Tools CC.</p>
-
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the
- <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
- Documentation License, version 1.2</a>; with no Invariant Sections,
- no Front-Cover Texts and no Back-Cover Texts.
- </p>
-
- <p>This document is available in the following formats:
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/index.xhtml">XHTML</a>,
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-tree-guide.pdf">PDF</a>, and
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-tree-guide.ps">PostScript</a>.</p>
-
- </div>
-
- <h1>Table of Contents</h1>
-
- <table class="toc">
- <tr>
- <th></th><td><a href="#0">Preface</a>
- <table class="toc">
- <tr><th></th><td><a href="#0.1">About This Document</a></td></tr>
- <tr><th></th><td><a href="#0.2">More Information</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>1</th><td><a href="#1">Introduction</a>
- <table class="toc">
- <tr><th>1.1</th><td><a href="#1.1">Mapping Overview</a></td></tr>
- <tr><th>1.2</th><td><a href="#1.2">Benefits</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>2</th><td><a href="#2">Hello World Example</a>
- <table class="toc">
- <tr><th>2.1</th><td><a href="#2.1">Writing XML Document and Schema</a></td></tr>
- <tr><th>2.2</th><td><a href="#2.2">Translating Schema to C++</a></td></tr>
- <tr><th>2.3</th><td><a href="#2.3">Implementing Application Logic</a></td></tr>
- <tr><th>2.4</th><td><a href="#2.4">Compiling and Running</a></td></tr>
- <tr><th>2.5</th><td><a href="#2.5">Adding Serialization</a></td></tr>
- <tr><th>2.6</th><td><a href="#2.6">Selecting Naming Convention</a></td></tr>
- <tr><th>2.7</th><td><a href="#2.7">Generating Documentation</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>3</th><td><a href="#3">Overall Mapping Configuration</a>
- <table class="toc">
- <tr><th>3.1</th><td><a href="#3.1">C++ Standard</a></td></tr>
- <tr><th>3.2</th><td><a href="#3.2">Character Type and Encoding</a></td></tr>
- <tr><th>3.3</th><td><a href="#3.3">Support for Polymorphism </a></td></tr>
- <tr><th>3.4</th><td><a href="#3.4">Namespace Mapping</a></td></tr>
- <tr><th>3.5</th><td><a href="#3.5">Thread Safety</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>4</th><td><a href="#4">Working with Object Models</a>
- <table class="toc">
- <tr><th>4.1</th><td><a href="#4.1">Attribute and Element Cardinalities</a></td></tr>
- <tr><th>4.2</th><td><a href="#4.2">Accessing the Object Model</a></td></tr>
- <tr><th>4.3</th><td><a href="#4.3">Modifying the Object Model</a></td></tr>
- <tr><th>4.4</th><td><a href="#4.4">Creating the Object Model from Scratch</a></td></tr>
- <tr><th>4.5</th><td><a href="#4.5">Mapping for the Built-in XML Schema Types</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>5</th><td><a href="#5">Parsing</a>
- <table class="toc">
- <tr><th>5.1</th><td><a href="#5.1">XML Schema Validation and Searching</a></td></tr>
- <tr><th>5.2</th><td><a href="#5.2">Error Handling</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>6</th><td><a href="#6">Serialization</a>
- <table class="toc">
- <tr><th>6.1</th><td><a href="#6.1">Namespace and Schema Information</a></td></tr>
- <tr><th>6.2</th><td><a href="#6.2">Error Handling</a></td></tr>
- </table>
- </td>
- </tr>
-
- </table>
- </div>
-
- <h1><a name="0">Preface</a></h1>
-
- <h2><a name="0.1">About This Document</a></h2>
-
- <p>The goal of this document is to provide you with an understanding of
- the C++/Tree programming model and allow you to efficiently evaluate
- XSD against your project's technical requirements. As such, this
- document is intended for C++ developers and software architects
- who are looking for an XML processing solution. For a more in-depth
- description of the C++/Tree mapping refer to the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/">C++/Tree
- Mapping User Manual</a>.</p>
-
- <p>Prior experience with XML and C++ is required to understand this
- document. Basic understanding of XML Schema is advantageous but
- not expected or required.
- </p>
-
-
- <h2><a name="0.2">More Information</a></h2>
-
- <p>Beyond this guide, you may also find the following sources of
- information useful:</p>
-
- <ul class="list">
- <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/">C++/Tree
- Mapping User Manual</a></li>
-
- <li><a href="http://wiki.codesynthesis.com/Tree/Customization_guide">C++/Tree
- Mapping Customization Guide</a></li>
-
- <li><a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree
- Mapping Frequently Asked Questions (FAQ)</a></li>
-
- <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a></li>
-
- <li>The <code>examples/cxx/tree/</code> directory in the XSD
- distribution contains a collection of examples and a README
- file with an overview of each example.</li>
-
- <li>The <code>README</code> file in the XSD distribution explains
- how to compile the examples on various platforms.</li>
-
- <li>The <a href="https://www.codesynthesis.com/mailman/listinfo/xsd-users">xsd-users</a>
- mailing list is the place to ask technical questions about XSD and the C++/Parser mapping.
- Furthermore, the <a href="https://www.codesynthesis.com/pipermail/xsd-users/">archives</a>
- may already have answers to some of your questions.</li>
- </ul>
-
- <!-- Introduction -->
-
- <h1><a name="1">1 Introduction</a></h1>
-
- <p>Welcome to CodeSynthesis XSD and the C++/Tree mapping. XSD is a
- cross-platform W3C XML Schema to C++ data binding compiler. C++/Tree
- is a W3C XML Schema to C++ mapping that represents the data stored
- in XML as a statically-typed, vocabulary-specific object model.
- </p>
-
- <h2><a name="1.1">1.1 Mapping Overview</a></h2>
-
- <p>Based on a formal description of an XML vocabulary (schema), the
- C++/Tree mapping produces a tree-like data structure suitable for
- in-memory processing. The core of the mapping consists of C++
- classes that constitute the object model and are derived from
- types defined in XML Schema as well as XML parsing and
- serialization code.</p>
-
- <p>Besides the core features, C++/Tree provide a number of additional
- mapping elements that can be useful in some applications. These
- include serialization and extraction to/from formats others than
- XML, such as unstructured text (useful for debugging) and binary
- representations such as XDR and CDR for high-speed data processing
- as well as automatic documentation generation. The C++/Tree mapping
- also provides a wide range of mechanisms for controlling and
- customizing the generated code.</p>
-
- <p>A typical application that uses C++/Tree for XML processing usually
- performs the following three steps: it first reads (parses) an XML
- document to an in-memory object model, it then performs some useful
- computations on that object model which may involve modification
- of the model, and finally it may write (serialize) the modified
- object model back to XML.</p>
-
- <p>The next chapter presents a simple application that performs these
- three steps. The following chapters show how to use the C++/Tree
- mapping in more detail.</p>
-
- <h2><a name="1.2">1.2 Benefits</a></h2>
-
- <p>Traditional XML access APIs such as Document Object Model (DOM)
- or Simple API for XML (SAX) have a number of drawbacks that
- make them less suitable for creating robust and maintainable
- XML processing applications. These drawbacks include:
- </p>
-
- <ul class="list">
- <li>Generic representation of XML in terms of elements, attributes,
- and text forces an application developer to write a substantial
- amount of bridging code that identifies and transforms pieces
- of information encoded in XML to a representation more suitable
- for consumption by the application logic.</li>
-
- <li>String-based flow control defers error detection to runtime.
- It also reduces code readability and maintainability.</li>
-
- <li>Lack of type safety because the data is represented as text.</li>
-
- <li>Resulting applications are hard to debug, change, and
- maintain.</li>
- </ul>
-
- <p>In contrast, statically-typed, vocabulary-specific object model
- produced by the C++/Tree mapping allows you to operate in your
- domain terms instead of the generic elements, attributes, and
- text. Static typing helps catch errors at compile-time rather
- than at run-time. Automatic code generation frees you for more
- interesting tasks (such as doing something useful with the
- information stored in the XML documents) and minimizes the
- effort needed to adapt your applications to changes in the
- document structure. To summarize, the C++/Tree object model has
- the following key advantages over generic XML access APIs:</p>
-
- <ul class="list">
- <li><b>Ease of use.</b> The generated code hides all the complexity
- associated with parsing and serializing XML. This includes navigating
- the structure and converting between the text representation and
- data types suitable for manipulation by the application
- logic.</li>
-
- <li><b>Natural representation.</b> The object representation allows
- you to access the XML data using your domain vocabulary instead
- of generic elements, attributes, and text.</li>
-
- <li><b>Concise code.</b> With the object representation the
- application implementation is simpler and thus easier
- to read and understand.</li>
-
- <li><b>Safety.</b> The generated object model is statically
- typed and uses functions instead of strings to access the
- information. This helps catch programming errors at compile-time
- rather than at runtime.</li>
-
- <li><b>Maintainability.</b> Automatic code generation minimizes the
- effort needed to adapt the application to changes in the
- document structure. With static typing, the C++ compiler
- can pin-point the places in the client code that need to be
- changed.</li>
-
- <li><b>Compatibility.</b> Sequences of elements are represented in
- the object model as containers conforming to the standard C++
- sequence requirements. This makes it possible to use standard
- C++ algorithms on the object representation and frees you from
- learning yet another container interface, as is the case with
- DOM.</li>
-
- <li><b>Efficiency.</b> If the application makes repetitive use
- of the data extracted from XML, then the C++/Tree object model
- is more efficient because the navigation is performed using
- function calls rather than string comparisons and the XML
- data is extracted only once. Furthermore, the runtime memory
- usage is reduced due to more efficient data storage
- (for instance, storing numeric data as integers instead of
- strings) as well as the static knowledge of cardinality
- constraints.</li>
- </ul>
-
-
- <!-- Hello World Parser -->
-
-
- <h1><a name="2">2 Hello World Example</a></h1>
-
- <p>In this chapter we will examine how to parse, access, modify, and
- serialize a very simple XML document using the XSD-generated
- C++/Tree object model. The code presented in this chapter is
- based on the <code>hello</code> example which can be found in
- the <code>examples/cxx/tree/</code> directory of the XSD
- distribution.</p>
-
- <h2><a name="2.1">2.1 Writing XML Document and Schema</a></h2>
-
- <p>First, we need to get an idea about the structure
- of the XML documents we are going to process. Our
- <code>hello.xml</code>, for example, could look like this:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;hello>
-
- &lt;greeting>Hello&lt;/greeting>
-
- &lt;name>sun&lt;/name>
- &lt;name>moon&lt;/name>
- &lt;name>world&lt;/name>
-
-&lt;/hello>
- </pre>
-
- <p>Then we can write a description of the above XML in the
- XML Schema language and save it into <code>hello.xsd</code>:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:complexType name="hello_t">
- &lt;xs:sequence>
- &lt;xs:element name="greeting" type="xs:string"/>
- &lt;xs:element name="name" type="xs:string" maxOccurs="unbounded"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:element name="hello" type="hello_t"/>
-
-&lt;/xs:schema>
- </pre>
-
- <p>Even if you are not familiar with XML Schema, it
- should be easy to connect declarations in <code>hello.xsd</code>
- to elements in <code>hello.xml</code>. The <code>hello_t</code> type
- is defined as a sequence of the nested <code>greeting</code> and
- <code>name</code> elements. Note that the term sequence in XML
- Schema means that elements should appear in a particular order
- as opposed to appearing multiple times. The <code>name</code>
- element has its <code>maxOccurs</code> property set to
- <code>unbounded</code> which means it can appear multiple times
- in an XML document. Finally, the globally-defined <code>hello</code>
- element prescribes the root element for our vocabulary. For an
- easily-approachable introduction to XML Schema refer to
- <a href="http://www.w3.org/TR/xmlschema-0/">XML Schema Part 0:
- Primer</a>.</p>
-
- <p>The above schema is a specification of our XML vocabulary; it tells
- everybody what valid documents of our XML-based language should look
- like. We can also update our <code>hello.xml</code> to include the
- information about the schema so that XML parsers can validate
- our document:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="hello.xsd">
-
- &lt;greeting>Hello&lt;/greeting>
-
- &lt;name>sun&lt;/name>
- &lt;name>moon&lt;/name>
- &lt;name>world&lt;/name>
-
-&lt;/hello>
- </pre>
-
-
- <p>The next step is to compile the schema to generate the object
- model and parsing functions.</p>
-
- <h2><a name="2.2">2.2 Translating Schema to C++</a></h2>
-
- <p>Now we are ready to translate our <code>hello.xsd</code> to C++.
- To do this we invoke the XSD compiler from a terminal (UNIX) or
- a command prompt (Windows):
- </p>
-
- <pre class="terminal">
-$ xsd cxx-tree hello.xsd
- </pre>
-
- <p>The XSD compiler produces two C++ files: <code>hello.hxx</code> and
- <code>hello.cxx</code>. The following code fragment is taken from
- <code>hello.hxx</code>; it should give you an idea about what gets
- generated:
- </p>
-
- <pre class="c++">
-class hello_t
-{
-public:
- // greeting
- //
- typedef xml_schema::string greeting_type;
-
- const greeting_type&amp;
- greeting () const;
-
- greeting_type&amp;
- greeting ();
-
- void
- greeting (const greeting_type&amp; x);
-
- // name
- //
- typedef xml_schema::string name_type;
- typedef xsd::sequence&lt;name_type> name_sequence;
- typedef name_sequence::iterator name_iterator;
- typedef name_sequence::const_iterator name_const_iterator;
-
- const name_sequence&amp;
- name () const;
-
- name_sequence&amp;
- name ();
-
- void
- name (const name_sequence&amp; s);
-
- // Constructor.
- //
- hello_t (const greeting_type&amp;);
-
- ...
-
-};
-
-std::auto_ptr&lt;hello_t>
-hello (const std::string&amp; uri);
-
-std::auto_ptr&lt;hello_t>
-hello (std::istream&amp;);
- </pre>
-
- <p>The <code>hello_t</code> C++ class corresponds to the
- <code>hello_t</code> XML Schema type. For each element
- in this type a set of C++ type definitions as well as
- accessor and modifier functions are generated inside the
- <code>hello_t</code> class. Note that the type definitions
- and member functions for the <code>greeting</code> and
- <code>name</code> elements are different because of the
- cardinality differences between these two elements
- (<code>greeting</code> is a required single element and
- <code>name</code> is a sequence of elements).</p>
-
- <p>The <code>xml_schema::string</code> type used in the type
- definitions is a C++ class provided by the XSD runtime
- that corresponds to built-in XML Schema type
- <code>string</code>. The <code>xml_schema::string</code>
- is based on <code>std::string</code> and can be used as
- such. Similarly, the <code>sequence</code> class template
- that is used in the <code>name_sequence</code> type
- definition is based on and has the same interface as
- <code>std::vector</code>. The mapping between the built-in
- XML Schema types and C++ types is described in more detail in
- <a href="#4.5">Section 4.5, "Mapping for the Built-in XML Schema
- Types"</a>. The <code>hello_t</code> class also includes a
- constructor with an initializer for the required
- <code>greeting</code> element as its argument.</p>
-
- <p>The <code>hello</code> overloaded global functions correspond
- to the <code>hello</code> global element in XML Schema. A
- global element in XML Schema is a valid document root.
- By default XSD generated a set of parsing functions for each
- global element defined in XML Schema (this can be overridden
- with the <code>--root-element-*</code> options). Parsing
- functions return a dynamically allocated object model as an
- automatic pointer. The actual pointer used depends on the
- C++ standard selected. For C++98 it is <code>std::auto_ptr</code>
- as shown above. For C++11 it is <code>std::unique_ptr</code>.
- For example, if we modify our XSD compiler invocation to
- select C++11:</p>
-
- <pre class="terminal">
-$ xsd cxx-tree --std c++11 hello.xsd
- </pre>
-
- <p>Then the parsing function signatures will become:</p>
-
- <pre class="c++">
-std::unique_ptr&lt;hello_t>
-hello (const std::string&amp; uri);
-
-std::unique_ptr&lt;hello_t>
-hello (std::istream&amp;);
- </pre>
-
- <p>For more information on parsing functions see <a href="#5">Chapter 5,
- "Parsing"</a>.</p>
-
- <h2><a name="2.3">2.3 Implementing Application Logic</a></h2>
-
- <p>At this point we have all the parts we need to do something useful
- with the information stored in our XML document:
- </p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include "hello.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- auto_ptr&lt;hello_t> h (hello (argv[1]));
-
- for (hello_t::name_const_iterator i (h->name ().begin ());
- i != h->name ().end ();
- ++i)
- {
- cerr &lt;&lt; h->greeting () &lt;&lt; ", " &lt;&lt; *i &lt;&lt; "!" &lt;&lt; endl;
- }
- }
- catch (const xml_schema::exception&amp; e)
- {
- cerr &lt;&lt; e &lt;&lt; endl;
- return 1;
- }
-}
- </pre>
-
- <p>The first part of our application calls one of the parsing
- functions to parser an XML file specified in the command line.
- We then use the returned object model to iterate over names
- and print a greeting line for each of them. Finally, we
- catch and print the <code>xml_schema::exception</code>
- exception in case something goes wrong. This exception
- is the root of the exception hierarchy used by the
- XSD-generated code.
- </p>
-
-
- <h2><a name="2.4">2.4 Compiling and Running</a></h2>
-
- <p>After saving our application from the previous section in
- <code>driver.cxx</code>, we are ready to compile our first
- program and run it on the test XML document. On a UNIX
- system this can be done with the following commands:
- </p>
-
- <pre class="terminal">
-$ c++ -I.../libxsd -c driver.cxx hello.cxx
-$ c++ -o driver driver.o hello.o -lxerces-c
-$ ./driver hello.xml
-Hello, sun!
-Hello, moon!
-Hello, world!
- </pre>
-
- <p>Here <code>.../libxsd</code> represents the path to the
- <code>libxsd</code> directory in the XSD distribution.
- Note also that we are required to link our application
- with the Xerces-C++ library because the generated code
- uses it as the underlying XML parser.</p>
-
- <h2><a name="2.5">2.5 Adding Serialization</a></h2>
-
- <p>While parsing and accessing the XML data may be everything
- you need, there are applications that require creating new
- or modifying existing XML documents. By default XSD does
- not produce serialization code. We will need to request
- it with the <code>--generate-serialization</code> options:</p>
-
- <pre class="terminal">
-$ xsd cxx-tree --generate-serialization hello.xsd
- </pre>
-
- <p>If we now examine the generated <code>hello.hxx</code> file,
- we will find a set of overloaded serialization functions,
- including the following version:</p>
-
- <pre class="c++">
-void
-hello (std::ostream&amp;,
- const hello_t&amp;,
- const xml_schema::namespace_infomap&amp; =
- xml_schema::namespace_infomap ());
-
- </pre>
-
- <p>Just like with parsing functions, XSD generates serialization
- functions for each global element unless instructed otherwise
- with one of the <code>--root-element-*</code> options. For more
- information on serialization functions see <a href="#6">Chapter 6,
- "Serialization"</a>.</p>
-
- <p>We first examine an application that modifies an existing
- object model and serializes it back to XML:</p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include "hello.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- auto_ptr&lt;hello_t> h (hello (argv[1]));
-
- // Change the greeting phrase.
- //
- h->greeting ("Hi");
-
- // Add another entry to the name sequence.
- //
- h->name ().push_back ("mars");
-
- // Serialize the modified object model to XML.
- //
- xml_schema::namespace_infomap map;
- map[""].name = "";
- map[""].schema = "hello.xsd";
-
- hello (cout, *h, map);
- }
- catch (const xml_schema::exception&amp; e)
- {
- cerr &lt;&lt; e &lt;&lt; endl;
- return 1;
- }
-}
- </pre>
-
- <p>First, our application parses an XML document and obtains its
- object model as in the previous example. Then it changes the
- greeting string and adds another entry to the list of names.
- Finally, it serializes the object model back to XML by calling
- the serialization function.</p>
-
- <p>The first argument we pass to the serialization function is
- <code>cout</code> which results in the XML being written to
- the standard output for us to inspect. We could have also
- written the result to a file or memory buffer by creating an
- instance of <code>std::ofstream</code> or <code>std::ostringstream</code>
- and passing it instead of <code>cout</code>. The second argument is the
- object model we want to serialize. The final argument is an optional
- namespace information map for our vocabulary. It captures information
- such as namespaces, namespace prefixes to which they should be mapped,
- and schemas associated with these namespaces. If we don't provide
- this argument then generic namespace prefixes (<code>p1</code>,
- <code>p2</code>, etc.) will be automatically assigned to XML namespaces
- and no schema information will be added to the resulting document
- (see <a href="#6">Chapter 6, "Serialization"</a> for details).
- In our case, the prefix (map key) and namespace name are empty
- because our vocabulary does not use XML namespaces.</p>
-
- <p>If we now compile and run this application we will see the
- output as shown in the following listing:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="hello.xsd">
-
- &lt;greeting>Hi&lt;/greeting>
-
- &lt;name>sun&lt;/name>
- &lt;name>moon&lt;/name>
- &lt;name>world&lt;/name>
- &lt;name>mars&lt;/name>
-
-&lt;/hello>
- </pre>
-
- <p>We can also create and serialize an object model from scratch
- as shown in the following example:</p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include &lt;fstream>
-#include "hello.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- try
- {
- hello_t h ("Hi");
-
- hello_t::name_sequence&amp; ns (h.name ());
-
- ns.push_back ("Jane");
- ns.push_back ("John");
-
- // Serialize the object model to XML.
- //
- xml_schema::namespace_infomap map;
- map[""].name = "";
- map[""].schema = "hello.xsd";
-
- std::ofstream ofs (argv[1]);
- hello (ofs, h, map);
- }
- catch (const xml_schema::exception&amp; e)
- {
- cerr &lt;&lt; e &lt;&lt; endl;
- return 1;
- }
-}
- </pre>
-
- <p>In this example we used the generated constructor to create
- an instance of type <code>hello_t</code>. To reduce typing,
- we obtained a reference to the name sequence which we then
- used to add a few names. The serialization part is identical
- to the previous example except this time we are writing to
- a file. If we compile and run this program, it produces the
- following XML file:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="hello.xsd">
-
- &lt;greeting>Hi&lt;/greeting>
-
- &lt;name>Jane&lt;/name>
- &lt;name>John&lt;/name>
-
-&lt;/hello>
- </pre>
-
- <h2><a name="2.6">2.6 Selecting Naming Convention</a></h2>
-
- <p>By default XSD uses the so-called K&amp;R (Kernighan and Ritchie)
- identifier naming convention in the generated code. In this
- convention both type and function names are in lower case and
- words are separated by underscores. If your application code or
- schemas use a different notation, you may want to change the
- naming convention used in the generated code for consistency.
- XSD supports a set of widely-used naming conventions
- that you can select with the <code>--type-naming</code> and
- <code>--function-naming</code> options. You can also further
- refine one of the predefined conventions or create a completely
- custom naming scheme by using the <code>--*-regex</code> options.</p>
-
- <p>As an example, let's assume that our "Hello World" application
- uses the so-called upper-camel-case naming convention for types
- (that is, each word in a type name is capitalized) and the K&amp;R
- convention for function names. Since K&amp;R is the default
- convention for both type and function names, we only need to
- change the type naming scheme:</p>
-
- <pre class="terminal">
-$ xsd cxx-tree --type-naming ucc hello.xsd
- </pre>
-
- <p>The <code>ucc</code> argument to the <code>--type-naming</code>
- options stands for upper-camel-case. If we now examine the
- generated <code>hello.hxx</code>, we will see the following
- changes compared to the declarations shown in the previous
- sections:</p>
-
- <pre class="c++">
-class Hello_t
-{
-public:
- // greeting
- //
- typedef xml_schema::String GreetingType;
-
- const GreetingType&amp;
- greeting () const;
-
- GreetingType&amp;
- greeting ();
-
- void
- greeting (const GreetingType&amp; x);
-
- // name
- //
- typedef xml_schema::String NameType;
- typedef xsd::sequence&lt;NameType> NameSequence;
- typedef NameSequence::iterator NameIterator;
- typedef NameSequence::const_iterator NameConstIterator;
-
- const NameSequence&amp;
- name () const;
-
- NameSequence&amp;
- name ();
-
- void
- name (const NameSequence&amp; s);
-
- // Constructor.
- //
- Hello_t (const GreetingType&amp;);
-
- ...
-
-};
-
-std::auto_ptr&lt;Hello_t>
-hello (const std::string&amp; uri);
-
-std::auto_ptr&lt;Hello_t>
-hello (std::istream&amp;);
- </pre>
-
- <p>Notice that the type names in the <code>xml_schema</code> namespace,
- for example <code>xml_schema::String</code>, now also use the
- upper-camel-case naming convention. The only thing that we may
- be unhappy about in the above code is the <code>_t</code>
- suffix in <code>Hello_t</code>. If we are not in a position
- to change the schema, we can <em>touch-up</em> the <code>ucc</code>
- convention with a custom translation rule using the
- <code>--type-regex</code> option:</p>
-
- <pre class="terminal">
-$ xsd cxx-tree --type-naming ucc --type-regex '/ (.+)_t/\u$1/' hello.xsd
- </pre>
-
- <p>This results in the following changes to the generated code:</p>
-
- <pre class="c++">
-class Hello
-{
-public:
- // greeting
- //
- typedef xml_schema::String GreetingType;
-
- const GreetingType&amp;
- greeting () const;
-
- GreetingType&amp;
- greeting ();
-
- void
- greeting (const GreetingType&amp; x);
-
- // name
- //
- typedef xml_schema::String NameType;
- typedef xsd::sequence&lt;NameType> NameSequence;
- typedef NameSequence::iterator NameIterator;
- typedef NameSequence::const_iterator NameConstIterator;
-
- const NameSequence&amp;
- name () const;
-
- NameSequence&amp;
- name ();
-
- void
- name (const NameSequence&amp; s);
-
- // Constructor.
- //
- Hello (const GreetingType&amp;);
-
- ...
-
-};
-
-std::auto_ptr&lt;Hello>
-hello (const std::string&amp; uri);
-
-std::auto_ptr&lt;Hello>
-hello (std::istream&amp;);
- </pre>
-
- <p>For more detailed information on the <code>--type-naming</code>,
- <code>--function-naming</code>, <code>--type-regex</code>, and
- other <code>--*-regex</code> options refer to the NAMING
- CONVENTION section in the <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a>.</p>
-
- <h2><a name="2.7">2.7 Generating Documentation</a></h2>
-
- <p>While our object model is quite simple, real-world vocabularies
- can be quite complex with hundreds of types, elements, and
- attributes. For such vocabularies figuring out which types
- provide which member functions by studying the generated
- source code or schemas can be a daunting task. To provide
- application developers with a more accessible way of
- understanding the generated object models, the XSD compiler
- can be instructed to produce source code with documentation
- comments in the Doxygen format. Then the source code can be
- processed with the <a href="http://www.doxygen.org">Doxygen</a>
- documentation system to extract this information and produce
- documentation in various formats.
- </p>
-
- <p>In this section we will see how to generate documentation
- for our "Hello World" vocabulary. To showcase the full power
- of the XSD documentation facilities, we will first document
- our schema. The XSD compiler will then transfer
- this information from the schema to the generated code and
- then to the object model documentation. Note that the
- documentation in the schema is not required for XSD to
- generate useful documentation. Below you will find
- our <code>hello.xsd</code> with added documentation:</p>
-
- <pre class="xml">
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:complexType name="hello_t">
-
- &lt;xs:annotation>
- &lt;xs:documentation>
- The hello_t type consists of a greeting phrase and a
- collection of names to which this greeting applies.
- &lt;/xs:documentation>
- &lt;/xs:annotation>
-
- &lt;xs:sequence>
-
- &lt;xs:element name="greeting" type="xs:string">
- &lt;xs:annotation>
- &lt;xs:documentation>
- The greeting element contains the greeting phrase
- for this hello object.
- &lt;/xs:documentation>
- &lt;/xs:annotation>
- &lt;/xs:element>
-
- &lt;xs:element name="name" type="xs:string" maxOccurs="unbounded">
- &lt;xs:annotation>
- &lt;xs:documentation>
- The name elements contains names to be greeted.
- &lt;/xs:documentation>
- &lt;/xs:annotation>
- &lt;/xs:element>
-
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:element name="hello" type="hello_t">
- &lt;xs:annotation>
- &lt;xs:documentation>
- The hello element is a root of the Hello XML vocabulary.
- Every conforming document should start with this element.
- &lt;/xs:documentation>
- &lt;/xs:annotation>
- &lt;/xs:element>
-
-&lt;/xs:schema>
- </pre>
-
- <p>The first step in obtaining the documentation is to recompile
- our schema with the <code>--generate-doxygen</code> option:</p>
-
- <pre class="terminal">
-$ xsd cxx-tree --generate-serialization --generate-doxygen hello.xsd
- </pre>
-
- <p>Now the generated <code>hello.hxx</code> file contains comments
- in the Doxygen format. The next step is to process this file
- with the Doxygen documentation system. If your project does
- not use Doxygen then you first need to create a configuration
- file for your project:</p>
-
- <pre class="terminal">
-$ doxygen -g hello.doxygen
- </pre>
-
- <p>You only need to perform this step once. Now we can generate
- the documentation by executing the following command in the
- directory with the generated source code:</p>
-
- <pre class="terminal">
-$ doxygen hello.doxygen
- </pre>
-
- <p>While the generated documentation can be useful as is, we can
- go one step further and link (using the Doxygen tags mechanism)
- the documentation for our object model with the documentation
- for the XSD runtime library which defines C++ classes for the
- built-in XML Schema types. This way we can seamlessly browse
- between documentation for the <code>hello_t</code> class which
- is generated by the XSD compiler and the <code>xml_schema::string</code>
- class which is defined in the XSD runtime library. The Doxygen
- configuration file for the XSD runtime is provided with the XSD
- distribution.</p>
-
- <p>You can view the result of the steps described in this section
- on the <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/hello/html/annotated.html">Hello
- Example Documentation</a> page.</p>
-
- <!-- Chapater 3 -->
-
-
- <h1><a name="3">3 Overall Mapping Configuration</a></h1>
-
- <p>The C++/Tree mapping has a number of configuration parameters that
- determine the overall properties and behavior of the generated code.
- Configuration parameters are specified with the XSD command line
- options. This chapter describes configuration aspects that are most
- commonly encountered by application developers. These include: the
- C++ standard, the character type that is used by the generated code,
- handling of vocabularies that use XML Schema polymorphism, XML Schema
- to C++ namespace mapping, and thread safety. For more ways to configure
- the generated code refer to the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a>.
- </p>
-
- <h2><a name="3.1">3.1 C++ Standard</a></h2>
-
- <p>The C++/Tree mapping provides support for ISO/IEC C++ 1998/2003 (C++98)
- and ISO/IEC C++ 2011 (C++11). To select the C++ standard for the
- generated code we use the <code>--std</code> XSD compiler command
- line option. While the majority of the examples in this guide use
- C++98, support for the new functionality and library components
- introduced in C++11 are discussed throughout the document.</p>
-
- <h2><a name="3.2">3.2 Character Type and Encoding</a></h2>
-
- <p>The C++/Tree mapping has built-in support for two character types:
- <code>char</code> and <code>wchar_t</code>. You can select the
- character type with the <code>--char-type</code> command line
- option. The default character type is <code>char</code>. The
- character type affects all string and string-based types that
- are used in the mapping. These include the string-based built-in
- XML Schema types, exception types, stream types, etc.</p>
-
- <p>Another aspect of the mapping that depends on the character type
- is character encoding. For the <code>char</code> character type
- the default encoding is UTF-8. Other supported encodings are
- ISO-8859-1, Xerces-C++ Local Code Page (LPC), as well as
- custom encodings. You can select which encoding should be used
- in the object model with the <code>--char-encoding</code> command
- line option.</p>
-
- <p>For the <code>wchar_t</code> character type the encoding is
- automatically selected between UTF-16 and UTF-32/UCS-4 depending
- on the size of the <code>wchar_t</code> type. On some platforms
- (for example, Windows with Visual C++ and AIX with IBM XL C++)
- <code>wchar_t</code> is 2 bytes long. For these platforms the
- encoding is UTF-16. On other platforms <code>wchar_t</code> is 4 bytes
- long and UTF-32/UCS-4 is used.</p>
-
- <p>Note also that the character encoding that is used in the object model
- is independent of the encodings used in input and output XML. In fact,
- all three (object mode, input XML, and output XML) can have different
- encodings.</p>
-
- <h2><a name="3.3">3.3 Support for Polymorphism</a></h2>
-
- <p>By default XSD generates non-polymorphic code. If your vocabulary
- uses XML Schema polymorphism in the form of <code>xsi:type</code>
- and/or substitution groups, then you will need to compile
- your schemas with the <code>--generate-polymorphic</code> option
- to produce polymorphism-aware code. For more information on
- working with polymorphic object models, refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.11">Section 2.11,
- "Mapping for <code>xsi:type</code> and Substitution Groups"</a> in
- the C++/Tree Mapping User Manual.</p>
-
- <h2><a name="3.4">3.4 Namespace Mapping</a></h2>
-
- <p>XSD maps XML namespaces specified in the <code>targetNamespace</code>
- attribute in XML Schema to one or more nested C++ namespaces. By
- default, a namespace URI is mapped to a sequence of C++ namespace
- names by removing the protocol and host parts and splitting the
- rest into a sequence of names with <code>'/'</code> as the name
- separator.</p>
-
- <p>The default mapping of namespace URIs to C++ namespaces
- can be altered using the <code>--namespace-map</code> and
- <code>--namespace-regex</code> compiler options. For example,
- to map namespace URI <code>https://www.codesynthesis.com/my</code> to
- C++ namespace <code>cs::my</code>, we can use the following option:</p>
-
- <pre class="terminal">
---namespace-map https://www.codesynthesis.com/my=cs::my
- </pre>
-
- <p>A vocabulary without a namespace is mapped to the global scope. This
- also can be altered with the above options by using an empty name
- for the XML namespace:</p>
-
- <pre class="terminal">
---namespace-map =cs
- </pre>
-
- <h2><a name="3.5">3.5 Thread Safety</a></h2>
-
- <p>XSD-generated code is thread-safe in the sense that you can
- use different instantiations of the object model in several
- threads concurrently. This is possible due to the generated
- code not relying on any writable global variables. If you need
- to share the same object between several threads then you will
- need to provide some form of synchronization. One approach would
- be to use the generated code customization mechanisms to embed
- synchronization primitives into the generated C++ classes. For more
- information on generated code customization refer to the
- <a href="http://wiki.codesynthesis.com/Tree/Customization_guide">C++/Tree
- Mapping Customization Guide</a>.</p>
-
- <p>If you also would like to call parsing and/or serialization
- functions from several threads potentially concurrently, then
- you will need to make sure the Xerces-C++ runtime is initialized
- and terminated only once. The easiest way to do this is to
- initialize/terminate Xerces-C++ from <code>main()</code> when
- there are no threads yet/anymore:</p>
-
- <pre class="c++">
-#include &lt;xercesc/util/PlatformUtils.hpp>
-
-int
-main ()
-{
- xercesc::XMLPlatformUtils::Initialize ();
-
- {
- // Start/terminate threads and parse/serialize here.
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
-}
- </pre>
-
- <p>Because you initialize the Xerces-C++ runtime yourself you should
- also pass the <code>xml_schema::flags::dont_initialize</code> flag
- to parsing and serialization functions. See <a href="#5">Chapter 5,
- "Parsing"</a> and <a href="#6">Chapter 6, "Serialization"</a> for
- more information.</p>
-
-
- <!-- Chapater 4 -->
-
-
- <h1><a name="4">4 Working with Object Models</a></h1>
-
- <p>As we have seen in the previous chapters, the XSD compiler generates
- a C++ class for each type defined in XML Schema. Together these classes
- constitute an object model for an XML vocabulary. In this chapter we
- will take a closer look at different elements that comprise an
- object model class as well as how to create, access, and modify
- object models.</p>
-
- <p>In this and subsequent chapters we will use the following schema
- that describes a collection of person records. We save it in
- <code>people.xsd</code>:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:simpleType name="gender_t">
- &lt;xs:restriction base="xs:string">
- &lt;xs:enumeration value="male"/>
- &lt;xs:enumeration value="female"/>
- &lt;/xs:restriction>
- &lt;/xs:simpleType>
-
- &lt;xs:complexType name="person_t">
- &lt;xs:sequence>
- &lt;xs:element name="first-name" type="xs:string"/>
- &lt;xs:element name="middle-name" type="xs:string" minOccurs="0"/>
- &lt;xs:element name="last-name" type="xs:string"/>
- &lt;xs:element name="gender" type="gender_t"/>
- &lt;xs:element name="age" type="xs:short"/>
- &lt;/xs:sequence>
- &lt;xs:attribute name="id" type="xs:unsignedInt" use="required"/>
- &lt;/xs:complexType>
-
- &lt;xs:complexType name="people_t">
- &lt;xs:sequence>
- &lt;xs:element name="person" type="person_t" maxOccurs="unbounded"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;xs:element name="people" type="people_t"/>
-
-&lt;/xs:schema>
- </pre>
-
- <p>A sample XML instance to go along with this schema is saved
- in <code>people.xml</code>:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="people.xsd">
-
- &lt;person id="1">
- &lt;first-name>John&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>male&lt;/gender>
- &lt;age>32&lt;/age>
- &lt;/person>
-
- &lt;person id="2">
- &lt;first-name>Jane&lt;/first-name>
- &lt;middle-name>Mary&lt;/middle-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>female&lt;/gender>
- &lt;age>28&lt;/age>
- &lt;/person>
-
-&lt;/people>
- </pre>
-
- <p>Compiling <code>people.xsd</code> with the XSD compiler results
- in three generated C++ classes: <code>gender_t</code>,
- <code>person_t</code>, and <code>people_t</code>.
- The <code>gender_t</code> class is modelled after the C++
- <code>enum</code> type. Its definition is presented below:</p>
-
- <pre class="c++">
-class gender_t: public xml_schema::string
-{
-public:
- enum value
- {
- male,
- female
- };
-
- gender_t (value);
- gender_t (const xml_schema::string&amp;);
-
- gender_t&amp;
- operator= (value);
-
- operator value () const;
-};
- </pre>
-
- <p>The following listing shows how we can use this type:</p>
-
- <pre class="c++">
-gender_t m (gender_t::male);
-gender_t f ("female");
-
-if (m == "female" || f == gender_t::male)
-{
- ...
-}
-
-switch (m)
-{
-case gender_t::male:
- {
- ...
- }
-case gender_t::female:
- {
- ...
- }
-}
- </pre>
-
- <p>The other two classes will be examined in detail in the subsequent
- sections.</p>
-
- <h2><a name="4.1">4.1 Attribute and Element Cardinalities</a></h2>
-
- <p>As we have seen in the previous chapters, XSD generates a different
- set of type definitions and member functions for elements with
- different cardinalities. The C++/Tree mapping divides all the possible
- element and attribute cardinalities into three cardinality classes:
- <em>one</em>, <em>optional</em>, and <em>sequence</em>.</p>
-
- <p>The <em>one</em> cardinality class covers all elements that should
- occur exactly once as well as required attributes. In our
- example, the <code>first-name</code>, <code>last-name</code>,
- <code>gender</code>, and <code>age</code> elements as well as
- the <code>id</code> attribute belong to this cardinality class.
- The following code fragment shows type definitions as well as the
- accessor and modifier functions that are generated for the
- <code>gender</code> element in the <code>person_t</code> class:</p>
-
- <pre class="c++">
-class person_t
-{
- // gender
- //
- typedef gender_t gender_type;
-
- const gender_type&amp;
- gender () const;
-
- gender_type&amp;
- gender ();
-
- void
- gender (const gender_type&amp;);
-};
- </pre>
-
- <p>The <code>gender_type</code> type is an alias for the element's type.
- The first two accessor functions return read-only (constant) and
- read-write references to the element's value, respectively. The
- modifier function sets the new value for the element.</p>
-
- <p>The <em>optional</em> cardinality class covers all elements that
- can occur zero or one time as well as optional attributes. In our
- example, the <code>middle-name</code> element belongs to this
- cardinality class. The following code fragment shows the type
- definitions as well as the accessor and modifier functions that
- are generated for this element in the <code>person_t</code> class:</p>
-
- <pre class="c++">
-class person_t
-{
- // middle-name
- //
- typedef xml_schema::string middle_name_type;
- typedef xsd::optional&lt;middle_name_type> middle_name_optional;
-
- const middle_name_optional&amp;
- middle_name () const;
-
- middle_name_optional&amp;
- middle_name ();
-
- void
- middle_name (const middle_name_type&amp;);
-
- void
- middle_name (const middle_name_optional&amp;);
-};
- </pre>
-
- <p>As with the <code>gender</code> element, <code>middle_name_type</code>
- is an alias for the element's type. The <code>middle_name_optional</code>
- type is a container for the element's optional value. It can be queried
- for the presence of the value using the <code>present()</code> function.
- The value itself can be retrieved using the <code>get()</code>
- accessor and set using the <code>set()</code> modifier. The container
- can be reverted to the value not present state with the call to the
- <code>reset()</code> function. The following example shows how we
- can use this container:</p>
-
- <pre class="c++">
-person_t::middle_name_optional n ("John");
-
-if (n.present ())
-{
- cout &lt;&lt; n.get () &lt;&lt; endl;
-}
-
-n.set ("Jane");
-n.reset ();
- </pre>
-
-
- <p>Unlike the <em>one</em> cardinality class, the accessor functions
- for the <em>optional</em> class return read-only (constant) and
- read-write references to the container instead of the element's
- value directly. The modifier functions set the new value for the
- element.</p>
-
- <p>Finally, the <em>sequence</em> cardinality class covers all elements
- that can occur more than once. In our example, the
- <code>person</code> element in the <code>people_t</code> type
- belongs to this cardinality class. The following code fragment shows
- the type definitions as well as the accessor and modifier functions
- that are generated for this element in the <code>people_t</code>
- class:</p>
-
- <pre class="c++">
-class people_t
-{
- // person
- //
- typedef person_t person_type;
- typedef xsd::sequence&lt;person_type> person_sequence;
- typedef person_sequence::iterator person_iterator;
- typedef person_sequence::const_iterator person_const_iterator;
-
- const person_sequence&amp;
- person () const;
-
- person_sequence&amp;
- person ();
-
- void
- person (const person_sequence&amp;);
-};
- </pre>
-
- <p>Identical to the other cardinality classes, <code>person_type</code>
- is an alias for the element's type. The <code>person_sequence</code>
- type is a sequence container for the element's values. It is based
- on and has the same interface as <code>std::vector</code> and
- therefore can be used in similar ways. The <code>person_iterator</code>
- and <code>person_const_iterator</code> types are read-only
- (constant) and read-write iterators for the <code>person_sequence</code>
- container.</p>
-
- <p>Similar to the <em>optional</em> cardinality class, the
- accessor functions for the <em>sequence</em> class return
- read-only (constant) and read-write references to the sequence
- container. The modifier functions copies the entries from
- the passed sequence.</p>
-
- <p>C++/Tree is a "flattening" mapping in a sense that many levels of
- nested compositors (<code>choice</code> and <code>sequence</code>),
- all potentially with their own cardinalities, are in the end mapped
- to a flat set of elements with one of the three cardinality classes
- discussed above. While this results in a simple and easy to use API
- for most types, in certain cases, the order of elements in the actual
- XML documents is not preserved once parsed into the object model. To
- overcome this limitation we can mark certain schema types, for which
- content order is not sufficiently preserved, as ordered. For more
- information on this functionality refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.8.4">Section
- 2.8.4, "Element Order"</a> in the C++/Tree Mapping User Manual.</p>
-
- <p>For complex schemas with many levels of nested compositors
- (<code>choice</code> and <code>sequence</code>) it can also
- be hard to deduce the cardinality class of a particular element.
- The generated Doxygen documentation can greatly help with
- this task. For each element and attribute the documentation
- clearly identifies its cardinality class. Alternatively, you
- can study the generated header files to find out the cardinality
- class of a particular attribute or element.</p>
-
- <p>In the next sections we will examine how to access and modify
- information stored in an object model using accessor and modifier
- functions described in this section.</p>
-
- <h2><a name="4.2">4.2 Accessing the Object Model</a></h2>
-
- <p>In this section we will learn how to get to the information
- stored in the object model for our person records vocabulary.
- The following application accesses and prints the contents
- of the <code>people.xml</code> file:</p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include "people.hxx"
-
-using namespace std;
-
-int
-main ()
-{
- auto_ptr&lt;people_t> ppl (people ("people.xml"));
-
- // Iterate over individual person records.
- //
- people_t::person_sequence&amp; ps (ppl->person ());
-
- for (people_t::person_iterator i (ps.begin ()); i != ps.end (); ++i)
- {
- person_t&amp; p (*i);
-
- // Print names: first-name and last-name are required elements,
- // middle-name is optional.
- //
- cout &lt;&lt; "name: " &lt;&lt; p.first_name () &lt;&lt; " ";
-
- if (p.middle_name ().present ())
- cout &lt;&lt; p.middle_name ().get () &lt;&lt; " ";
-
- cout &lt;&lt; p.last_name () &lt;&lt; endl;
-
- // Print gender, age, and id which are all required.
- //
- cout &lt;&lt; "gender: " &lt;&lt; p.gender () &lt;&lt; endl
- &lt;&lt; "age: " &lt;&lt; p.age () &lt;&lt; endl
- &lt;&lt; "id: " &lt;&lt; p.id () &lt;&lt; endl
- &lt;&lt; endl;
- }
-}
- </pre>
-
- <p>This code shows common patterns of accessing elements and attributes
- with different cardinality classes. For the sequence element
- (<code>person</code> in <code>people_t</code>) we first obtain a
- reference to the container and then iterate over individual
- records. The values of elements and attributes with the
- <em>one</em> cardinality class (<code>first-name</code>,
- <code>last-name</code>, <code>gender</code>, <code>age</code>,
- and <code>id</code>) can be obtained directly by calling the
- corresponding accessor functions. For the optional element
- <code>middle-name</code> we first check if the value is present
- and only then call <code>get()</code> to retrieve it.</p>
-
- <p>Note that when we want to reduce typing by creating a variable
- representing a fragment of the object model that we are currently
- working with (<code>ps</code> and <code>p</code> above), we obtain
- a reference to that fragment instead of making a potentially
- expensive copy. This is generally a good rule to follow when
- creating high-performance applications.</p>
-
- <p>If we run the above application on our sample
- <code>people.xml</code>, the output looks as follows:</p>
-
- <pre class="terminal">
-name: John Doe
-gender: male
-age: 32
-id: 1
-
-name: Jane Mary Doe
-gender: female
-age: 28
-id: 2
- </pre>
-
-
- <h2><a name="4.3">4.3 Modifying the Object Model</a></h2>
-
- <p>In this section we will learn how to modify the information
- stored in the object model for our person records vocabulary.
- The following application changes the contents of the
- <code>people.xml</code> file:</p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include "people.hxx"
-
-using namespace std;
-
-int
-main ()
-{
- auto_ptr&lt;people_t> ppl (people ("people.xml"));
-
- // Iterate over individual person records and increment
- // the age.
- //
- people_t::person_sequence&amp; ps (ppl->person ());
-
- for (people_t::person_iterator i (ps.begin ()); i != ps.end (); ++i)
- {
- // Alternative way: i->age ()++;
- //
- i->age (i->age () + 1);
- }
-
- // Add middle-name to the first record and remove it from
- // the second.
- //
- person_t&amp; john (ps[0]);
- person_t&amp; jane (ps[1]);
-
- john.middle_name ("Mary");
- jane.middle_name ().reset ();
-
- // Add another John record.
- //
- ps.push_back (john);
-
- // Serialize the modified object model to XML.
- //
- xml_schema::namespace_infomap map;
- map[""].name = "";
- map[""].schema = "people.xsd";
-
- people (cout, *ppl, map);
-}
- </pre>
-
- <p>The first modification the above application performs is iterating
- over person records and incrementing the age value. This code
- fragment shows how to modify the value of a required attribute
- or element. The next modification shows how to set a new value
- for the optional <code>middle-name</code> element as well
- as clear its value. Finally the example adds a copy of the
- John Doe record to the <code>person</code> element sequence.</p>
-
- <p>Note that in this case using references for the <code>ps</code>,
- <code>john</code>, and <code>jane</code> variables is no longer
- a performance improvement but a requirement for the application
- to function correctly. If we hadn't used references, all our changes
- would have been made on copies without affecting the object model.</p>
-
- <p>If we run the above application on our sample <code>people.xml</code>,
- the output looks as follows:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0"?>
-&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="people.xsd">
-
- &lt;person id="1">
- &lt;first-name>John&lt;/first-name>
- &lt;middle-name>Mary&lt;/middle-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>male&lt;/gender>
- &lt;age>33&lt;/age>
- &lt;/person>
-
- &lt;person id="2">
- &lt;first-name>Jane&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>female&lt;/gender>
- &lt;age>29&lt;/age>
- &lt;/person>
-
- &lt;person id="1">
- &lt;first-name>John&lt;/first-name>
- &lt;middle-name>Mary&lt;/middle-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>male&lt;/gender>
- &lt;age>33&lt;/age>
- &lt;/person>
-
-&lt;/people>
- </pre>
-
-
- <h2><a name="4.4">4.4 Creating the Object Model from Scratch</a></h2>
-
- <p>In this section we will learn how to create a new object model
- for our person records vocabulary. The following application
- recreates the content of the original <code>people.xml</code>
- file:</p>
-
- <pre class="c++">
-#include &lt;iostream>
-#include "people.hxx"
-
-using namespace std;
-
-int
-main ()
-{
- people_t ppl;
- people_t::person_sequence&amp; ps (ppl.person ());
-
- // Add the John Doe record.
- //
- ps.push_back (
- person_t ("John", // first-name
- "Doe", // last-name
- gender_t::male, // gender
- 32, // age
- 1));
-
- // Add the Jane Doe record.
- //
- ps.push_back (
- person_t ("Jane", // first-name
- "Doe", // last-name
- gender_t::female, // gender
- 28, // age
- 2)); // id
-
- // Add middle name to the Jane Doe record.
- //
- person_t&amp; jane (ps.back ());
- jane.middle_name ("Mary");
-
- // Serialize the object model to XML.
- //
- xml_schema::namespace_infomap map;
- map[""].name = "";
- map[""].schema = "people.xsd";
-
- people (cout, ppl, map);
-}
- </pre>
-
- <p>The only new part in the above application is the calls
- to the <code>people_t</code> and <code>person_t</code>
- constructors. As a general rule, for each C++ class
- XSD generates a constructor with initializers
- for each element and attribute belonging to the <em>one</em>
- cardinality class. For our vocabulary, the following
- constructors are generated:</p>
-
- <pre class="c++">
-class person_t
-{
- person_t (const first_name_type&amp;,
- const last_name_type&amp;,
- const gender_type&amp;,
- const age_type&amp;,
- const id_type&amp;);
-};
-
-class people_t
-{
- people_t ();
-};
- </pre>
-
- <p>Note also that we set the <code>middle-name</code> element
- on the Jane Doe record by obtaining a reference to that record
- in the object model and setting the <code>middle-name</code>
- value on it. This is a general rule that should be followed
- in order to obtain the best performance: if possible,
- direct modifications to the object model should be preferred
- to modifications on temporaries with subsequent copying. The
- following code fragment shows a semantically equivalent but
- slightly slower version:</p>
-
- <pre class="c++">
-// Add the Jane Doe record.
-//
-person_t jane ("Jane", // first-name
- "Doe", // last-name
- gender_t::female, // gender
- 28, // age
- 2); // id
-
-jane.middle_name ("Mary");
-
-ps.push_back (jane);
- </pre>
-
- <p>We can also go one step further to reduce copying and improve
- the performance of our application by using the non-copying
- <code>push_back()</code> function which assumes ownership
- of the passed objects:</p>
-
- <pre class="c++">
-// Add the John Doe record. C++98 version.
-//
-auto_ptr&lt;person_t> john_p (
- new person_t ("John", // first-name
- "Doe", // last-name
- gender_t::male, // gender
- 32, // age
- 1));
-ps.push_back (john_p); // assumes ownership
-
-// Add the Jane Doe record. C++11 version
-//
-unique_ptr&lt;person_t> jane_p (
- new person_t ("Jane", // first-name
- "Doe", // last-name
- gender_t::female, // gender
- 28, // age
- 2)); // id
-ps.push_back (std::move (jane_p)); // assumes ownership
- </pre>
-
- <p>For more information on the non-copying modifier functions refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.8">Section
- 2.8, "Mapping for Local Elements and Attributes"</a> in the C++/Tree Mapping
- User Manual. The above application produces the following output:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="people.xsd">
-
- &lt;person id="1">
- &lt;first-name>John&lt;/first-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>male&lt;/gender>
- &lt;age>32&lt;/age>
- &lt;/person>
-
- &lt;person id="2">
- &lt;first-name>Jane&lt;/first-name>
- &lt;middle-name>Mary&lt;/middle-name>
- &lt;last-name>Doe&lt;/last-name>
- &lt;gender>female&lt;/gender>
- &lt;age>28&lt;/age>
- &lt;/person>
-
-&lt;/people>
- </pre>
-
- <h2><a name="4.5">4.5 Mapping for the Built-in XML Schema Types</a></h2>
-
- <p>Our person record vocabulary uses several built-in XML Schema
- types: <code>string</code>, <code>short</code>, and
- <code>unsignedInt</code>. Until now we haven't talked about
- the mapping of built-in XML Schema types to C++ types and how
- to work with them. This section provides an overview
- of the built-in types. For more detailed information refer
- to <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.5">Section
- 2.5, "Mapping for Built-in Data Types"</a> in the C++/Tree Mapping
- User Manual.</p>
-
- <p>In XML Schema, built-in types are defined in the XML Schema namespace.
- By default, the C++/Tree mapping maps this namespace to C++
- namespace <code>xml_schema</code> (this mapping can be altered
- with the <code>--namespace-map</code> option). The following table
- summarizes the mapping of XML Schema built-in types to C++ types:</p>
-
- <!-- border="1" is necessary for html2ps -->
- <table id="builtin" border="1">
- <tr>
- <th>XML Schema type</th>
- <th>Alias in the <code>xml_schema</code> namespace</th>
- <th>C++ type</th>
- </tr>
-
- <tr>
- <th colspan="3">fixed-length integral types</th>
- </tr>
- <!-- 8-bit -->
- <tr>
- <td><code>byte</code></td>
- <td><code>byte</code></td>
- <td><code>signed&nbsp;char</code></td>
- </tr>
- <tr>
- <td><code>unsignedByte</code></td>
- <td><code>unsigned_byte</code></td>
- <td><code>unsigned&nbsp;char</code></td>
- </tr>
-
- <!-- 16-bit -->
- <tr>
- <td><code>short</code></td>
- <td><code>short_</code></td>
- <td><code>short</code></td>
- </tr>
- <tr>
- <td><code>unsignedShort</code></td>
- <td><code>unsigned_short</code></td>
- <td><code>unsigned&nbsp;short</code></td>
- </tr>
-
- <!-- 32-bit -->
- <tr>
- <td><code>int</code></td>
- <td><code>int_</code></td>
- <td><code>int</code></td>
- </tr>
- <tr>
- <td><code>unsignedInt</code></td>
- <td><code>unsigned_int</code></td>
- <td><code>unsigned&nbsp;int</code></td>
- </tr>
-
- <!-- 64-bit -->
- <tr>
- <td><code>long</code></td>
- <td><code>long_</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>unsignedLong</code></td>
- <td><code>unsigned_long</code></td>
- <td><code>unsigned&nbsp;long&nbsp;long</code></td>
- </tr>
-
- <tr>
- <th colspan="3">arbitrary-length integral types</th>
- </tr>
- <tr>
- <td><code>integer</code></td>
- <td><code>integer</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>nonPositiveInteger</code></td>
- <td><code>non_positive_integer</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>nonNegativeInteger</code></td>
- <td><code>non_negative_integer</code></td>
- <td><code>unsigned long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>positiveInteger</code></td>
- <td><code>positive_integer</code></td>
- <td><code>unsigned long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>negativeInteger</code></td>
- <td><code>negative_integer</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
-
- <tr>
- <th colspan="3">boolean types</th>
- </tr>
- <tr>
- <td><code>boolean</code></td>
- <td><code>boolean</code></td>
- <td><code>bool</code></td>
- </tr>
-
- <tr>
- <th colspan="3">fixed-precision floating-point types</th>
- </tr>
- <tr>
- <td><code>float</code></td>
- <td><code>float_</code></td>
- <td><code>float</code></td>
- </tr>
- <tr>
- <td><code>double</code></td>
- <td><code>double_</code></td>
- <td><code>double</code></td>
- </tr>
-
- <tr>
- <th colspan="3">arbitrary-precision floating-point types</th>
- </tr>
- <tr>
- <td><code>decimal</code></td>
- <td><code>decimal</code></td>
- <td><code>double</code></td>
- </tr>
-
- <tr>
- <th colspan="3">string types</th>
- </tr>
- <tr>
- <td><code>string</code></td>
- <td><code>string</code></td>
- <td>type derived from <code>std::basic_string</code></td>
- </tr>
- <tr>
- <td><code>normalizedString</code></td>
- <td><code>normalized_string</code></td>
- <td>type derived from <code>string</code></td>
- </tr>
- <tr>
- <td><code>token</code></td>
- <td><code>token</code></td>
- <td>type&nbsp;derived&nbsp;from&nbsp;<code>normalized_string</code></td>
- </tr>
- <tr>
- <td><code>Name</code></td>
- <td><code>name</code></td>
- <td>type derived from <code>token</code></td>
- </tr>
- <tr>
- <td><code>NMTOKEN</code></td>
- <td><code>nmtoken</code></td>
- <td>type derived from <code>token</code></td>
- </tr>
- <tr>
- <td><code>NMTOKENS</code></td>
- <td><code>nmtokens</code></td>
- <td>type derived from <code>sequence&lt;nmtoken></code></td>
- </tr>
- <tr>
- <td><code>NCName</code></td>
- <td><code>ncname</code></td>
- <td>type derived from <code>name</code></td>
- </tr>
- <tr>
- <td><code>language</code></td>
- <td><code>language</code></td>
- <td>type derived from <code>token</code></td>
- </tr>
-
- <tr>
- <th colspan="3">qualified name</th>
- </tr>
- <tr>
- <td><code>QName</code></td>
- <td><code>qname</code></td>
- <td><code>xml_schema::qname</code></td>
- </tr>
-
- <tr>
- <th colspan="3">ID/IDREF types</th>
- </tr>
- <tr>
- <td><code>ID</code></td>
- <td><code>id</code></td>
- <td>type derived from <code>ncname</code></td>
- </tr>
- <tr>
- <td><code>IDREF</code></td>
- <td><code>idref</code></td>
- <td>type derived from <code>ncname</code></td>
- </tr>
- <tr>
- <td><code>IDREFS</code></td>
- <td><code>idrefs</code></td>
- <td>type derived from <code>sequence&lt;idref></code></td>
- </tr>
-
- <tr>
- <th colspan="3">URI types</th>
- </tr>
- <tr>
- <td><code>anyURI</code></td>
- <td><code>uri</code></td>
- <td>type derived from <code>std::basic_string</code></td>
- </tr>
-
- <tr>
- <th colspan="3">binary types</th>
- </tr>
- <tr>
- <td><code>base64Binary</code></td>
- <td><code>base64_binary</code></td>
- <td><code>xml_schema::base64_binary</code></td>
- </tr>
- <tr>
- <td><code>hexBinary</code></td>
- <td><code>hex_binary</code></td>
- <td><code>xml_schema::hex_binary</code></td>
- </tr>
-
- <tr>
- <th colspan="3">date/time types</th>
- </tr>
- <tr>
- <td><code>date</code></td>
- <td><code>date</code></td>
- <td><code>xml_schema::date</code></td>
- </tr>
- <tr>
- <td><code>dateTime</code></td>
- <td><code>date_time</code></td>
- <td><code>xml_schema::date_time</code></td>
- </tr>
- <tr>
- <td><code>duration</code></td>
- <td><code>duration</code></td>
- <td><code>xml_schema::duration</code></td>
- </tr>
- <tr>
- <td><code>gDay</code></td>
- <td><code>gday</code></td>
- <td><code>xml_schema::gday</code></td>
- </tr>
- <tr>
- <td><code>gMonth</code></td>
- <td><code>gmonth</code></td>
- <td><code>xml_schema::gmonth</code></td>
- </tr>
- <tr>
- <td><code>gMonthDay</code></td>
- <td><code>gmonth_day</code></td>
- <td><code>xml_schema::gmonth_day</code></td>
- </tr>
- <tr>
- <td><code>gYear</code></td>
- <td><code>gyear</code></td>
- <td><code>xml_schema::gyear</code></td>
- </tr>
- <tr>
- <td><code>gYearMonth</code></td>
- <td><code>gyear_month</code></td>
- <td><code>xml_schema::gyear_month</code></td>
- </tr>
- <tr>
- <td><code>time</code></td>
- <td><code>time</code></td>
- <td><code>xml_schema::time</code></td>
- </tr>
-
- <tr>
- <th colspan="3">entity types</th>
- </tr>
- <tr>
- <td><code>ENTITY</code></td>
- <td><code>entity</code></td>
- <td>type derived from <code>name</code></td>
- </tr>
- <tr>
- <td><code>ENTITIES</code></td>
- <td><code>entities</code></td>
- <td>type derived from <code>sequence&lt;entity></code></td>
- </tr>
- </table>
-
- <p>As you can see from the table above a number of built-in
- XML Schema types are mapped to fundamental C++ types such
- as <code>int</code> or <code>bool</code>. All string-based
- XML Schema types are mapped to C++ types that are derived
- from either <code>std::string</code> or
- <code>std::wstring</code>, depending on the character
- type selected. For access and modification purposes these
- types can be treated as <code>std::string</code>. A number
- of built-in types, such as <code>qname</code>, the binary
- types, and the date/time types do not have suitable
- fundamental or standard C++ types to map to. As a result,
- these types are implemented from scratch in the XSD runtime.
- For more information on their interfaces refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.5">Section
- 2.5, "Mapping for Built-in Data Types"</a> in the C++/Tree Mapping
- User Manual.</p>
-
-
- <!-- Chapater 5 -->
-
-
- <h1><a name="5">5 Parsing</a></h1>
-
- <p>We have already seen how to parse XML to an object model in this guide
- before. In this chapter we will discuss the parsing topic in more
- detail.</p>
-
- <p>By default, the C++/Tree mapping provides a total of 14 overloaded
- parsing functions. They differ in the input methods used to
- read XML as well as the error reporting mechanisms. It is also possible
- to generate types for root elements instead of parsing and serialization
- functions. This may be useful if your XML vocabulary has multiple
- root elements. For more information on element types refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.9">Section
- 2.9, "Mapping for Global Elements"</a> in the C++/Tree Mapping User
- Manual.</p>
-
-
- <p>In this section we will discuss the most commonly used versions of
- the parsing functions. For a comprehensive description of parsing
- refer to <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#3">Chapter
- 3, "Parsing"</a> in the C++/Tree Mapping User Manual. For the <code>people</code>
- global element from our person record vocabulary, we will concentrate
- on the following three parsing functions:</p>
-
- <pre class="c++">
-std::[auto|unique]_ptr&lt;people_t>
-people (const std::string&amp; uri,
- xml_schema::flags f = 0,
- const xml_schema::properties&amp; p = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;people_t>
-people (std::istream&amp; is,
- xml_schema::flags f = 0,
- const xml_schema::properties&amp; p = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;people_t>
-people (std::istream&amp; is,
- const std::string&amp; resource_id,
- xml_schema::flags f = 0,
- const xml_schema::properties&amp; p = ::xml_schema::properties ());
- </pre>
-
- <p>The first function parses a local file or a URI. We have already
- used this parsing function in the previous chapters. The second
- and third functions read XML from a standard input stream. The
- last function also requires a resource id. This id is used to
- identify the XML document being parser in diagnostics messages
- as well as to resolve relative paths to other documents (for example,
- schemas) that might be referenced from the XML document.</p>
-
- <p>The last two arguments to all three parsing functions are parsing
- flags and properties. The flags argument provides a number of ways
- to fine-tune the parsing process. The properties argument allows
- to pass additional information to the parsing functions. We will
- use these two arguments in <a href="#5.1">Section 5.1, "XML Schema
- Validation and Searching"</a> below. All three functions return
- the object model as either <code>std::auto_ptr</code> (C++98) or
- <code>std::unique_ptr</code> (C++11), depending on the C++ standard
- selected (<code>--std</code> XSD compiler option). The following
- example shows how we can use the above parsing functions:</p>
-
- <pre class="c++">
-using std::auto_ptr;
-
-// Parse a local file or URI.
-//
-auto_ptr&lt;people_t> p1 (people ("people.xml"));
-auto_ptr&lt;people_t> p2 (people ("http://example.com/people.xml"));
-
-// Parse a local file via ifstream.
-//
-std::ifstream ifs ("people.xml");
-auto_ptr&lt;people_t> p3 (people (ifs, "people.xml"));
-
-// Parse an XML string.
-//
-std::string str ("..."); // XML in a string.
-std::istringstream iss (str);
-auto_ptr&lt;people_t> p4 (people (iss));
- </pre>
-
-
- <h2><a name="5.1">5.1 XML Schema Validation and Searching</a></h2>
-
- <p>The C++/Tree mapping relies on the underlying Xerces-C++ XML
- parser for full XML document validation. The XML Schema
- validation is enabled by default and can be disabled by
- passing the <code>xml_schema::flags::dont_validate</code>
- flag to the parsing functions, for example:</p>
-
- <pre class="c++">
-auto_ptr&lt;people_t> p (
- people ("people.xml", xml_schema::flags::dont_validate));
- </pre>
-
- <p>Even when XML Schema validation is disabled, the generated
- code still performs a number of checks to prevent
- construction of an inconsistent object model (for example, an
- object model with missing required attributes or elements).</p>
-
- <p>When XML Schema validation is enabled, the XML parser needs
- to locate a schema to validate against. There are several
- methods to provide the schema location information to the
- parser. The easiest and most commonly used method is to
- specify schema locations in the XML document itself
- with the <code>schemaLocation</code> or
- <code>noNamespaceSchemaLocation</code> attributes, for example:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="people.xsd"
- xsi:schemaLocation="http://www.w3.org/XML/1998/namespace xml.xsd">
- </pre>
-
- <p>As you might have noticed, we used this method in all the sample XML
- documents presented in this guide up until now. Note that the
- schema locations specified with these two attributes are relative
- to the document's path unless they are absolute URIs (that is
- start with <code>http://</code>, <code>file://</code>, etc.).
- In particular, if you specify just file names as your schema
- locations, as we did above, then the schemas should reside in
- the same directory as the XML document itself.</p>
-
- <p>Another method of providing the schema location information
- is via the <code>xml_schema::properties</code> argument, as
- shown in the following example:</p>
-
- <pre class="c++">
-xml_schema::properties props;
-props.no_namespace_schema_location ("people.xsd");
-props.schema_location ("http://www.w3.org/XML/1998/namespace", "xml.xsd");
-
-auto_ptr&lt;people_t> p (people ("people.xml", 0, props));
- </pre>
-
- <p>The schema locations provided with this method overrides
- those specified in the XML document. As with the previous
- method, the schema locations specified this way are
- relative to the document's path unless they are absolute URIs.
- In particular, if you want to use local schemas that are
- not related to the document being parsed, then you will
- need to use the <code>file://</code> URI. The following
- example shows how to use schemas that reside in the current
- working directory:</p>
-
- <pre class="c++">
-#include &lt;unistd.h> // getcwd
-#include &lt;limits.h> // PATH_MAX
-
-char cwd[PATH_MAX];
-if (getcwd (cwd, PATH_MAX) == 0)
-{
- // Buffer too small?
-}
-
-xml_schema::properties props;
-
-props.no_namespace_schema_location (
- "file:///" + std::string (cwd) + "/people.xsd");
-
-props.schema_location (
- "http://www.w3.org/XML/1998/namespace",
- "file:///" + std::string (cwd) + "/xml.xsd");
-
-auto_ptr&lt;people_t> p (people ("people.xml", 0, props));
- </pre>
-
- <p>A third method is the most useful if you are planning to parse
- several XML documents of the same vocabulary. In that case
- it may be beneficial to pre-parse and cache the schemas in
- the XML parser which can then be used to parse all documents
- without re-parsing the schemas. For more information on
- this method refer to the <code>caching</code> example in the
- <code>examples/cxx/tree/</code> directory of the XSD
- distribution. It is also possible to convert the schemas into
- a pre-compiled binary representation and embed this representation
- directly into the application executable. With this approach your
- application can perform XML Schema validation without depending on
- any external schema files. For more information on how to achieve
- this refer to the <code>embedded</code> example in the
- <code>examples/cxx/tree/</code> directory of the XSD distribution.</p>
-
- <p>When the XML parser cannot locate a schema for the
- XML document, the validation fails and XML document
- elements and attributes for which schema definitions could
- not be located are reported in the diagnostics. For
- example, if we remove the <code>noNamespaceSchemaLocation</code>
- attribute in <code>people.xml</code> from the previous chapter,
- then we will get the following diagnostics if we try to parse
- this file with validation enabled:</p>
-
- <pre class="terminal">
-people.xml:2:63 error: no declaration found for element 'people'
-people.xml:4:18 error: no declaration found for element 'person'
-people.xml:4:18 error: attribute 'id' is not declared for element 'person'
-people.xml:5:17 error: no declaration found for element 'first-name'
-people.xml:6:18 error: no declaration found for element 'middle-name'
-people.xml:7:16 error: no declaration found for element 'last-name'
-people.xml:8:13 error: no declaration found for element 'gender'
-people.xml:9:10 error: no declaration found for element 'age'
- </pre>
-
- <h2><a name="5.2">5.2 Error Handling</a></h2>
-
- <p>The parsing functions offer a number of ways to handle error conditions
- with the C++ exceptions being the most commonly used mechanism. All
- C++/Tree exceptions derive from common base <code>xml_schema::exception</code>
- which in turn derives from <code>std::exception</code>. The easiest
- way to uniformly handle all possible C++/Tree exceptions and print
- detailed information about the error is to catch and print
- <code>xml_schema::exception</code>, as shown in the following
- example:</p>
-
- <pre class="c++">
-try
-{
- auto_ptr&lt;people_t> p (people ("people.xml"));
-}
-catch (const xml_schema::exception&amp; e)
-{
- cerr &lt;&lt; e &lt;&lt; endl;
-}
- </pre>
-
- <p>Each individual C++/Tree exception also allows you to obtain
- error details programmatically. For example, the
- <code>xml_schema::parsing</code> exception is thrown when
- the XML parsing and validation in the underlying XML parser
- fails. It encapsulates various diagnostics information
- such as the file name, line and column numbers, as well as the
- error or warning message for each entry. For more information
- about this and other exceptions that can be thrown during
- parsing, refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#3.3">Section
- 3.3, "Error Handling"</a> in the C++/Tree Mapping
- User Manual.</p>
-
- <p>Note that if you are parsing <code>std::istream</code> on which
- exceptions are not enabled, then you will need to check the
- stream state after the call to the parsing function in order
- to detect any possible stream failures, for example:</p>
-
- <pre class="c++">
-std::ifstream ifs ("people.xml");
-
-if (ifs.fail ())
-{
- cerr &lt;&lt; "people.xml: unable to open" &lt;&lt; endl;
- return 1;
-}
-
-auto_ptr&lt;people_t> p (people (ifs, "people.xml"));
-
-if (ifs.fail ())
-{
- cerr &lt;&lt; "people.xml: read error" &lt;&lt; endl;
- return 1;
-}
- </pre>
-
- <p>The above example can be rewritten to use exceptions as
- shown below:</p>
-
- <pre class="c++">
-try
-{
- std::ifstream ifs;
- ifs.exceptions (std::ifstream::badbit | std::ifstream::failbit);
- ifs.open ("people.xml");
-
- auto_ptr&lt;people_t> p (people (ifs, "people.xml"));
-}
-catch (const std::ifstream::failure&amp;)
-{
- cerr &lt;&lt; "people.xml: unable to open or read error" &lt;&lt; endl;
- return 1;
-}
- </pre>
-
-
- <!-- Chapater 6 -->
-
-
- <h1><a name="6">6 Serialization</a></h1>
-
- <p>We have already seen how to serialize an object model back to XML
- in this guide before. In this chapter we will discuss the
- serialization topic in more detail.</p>
-
- <p>By default, the C++/Tree mapping provides a total of 8 overloaded
- serialization functions. They differ in the output methods used to write
- XML as well as the error reporting mechanisms. It is also possible to
- generate types for root elements instead of parsing and serialization
- functions. This may be useful if your XML vocabulary has multiple
- root elements. For more information on element types refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.9">Section
- 2.9, "Mapping for Global Elements"</a> in the C++/Tree Mapping User
- Manual.</p>
-
-
- <p>In this section we will discuss the most commonly
- used version of serialization functions. For a comprehensive description
- of serialization refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#4">Chapter
- 4, "Serialization"</a> in the C++/Tree Mapping User Manual. For the
- <code>people</code> global element from our person record vocabulary,
- we will concentrate on the following serialization function:</p>
-
- <pre class="c++">
-void
-people (std::ostream&amp; os,
- const people_t&amp; x,
- const xml_schema::namespace_infomap&amp; map =
- xml_schema::namespace_infomap (),
- const std::string&amp; encoding = "UTF-8",
- xml_schema::flags f = 0);
- </pre>
-
- <p>This function serializes the object model passed as the second
- argument to the standard output stream passed as the first
- argument. The third argument is a namespace information map
- which we will discuss in more detail in the next section.
- The fourth argument is a character encoding that the resulting
- XML document should be in. Possible valid values for this
- argument are "US-ASCII", "ISO8859-1", "UTF-8", "UTF-16BE",
- "UTF-16LE", "UCS-4BE", and "UCS-4LE". Finally, the flags
- argument allows fine-tuning of the serialization process.
- The following example shows how we can use the above serialization
- function:</p>
-
- <pre class="c++">
-people_t&amp; p = ...
-
-xml_schema::namespace_infomap map;
-map[""].schema = "people.xsd";
-
-// Serialize to stdout.
-//
-people (std::cout, p, map);
-
-// Serialize to a file.
-//
-std::ofstream ofs ("people.xml");
-people (ofs, p, map);
-
-// Serialize to a string.
-//
-std::ostringstream oss;
-people (oss, p, map);
-std::string xml (oss.str ());
- </pre>
-
-
- <h2><a name="6.1">6.1 Namespace and Schema Information</a></h2>
-
- <p>While XML serialization can be done just from the object
- model alone, it is often desirable to assign meaningful
- prefixes to XML namespaces used in the vocabulary as
- well as to provide the schema location information.
- This is accomplished by passing the namespace information
- map to the serialization function. The key in this map is
- a namespace prefix that should be assigned to an XML namespace
- specified in the <code>name</code> variable of the
- map value. You can also assign an optional schema location for
- this namespace in the <code>schema</code> variable. Based
- on each key-value entry in this map, the serialization
- function adds two attributes to the resulting XML document:
- the namespace-prefix mapping attribute and schema location
- attribute. The empty prefix indicates that the namespace
- should be mapped without a prefix. For example, the following
- map:</p>
-
- <pre class="c++">
-xml_schema::namespace_infomap map;
-
-map[""].name = "http://www.example.com/example";
-map[""].schema = "example.xsd";
-
-map["x"].name = "http://www.w3.org/XML/1998/namespace";
-map["x"].schema = "xml.xsd";
- </pre>
-
- <p>Results in the following XML document:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;example
- xmlns="http://www.example.com/example"
- xmlns:x="http://www.w3.org/XML/1998/namespace"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/example example.xsd
- http://www.w3.org/XML/1998/namespace xml.xsd">
- </pre>
-
- <p>The empty namespace indicates that the vocabulary has no target
- namespace. For example, the following map results in only the
- <code>noNamespaceSchemaLocation</code> attribute being added:</p>
-
- <pre class="c++">
-xml_schema::namespace_infomap map;
-
-map[""].name = "";
-map[""].schema = "example.xsd";
- </pre>
-
- <h2><a name="6.2">6.2 Error Handling</a></h2>
-
- <p>Similar to the parsing functions, the serialization functions offer a
- number of ways to handle error conditions with the C++ exceptions being
- the most commonly used mechanisms. As with parsing, the easiest way to
- uniformly handle all possible serialization exceptions and print
- detailed information about the error is to catch and print
- <code>xml_schema::exception</code>:</p>
-
- <pre class="c++">
-try
-{
- people_t&amp; p = ...
-
- xml_schema::namespace_infomap map;
- map[""].schema = "people.xsd";
-
- people (std::cout, p, map));
-}
-catch (const xml_schema::exception&amp; e)
-{
- cerr &lt;&lt; e &lt;&lt; endl;
-}
- </pre>
-
- <p>The most commonly encountered serialization exception is
- <code>xml_schema::serialization</code>. It is thrown
- when the XML serialization in the underlying XML writer
- fails. It encapsulates various diagnostics information
- such as the file name, line and column numbers, as well as the
- error or warning message for each entry. For more information
- about this and other exceptions that can be thrown during
- serialization, refer to
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#4.4">Section
- 4.4, "Error Handling"</a> in the C++/Tree Mapping
- User Manual.</p>
-
- <p>Note that if you are serializing to <code>std::ostream</code> on
- which exceptions are not enabled, then you will need to check the
- stream state after the call to the serialization function in order
- to detect any possible stream failures, for example:</p>
-
- <pre class="c++">
-std::ofstream ofs ("people.xml");
-
-if (ofs.fail ())
-{
- cerr &lt;&lt; "people.xml: unable to open" &lt;&lt; endl;
- return 1;
-}
-
-people (ofs, p, map));
-
-if (ofs.fail ())
-{
- cerr &lt;&lt; "people.xml: write error" &lt;&lt; endl;
- return 1;
-}
- </pre>
-
- <p>The above example can be rewritten to use exceptions as
- shown below:</p>
-
- <pre class="c++">
-try
-{
- std::ofstream ofs;
- ofs.exceptions (std::ofstream::badbit | std::ofstream::failbit);
- ofs.open ("people.xml");
-
- people (ofs, p, map));
-}
-catch (const std::ofstream::failure&amp;)
-{
- cerr &lt;&lt; "people.xml: unable to open or write error" &lt;&lt; endl;
- return 1;
-}
- </pre>
-
- </div>
-</div>
-
-</body>
-</html>
diff --git a/doc/cxx/tree/guide/makefile b/doc/cxx/tree/guide/makefile
deleted file mode 100644
index 3b95fff..0000000
--- a/doc/cxx/tree/guide/makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# file : doc/cxx/tree/guide/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(out_base)/cxx-tree-guide.ps $(out_base)/cxx-tree-guide.pdf
-
-
-$(out_base)/cxx-tree-guide.ps: $(src_base)/index.xhtml \
- $(src_base)/guide.html2ps \
- | $(out_base)/.
- $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<)
-
-$(out_base)/cxx-tree-guide.pdf: $(out_base)/cxx-tree-guide.ps | $(out_base)/.
- $(call message,ps2pdf $<,ps2pdf14 $< $@)
-
-# Install & Dist.
-#
-$(install): path := $(subst $(src_root)/doc/,,$(src_base))
-$(dist): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(out_base)/cxx-tree-guide.ps $(out_base)/cxx-tree-guide.pdf
- $(call install-data,$(src_base)/index.xhtml,$(install_doc_dir)/xsd/$(path)/index.xhtml)
- $(call install-data,$(out_base)/cxx-tree-guide.ps,$(install_doc_dir)/xsd/$(path)/cxx-tree-guide.ps)
- $(call install-data,$(out_base)/cxx-tree-guide.pdf,$(install_doc_dir)/xsd/$(path)/cxx-tree-guide.pdf)
-
-$(dist): $(out_base)/cxx-tree-guide.ps $(out_base)/cxx-tree-guide.pdf
- $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml)
- $(call install-data,$(out_base)/cxx-tree-guide.ps,$(dist_prefix)/$(path)/cxx-tree-guide.ps)
- $(call install-data,$(out_base)/cxx-tree-guide.pdf,$(dist_prefix)/$(path)/cxx-tree-guide.pdf)
-
-$(dist-win): $(dist)
-
-
-# Clean
-#
-$(clean):
-ifneq ($(xsd_clean_gen),n)
- $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-guide.ps)
- $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-guide.pdf)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/install.make)
diff --git a/doc/cxx/tree/makefile b/doc/cxx/tree/makefile
deleted file mode 100644
index deb254c..0000000
--- a/doc/cxx/tree/makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# file : doc/cxx/tree/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-docs := guide manual
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(docs)))
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install): path := $(subst $(src_root)/doc/,,$(src_base))
-$(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(docs)))
- $(call install-dir,$(src_base)/reference,$(install_doc_dir)/xsd/$(path)/reference)
-
-$(dist-common):
- $(call install-dir,$(src_base)/reference,$(dist_prefix)/$(path)/reference)
-
-$(dist): $(dist-common) $(addprefix $(out_base)/,$(addsuffix /.dist,$(docs)))
-$(dist-win): $(dist-common) $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(docs)))
-
-# Clean.
-#
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(docs)))
-
-$(call include,$(bld_root)/install.make)
-
-$(foreach m,$(docs),$(call import,$(src_base)/$m/makefile))
diff --git a/doc/cxx/tree/manual/index.xhtml b/doc/cxx/tree/manual/index.xhtml
deleted file mode 100644
index 550c07e..0000000
--- a/doc/cxx/tree/manual/index.xhtml
+++ /dev/null
@@ -1,6822 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head>
- <title>C++/Tree Mapping User Manual</title>
-
- <meta name="copyright" content="&#169; 2009-2020 Code Synthesis Tools CC"/>
- <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,tree,serialization,guide,manual,examples"/>
- <meta name="description" content="C++/Tree Mapping User Manual"/>
- <meta name="revision" content="4.1.0"/>
-
- <link rel="stylesheet" type="text/css" href="../../../default.css" />
-
-<style type="text/css">
- pre {
- padding : 0 0 0 0em;
- margin : 0em 0em 0em 0;
-
- font-size : 102%
- }
-
- body {
- min-width: 48em;
- }
-
- h1 {
- font-weight: bold;
- font-size: 200%;
- }
-
- h2 {
- font-weight : bold;
- font-size : 150%;
-
- padding-top : 0.8em;
- }
-
- h3 {
- font-size : 130%;
- padding-top : 0.8em;
- }
-
- /* Adjust indentation for three levels. */
- #container {
- max-width: 48em;
- }
-
- #content {
- padding: 0 0.1em 0 4em;
- /*background-color: red;*/
- }
-
- #content h1 {
- margin-left: -2.06em;
- }
-
- #content h2 {
- margin-left: -1.33em;
- }
-
- /* Title page */
-
- #titlepage {
- padding: 2em 0 1em 0;
- border-bottom: 1px solid black;
- }
-
- #titlepage #title {
- font-weight: bold;
- font-size: 200%;
- text-align: center;
- padding: 1em 0 2em 0;
- }
-
- /* Lists */
- ul.list li {
- padding-top : 0.3em;
- padding-bottom : 0.3em;
- }
-
-
- /* Built-in table */
- #builtin {
- margin: 2em 0 2em 0;
-
- border-collapse : collapse;
- border : 1px solid;
- border-color : #000000;
-
- font-size : 11px;
- line-height : 14px;
- }
-
- #builtin th, #builtin td {
- border: 1px solid;
- padding : 0.9em 0.9em 0.7em 0.9em;
- }
-
- #builtin th {
- background : #cde8f6;
- }
-
- #builtin td {
- text-align: left;
- }
-
-
- /* default-fixed */
- #default-fixed {
- margin: 2em 0 2em 0;
-
- border-collapse : collapse;
- border : 1px solid;
- border-color : #000000;
-
- font-size : 11px;
- line-height : 14px;
- }
-
- #default-fixed th, #default-fixed td {
- border: 1px solid;
- padding : 0.9em 0.9em 0.7em 0.9em;
- }
-
- #default-fixed th {
- background : #cde8f6;
- }
-
- #default-fixed td {
- text-align: center;
- }
-
-
- /* */
- dl dt {
- padding : 0.8em 0 0 0;
- }
-
-
- /* TOC */
- table.toc {
- border-style : none;
- border-collapse : separate;
- border-spacing : 0;
-
- margin : 0.2em 0 0.2em 0;
- padding : 0 0 0 0;
- }
-
- table.toc tr {
- padding : 0 0 0 0;
- margin : 0 0 0 0;
- }
-
- table.toc * td, table.toc * th {
- border-style : none;
- margin : 0 0 0 0;
- vertical-align : top;
- }
-
- table.toc * th {
- font-weight : normal;
- padding : 0em 0.1em 0em 0;
- text-align : left;
- white-space : nowrap;
- }
-
- table.toc * table.toc th {
- padding-left : 1em;
- }
-
- table.toc * td {
- padding : 0em 0 0em 0.7em;
- text-align : left;
- }
-</style>
-
-
-</head>
-
-<body>
-<div id="container">
- <div id="content">
-
- <div class="noprint">
-
- <div id="titlepage">
- <div id="title">C++/Tree Mapping User Manual</div>
-
- <p>Copyright &#169; 2009-2020 Code Synthesis Tools CC.</p>
-
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the
- <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
- Documentation License, version 1.2</a>; with no Invariant Sections,
- no Front-Cover Texts and no Back-Cover Texts.
- </p>
-
- <p>This document is available in the following formats:
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/index.xhtml">XHTML</a>,
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf">PDF</a>, and
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps">PostScript</a>.</p>
- </div>
-
- <h1>Table of Contents</h1>
-
- <table class="toc">
- <tr>
- <th></th><td><a href="#0">Preface</a>
- <table class="toc">
- <tr><th></th><td><a href="#0.1">About This Document</a></td></tr>
- <tr><th></th><td><a href="#0.2">More Information</a></td></tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>1</th><td><a href="#1">Introduction</a></td>
- </tr>
-
- <tr>
- <th>2</th><td><a href="#2">C++/Tree Mapping</a>
- <table class="toc">
- <tr>
- <th>2.1</th><td><a href="#2.1">Preliminary Information</a>
- <table class="toc">
- <tr><th>2.1.1</th><td><a href="#2.1.1">C++ Standard</a></td></tr>
- <tr><th>2.1.2</th><td><a href="#2.1.2">Identifiers</a></td></tr>
- <tr><th>2.1.3</th><td><a href="#2.1.3">Character Type and Encoding</a></td></tr>
- <tr><th>2.1.4</th><td><a href="#2.1.4">XML Schema Namespace</a></td></tr>
- <tr><th>2.1.5</th><td><a href="#2.1.5">Anonymous Types</a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.2</th><td><a href="#2.2">Error Handling</a>
- <table class="toc">
- <tr><th>2.2.1</th><td><a href="#2.2.1"><code>xml_schema::duplicate_id</code></a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.3</th><td><a href="#2.3">Mapping for <code>import</code> and <code>include</code></a>
- <table class="toc">
- <tr><th>2.3.1</th><td><a href="#2.3.1">Import</a></td></tr>
- <tr><th>2.3.2</th><td><a href="#2.3.2">Inclusion with Target Namespace</a></td></tr>
- <tr><th>2.3.3</th><td><a href="#2.3.3">Inclusion without Target Namespace</a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.4</th><td><a href="#2.4">Mapping for Namespaces</a></td>
- </tr>
- <tr>
- <th>2.5</th><td><a href="#2.5">Mapping for Built-in Data Types</a>
- <table class="toc">
- <tr><th>2.5.1</th><td><a href="#2.5.1">Inheritance from Built-in Data Types</a></td></tr>
- <tr><th>2.5.2</th><td><a href="#2.5.2">Mapping for <code>anyType</code></a></td></tr>
- <tr><th>2.5.3</th><td><a href="#2.5.3">Mapping for <code>anySimpleType</code></a></td></tr>
- <tr><th>2.5.4</th><td><a href="#2.5.4">Mapping for <code>QName</code></a></td></tr>
- <tr><th>2.5.5</th><td><a href="#2.5.5">Mapping for <code>IDREF</code></a></td></tr>
- <tr><th>2.5.6</th><td><a href="#2.5.6">Mapping for <code>base64Binary</code> and <code>hexBinary</code></a></td></tr>
- <tr><th>2.5.7</th><td><a href="#2.5.7">Time Zone Representation</a></td></tr>
- <tr><th>2.5.8</th><td><a href="#2.5.8">Mapping for <code>date</code></a></td></tr>
- <tr><th>2.5.9</th><td><a href="#2.5.9">Mapping for <code>dateTime</code></a></td></tr>
- <tr><th>2.5.10</th><td><a href="#2.5.10">Mapping for <code>duration</code></a></td></tr>
- <tr><th>2.5.11</th><td><a href="#2.5.11">Mapping for <code>gDay</code></a></td></tr>
- <tr><th>2.5.12</th><td><a href="#2.5.12">Mapping for <code>gMonth</code></a></td></tr>
- <tr><th>2.5.13</th><td><a href="#2.5.13">Mapping for <code>gMonthDay</code></a></td></tr>
- <tr><th>2.5.14</th><td><a href="#2.5.14">Mapping for <code>gYear</code></a></td></tr>
- <tr><th>2.5.15</th><td><a href="#2.5.15">Mapping for <code>gYearMonth</code></a></td></tr>
- <tr><th>2.5.16</th><td><a href="#2.5.16">Mapping for <code>time</code></a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.6</th><td><a href="#2.6">Mapping for Simple Types</a>
- <table class="toc">
- <tr><th>2.6.1</th><td><a href="#2.6.1">Mapping for Derivation by Restriction</a></td></tr>
- <tr><th>2.6.2</th><td><a href="#2.6.2">Mapping for Enumerations</a></td></tr>
- <tr><th>2.6.3</th><td><a href="#2.6.3">Mapping for Derivation by List</a></td></tr>
- <tr><th>2.6.4</th><td><a href="#2.6.4">Mapping for Derivation by Union</a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.7</th><td><a href="#2.7">Mapping for Complex Types</a>
- <table class="toc">
- <tr><th>2.7.1</th><td><a href="#2.7.1">Mapping for Derivation by Extension</a></td></tr>
- <tr><th>2.7.2</th><td><a href="#2.7.2">Mapping for Derivation by Restriction</a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.8</th><td><a href="#2.8">Mapping for Local Elements and Attributes</a>
- <table class="toc">
- <tr><th>2.8.1</th><td><a href="#2.8.1">Mapping for Members with the One Cardinality Class</a></td></tr>
- <tr><th>2.8.2</th><td><a href="#2.8.2">Mapping for Members with the Optional Cardinality Class</a></td></tr>
- <tr><th>2.8.3</th><td><a href="#2.8.3">Mapping for Members with the Sequence Cardinality Class</a></td></tr>
- <tr><th>2.8.4</th><td><a href="#2.8.4">Element Order</a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.9</th><td><a href="#2.9">Mapping for Global Elements</a>
- <table class="toc">
- <tr><th>2.9.1</th><td><a href="#2.9.1">Element Types</a></td></tr>
- <tr><th>2.9.2</th><td><a href="#2.9.2">Element Map</a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.10</th><td><a href="#2.10">Mapping for Global Attributes</a></td>
- </tr>
- <tr>
- <th>2.11</th><td><a href="#2.11">Mapping for <code>xsi:type</code> and Substitution Groups</a></td>
- </tr>
- <tr>
- <th>2.12</th><td><a href="#2.12">Mapping for <code>any</code> and <code>anyAttribute</code></a>
- <table class="toc">
- <tr><th>2.12.1</th><td><a href="#2.12.1">Mapping for <code>any</code> with the One Cardinality Class</a></td></tr>
- <tr><th>2.12.2</th><td><a href="#2.12.2">Mapping for <code>any</code> with the Optional Cardinality Class</a></td></tr>
- <tr><th>2.12.3</th><td><a href="#2.12.3">Mapping for <code>any</code> with the Sequence Cardinality Class</a></td></tr>
- <tr><th>2.12.4</th><td><a href="#2.12.4">Element Wildcard Order</a></td></tr>
- <tr><th>2.12.5</th><td><a href="#2.12.5">Mapping for <code>anyAttribute</code></a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>2.13</th><td><a href="#2.13">Mapping for Mixed Content Models</a></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>3</th><td><a href="#3">Parsing</a>
- <table class="toc">
- <tr>
- <th>3.1</th><td><a href="#3.1">Initializing the Xerces-C++ Runtime</a></td>
- </tr>
- <tr>
- <th>3.2</th><td><a href="#3.2">Flags and Properties</a></td>
- </tr>
- <tr>
- <th>3.3</th><td><a href="#3.3">Error Handling</a>
- <table class="toc">
- <tr><th>3.3.1</th><td><a href="#3.3.1"><code>xml_schema::parsing</code></a></td></tr>
- <tr><th>3.3.2</th><td><a href="#3.3.2"><code>xml_schema::expected_element</code></a></td></tr>
- <tr><th>3.3.3</th><td><a href="#3.3.3"><code>xml_schema::unexpected_element</code></a></td></tr>
- <tr><th>3.3.4</th><td><a href="#3.3.4"><code>xml_schema::expected_attribute</code></a></td></tr>
- <tr><th>3.3.5</th><td><a href="#3.3.5"><code>xml_schema::unexpected_enumerator</code></a></td></tr>
- <tr><th>3.3.6</th><td><a href="#3.3.6"><code>xml_schema::expected_text_content</code></a></td></tr>
- <tr><th>3.3.7</th><td><a href="#3.3.7"><code>xml_schema::no_type_info</code></a></td></tr>
- <tr><th>3.3.8</th><td><a href="#3.3.8"><code>xml_schema::not_derived</code></a></td></tr>
- <tr><th>3.3.9</th><td><a href="#3.3.9"><code>xml_schema::not_prefix_mapping</code></a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>3.4</th><td><a href="#3.4">Reading from a Local File or URI</a></td>
- </tr>
- <tr>
- <th>3.5</th><td><a href="#3.5">Reading from <code>std::istream</code></a></td>
- </tr>
- <tr>
- <th>3.6</th><td><a href="#3.6">Reading from <code>xercesc::InputSource</code></a></td>
- </tr>
- <tr>
- <th>3.7</th><td><a href="#3.7">Reading from DOM</a></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>4</th><td><a href="#4">Serialization</a>
- <table class="toc">
- <tr>
- <th>4.1</th><td><a href="#4.1">Initializing the Xerces-C++ Runtime</a></td>
- </tr>
- <tr>
- <th>4.2</th><td><a href="#4.2">Namespace Infomap and Character Encoding</a></td>
- </tr>
- <tr>
- <th>4.3</th><td><a href="#4.3">Flags</a></td>
- </tr>
- <tr>
- <th>4.4</th><td><a href="#4.4">Error Handling</a>
- <table class="toc">
- <tr><th>4.4.1</th><td><a href="#4.4.1"><code>xml_schema::serialization</code></a></td></tr>
- <tr><th>4.4.2</th><td><a href="#4.4.2"><code>xml_schema::unexpected_element</code></a></td></tr>
- <tr><th>4.4.3</th><td><a href="#4.4.3"><code>xml_schema::no_type_info</code></a></td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>4.5</th><td><a href="#4.5">Serializing to <code>std::ostream</code></a></td>
- </tr>
- <tr>
- <th>4.6</th><td><a href="#4.6">Serializing to <code>xercesc::XMLFormatTarget</code></a></td>
- </tr>
- <tr>
- <th>4.7</th><td><a href="#4.7">Serializing to DOM</a></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th>5</th><td><a href="#5">Additional Functionality</a>
- <table class="toc">
- <tr>
- <th>5.1</th><td><a href="#5.1">DOM Association</a></td>
- </tr>
- <tr>
- <th>5.2</th><td><a href="#5.2">Binary Serialization</a></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <th></th><td><a href="#A">Appendix A &mdash; Default and Fixed Values</a></td>
- </tr>
-
- </table>
- </div>
-
- <h1><a name="0">Preface</a></h1>
-
- <h2><a name="0.1">About This Document</a></h2>
-
- <p>This document describes the mapping of W3C XML Schema
- to the C++ programming language as implemented by
- <a href="https://www.codesynthesis.com/products/xsd">CodeSynthesis
- XSD</a> - an XML Schema to C++ data binding compiler. The mapping
- represents information stored in XML instance documents as a
- statically-typed, tree-like in-memory data structure and is
- called C++/Tree.
- </p>
-
- <p>Revision 4.1.0<br/> <!-- Remember to change revision in other places -->
- This revision of the manual describes the C++/Tree
- mapping as implemented by CodeSynthesis XSD version 4.1.0.
- </p>
-
- <p>This document is available in the following formats:
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/index.xhtml">XHTML</a>,
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf">PDF</a>, and
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps">PostScript</a>.</p>
-
- <h2><a name="0.2">More Information</a></h2>
-
- <p>Beyond this manual, you may also find the following sources of
- information useful:</p>
-
- <ul class="list">
- <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/">C++/Tree
- Mapping Getting Started Guide</a></li>
-
- <li><a href="http://wiki.codesynthesis.com/Tree/Customization_guide">C++/Tree
- Mapping Customization Guide</a></li>
-
- <li><a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree
- Mapping Frequently Asked Questions (FAQ)</a></li>
-
- <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a></li>
-
- <li>The <code>examples/cxx/tree/</code> directory in the XSD
- distribution contains a collection of examples and a README
- file with an overview of each example.</li>
-
- <li>The <code>README</code> file in the XSD distribution explains
- how to compile the examples on various platforms.</li>
-
- <li>The <a href="https://www.codesynthesis.com/mailman/listinfo/xsd-users">xsd-users</a>
- mailing list is a place to ask questions. Furthermore the
- <a href="https://www.codesynthesis.com/pipermail/xsd-users/">archives</a>
- may already have answers to some of your questions.</li>
- </ul>
-
-
- <h1><a name="1">1 Introduction</a></h1>
-
- <p>C++/Tree is a W3C XML Schema to C++ mapping that represents the
- data stored in XML as a statically-typed, vocabulary-specific
- object model. Based on a formal description of an XML vocabulary
- (schema), the C++/Tree mapping produces a tree-like data structure
- suitable for in-memory processing as well as XML parsing and
- serialization code.</p>
-
- <p>A typical application that processes XML documents usually
- performs the following three steps: it first reads (parses) an XML
- instance document to an object model, it then performs
- some useful computations on that model which may involve
- modification of the model, and finally it may write (serialize)
- the modified object model back to XML.
- </p>
-
- <p>The C++/Tree mapping consists of C++ types that represent the
- given vocabulary (<a href="#2">Chapter 2, "C++/Tree Mapping"</a>),
- a set of parsing functions that convert XML documents to
- a tree-like in-memory data structure (<a href="#3">Chapter 3,
- "Parsing"</a>), and a set of serialization functions that convert
- the object model back to XML (<a href="#4">Chapter 4,
- "Serialization"</a>). Furthermore, the mapping provides a number
- of additional features, such as DOM association and binary
- serialization, that can be useful in some applications
- (<a href="#5">Chapter 5, "Additional Functionality"</a>).
- </p>
-
-
- <!-- Chapter 2 -->
-
-
- <h1><a name="2">2 C++/Tree Mapping</a></h1>
-
- <h2><a name="2.1">2.1 Preliminary Information</a></h2>
-
- <h3><a name="2.1.1">2.1.1 C++ Standard</a></h3>
-
- <p>The C++/Tree mapping provides support for ISO/IEC C++ 1998/2003 (C++98)
- and ISO/IEC C++ 2011 (C++11). To select the C++ standard for the
- generated code we use the <code>--std</code> XSD compiler command
- line option. While the majority of the examples in this manual use
- C++98, support for the new functionality and library components
- introduced in C++11 are discussed throughout the document.</p>
-
- <h3><a name="2.1.2">2.1.2 Identifiers</a></h3>
-
- <p>XML Schema names may happen to be reserved C++ keywords or contain
- characters that are illegal in C++ identifiers. To avoid C++ compilation
- problems, such names are changed (escaped) when mapped to C++. If an
- XML Schema name is a C++ keyword, the "_" suffix is added to it. All
- character of an XML Schema name that are not allowed in C++ identifiers
- are replaced with "_".
- </p>
-
- <p>For example, XML Schema name <code>try</code> will be mapped to
- C++ identifier <code>try_</code>. Similarly, XML Schema name
- <code>strange.na-me</code> will be mapped to C++ identifier
- <code>strange_na_me</code>.
- </p>
-
- <p>Furthermore, conflicts between type names and function names in the
- same scope are resolved using name escaping. Such conflicts include
- both a global element (which is mapped to a set of parsing and/or
- serialization functions or element types, see <a href="#2.9">Section
- 2.9, "Mapping for Global Elements"</a>) and a global type sharing the
- same name as well as a local element or attribute inside a type having
- the same name as the type itself.</p>
-
- <p>For example, if we had a global type <code>catalog</code>
- and a global element with the same name then the type would be
- mapped to a C++ class with name <code>catalog</code> while the
- parsing functions corresponding to the global element would have
- their names escaped as <code>catalog_</code>.
- </p>
-
- <p>By default the mapping uses the so-called K&amp;R (Kernighan and
- Ritchie) identifier naming convention which is also used throughout
- this manual. In this convention both type and function names are in
- lower case and words are separated by underscores. If your application
- code or schemas use a different notation, you may want to change the
- naming convention used by the mapping for consistency.
- The compiler supports a set of widely-used naming conventions
- that you can select with the <code>--type-naming</code> and
- <code>--function-naming</code> options. You can also further
- refine one of the predefined conventions or create a completely
- custom naming scheme by using the <code>--*-regex</code> options.
- For more detailed information on these options refer to the NAMING
- CONVENTION section in the <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a>.</p>
-
- <h3><a name="2.1.3">2.1.3 Character Type and Encoding</a></h3>
-
- <p>The code that implements the mapping, depending on the
- <code>--char-type</code> option, is generated using either
- <code>char</code> or <code>wchar_t</code> as the character
- type. In this document code samples use symbol <code>C</code>
- to refer to the character type you have selected when translating
- your schemas, for example <code>std::basic_string&lt;C></code>.
- </p>
-
- <p>Another aspect of the mapping that depends on the character type
- is character encoding. For the <code>char</code> character type
- the default encoding is UTF-8. Other supported encodings are
- ISO-8859-1, Xerces-C++ Local Code Page (LPC), as well as
- custom encodings and can be selected with the
- <code>--char-encoding</code> command line option.</p>
-
- <p>For the <code>wchar_t</code> character type the encoding is
- automatically selected between UTF-16 and UTF-32/UCS-4 depending
- on the size of the <code>wchar_t</code> type. On some platforms
- (for example, Windows with Visual C++ and AIX with IBM XL C++)
- <code>wchar_t</code> is 2 bytes long. For these platforms the
- encoding is UTF-16. On other platforms <code>wchar_t</code> is 4 bytes
- long and UTF-32/UCS-4 is used.</p>
-
- <h3><a name="2.1.4">2.1.4 XML Schema Namespace</a></h3>
-
- <p>The mapping relies on some predefined types, classes, and functions
- that are logically defined in the XML Schema namespace reserved for
- the XML Schema language (<code>http://www.w3.org/2001/XMLSchema</code>).
- By default, this namespace is mapped to C++ namespace
- <code>xml_schema</code>. It is automatically accessible
- from a C++ compilation unit that includes a header file generated
- from an XML Schema definition.
- </p>
-
- <p>Note that, if desired, the default mapping of this namespace can be
- changed as described in <a href="#2.4">Section 2.4, "Mapping for
- Namespaces"</a>.
- </p>
-
-
- <h3><a name="2.1.5">2.1.5 Anonymous Types</a></h3>
-
- <p>For the purpose of code generation, anonymous types defined in
- XML Schema are automatically assigned names that are derived
- from enclosing attributes and elements. Otherwise, such types
- follows standard mapping rules for simple and complex type
- definitions (see <a href="#2.6">Section 2.6, "Mapping for Simple Types"</a>
- and <a href="#2.7">Section 2.7, "Mapping for Complex Types"</a>).
- For example, in the following schema fragment:
- </p>
-
- <pre class="xml">
-&lt;element name="object">
- &lt;complexType>
- ...
- &lt;/complexType>
-&lt;/element>
- </pre>
-
- <p>The anonymous type defined inside element <code>object</code> will
- be given name <code>object</code>. The compiler has a number of
- options that control the process of anonymous type naming. For more
- information refer to the <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a>.</p>
-
-
- <h2><a name="2.2">2.2 Error Handling</a></h2>
-
- <p>The mapping uses the C++ exception handling mechanism as a primary way
- of reporting error conditions. All exceptions that are specified in
- this mapping derive from <code>xml_schema::exception</code> which
- itself is derived from <code>std::exception</code>:
- </p>
-
- <pre class="c++">
-struct exception: virtual std::exception
-{
- friend
- std::basic_ostream&lt;C>&amp;
- operator&lt;&lt; (std::basic_ostream&lt;C>&amp; os, const exception&amp; e)
- {
- e.print (os);
- return os;
- }
-
-protected:
- virtual void
- print (std::basic_ostream&lt;C>&amp;) const = 0;
-};
- </pre>
-
- <p>The exception hierarchy supports "virtual" <code>operator&lt;&lt;</code>
- which allows you to obtain diagnostics corresponding to the thrown
- exception using the base exception interface. For example:</p>
-
- <pre class="c++">
-try
-{
- ...
-}
-catch (const xml_schema::exception&amp; e)
-{
- cerr &lt;&lt; e &lt;&lt; endl;
-}
- </pre>
-
- <p>The following sub-sections describe exceptions thrown by the
- types that constitute the object model.
- <a href="#3.3">Section 3.3, "Error Handling"</a> of
- <a href="#3">Chapter 3, "Parsing"</a> describes exceptions
- and error handling mechanisms specific to the parsing functions.
- <a href="#4.4">Section 4.4, "Error Handling"</a> of
- <a href="#4">Chapter 4, "Serialization"</a> describes exceptions
- and error handling mechanisms specific to the serialization functions.
- </p>
-
-
- <h3><a name="2.2.1">2.2.1 <code>xml_schema::duplicate_id</code></a></h3>
-
- <pre class="c++">
-struct duplicate_id: virtual exception
-{
- duplicate_id (const std::basic_string&lt;C>&amp; id);
-
- const std::basic_string&lt;C>&amp;
- id () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::duplicate_id</code> is thrown when
- a conflicting instance of <code>xml_schema::id</code> (see
- <a href="#2.5">Section 2.5, "Mapping for Built-in Data Types"</a>)
- is added to a tree. The offending ID value can be obtained using
- the <code>id</code> function.
- </p>
-
- <h2><a name="2.3">2.3 Mapping for <code>import</code> and <code>include</code></a></h2>
-
- <h3><a name="2.3.1">2.3.1 Import</a></h3>
-
- <p>The XML Schema <code>import</code> element is mapped to the C++
- Preprocessor <code>#include</code> directive. The value of
- the <code>schemaLocation</code> attribute is used to derive
- the name of the header file that appears in the <code>#include</code>
- directive. For instance:
- </p>
-
- <pre class="xml">
-&lt;import namespace="https://www.codesynthesis.com/test"
- schemaLocation="test.xsd"/>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-#include "test.hxx"
- </pre>
-
- <p>Note that you will need to compile imported schemas separately
- in order to produce corresponding header files.</p>
-
- <h3><a name="2.3.2">2.3.2 Inclusion with Target Namespace</a></h3>
-
- <p>The XML Schema <code>include</code> element which refers to a schema
- with a target namespace or appears in a schema without a target namespace
- follows the same mapping rules as the <code>import</code> element,
- see <a href="#2.3.1">Section 2.3.1, "Import"</a>.
- </p>
-
- <h3><a name="2.3.3">2.3.3 Inclusion without Target Namespace</a></h3>
-
- <p>For the XML Schema <code>include</code> element which refers to a schema
- without a target namespace and appears in a schema with a target
- namespace (such inclusion sometimes called "chameleon inclusion"),
- declarations and definitions from the included schema are generated
- in-line in the namespace of the including schema as if they were
- declared and defined there verbatim. For example, consider the
- following two schemas:
- </p>
-
- <pre class="xml">
-&lt;-- common.xsd -->
-&lt;schema>
- &lt;complexType name="type">
- ...
- &lt;/complexType>
-&lt;/schema>
-
-&lt;-- test.xsd -->
-&lt;schema targetNamespace="https://www.codesynthesis.com/test">
- &lt;include schemaLocation="common.xsd"/>
-&lt;/schema>
- </pre>
-
- <p>The fragment of interest from the generated header file for
- <code>text.xsd</code> would look like this:</p>
-
- <pre class="c++">
-// test.hxx
-namespace test
-{
- class type
- {
- ...
- };
-}
- </pre>
-
- <h2><a name="2.4">2.4 Mapping for Namespaces</a></h2>
-
- <p>An XML Schema namespace is mapped to one or more nested C++
- namespaces. XML Schema namespaces are identified by URIs.
- By default, a namespace URI is mapped to a sequence of
- C++ namespace names by removing the protocol and host parts
- and splitting the rest into a sequence of names with '<code>/</code>'
- as the name separator. For instance:
- </p>
-
- <pre class="xml">
-&lt;schema targetNamespace="https://www.codesynthesis.com/system/test">
- ...
-&lt;/schema>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-namespace system
-{
- namespace test
- {
- ...
- }
-}
- </pre>
-
- <p>The default mapping of namespace URIs to C++ namespace names can be
- altered using the <code>--namespace-map</code> and
- <code>--namespace-regex</code> options. See the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a> for more information.
- </p>
-
- <h2><a name="2.5">2.5 Mapping for Built-in Data Types</a></h2>
-
- <p>The mapping of XML Schema built-in data types to C++ types is
- summarized in the table below.</p>
-
- <!-- border="1" is necessary for html2ps -->
- <table id="builtin" border="1">
- <tr>
- <th>XML Schema type</th>
- <th>Alias in the <code>xml_schema</code> namespace</th>
- <th>C++ type</th>
- </tr>
-
- <tr>
- <th colspan="3">anyType and anySimpleType types</th>
- </tr>
- <tr>
- <td><code>anyType</code></td>
- <td><code>type</code></td>
- <td><a href="#2.5.2">Section 2.5.2, "Mapping for <code>anyType</code>"</a></td>
- </tr>
- <tr>
- <td><code>anySimpleType</code></td>
- <td><code>simple_type</code></td>
- <td><a href="#2.5.3">Section 2.5.3, "Mapping for <code>anySimpleType</code>"</a></td>
- </tr>
-
- <tr>
- <th colspan="3">fixed-length integral types</th>
- </tr>
- <!-- 8-bit -->
- <tr>
- <td><code>byte</code></td>
- <td><code>byte</code></td>
- <td><code>signed&nbsp;char</code></td>
- </tr>
- <tr>
- <td><code>unsignedByte</code></td>
- <td><code>unsigned_byte</code></td>
- <td><code>unsigned&nbsp;char</code></td>
- </tr>
-
- <!-- 16-bit -->
- <tr>
- <td><code>short</code></td>
- <td><code>short_</code></td>
- <td><code>short</code></td>
- </tr>
- <tr>
- <td><code>unsignedShort</code></td>
- <td><code>unsigned_short</code></td>
- <td><code>unsigned&nbsp;short</code></td>
- </tr>
-
- <!-- 32-bit -->
- <tr>
- <td><code>int</code></td>
- <td><code>int_</code></td>
- <td><code>int</code></td>
- </tr>
- <tr>
- <td><code>unsignedInt</code></td>
- <td><code>unsigned_int</code></td>
- <td><code>unsigned&nbsp;int</code></td>
- </tr>
-
- <!-- 64-bit -->
- <tr>
- <td><code>long</code></td>
- <td><code>long_</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>unsignedLong</code></td>
- <td><code>unsigned_long</code></td>
- <td><code>unsigned&nbsp;long&nbsp;long</code></td>
- </tr>
-
- <tr>
- <th colspan="3">arbitrary-length integral types</th>
- </tr>
- <tr>
- <td><code>integer</code></td>
- <td><code>integer</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>nonPositiveInteger</code></td>
- <td><code>non_positive_integer</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>nonNegativeInteger</code></td>
- <td><code>non_negative_integer</code></td>
- <td><code>unsigned long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>positiveInteger</code></td>
- <td><code>positive_integer</code></td>
- <td><code>unsigned long&nbsp;long</code></td>
- </tr>
- <tr>
- <td><code>negativeInteger</code></td>
- <td><code>negative_integer</code></td>
- <td><code>long&nbsp;long</code></td>
- </tr>
-
- <tr>
- <th colspan="3">boolean types</th>
- </tr>
- <tr>
- <td><code>boolean</code></td>
- <td><code>boolean</code></td>
- <td><code>bool</code></td>
- </tr>
-
- <tr>
- <th colspan="3">fixed-precision floating-point types</th>
- </tr>
- <tr>
- <td><code>float</code></td>
- <td><code>float_</code></td>
- <td><code>float</code></td>
- </tr>
- <tr>
- <td><code>double</code></td>
- <td><code>double_</code></td>
- <td><code>double</code></td>
- </tr>
-
- <tr>
- <th colspan="3">arbitrary-precision floating-point types</th>
- </tr>
- <tr>
- <td><code>decimal</code></td>
- <td><code>decimal</code></td>
- <td><code>double</code></td>
- </tr>
-
- <tr>
- <th colspan="3">string types</th>
- </tr>
- <tr>
- <td><code>string</code></td>
- <td><code>string</code></td>
- <td>type derived from <code>std::basic_string</code></td>
- </tr>
- <tr>
- <td><code>normalizedString</code></td>
- <td><code>normalized_string</code></td>
- <td>type derived from <code>string</code></td>
- </tr>
- <tr>
- <td><code>token</code></td>
- <td><code>token</code></td>
- <td>type&nbsp;derived&nbsp;from&nbsp;<code>normalized_string</code></td>
- </tr>
- <tr>
- <td><code>Name</code></td>
- <td><code>name</code></td>
- <td>type derived from <code>token</code></td>
- </tr>
- <tr>
- <td><code>NMTOKEN</code></td>
- <td><code>nmtoken</code></td>
- <td>type derived from <code>token</code></td>
- </tr>
- <tr>
- <td><code>NMTOKENS</code></td>
- <td><code>nmtokens</code></td>
- <td>type derived from <code>sequence&lt;nmtoken></code></td>
- </tr>
- <tr>
- <td><code>NCName</code></td>
- <td><code>ncname</code></td>
- <td>type derived from <code>name</code></td>
- </tr>
- <tr>
- <td><code>language</code></td>
- <td><code>language</code></td>
- <td>type derived from <code>token</code></td>
- </tr>
-
- <tr>
- <th colspan="3">qualified name</th>
- </tr>
- <tr>
- <td><code>QName</code></td>
- <td><code>qname</code></td>
- <td><a href="#2.5.4">Section 2.5.4, "Mapping for <code>QName</code>"</a></td>
- </tr>
-
- <tr>
- <th colspan="3">ID/IDREF types</th>
- </tr>
- <tr>
- <td><code>ID</code></td>
- <td><code>id</code></td>
- <td>type derived from <code>ncname</code></td>
- </tr>
- <tr>
- <td><code>IDREF</code></td>
- <td><code>idref</code></td>
- <td><a href="#2.5.5">Section 2.5.5, "Mapping for <code>IDREF</code>"</a></td>
- </tr>
- <tr>
- <td><code>IDREFS</code></td>
- <td><code>idrefs</code></td>
- <td>type derived from <code>sequence&lt;idref></code></td>
- </tr>
-
- <tr>
- <th colspan="3">URI types</th>
- </tr>
- <tr>
- <td><code>anyURI</code></td>
- <td><code>uri</code></td>
- <td>type derived from <code>std::basic_string</code></td>
- </tr>
-
- <tr>
- <th colspan="3">binary types</th>
- </tr>
- <tr>
- <td><code>base64Binary</code></td>
- <td><code>base64_binary</code></td>
- <td rowspan="2"><a href="#2.5.6">Section 2.5.6, "Mapping for
- <code>base64Binary</code> and <code>hexBinary</code>"</a></td>
- </tr>
- <tr>
- <td><code>hexBinary</code></td>
- <td><code>hex_binary</code></td>
- </tr>
-
- <tr>
- <th colspan="3">date/time types</th>
- </tr>
- <tr>
- <td><code>date</code></td>
- <td><code>date</code></td>
- <td><a href="#2.5.8">Section 2.5.8, "Mapping for
- <code>date</code>"</a></td>
- </tr>
- <tr>
- <td><code>dateTime</code></td>
- <td><code>date_time</code></td>
- <td><a href="#2.5.9">Section 2.5.9, "Mapping for
- <code>dateTime</code>"</a></td>
- </tr>
- <tr>
- <td><code>duration</code></td>
- <td><code>duration</code></td>
- <td><a href="#2.5.10">Section 2.5.10, "Mapping for
- <code>duration</code>"</a></td>
- </tr>
- <tr>
- <td><code>gDay</code></td>
- <td><code>gday</code></td>
- <td><a href="#2.5.11">Section 2.5.11, "Mapping for
- <code>gDay</code>"</a></td>
- </tr>
- <tr>
- <td><code>gMonth</code></td>
- <td><code>gmonth</code></td>
- <td><a href="#2.5.12">Section 2.5.12, "Mapping for
- <code>gMonth</code>"</a></td>
- </tr>
- <tr>
- <td><code>gMonthDay</code></td>
- <td><code>gmonth_day</code></td>
- <td><a href="#2.5.13">Section 2.5.13, "Mapping for
- <code>gMonthDay</code>"</a></td>
- </tr>
- <tr>
- <td><code>gYear</code></td>
- <td><code>gyear</code></td>
- <td><a href="#2.5.14">Section 2.5.14, "Mapping for
- <code>gYear</code>"</a></td>
- </tr>
- <tr>
- <td><code>gYearMonth</code></td>
- <td><code>gyear_month</code></td>
- <td><a href="#2.5.15">Section 2.5.15, "Mapping for
- <code>gYearMonth</code>"</a></td>
- </tr>
- <tr>
- <td><code>time</code></td>
- <td><code>time</code></td>
- <td><a href="#2.5.16">Section 2.5.16, "Mapping for
- <code>time</code>"</a></td>
- </tr>
-
- <tr>
- <th colspan="3">entity types</th>
- </tr>
- <tr>
- <td><code>ENTITY</code></td>
- <td><code>entity</code></td>
- <td>type derived from <code>name</code></td>
- </tr>
- <tr>
- <td><code>ENTITIES</code></td>
- <td><code>entities</code></td>
- <td>type derived from <code>sequence&lt;entity></code></td>
- </tr>
- </table>
-
- <p>All XML Schema built-in types are mapped to C++ classes that are
- derived from the <code>xml_schema::simple_type</code> class except
- where the mapping is to a fundamental C++ type.</p>
-
- <p>The <code>sequence</code> class template is defined in an
- implementation-specific namespace. It conforms to the
- sequence interface as defined by the ISO/ANSI Standard for
- C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences").
- Practically, this means that you can treat such a sequence
- as if it was <code>std::vector</code>. One notable extension
- to the standard interface that is available only for
- sequences of non-fundamental C++ types is the addition of
- the overloaded <code>push_back</code> and <code>insert</code>
- member functions which instead of the constant reference
- to the element type accept automatic pointer (<code>std::auto_ptr</code>
- or <code>std::unique_ptr</code>, depending on the C++ standard
- selected) to the element type. These functions assume ownership
- of the pointed to object and reset the passed automatic pointer.
- </p>
-
- <h3><a name="2.5.1">2.5.1 Inheritance from Built-in Data Types</a></h3>
-
- <p>In cases where the mapping calls for an inheritance from a built-in
- type which is mapped to a fundamental C++ type, a proxy type is
- used instead of the fundamental C++ type (C++ does not allow
- inheritance from fundamental types). For instance:</p>
-
- <pre class="xml">
-&lt;simpleType name="my_int">
- &lt;restriction base="int"/>
-&lt;/simpleType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class my_int: public fundamental_base&lt;int>
-{
- ...
-};
- </pre>
-
- <p>The <code>fundamental_base</code> class template provides a close
- emulation (though not exact) of a fundamental C++ type.
- It is defined in an implementation-specific namespace and has the
- following interface:</p>
-
- <pre class="c++">
-template &lt;typename X>
-class fundamental_base: public simple_type
-{
-public:
- fundamental_base ();
- fundamental_base (X)
- fundamental_base (const fundamental_base&amp;)
-
-public:
- fundamental_base&amp;
- operator= (const X&amp;);
-
-public:
- operator const X &amp; () const;
- operator X&amp; ();
-
- template &lt;typename Y>
- operator Y () const;
-
- template &lt;typename Y>
- operator Y ();
-};
- </pre>
-
- <h3><a name="2.5.2">2.5.2 Mapping for <code>anyType</code></a></h3>
-
- <p>The XML Schema <code>anyType</code> built-in data type is mapped to the
- <code>xml_schema::type</code> C++ class:</p>
-
- <pre class="c++">
-class type
-{
-public:
- virtual
- ~type ();
-
- type ();
- type (const type&amp;);
-
- type&amp;
- operator= (const type&amp;);
-
- virtual type*
- _clone () const;
-
- // anyType DOM content.
- //
-public:
- typedef element_optional dom_content_optional;
-
- const dom_content_optional&amp;
- dom_content () const;
-
- dom_content_optional&amp;
- dom_content ();
-
- void
- dom_content (const xercesc::DOMElement&amp;);
-
- void
- dom_content (xercesc::DOMElement*);
-
- void
- dom_content (const dom_content_optional&amp;);
-
- const xercesc::DOMDocument&amp;
- dom_content_document () const;
-
- xercesc::DOMDocument&amp;
- dom_content_document ();
-
- bool
- null_content () const;
-
- // DOM association.
- //
-public:
- const xercesc::DOMNode*
- _node () const;
-
- xercesc::DOMNode*
- _node ();
-};
- </pre>
-
- <p>When <code>xml_schema::type</code> is used to create an instance
- (as opposed to being a base of a derived type), it represents
- the XML Schema <code>anyType</code> type. <code>anyType</code>
- allows any attributes and any content in any order. In the
- C++/Tree mapping this content can be represented as a DOM
- fragment, similar to XML Schema wildcards (<a href="#2.12">Section
- 2.12, "Mapping for <code>any</code> and
- <code>anyAttribute</code>"</a>).</p>
-
- <p>To enable automatic extraction of <code>anyType</code> content
- during parsing, the <code>--generate-any-type</code> option must be
- specified. Because the DOM API is used to access such content, the
- Xerces-C++ runtime should be initialized by the application prior to
- parsing and should remain initialized for the lifetime of objects
- with the DOM content. For more information on the Xerces-C++ runtime
- initialization see <a href="#3.1">Section 3.1, "Initializing the
- Xerces-C++ Runtime"</a>.</p>
-
- <p>The DOM content is stored as the optional DOM element container
- and the DOM content accessors and modifiers presented above are
- identical to those generated for an optional element wildcard.
- Refer to <a href="#2.12.2">Section 2.12.2, "Mapping for <code>any</code>
- with the Optional Cardinality Class"</a> for details on their
- semantics.</p>
-
- <p>The <code>dom_content_document()</code> function returns the
- DOM document used to store the raw XML content corresponding
- to the <code>anyType</code> instance. It is equivalent to the
- <code>dom_document()</code> function generated for types
- with wildcards.</p>
-
- <p>The <code>null_content()</code> accessor is an optimization function
- that allows us to check for the lack of content without actually
- creating its empty representation, that is, empty DOM document for
- <code>anyType</code> or empty string for <code>anySimpleType</code>
- (see the following section for details on <code>anySimpleType</code>).</p>
-
- <p>For more information on DOM association refer to
- <a href="#5.1">Section 5.1, "DOM Association"</a>.</p>
-
- <h3><a name="2.5.3">2.5.3 Mapping for <code>anySimpleType</code></a></h3>
-
- <p>The XML Schema <code>anySimpleType</code> built-in data type is mapped
- to the <code>xml_schema::simple_type</code> C++ class:</p>
-
- <pre class="c++">
-class simple_type: public type
-{
-public:
- simple_type ();
- simple_type (const C*);
- simple_type (const std::basic_string&lt;C>&amp;);
-
- simple_type (const simple_type&amp;);
-
- simple_type&amp;
- operator= (const simple_type&amp;);
-
- virtual simple_type*
- _clone () const;
-
- // anySimpleType text content.
- //
-public:
- const std::basic_string&lt;C>&amp;
- text_content () const;
-
- std::basic_string&lt;C>&amp;
- text_content ();
-
- void
- text_content (const std::basic_string&lt;C>&amp;);
-};
- </pre>
-
- <p>When <code>xml_schema::simple_type</code> is used to create an instance
- (as opposed to being a base of a derived type), it represents
- the XML Schema <code>anySimpleType</code> type. <code>anySimpleType</code>
- allows any simple content. In the C++/Tree mapping this content can
- be represented as a string and accessed or modified with the
- <code>text_content()</code> functions shown above.</p>
-
- <h3><a name="2.5.4">2.5.4 Mapping for <code>QName</code></a></h3>
-
- <p>The XML Schema <code>QName</code> built-in data type is mapped to the
- <code>xml_schema::qname</code> C++ class:</p>
-
- <pre class="c++">
-class qname: public simple_type
-{
-public:
- qname (const ncname&amp;);
- qname (const uri&amp;, const ncname&amp;);
- qname (const qname&amp;);
-
-public:
- qname&amp;
- operator= (const qname&amp;);
-
-public:
- virtual qname*
- _clone () const;
-
-public:
- bool
- qualified () const;
-
- const uri&amp;
- namespace_ () const;
-
- const ncname&amp;
- name () const;
-};
- </pre>
-
- <p>The <code>qualified</code> accessor function can be used to determine
- if the name is qualified.</p>
-
- <h3><a name="2.5.5">2.5.5 Mapping for <code>IDREF</code></a></h3>
-
- <p>The XML Schema <code>IDREF</code> built-in data type is mapped to the
- <code>xml_schema::idref</code> C++ class. This class implements the
- smart pointer C++ idiom:</p>
-
- <pre class="c++">
-class idref: public ncname
-{
-public:
- idref (const C* s);
- idref (const C* s, std::size_t n);
- idref (std::size_t n, C c);
- idref (const std::basic_string&lt;C>&amp;);
- idref (const std::basic_string&lt;C>&amp;,
- std::size_t pos,
- std::size_t n = npos);
-
-public:
- idref (const idref&amp;);
-
-public:
- virtual idref*
- _clone () const;
-
-public:
- idref&amp;
- operator= (C c);
-
- idref&amp;
- operator= (const C* s);
-
- idref&amp;
- operator= (const std::basic_string&lt;C>&amp;)
-
- idref&amp;
- operator= (const idref&amp;);
-
-public:
- const type*
- operator-> () const;
-
- type*
- operator-> ();
-
- const type&amp;
- operator* () const;
-
- type&amp;
- operator* ();
-
- const type*
- get () const;
-
- type*
- get ();
-
- // Conversion to bool.
- //
-public:
- typedef void (idref::*bool_convertible)();
- operator bool_convertible () const;
-};
- </pre>
-
- <p>The object, <code>idref</code> instance refers to, is the immediate
- container of the matching <code>id</code> instance. For example,
- with the following instance document and schema:
- </p>
-
-
- <pre class="xml">
-&lt;!-- test.xml -->
-&lt;root>
- &lt;object id="obj-1" text="hello"/>
- &lt;reference>obj-1&lt;/reference>
-&lt;/root>
-
-&lt;!-- test.xsd -->
-&lt;schema>
- &lt;complexType name="object_type">
- &lt;attribute name="id" type="ID"/>
- &lt;attribute name="text" type="string"/>
- &lt;/complexType>
-
- &lt;complexType name="root_type">
- &lt;sequence>
- &lt;element name="object" type="object_type"/>
- &lt;element name="reference" type="IDREF"/>
- &lt;/sequence>
- &lt;/complexType>
-
- &lt;element name="root" type="root_type"/>
-&lt;/schema>
- </pre>
-
- <p>The <code>ref</code> instance in the code below will refer to
- an object of type <code>object_type</code>:</p>
-
- <pre class="c++">
-root_type&amp; root = ...;
-xml_schema::idref&amp; ref (root.reference ());
-object_type&amp; obj (dynamic_cast&lt;object_type&amp;> (*ref));
-cout &lt;&lt; obj.text () &lt;&lt; endl;
- </pre>
-
- <p>The smart pointer interface of the <code>idref</code> class always
- returns a pointer or reference to <code>xml_schema::type</code>.
- This means that you will need to manually cast such pointer or
- reference to its real (dynamic) type before you can use it (unless
- all you need is the base interface provided by
- <code>xml_schema::type</code>). As a special extension to the XML
- Schema language, the mapping supports static typing of <code>idref</code>
- references by employing the <code>refType</code> extension attribute.
- The following example illustrates this mechanism:
- </p>
-
- <pre class="xml">
-&lt;!-- test.xsd -->
-&lt;schema
- xmlns:xse="https://www.codesynthesis.com/xmlns/xml-schema-extension">
-
- ...
-
- &lt;element name="reference" type="IDREF" xse:refType="object_type"/>
-
- ...
-
-&lt;/schema>
- </pre>
-
- <p>With this modification we do not need to do manual casting anymore:
- </p>
-
- <pre class="c++">
-root_type&amp; root = ...;
-root_type::reference_type&amp; ref (root.reference ());
-object_type&amp; obj (*ref);
-cout &lt;&lt; ref->text () &lt;&lt; endl;
- </pre>
-
-
- <h3><a name="2.5.6">2.5.6 Mapping for <code>base64Binary</code> and
- <code>hexBinary</code></a></h3>
-
- <p>The XML Schema <code>base64Binary</code> and <code>hexBinary</code>
- built-in data types are mapped to the
- <code>xml_schema::base64_binary</code> and
- <code>xml_schema::hex_binary</code> C++ classes, respectively. The
- <code>base64_binary</code> and <code>hex_binary</code> classes
- support a simple buffer abstraction by inheriting from the
- <code>xml_schema::buffer</code> class:
- </p>
-
- <pre class="c++">
-class bounds: public virtual exception
-{
-public:
- virtual const char*
- what () const throw ();
-};
-
-class buffer
-{
-public:
- typedef std::size_t size_t;
-
-public:
- buffer (size_t size = 0);
- buffer (size_t size, size_t capacity);
- buffer (const void* data, size_t size);
- buffer (const void* data, size_t size, size_t capacity);
- buffer (void* data,
- size_t size,
- size_t capacity,
- bool assume_ownership);
-
-public:
- buffer (const buffer&amp;);
-
- buffer&amp;
- operator= (const buffer&amp;);
-
- void
- swap (buffer&amp;);
-
-public:
- size_t
- capacity () const;
-
- bool
- capacity (size_t);
-
-public:
- size_t
- size () const;
-
- bool
- size (size_t);
-
-public:
- const char*
- data () const;
-
- char*
- data ();
-
- const char*
- begin () const;
-
- char*
- begin ();
-
- const char*
- end () const;
-
- char*
- end ();
-};
- </pre>
-
- <p>The last overloaded constructor reuses an existing data buffer instead
- of making a copy. If the <code>assume_ownership</code> argument is
- <code>true</code>, the instance assumes ownership of the
- memory block pointed to by the <code>data</code> argument and will
- eventually release it by calling <code>operator delete</code>. The
- <code>capacity</code> and <code>size</code> modifier functions return
- <code>true</code> if the underlying buffer has moved.
- </p>
-
- <p>The <code>bounds</code> exception is thrown if the constructor
- arguments violate the <code>(size&nbsp;&lt;=&nbsp;capacity)</code>
- constraint.</p>
-
- <p>The <code>base64_binary</code> and <code>hex_binary</code> classes
- support the <code>buffer</code> interface and perform automatic
- decoding/encoding from/to the Base64 and Hex formats, respectively:
- </p>
-
- <pre class="c++">
-class base64_binary: public simple_type, public buffer
-{
-public:
- base64_binary (size_t size = 0);
- base64_binary (size_t size, size_t capacity);
- base64_binary (const void* data, size_t size);
- base64_binary (const void* data, size_t size, size_t capacity);
- base64_binary (void* data,
- size_t size,
- size_t capacity,
- bool assume_ownership);
-
-public:
- base64_binary (const base64_binary&amp;);
-
- base64_binary&amp;
- operator= (const base64_binary&amp;);
-
- virtual base64_binary*
- _clone () const;
-
-public:
- std::basic_string&lt;C>
- encode () const;
-};
- </pre>
-
- <pre class="c++">
-class hex_binary: public simple_type, public buffer
-{
-public:
- hex_binary (size_t size = 0);
- hex_binary (size_t size, size_t capacity);
- hex_binary (const void* data, size_t size);
- hex_binary (const void* data, size_t size, size_t capacity);
- hex_binary (void* data,
- size_t size,
- size_t capacity,
- bool assume_ownership);
-
-public:
- hex_binary (const hex_binary&amp;);
-
- hex_binary&amp;
- operator= (const hex_binary&amp;);
-
- virtual hex_binary*
- _clone () const;
-
-public:
- std::basic_string&lt;C>
- encode () const;
-};
- </pre>
-
-
- <h2><a name="2.5.7">2.5.7 Time Zone Representation</a></h2>
-
- <p>The <code>date</code>, <code>dateTime</code>, <code>gDay</code>,
- <code>gMonth</code>, <code>gMonthDay</code>, <code>gYear</code>,
- <code>gYearMonth</code>, and <code>time</code> XML Schema built-in
- types all include an optional time zone component. The following
- <code>xml_schema::time_zone</code> base class is used to represent
- this information:</p>
-
- <pre class="c++">
-class time_zone
-{
-public:
- time_zone ();
- time_zone (short hours, short minutes);
-
- bool
- zone_present () const;
-
- void
- zone_reset ();
-
- short
- zone_hours () const;
-
- void
- zone_hours (short);
-
- short
- zone_minutes () const;
-
- void
- zone_minutes (short);
-};
-
-bool
-operator== (const time_zone&amp;, const time_zone&amp;);
-
-bool
-operator!= (const time_zone&amp;, const time_zone&amp;);
- </pre>
-
- <p>The <code>zone_present()</code> accessor function returns <code>true</code>
- if the time zone is specified. The <code>zone_reset()</code> modifier
- function resets the time zone object to the <em>not specified</em>
- state. If the time zone offset is negative then both hours and
- minutes components are represented as negative integers.</p>
-
-
- <h2><a name="2.5.8">2.5.8 Mapping for <code>date</code></a></h2>
-
- <p>The XML Schema <code>date</code> built-in data type is mapped to the
- <code>xml_schema::date</code> C++ class which represents a year, a day,
- and a month with an optional time zone. Its interface is presented
- below. For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-class date: public simple_type, public time_zone
-{
-public:
- date (int year, unsigned short month, unsigned short day);
- date (int year, unsigned short month, unsigned short day,
- short zone_hours, short zone_minutes);
-
-public:
- date (const date&amp;);
-
- date&amp;
- operator= (const date&amp;);
-
- virtual date*
- _clone () const;
-
-public:
- int
- year () const;
-
- void
- year (int);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
-};
-
-bool
-operator== (const date&amp;, const date&amp;);
-
-bool
-operator!= (const date&amp;, const date&amp;);
- </pre>
-
- <h2><a name="2.5.9">2.5.9 Mapping for <code>dateTime</code></a></h2>
-
- <p>The XML Schema <code>dateTime</code> built-in data type is mapped to the
- <code>xml_schema::date_time</code> C++ class which represents a year, a month,
- a day, hours, minutes, and seconds with an optional time zone. Its interface
- is presented below. For more information on the base
- <code>xml_schema::time_zone</code> class refer to <a href="#2.5.7">Section
- 2.5.7, "Time Zone Representation"</a>.</p>
-
- <pre class="c++">
-class date_time: public simple_type, public time_zone
-{
-public:
- date_time (int year, unsigned short month, unsigned short day,
- unsigned short hours, unsigned short minutes,
- double seconds);
-
- date_time (int year, unsigned short month, unsigned short day,
- unsigned short hours, unsigned short minutes,
- double seconds, short zone_hours, short zone_minutes);
-public:
- date_time (const date_time&amp;);
-
- date_time&amp;
- operator= (const date_time&amp;);
-
- virtual date_time*
- _clone () const;
-
-public:
- int
- year () const;
-
- void
- year (int);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
-
- unsigned short
- hours () const;
-
- void
- hours (unsigned short);
-
- unsigned short
- minutes () const;
-
- void
- minutes (unsigned short);
-
- double
- seconds () const;
-
- void
- seconds (double);
-};
-
-bool
-operator== (const date_time&amp;, const date_time&amp;);
-
-bool
-operator!= (const date_time&amp;, const date_time&amp;);
- </pre>
-
-
- <h2><a name="2.5.10">2.5.10 Mapping for <code>duration</code></a></h2>
-
- <p>The XML Schema <code>duration</code> built-in data type is mapped to the
- <code>xml_schema::duration</code> C++ class which represents a potentially
- negative duration in the form of years, months, days, hours, minutes,
- and seconds. Its interface is presented below.</p>
-
- <pre class="c++">
-class duration: public simple_type
-{
-public:
- duration (bool negative,
- unsigned int years, unsigned int months, unsigned int days,
- unsigned int hours, unsigned int minutes, double seconds);
-public:
- duration (const duration&amp;);
-
- duration&amp;
- operator= (const duration&amp;);
-
- virtual duration*
- _clone () const;
-
-public:
- bool
- negative () const;
-
- void
- negative (bool);
-
- unsigned int
- years () const;
-
- void
- years (unsigned int);
-
- unsigned int
- months () const;
-
- void
- months (unsigned int);
-
- unsigned int
- days () const;
-
- void
- days (unsigned int);
-
- unsigned int
- hours () const;
-
- void
- hours (unsigned int);
-
- unsigned int
- minutes () const;
-
- void
- minutes (unsigned int);
-
- double
- seconds () const;
-
- void
- seconds (double);
-};
-
-bool
-operator== (const duration&amp;, const duration&amp;);
-
-bool
-operator!= (const duration&amp;, const duration&amp;);
- </pre>
-
-
- <h2><a name="2.5.11">2.5.11 Mapping for <code>gDay</code></a></h2>
-
- <p>The XML Schema <code>gDay</code> built-in data type is mapped to the
- <code>xml_schema::gday</code> C++ class which represents a day of the
- month with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-class gday: public simple_type, public time_zone
-{
-public:
- explicit
- gday (unsigned short day);
- gday (unsigned short day, short zone_hours, short zone_minutes);
-
-public:
- gday (const gday&amp;);
-
- gday&amp;
- operator= (const gday&amp;);
-
- virtual gday*
- _clone () const;
-
-public:
- unsigned short
- day () const;
-
- void
- day (unsigned short);
-};
-
-bool
-operator== (const gday&amp;, const gday&amp;);
-
-bool
-operator!= (const gday&amp;, const gday&amp;);
- </pre>
-
-
- <h2><a name="2.5.12">2.5.12 Mapping for <code>gMonth</code></a></h2>
-
- <p>The XML Schema <code>gMonth</code> built-in data type is mapped to the
- <code>xml_schema::gmonth</code> C++ class which represents a month of the
- year with an optional time zone. Its interface is presented below.
- For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-class gmonth: public simple_type, public time_zone
-{
-public:
- explicit
- gmonth (unsigned short month);
- gmonth (unsigned short month,
- short zone_hours, short zone_minutes);
-
-public:
- gmonth (const gmonth&amp;);
-
- gmonth&amp;
- operator= (const gmonth&amp;);
-
- virtual gmonth*
- _clone () const;
-
-public:
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-};
-
-bool
-operator== (const gmonth&amp;, const gmonth&amp;);
-
-bool
-operator!= (const gmonth&amp;, const gmonth&amp;);
- </pre>
-
-
- <h2><a name="2.5.13">2.5.13 Mapping for <code>gMonthDay</code></a></h2>
-
- <p>The XML Schema <code>gMonthDay</code> built-in data type is mapped to the
- <code>xml_schema::gmonth_day</code> C++ class which represents a day and
- a month of the year with an optional time zone. Its interface is presented
- below. For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-class gmonth_day: public simple_type, public time_zone
-{
-public:
- gmonth_day (unsigned short month, unsigned short day);
- gmonth_day (unsigned short month, unsigned short day,
- short zone_hours, short zone_minutes);
-
-public:
- gmonth_day (const gmonth_day&amp;);
-
- gmonth_day&amp;
- operator= (const gmonth_day&amp;);
-
- virtual gmonth_day*
- _clone () const;
-
-public:
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-
- unsigned short
- day () const;
-
- void
- day (unsigned short);
-};
-
-bool
-operator== (const gmonth_day&amp;, const gmonth_day&amp;);
-
-bool
-operator!= (const gmonth_day&amp;, const gmonth_day&amp;);
- </pre>
-
-
- <h2><a name="2.5.14">2.5.14 Mapping for <code>gYear</code></a></h2>
-
- <p>The XML Schema <code>gYear</code> built-in data type is mapped to the
- <code>xml_schema::gyear</code> C++ class which represents a year with
- an optional time zone. Its interface is presented below. For more
- information on the base <code>xml_schema::time_zone</code> class refer
- to <a href="#2.5.7">Section 2.5.7, "Time Zone Representation"</a>.</p>
-
- <pre class="c++">
-class gyear: public simple_type, public time_zone
-{
-public:
- explicit
- gyear (int year);
- gyear (int year, short zone_hours, short zone_minutes);
-
-public:
- gyear (const gyear&amp;);
-
- gyear&amp;
- operator= (const gyear&amp;);
-
- virtual gyear*
- _clone () const;
-
-public:
- int
- year () const;
-
- void
- year (int);
-};
-
-bool
-operator== (const gyear&amp;, const gyear&amp;);
-
-bool
-operator!= (const gyear&amp;, const gyear&amp;);
- </pre>
-
-
- <h2><a name="2.5.15">2.5.15 Mapping for <code>gYearMonth</code></a></h2>
-
- <p>The XML Schema <code>gYearMonth</code> built-in data type is mapped to
- the <code>xml_schema::gyear_month</code> C++ class which represents
- a year and a month with an optional time zone. Its interface is presented
- below. For more information on the base <code>xml_schema::time_zone</code>
- class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
- Representation"</a>.</p>
-
- <pre class="c++">
-class gyear_month: public simple_type, public time_zone
-{
-public:
- gyear_month (int year, unsigned short month);
- gyear_month (int year, unsigned short month,
- short zone_hours, short zone_minutes);
-public:
- gyear_month (const gyear_month&amp;);
-
- gyear_month&amp;
- operator= (const gyear_month&amp;);
-
- virtual gyear_month*
- _clone () const;
-
-public:
- int
- year () const;
-
- void
- year (int);
-
- unsigned short
- month () const;
-
- void
- month (unsigned short);
-};
-
-bool
-operator== (const gyear_month&amp;, const gyear_month&amp;);
-
-bool
-operator!= (const gyear_month&amp;, const gyear_month&amp;);
- </pre>
-
-
- <h2><a name="2.5.16">2.5.16 Mapping for <code>time</code></a></h2>
-
- <p>The XML Schema <code>time</code> built-in data type is mapped to
- the <code>xml_schema::time</code> C++ class which represents hours,
- minutes, and seconds with an optional time zone. Its interface is
- presented below. For more information on the base
- <code>xml_schema::time_zone</code> class refer to
- <a href="#2.5.7">Section 2.5.7, "Time Zone Representation"</a>.</p>
-
- <pre class="c++">
-class time: public simple_type, public time_zone
-{
-public:
- time (unsigned short hours, unsigned short minutes, double seconds);
- time (unsigned short hours, unsigned short minutes, double seconds,
- short zone_hours, short zone_minutes);
-
-public:
- time (const time&amp;);
-
- time&amp;
- operator= (const time&amp;);
-
- virtual time*
- _clone () const;
-
-public:
- unsigned short
- hours () const;
-
- void
- hours (unsigned short);
-
- unsigned short
- minutes () const;
-
- void
- minutes (unsigned short);
-
- double
- seconds () const;
-
- void
- seconds (double);
-};
-
-bool
-operator== (const time&amp;, const time&amp;);
-
-bool
-operator!= (const time&amp;, const time&amp;);
- </pre>
-
-
- <!-- Mapping for Simple Types -->
-
- <h2><a name="2.6">2.6 Mapping for Simple Types</a></h2>
-
- <p>An XML Schema simple type is mapped to a C++ class with the same
- name as the simple type. The class defines a public copy constructor,
- a public copy assignment operator, and a public virtual
- <code>_clone</code> function. The <code>_clone</code> function is
- declared <code>const</code>, does not take any arguments, and returns
- a pointer to a complete copy of the instance allocated in the free
- store. The <code>_clone</code> function shall be used to make copies
- when static type and dynamic type of the instance may differ (see
- <a href="#2.11">Section 2.11, "Mapping for <code>xsi:type</code>
- and Substitution Groups"</a>). For instance:</p>
-
- <pre class="xml">
-&lt;simpleType name="object">
- ...
-&lt;/simpleType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: ...
-{
-public:
- object (const object&amp;);
-
-public:
- object&amp;
- operator= (const object&amp;);
-
-public:
- virtual object*
- _clone () const;
-
- ...
-
-};
- </pre>
-
- <p>The base class specification and the rest of the class definition
- depend on the type of derivation used to define the simple type. </p>
-
-
- <h3><a name="2.6.1">2.6.1 Mapping for Derivation by Restriction</a></h3>
-
- <p>XML Schema derivation by restriction is mapped to C++ public
- inheritance. The base type of the restriction becomes the base
- type for the resulting C++ class. In addition to the members described
- in <a href="#2.6">Section 2.6, "Mapping for Simple Types"</a>, the
- resulting C++ class defines a public constructor with the base type
- as its single argument. For instance:</p>
-
- <pre class="xml">
-&lt;simpleType name="object">
- &lt;restriction base="base">
- ...
- &lt;/restriction>
-&lt;/simpleType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public base
-{
-public:
- object (const base&amp;);
- object (const object&amp;);
-
-public:
- object&amp;
- operator= (const object&amp;);
-
-public:
- virtual object*
- _clone () const;
-};
- </pre>
-
-
- <h3><a name="2.6.2">2.6.2 Mapping for Enumerations</a></h3>
-
-<p>XML Schema restriction by enumeration is mapped to a C++ class
- with semantics similar to C++ <code>enum</code>. Each XML Schema
- enumeration element is mapped to a C++ enumerator with the
- name derived from the <code>value</code> attribute and defined
- in the class scope. In addition to the members
- described in <a href="#2.6">Section 2.6, "Mapping for Simple Types"</a>,
- the resulting C++ class defines a public constructor that can be called
- with one of the enumerators as its single argument, a public constructor
- that can be called with enumeration's base value as its single
- argument, a public assignment operator that can be used to assign the
- value of one of the enumerators, and a public implicit conversion
- operator to the underlying C++ enum type.</p>
-
-<p>Furthermore, for string-based enumeration types, the resulting C++
- class defines a public constructor with a single argument of type
- <code>const C*</code> and a public constructor with a single
- argument of type <code>const std::basic_string&lt;C>&amp;</code>.
- For instance:</p>
-
- <pre class="xml">
-&lt;simpleType name="color">
- &lt;restriction base="string">
- &lt;enumeration value="red"/>
- &lt;enumeration value="green"/>
- &lt;enumeration value="blue"/>
- &lt;/restriction>
-&lt;/simpleType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class color: public xml_schema::string
-{
-public:
- enum value
- {
- red,
- green,
- blue
- };
-
-public:
- color (value);
- color (const C*);
- color (const std::basic_string&lt;C>&amp;);
- color (const xml_schema::string&amp;);
- color (const color&amp;);
-
-public:
- color&amp;
- operator= (value);
-
- color&amp;
- operator= (const color&amp;);
-
-public:
- virtual color*
- _clone () const;
-
-public:
- operator value () const;
-};
- </pre>
-
- <h3><a name="2.6.3">2.6.3 Mapping for Derivation by List</a></h3>
-
- <p>XML Schema derivation by list is mapped to C++ public
- inheritance from <code>xml_schema::simple_type</code>
- (<a href="#2.5.3">Section 2.5.3, "Mapping for
- <code>anySimpleType</code>"</a>) and a suitable sequence type.
- The list item type becomes the element type of the sequence.
- In addition to the members described in <a href="#2.6">Section 2.6,
- "Mapping for Simple Types"</a>, the resulting C++ class defines
- a public default constructor, a public constructor
- with the first argument of type <code>size_type</code> and
- the second argument of list item type that creates
- a list object with the specified number of copies of the specified
- element value, and a public constructor with the two arguments
- of an input iterator type that creates a list object from an
- iterator range. For instance:
- </p>
-
- <pre class="xml">
-&lt;simpleType name="int_list">
- &lt;list itemType="int"/>
-&lt;/simpleType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class int_list: public simple_type,
- public sequence&lt;int>
-{
-public:
- int_list ();
- int_list (size_type n, int x);
-
- template &lt;typename I>
- int_list (const I&amp; begin, const I&amp; end);
- int_list (const int_list&amp;);
-
-public:
- int_list&amp;
- operator= (const int_list&amp;);
-
-public:
- virtual int_list*
- _clone () const;
-};
- </pre>
-
- <p>The <code>sequence</code> class template is defined in an
- implementation-specific namespace. It conforms to the
- sequence interface as defined by the ISO/ANSI Standard for
- C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences").
- Practically, this means that you can treat such a sequence
- as if it was <code>std::vector</code>. One notable extension
- to the standard interface that is available only for
- sequences of non-fundamental C++ types is the addition of
- the overloaded <code>push_back</code> and <code>insert</code>
- member functions which instead of the constant reference
- to the element type accept automatic pointer (<code>std::auto_ptr</code>
- or <code>std::unique_ptr</code>, depending on the C++ standard
- selected) to the element type. These functions assume ownership
- of the pointed to object and reset the passed automatic pointer.
- </p>
-
- <h3><a name="2.6.4">2.6.4 Mapping for Derivation by Union</a></h3>
-
- <p>XML Schema derivation by union is mapped to C++ public
- inheritance from <code>xml_schema::simple_type</code>
- (<a href="#2.5.3">Section 2.5.3, "Mapping for
- <code>anySimpleType</code>"</a>) and <code>std::basic_string&lt;C></code>.
- In addition to the members described in <a href="#2.6">Section 2.6,
- "Mapping for Simple Types"</a>, the resulting C++ class defines a
- public constructor with a single argument of type <code>const C*</code>
- and a public constructor with a single argument of type
- <code>const std::basic_string&lt;C>&amp;</code>. For instance:
- </p>
-
- <pre class="xml">
-&lt;simpleType name="int_string_union">
- &lt;xsd:union memberTypes="xsd:int xsd:string"/>
-&lt;/simpleType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class int_string_union: public simple_type,
- public std::basic_string&lt;C>
-{
-public:
- int_string_union (const C*);
- int_string_union (const std::basic_string&lt;C>&amp;);
- int_string_union (const int_string_union&amp;);
-
-public:
- int_string_union&amp;
- operator= (const int_string_union&amp;);
-
-public:
- virtual int_string_union*
- _clone () const;
-};
- </pre>
-
- <h2><a name="2.7">2.7 Mapping for Complex Types</a></h2>
-
- <p>An XML Schema complex type is mapped to a C++ class with the same
- name as the complex type. The class defines a public copy constructor,
- a public copy assignment operator, and a public virtual
- <code>_clone</code> function. The <code>_clone</code> function is
- declared <code>const</code>, does not take any arguments, and returns
- a pointer to a complete copy of the instance allocated in the free
- store. The <code>_clone</code> function shall be used to make copies
- when static type and dynamic type of the instance may differ (see
- <a href="#2.11">Section 2.11, "Mapping for <code>xsi:type</code>
- and Substitution Groups"</a>).</p>
-
- <p>Additionally, the resulting C++ class
- defines two public constructors that take an initializer for each
- member of the complex type and all its base types that belongs to
- the One cardinality class (see <a href="#2.8">Section 2.8, "Mapping
- for Local Elements and Attributes"</a>). In the first constructor,
- the arguments are passed as constant references and the newly created
- instance is initialized with copies of the passed objects. In the
- second constructor, arguments that are complex types (that is,
- they themselves contain elements or attributes) are passed as
- either <code>std::auto_ptr</code> (C++98) or <code>std::unique_ptr</code>
- (C++11), depending on the C++ standard selected. In this case the newly
- created instance is directly initialized with and assumes ownership
- of the pointed to objects and the <code>std::[auto|unique]_ptr</code>
- arguments are reset to <code>0</code>. For instance:</p>
-
- <pre class="xml">
-&lt;complexType name="complex">
- &lt;sequence>
- &lt;element name="a" type="int"/>
- &lt;element name="b" type="string"/>
- &lt;/sequence>
-&lt;/complexType>
-
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="s-one" type="boolean"/>
- &lt;element name="c-one" type="complex"/>
- &lt;element name="optional" type="int" minOccurs="0"/>
- &lt;element name="sequence" type="string" maxOccurs="unbounded"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class complex: public xml_schema::type
-{
-public:
- object (const int&amp; a, const xml_schema::string&amp; b);
- object (const complex&amp;);
-
-public:
- object&amp;
- operator= (const complex&amp;);
-
-public:
- virtual complex*
- _clone () const;
-
- ...
-
-};
-
-class object: public xml_schema::type
-{
-public:
- object (const bool&amp; s_one, const complex&amp; c_one);
- object (const bool&amp; s_one, std::[auto|unique]_ptr&lt;complex> c_one);
- object (const object&amp;);
-
-public:
- object&amp;
- operator= (const object&amp;);
-
-public:
- virtual object*
- _clone () const;
-
- ...
-
-};
- </pre>
-
- <p>Notice that the generated <code>complex</code> class does not
- have the second (<code>std::[auto|unique]_ptr</code>) version of the
- constructor since all its required members are of simple types.</p>
-
- <p>If an XML Schema complex type has an ultimate base which is an XML
- Schema simple type then the resulting C++ class also defines a public
- constructor that takes an initializer for the base type as well as
- for each member of the complex type and all its base types that
- belongs to the One cardinality class. For instance:</p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;simpleContent>
- &lt;extension base="date">
- &lt;attribute name="lang" type="language" use="required"/>
- &lt;/extension>
- &lt;/simpleContent>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::string
-{
-public:
- object (const xml_schema::language&amp; lang);
-
- object (const xml_schema::date&amp; base,
- const xml_schema::language&amp; lang);
-
- ...
-
-};
- </pre>
-
- <p>Furthermore, for string-based XML Schema complex types, the resulting C++
- class also defines two public constructors with the first arguments
- of type <code>const C*</code> and <code>std::basic_string&lt;C>&amp;</code>,
- respectively, followed by arguments for each member of the complex
- type and all its base types that belongs to the One cardinality
- class. For enumeration-based complex types the resulting C++
- class also defines a public constructor with the first arguments
- of the underlying enum type followed by arguments for each member
- of the complex type and all its base types that belongs to the One
- cardinality class. For instance:</p>
-
- <pre class="xml">
-&lt;simpleType name="color">
- &lt;restriction base="string">
- &lt;enumeration value="red"/>
- &lt;enumeration value="green"/>
- &lt;enumeration value="blue"/>
- &lt;/restriction>
-&lt;/simpleType>
-
-&lt;complexType name="object">
- &lt;simpleContent>
- &lt;extension base="color">
- &lt;attribute name="lang" type="language" use="required"/>
- &lt;/extension>
- &lt;/simpleContent>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class color: public xml_schema::string
-{
-public:
- enum value
- {
- red,
- green,
- blue
- };
-
-public:
- color (value);
- color (const C*);
- color (const std::basic_string&lt;C>&amp;);
-
- ...
-
-};
-
-class object: color
-{
-public:
- object (const color&amp; base,
- const xml_schema::language&amp; lang);
-
- object (const color::value&amp; base,
- const xml_schema::language&amp; lang);
-
- object (const C* base,
- const xml_schema::language&amp; lang);
-
- object (const std::basic_string&lt;C>&amp; base,
- const xml_schema::language&amp; lang);
-
- ...
-
-};
- </pre>
-
- <p>Additional constructors can be requested with the
- <code>--generate-default-ctor</code> and
- <code>--generate-from-base-ctor</code> options. See the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a> for details.</p>
-
- <p>If an XML Schema complex type is not explicitly derived from any type,
- the resulting C++ class is derived from <code>xml_schema::type</code>.
- In cases where an XML Schema complex type is defined using derivation
- by extension or restriction, the resulting C++ base class specification
- depends on the type of derivation and is described in the subsequent
- sections.
- </p>
-
- <p>The mapping for elements and attributes that are defined in a complex
- type is described in <a href="#2.8">Section 2.8, "Mapping for Local
- Elements and Attributes"</a>.
- </p>
-
- <h3><a name="2.7.1">2.7.1 Mapping for Derivation by Extension</a></h3>
-
- <p>XML Schema derivation by extension is mapped to C++ public
- inheritance. The base type of the extension becomes the base
- type for the resulting C++ class.
- </p>
-
- <h3><a name="2.7.2">2.7.2 Mapping for Derivation by Restriction</a></h3>
-
- <p>XML Schema derivation by restriction is mapped to C++ public
- inheritance. The base type of the restriction becomes the base
- type for the resulting C++ class. XML Schema elements and
- attributes defined within restriction do not result in any
- definitions in the resulting C++ class. Instead, corresponding
- (unrestricted) definitions are inherited from the base class.
- In the future versions of this mapping, such elements and
- attributes may result in redefinitions of accessors and
- modifiers to reflect their restricted semantics.
- </p>
-
- <!-- 2.8 Mapping for Local Elements and Attributes -->
-
- <h2><a name="2.8">2.8 Mapping for Local Elements and Attributes</a></h2>
-
- <p>XML Schema element and attribute definitions are called local
- if they appear within a complex type definition, an element group
- definition, or an attribute group definitions.
- </p>
-
- <p>Local XML Schema element and attribute definitions have the same
- C++ mapping. Therefore, in this section, local elements and
- attributes are collectively called members.
- </p>
-
- <p>While there are many different member cardinality combinations
- (determined by the <code>use</code> attribute for attributes and
- the <code>minOccurs</code> and <code>maxOccurs</code> attributes
- for elements), the mapping divides all possible cardinality
- combinations into three cardinality classes:
- </p>
-
- <dl>
- <dt><i>one</i></dt>
- <dd>attributes: <code>use == "required"</code></dd>
- <dd>attributes: <code>use == "optional"</code> and has default or fixed value</dd>
- <dd>elements: <code>minOccurs == "1"</code> and <code>maxOccurs == "1"</code></dd>
-
- <dt><i>optional</i></dt>
- <dd>attributes: <code>use == "optional"</code> and doesn't have default or fixed value</dd>
- <dd>elements: <code>minOccurs == "0"</code> and <code>maxOccurs == "1"</code></dd>
-
- <dt><i>sequence</i></dt>
- <dd>elements: <code>maxOccurs > "1"</code></dd>
- </dl>
-
- <p>An optional attribute with a default or fixed value acquires this value
- if the attribute hasn't been specified in an instance document (see
- <a href="#A">Appendix A, "Default and Fixed Values"</a>). This
- mapping places such optional attributes to the One cardinality
- class.</p>
-
- <p>A member is mapped to a set of public type definitions
- (<code>typedef</code>s) and a set of public accessor and modifier
- functions. Type definitions have names derived from the member's
- name. The accessor and modifier functions have the same name as the
- member. For example:
- </p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="member" type="string"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- typedef xml_schema::string member_type;
-
- const member_type&amp;
- member () const;
-
- ...
-
-};
- </pre>
-
- <p>In addition, if a member has a default or fixed value, a static
- accessor function is generated that returns this value. For
- example:</p>
-
-<pre class="xml">
-&lt;complexType name="object">
- &lt;attribute name="data" type="string" default="test"/>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- typedef xml_schema::string data_type;
-
- const data_type&amp;
- data () const;
-
- static const data_type&amp;
- data_default_value ();
-
- ...
-
-};
- </pre>
-
- <p>Names and semantics of type definitions for the member as well
- as signatures of the accessor and modifier functions depend on
- the member's cardinality class and are described in the following
- sub-sections.
- </p>
-
-
- <h3><a name="2.8.1">2.8.1 Mapping for Members with the One Cardinality Class</a></h3>
-
- <p>For the One cardinality class, the type definitions consist of
- an alias for the member's type with the name created by appending
- the <code>_type</code> suffix to the member's name.
- </p>
-
- <p>The accessor functions come in constant and non-constant versions.
- The constant accessor function returns a constant reference to the
- member and can be used for read-only access. The non-constant
- version returns an unrestricted reference to the member and can
- be used for read-write access.
- </p>
-
- <p>The first modifier function expects an argument of type reference to
- constant of the member's type. It makes a deep copy of its argument.
- Except for member's types that are mapped to fundamental C++ types,
- the second modifier function is provided that expects an argument
- of type automatic pointer (<code>std::auto_ptr</code> or
- <code>std::unique_ptr</code>, depending on the C++ standard selected)
- to the member's type. It assumes ownership of the pointed to object
- and resets the passed automatic pointer. For instance:</p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="member" type="string"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Type definitions.
- //
- typedef xml_schema::string member_type;
-
- // Accessors.
- //
- const member_type&amp;
- member () const;
-
- member_type&amp;
- member ();
-
- // Modifiers.
- //
- void
- member (const member_type&amp;);
-
- void
- member (std::[auto|unique]_ptr&lt;member_type>);
- ...
-
-};
- </pre>
-
- <p>In addition, if requested by specifying the <code>--generate-detach</code>
- option and only for members of non-fundamental C++ types, the mapping
- provides a detach function that returns an automatic pointer to the
- member's type, for example:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- ...
-
- std::[auto|unique]_ptr&lt;member_type>
- detach_member ();
- ...
-
-};
- </pre>
-
- <p>This function detaches the value from the tree leaving the member
- value uninitialized. Accessing such an uninitialized value prior to
- re-initializing it results in undefined behavior.</p>
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o)
-{
- using xml_schema::string;
-
- string s (o.member ()); // get
- object::member_type&amp; sr (o.member ()); // get
-
- o.member ("hello"); // set, deep copy
- o.member () = "hello"; // set, deep copy
-
- // C++98 version.
- //
- std::auto_ptr&lt;string> p (new string ("hello"));
- o.member (p); // set, assumes ownership
- p = o.detach_member (); // detach, member is uninitialized
- o.member (p); // re-attach
-
- // C++11 version.
- //
- std::unique_ptr&lt;string> p (new string ("hello"));
- o.member (std::move (p)); // set, assumes ownership
- p = o.detach_member (); // detach, member is uninitialized
- o.member (std::move (p)); // re-attach
-}
- </pre>
-
-
-<h3><a name="2.8.2">2.8.2 Mapping for Members with the Optional Cardinality Class</a></h3>
-
- <p>For the Optional cardinality class, the type definitions consist of
- an alias for the member's type with the name created by appending
- the <code>_type</code> suffix to the member's name and an alias for
- the container type with the name created by appending the
- <code>_optional</code> suffix to the member's name.
- </p>
-
- <p>Unlike accessor functions for the One cardinality class, accessor
- functions for the Optional cardinality class return references to
- corresponding containers rather than directly to members. The
- accessor functions come in constant and non-constant versions.
- The constant accessor function returns a constant reference to
- the container and can be used for read-only access. The non-constant
- version returns an unrestricted reference to the container
- and can be used for read-write access.
- </p>
-
- <p>The modifier functions are overloaded for the member's
- type and the container type. The first modifier function
- expects an argument of type reference to constant of the
- member's type. It makes a deep copy of its argument.
- Except for member's types that are mapped to fundamental C++ types,
- the second modifier function is provided that expects an argument
- of type automatic pointer (<code>std::auto_ptr</code> or
- <code>std::unique_ptr</code>, depending on the C++ standard selected)
- to the member's type. It assumes ownership of the pointed to object
- and resets the passed automatic pointer. The last modifier function
- expects an argument of type reference to constant of the container
- type. It makes a deep copy of its argument. For instance:
- </p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="member" type="string" minOccurs="0"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Type definitions.
- //
- typedef xml_schema::string member_type;
- typedef optional&lt;member_type> member_optional;
-
- // Accessors.
- //
- const member_optional&amp;
- member () const;
-
- member_optional&amp;
- member ();
-
- // Modifiers.
- //
- void
- member (const member_type&amp;);
-
- void
- member (std::[auto|unique]_ptr&lt;member_type>);
-
- void
- member (const member_optional&amp;);
-
- ...
-
-};
- </pre>
-
-
- <p>The <code>optional</code> class template is defined in an
- implementation-specific namespace and has the following
- interface. The <code>[auto|unique]_ptr</code>-based constructor
- and modifier function are only available if the template
- argument is not a fundamental C++ type.
- </p>
-
- <pre class="c++">
-template &lt;typename X>
-class optional
-{
-public:
- optional ();
-
- // Makes a deep copy.
- //
- explicit
- optional (const X&amp;);
-
- // Assumes ownership.
- //
- explicit
- optional (std::[auto|unique]_ptr&lt;X>);
-
- optional (const optional&amp;);
-
-public:
- optional&amp;
- operator= (const X&amp;);
-
- optional&amp;
- operator= (const optional&amp;);
-
- // Pointer-like interface.
- //
-public:
- const X*
- operator-> () const;
-
- X*
- operator-> ();
-
- const X&amp;
- operator* () const;
-
- X&amp;
- operator* ();
-
- typedef void (optional::*bool_convertible) ();
- operator bool_convertible () const;
-
- // Get/set interface.
- //
-public:
- bool
- present () const;
-
- const X&amp;
- get () const;
-
- X&amp;
- get ();
-
- // Makes a deep copy.
- //
- void
- set (const X&amp;);
-
- // Assumes ownership.
- //
- void
- set (std::[auto|unique]_ptr&lt;X>);
-
- // Detach and return the contained value.
- //
- std::[auto|unique]_ptr&lt;X>
- detach ();
-
- void
- reset ();
-};
-
-template &lt;typename X>
-bool
-operator== (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
-
-template &lt;typename X>
-bool
-operator!= (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
-
-template &lt;typename X>
-bool
-operator&lt; (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
-
-template &lt;typename X>
-bool
-operator> (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
-
-template &lt;typename X>
-bool
-operator&lt;= (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
-
-template &lt;typename X>
-bool
-operator>= (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
- </pre>
-
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o)
-{
- using xml_schema::string;
-
- if (o.member ().present ()) // test
- {
- string&amp; s (o.member ().get ()); // get
- o.member ("hello"); // set, deep copy
- o.member ().set ("hello"); // set, deep copy
- o.member ().reset (); // reset
- }
-
- // Same as above but using pointer notation:
- //
- if (o.member ()) // test
- {
- string&amp; s (*o.member ()); // get
- o.member ("hello"); // set, deep copy
- *o.member () = "hello"; // set, deep copy
- o.member ().reset (); // reset
- }
-
- // C++98 version.
- //
- std::auto_ptr&lt;string> p (new string ("hello"));
- o.member (p); // set, assumes ownership
-
- p = new string ("hello");
- o.member ().set (p); // set, assumes ownership
-
- p = o.member ().detach (); // detach, member is reset
- o.member ().set (p); // re-attach
-
- // C++11 version.
- //
- std::unique_ptr&lt;string> p (new string ("hello"));
- o.member (std::move (p)); // set, assumes ownership
-
- p.reset (new string ("hello"));
- o.member ().set (std::move (p)); // set, assumes ownership
-
- p = o.member ().detach (); // detach, member is reset
- o.member ().set (std::move (p)); // re-attach
-}
- </pre>
-
-
- <h3><a name="2.8.3">2.8.3 Mapping for Members with the Sequence Cardinality Class</a></h3>
-
- <p>For the Sequence cardinality class, the type definitions consist of an
- alias for the member's type with the name created by appending
- the <code>_type</code> suffix to the member's name, an alias of
- the container type with the name created by appending the
- <code>_sequence</code> suffix to the member's name, an alias of
- the iterator type with the name created by appending the
- <code>_iterator</code> suffix to the member's name, and an alias
- of the constant iterator type with the name created by appending the
- <code>_const_iterator</code> suffix to the member's name.
- </p>
-
- <p>The accessor functions come in constant and non-constant versions.
- The constant accessor function returns a constant reference to the
- container and can be used for read-only access. The non-constant
- version returns an unrestricted reference to the container and can
- be used for read-write access.
- </p>
-
- <p>The modifier function expects an argument of type reference to
- constant of the container type. The modifier function
- makes a deep copy of its argument. For instance:
- </p>
-
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="member" type="string" minOccurs="unbounded"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Type definitions.
- //
- typedef xml_schema::string member_type;
- typedef sequence&lt;member_type> member_sequence;
- typedef member_sequence::iterator member_iterator;
- typedef member_sequence::const_iterator member_const_iterator;
-
- // Accessors.
- //
- const member_sequence&amp;
- member () const;
-
- member_sequence&amp;
- member ();
-
- // Modifier.
- //
- void
- member (const member_sequence&amp;);
-
- ...
-
-};
- </pre>
-
- <p>The <code>sequence</code> class template is defined in an
- implementation-specific namespace. It conforms to the
- sequence interface as defined by the ISO/ANSI Standard for
- C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences").
- Practically, this means that you can treat such a sequence
- as if it was <code>std::vector</code>. Two notable extensions
- to the standard interface that are available only for
- sequences of non-fundamental C++ types are the addition of
- the overloaded <code>push_back</code> and <code>insert</code>
- as well as the <code>detach_back</code> and <code>detach</code>
- member functions. The additional <code>push_back</code> and
- <code>insert</code> functions accept an automatic pointer
- (<code>std::auto_ptr</code> or <code>std::unique_ptr</code>,
- depending on the C++ standard selected) to the
- element type instead of the constant reference. They assume
- ownership of the pointed to object and reset the passed
- automatic pointer. The <code>detach_back</code> and
- <code>detach</code> functions detach the element
- value from the sequence container and, by default, remove
- the element from the sequence. These additional functions
- have the following signatures:</p>
-
- <pre class="c++">
-template &lt;typename X>
-class sequence
-{
-public:
- ...
-
- void
- push_back (std::[auto|unique]_ptr&lt;X>)
-
- iterator
- insert (iterator position, std::[auto|unique]_ptr&lt;X>)
-
- std::[auto|unique]_ptr&lt;X>
- detach_back (bool pop = true);
-
- iterator
- detach (iterator position,
- std::[auto|unique]_ptr&lt;X>&amp; result,
- bool erase = true)
-
- ...
-}
- </pre>
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o)
-{
- using xml_schema::string;
-
- object::member_sequence&amp; s (o.member ());
-
- // Iteration.
- //
- for (object::member_iterator i (s.begin ()); i != s.end (); ++i)
- {
- string&amp; value (*i);
- }
-
- // Modification.
- //
- s.push_back ("hello"); // deep copy
-
- // C++98 version.
- //
- std::auto_ptr&lt;string> p (new string ("hello"));
- s.push_back (p); // assumes ownership
- p = s.detach_back (); // detach and pop
- s.push_back (p); // re-append
-
- // C++11 version.
- //
- std::unique_ptr&lt;string> p (new string ("hello"));
- s.push_back (std::move (p)); // assumes ownership
- p = s.detach_back (); // detach and pop
- s.push_back (std::move (p)); // re-append
-
- // Setting a new container.
- //
- object::member_sequence n;
- n.push_back ("one");
- n.push_back ("two");
- o.member (n); // deep copy
-}
- </pre>
-
- <h3><a name="2.8.4">2.8.4 Element Order</a></h3>
-
- <p>C++/Tree is a "flattening" mapping in a sense that many levels of
- nested compositors (<code>choice</code> and <code>sequence</code>),
- all potentially with their own cardinalities, are in the end mapped
- to a flat set of elements with one of the three cardinality classes
- discussed in the previous sections. While this results in a simple
- and easy to use API for most types, in certain cases, the order of
- elements in the actual XML documents is not preserved once parsed
- into the object model. And sometimes such order has
- application-specific significance. As an example, consider a schema
- that defines a batch of bank transactions:</p>
-
- <pre class="xml">
-&lt;complexType name="withdraw">
- &lt;sequence>
- &lt;element name="account" type="unsignedInt"/>
- &lt;element name="amount" type="unsignedInt"/>
- &lt;/sequence>
-&lt;/complexType>
-
-&lt;complexType name="deposit">
- &lt;sequence>
- &lt;element name="account" type="unsignedInt"/>
- &lt;element name="amount" type="unsignedInt"/>
- &lt;/sequence>
-&lt;/complexType>
-
-&lt;complexType name="batch">
- &lt;choice minOccurs="0" maxOccurs="unbounded">
- &lt;element name="withdraw" type="withdraw"/>
- &lt;element name="deposit" type="deposit"/>
- &lt;/choice>
-&lt;/complexType>
- </pre>
-
- <p>The batch can contain any number of transactions in any order
- but the order of transactions in each actual batch is significant.
- For instance, consider what could happen if we reorder the
- transactions and apply all the withdrawals before deposits.</p>
-
- <p>For the <code>batch</code> schema type defined above the default
- C++/Tree mapping will produce a C++ class that contains a pair of
- sequence containers, one for each of the two elements. While this
- will capture the content (transactions), the order of this content
- as it appears in XML will be lost. Also, if we try to serialize the
- batch we just loaded back to XML, all the withdrawal transactions
- will appear before deposits.</p>
-
- <p>To overcome this limitation of a flattening mapping, C++/Tree
- allows us to mark certain XML Schema types, for which content
- order is important, as ordered.</p>
-
- <p>There are several command line options that control which
- schema types are treated as ordered. To make an individual
- type ordered, we use the <code>--ordered-type</code> option,
- for example:</p>
-
- <pre class="term">
---ordered-type batch
- </pre>
-
- <p>To automatically treat all the types that are derived from an ordered
- type also ordered, we use the <code>--ordered-type-derived</code>
- option. This is primarily useful if you would like to iterate
- over the complete hierarchy's content using the content order
- sequence (discussed below).</p>
-
- <p>Ordered types are also useful for handling mixed content. To
- automatically mark all the types with mixed content as ordered
- we use the <code>--ordered-type-mixed</code> option. For more
- information on handling mixed content see <a href="#2.13">Section
- 2.13, "Mapping for Mixed Content Models"</a>.</p>
-
- <p>Finally, we can mark all the types in the schema we are
- compiling with the <code>--ordered-type-all</code> option.
- You should only resort to this option if all the types in
- your schema truly suffer from the loss of content
- order since, as we will discuss shortly, ordered types
- require extra effort to access and, especially, modify.
- See the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a> for more information on
- these options.</p>
-
- <p>Once a type is marked ordered, C++/Tree alters its mapping
- in several ways. Firstly, for each local element, element
- wildcard (<a href="#2.12.4">Section 2.12.4, "Element Wildcard
- Order"</a>), and mixed content text (<a href="#2.13">Section
- 2.13, "Mapping for Mixed Content Models"</a>) in this type, a
- content id constant is generated. Secondly, an addition sequence
- is added to the class that captures the content order. Here
- is how the mapping of our <code>batch</code> class changes
- once we make it ordered:</p>
-
- <pre class="c++">
-class batch: public xml_schema::type
-{
-public:
- // withdraw
- //
- typedef withdraw withdraw_type;
- typedef sequence&lt;withdraw_type> withdraw_sequence;
- typedef withdraw_sequence::iterator withdraw_iterator;
- typedef withdraw_sequence::const_iterator withdraw_const_iterator;
-
- static const std::size_t withdraw_id = 1;
-
- const withdraw_sequence&amp;
- withdraw () const;
-
- withdraw_sequence&amp;
- withdraw ();
-
- void
- withdraw (const withdraw_sequence&amp;);
-
- // deposit
- //
- typedef deposit deposit_type;
- typedef sequence&lt;deposit_type> deposit_sequence;
- typedef deposit_sequence::iterator deposit_iterator;
- typedef deposit_sequence::const_iterator deposit_const_iterator;
-
- static const std::size_t deposit_id = 2;
-
- const deposit_sequence&amp;
- deposit () const;
-
- deposit_sequence&amp;
- deposit ();
-
- void
- deposit (const deposit_sequence&amp;);
-
- // content_order
- //
- typedef xml_schema::content_order content_order_type;
- typedef std::vector&lt;content_order_type> content_order_sequence;
- typedef content_order_sequence::iterator content_order_iterator;
- typedef content_order_sequence::const_iterator content_order_const_iterator;
-
- const content_order_sequence&amp;
- content_order () const;
-
- content_order_sequence&amp;
- content_order ();
-
- void
- content_order (const content_order_sequence&amp;);
-
- ...
-};
- </pre>
-
- <p>Notice the <code>withdraw_id</code> and <code>deposit_id</code>
- content ids as well as the extra <code>content_order</code>
- sequence that does not correspond to any element in the
- schema definition. The other changes to the mapping for ordered
- types has to do with XML parsing and serialization code. During
- parsing the content order is captured in the <code>content_order</code>
- sequence while during serialization this sequence is used to
- determine the order in which content is serialized. The
- <code>content_order</code> sequence is also copied during
- copy construction and assigned during copy assignment. It is also
- taken into account during comparison.</p>
-
- <p>The entry type of the <code>content_order</code> sequence is the
- <code>xml_schema::content_order</code> type that has the following
- interface:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- struct content_order
- {
- content_order (std::size_t id, std::size_t index = 0);
-
- std::size_t id;
- std::size_t index;
- };
-
- bool
- operator== (const content_order&amp;, const content_order&amp;);
-
- bool
- operator!= (const content_order&amp;, const content_order&amp;);
-
- bool
- operator&lt; (const content_order&amp;, const content_order&amp;);
-}
- </pre>
-
- <p>The <code>content_order</code> sequence describes the order of
- content (elements, including wildcards, as well as mixed content
- text). Each entry in this sequence consists of the content id
- (for example, <code>withdraw_id</code> or <code>deposit_id</code>
- in our case) as well as, for elements of the sequence cardinality
- class, an index into the corresponding sequence container (the
- index is unused for the one and optional cardinality classes).
- For example, in our case, if the content id is <code>withdraw_id</code>,
- then the index will point into the <code>withdraw</code> element
- sequence.</p>
-
- <p>With all this information we can now examine how to iterate over
- transaction in the batch in content order:</p>
-
- <pre class="c++">
-batch&amp; b = ...
-
-for (batch::content_order_const_iterator i (b.content_order ().begin ());
- i != b.content_order ().end ();
- ++i)
-{
- switch (i->id)
- {
- case batch::withdraw_id:
- {
- const withdraw&amp; t (b.withdraw ()[i->index]);
- cerr &lt;&lt; t.account () &lt;&lt; " withdraw " &lt;&lt; t.amount () &lt;&lt; endl;
- break;
- }
- case batch::deposit_id:
- {
- const deposit&amp; t (b.deposit ()[i->index]);
- cerr &lt;&lt; t.account () &lt;&lt; " deposit " &lt;&lt; t.amount () &lt;&lt; endl;
- break;
- }
- default:
- {
- assert (false); // Unknown content id.
- }
- }
-}
- </pre>
-
- <p>If we serialized our batch back to XML, we would also see that the
- order of transactions in the output is exactly the same as in the
- input rather than all the withdrawals first followed by all the
- deposits.</p>
-
- <p>The most complex aspect of working with ordered types is
- modifications. Now we not only need to change the content,
- but also remember to update the order information corresponding
- to this change. As a first example, we add a deposit transaction
- to the batch:</p>
-
- <pre class="c++">
-using xml_schema::content_order;
-
-batch::deposit_sequence&amp; d (b.deposit ());
-batch::withdraw_sequence&amp; w (b.withdraw ());
-batch::content_order_sequence&amp; co (b.content_order ());
-
-d.push_back (deposit (123456789, 100000));
-co.push_back (content_order (batch::deposit_id, d.size () - 1));
- </pre>
-
- <p>In the above example we first added the content (deposit
- transaction) and then updated the content order information
- by adding an entry with <code>deposit_id</code> content
- id and the index of the just added deposit transaction.</p>
-
- <p>Removing the last transaction can be easy if we know which
- transaction (deposit or withdrawal) is last:</p>
-
- <pre class="c++">
-d.pop_back ();
-co.pop_back ();
- </pre>
-
- <p>If, however, we do not know which transaction is last, then
- things get a bit more complicated:</p>
-
- <pre class="c++">
-switch (co.back ().id)
-{
-case batch::withdraw_id:
- {
- d.pop_back ();
- break;
- }
-case batch::deposit_id:
- {
- w.pop_back ();
- break;
- }
-}
-
-co.pop_back ();
- </pre>
-
- <p>The following example shows how to add a transaction at the
- beginning of the batch:</p>
-
- <pre class="c++">
-w.push_back (withdraw (123456789, 100000));
-co.insert (co.begin (),
- content_order (batch::withdraw_id, w.size () - 1));
- </pre>
-
- <p>Note also that when we merely modify the content of one
- of the elements in place, we do not need to update its
- order since it doesn't change. For example, here is how
- we can change the amount in the first withdrawal:</p>
-
- <pre class="c++">
-w[0].amount (10000);
- </pre>
-
- <p>For the complete working code shown in this section refer to the
- <code>order/element</code> example in the
- <code>examples/cxx/tree/</code> directory in the XSD distribution.</p>
-
- <p>If both the base and derived types are ordered, then the
- content order sequence is only added to the base and the content
- ids are unique within the whole hierarchy. In this case
- the content order sequence for the derived type contains
- ordering information for both base and derived content.</p>
-
- <p>In some applications we may need to perform more complex
- content processing. For example, in our case, we may need
- to remove all the withdrawal transactions. The default
- container, <code>std::vector</code>, is not particularly
- suitable for such operations. What may be required by
- some applications is a multi-index container that not
- only allows us to iterate in content order similar to
- <code>std::vector</code> but also search by the content
- id as well as the content id and index pair.</p>
-
- <p>While C++/Tree does not provide this functionality by
- default, it allows us to specify a custom container
- type for content order with the <code>--order-container</code>
- command line option. The only requirement from the
- generated code side for such a container is to provide
- the <code>vector</code>-like <code>push_back()</code>,
- <code>size()</code>, and const iteration interfaces.</p>
-
- <p>As an example, here is how we can use the Boost Multi-Index
- container for content order. First we create the
- <code>content-order-container.hxx</code> header with the
- following definition (in C++11, use the alias template
- instead):</p>
-
- <pre class="c++">
-#ifndef CONTENT_ORDER_CONTAINER
-#define CONTENT_ORDER_CONTAINER
-
-#include &lt;cstddef> // std::size_t
-
-#include &lt;boost/multi_index_container.hpp>
-#include &lt;boost/multi_index/member.hpp>
-#include &lt;boost/multi_index/identity.hpp>
-#include &lt;boost/multi_index/ordered_index.hpp>
-#include &lt;boost/multi_index/random_access_index.hpp>
-
-struct by_id {};
-struct by_id_index {};
-
-template &lt;typename T>
-struct content_order_container:
- boost::multi_index::multi_index_container&lt;
- T,
- boost::multi_index::indexed_by&lt;
- boost::multi_index::random_access&lt;>,
- boost::multi_index::ordered_unique&lt;
- boost::multi_index::tag&lt;by_id_index>,
- boost::multi_index::identity&lt;T>
- >,
- boost::multi_index::ordered_non_unique&lt;
- boost::multi_index::tag&lt;by_id>,
- boost::multi_index::member&lt;T, std::size_t, &amp;T::id>
- >
- >
- >
-{};
-
-#endif
- </pre>
-
- <p>Next we add the following two XSD compiler options to include
- this header into every generated header file and to use the
- custom container type (see the XSD compiler command line manual
- for more information on shell quoting for the first option):</p>
-
- <pre class="term">
---hxx-prologue '#include "content-order-container.hxx"'
---order-container content_order_container
- </pre>
-
- <p>With these changes we can now use the multi-index functionality,
- for example, to search for a specific content id:</p>
-
- <pre class="c++">
-typedef batch::content_order_sequence::index&lt;by_id>::type id_set;
-typedef id_set::iterator id_iterator;
-
-const id_set&amp; ids (b.content_order ().get&lt;by_id> ());
-
-std::pair&lt;id_iterator, id_iterator> r (
- ids.equal_range (std::size_t (batch::deposit_id));
-
-for (id_iterator i (r.first); i != r.second; ++i)
-{
- const deposit&amp; t (b.deposit ()[i->index]);
- cerr &lt;&lt; t.account () &lt;&lt; " deposit " &lt;&lt; t.amount () &lt;&lt; endl;
-}
- </pre>
-
- <h2><a name="2.9">2.9 Mapping for Global Elements</a></h2>
-
- <p>An XML Schema element definition is called global if it appears
- directly under the <code>schema</code> element.
- A global element is a valid root of an instance document. By
- default, a global element is mapped to a set of overloaded
- parsing and, optionally, serialization functions with the
- same name as the element. It is also possible to generate types
- for root elements instead of parsing and serialization functions.
- This is primarily useful to distinguish object models with the
- same root type but with different root elements. See
- <a href="#2.9.1">Section 2.9.1, "Element Types"</a> for details.
- It is also possible to request the generation of an element map
- which allows uniform parsing and serialization of multiple root
- elements. See <a href="#2.9.2">Section 2.9.2, "Element Map"</a>
- for details.
- </p>
-
- <p>The parsing functions read XML instance documents and return
- corresponding object models as an automatic pointer
- (<code>std::auto_ptr</code> or <code>std::unique_ptr</code>,
- depending on the C++ standard selected). Their signatures
- have the following pattern (<code>type</code> denotes
- element's type and <code>name</code> denotes element's
- name):
- </p>
-
- <pre class="c++">
-std::[auto|unique]_ptr&lt;type>
-name (....);
- </pre>
-
- <p>The process of parsing, including the exact signatures of the parsing
- functions, is the subject of <a href="#3">Chapter 3, "Parsing"</a>.
- </p>
-
- <p>The serialization functions write object models back to XML instance
- documents. Their signatures have the following pattern:
- </p>
-
- <pre class="c++">
-void
-name (&lt;stream type>&amp;, const type&amp;, ....);
- </pre>
-
- <p>The process of serialization, including the exact signatures of the
- serialization functions, is the subject of <a href="#4">Chapter 4,
- "Serialization"</a>.
- </p>
-
-
- <h3><a name="2.9.1">2.9.1 Element Types</a></h3>
-
- <p>The generation of element types is requested with the
- <code>--generate-element-type</code> option. With this option
- each global element is mapped to a C++ class with the
- same name as the element. Such a class is derived from
- <code>xml_schema::element_type</code> and contains the same set
- of type definitions, constructors, and member function as would a
- type containing a single element with the One cardinality class
- named <code>"value"</code>. In addition, the element type also
- contains a set of member functions for accessing the element
- name and namespace as well as its value in a uniform manner.
- For example:</p>
-
- <pre class="xml">
-&lt;complexType name="type">
- &lt;sequence>
- ...
- &lt;/sequence>
-&lt;/complexType>
-
-&lt;element name="root" type="type"/>
- </pre>
-
-<p>is mapped to:</p>
-
- <pre class="c++">
-class type
-{
- ...
-};
-
-class root: public xml_schema::element_type
-{
-public:
- // Element value.
- //
- typedef type value_type;
-
- const value_type&amp;
- value () const;
-
- value_type&amp;
- value ();
-
- void
- value (const value_type&amp;);
-
- void
- value (std::[auto|unique]_ptr&lt;value_type>);
-
- // Constructors.
- //
- root (const value_type&amp;);
-
- root (std::[auto|unique]_ptr&lt;value_type>);
-
- root (const xercesc::DOMElement&amp;, xml_schema::flags = 0);
-
- root (const root&amp;, xml_schema::flags = 0);
-
- virtual root*
- _clone (xml_schema::flags = 0) const;
-
- // Element name and namespace.
- //
- static const std::string&amp;
- name ();
-
- static const std::string&amp;
- namespace_ ();
-
- virtual const std::string&amp;
- _name () const;
-
- virtual const std::string&amp;
- _namespace () const;
-
- // Element value as xml_schema::type.
- //
- virtual const xml_schema::type*
- _value () const;
-
- virtual xml_schema::type*
- _value ();
-};
-
-void
-operator&lt;&lt; (xercesc::DOMElement&amp;, const root&amp;);
- </pre>
-
- <p>The <code>xml_schema::element_type</code> class is a common
- base type for all element types and is defined as follows:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class element_type
- {
- public:
- virtual
- ~element_type ();
-
- virtual element_type*
- _clone (flags f = 0) const = 0;
-
- virtual const std::basic_string&lt;C>&amp;
- _name () const = 0;
-
- virtual const std::basic_string&lt;C>&amp;
- _namespace () const = 0;
-
- virtual xml_schema::type*
- _value () = 0;
-
- virtual const xml_schema::type*
- _value () const = 0;
- };
-}
- </pre>
-
- <p>The <code>_value()</code> member function returns a pointer to
- the element value or 0 if the element is of a fundamental C++
- type and therefore is not derived from <code>xml_schema::type</code>.
- </p>
-
- <p>Unlike parsing and serialization functions, element types
- are only capable of parsing and serializing from/to a
- <code>DOMElement</code> object. This means that the application
- will need to perform its own XML-to-DOM parsing and DOM-to-XML
- serialization. The following section describes a mechanism
- provided by the mapping to uniformly parse and serialize
- multiple root elements.</p>
-
-
- <h3><a name="2.9.2">2.9.2 Element Map</a></h3>
-
- <p>When element types are generated for root elements it is also
- possible to request the generation of an element map with the
- <code>--generate-element-map</code> option. The element map
- allows uniform parsing and serialization of multiple root
- elements via the common <code>xml_schema::element_type</code>
- base type. The <code>xml_schema::element_map</code> class is
- defined as follows:</p>
-
- <pre class="c++">
-namespace xml_schema
-{
- class element_map
- {
- public:
- static std::[auto|unique]_ptr&lt;xml_schema::element_type>
- parse (const xercesc::DOMElement&amp;, flags = 0);
-
- static void
- serialize (xercesc::DOMElement&amp;, const element_type&amp;);
- };
-}
- </pre>
-
- <p>The <code>parse()</code> function creates the corresponding
- element type object based on the element name and namespace
- and returns it as an automatic pointer (<code>std::auto_ptr</code>
- or <code>std::unique_ptr</code>, depending on the C++ standard
- selected) to <code>xml_schema::element_type</code>.
- The <code>serialize()</code> function serializes the passed element
- object to <code>DOMElement</code>. Note that in case of
- <code>serialize()</code>, the <code>DOMElement</code> object
- should have the correct name and namespace. If no element type is
- available for an element, both functions throw the
- <code>xml_schema::no_element_info</code> exception:</p>
-
- <pre class="c++">
-struct no_element_info: virtual exception
-{
- no_element_info (const std::basic_string&lt;C>&amp; element_name,
- const std::basic_string&lt;C>&amp; element_namespace);
-
- const std::basic_string&lt;C>&amp;
- element_name () const;
-
- const std::basic_string&lt;C>&amp;
- element_namespace () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The application can discover the actual type of the element
- object returned by <code>parse()</code> either using
- <code>dynamic_cast</code> or by comparing element names and
- namespaces. The following code fragments illustrate how the
- element map can be used:</p>
-
- <pre class="c++">
-// Parsing.
-//
-DOMElement&amp; e = ... // Parse XML to DOM.
-
-auto_ptr&lt;xml_schema::element_type> r (
- xml_schema::element_map::parse (e));
-
-if (root1 r1 = dynamic_cast&lt;root1*> (r.get ()))
-{
- ...
-}
-else if (r->_name == root2::name () &amp;&amp;
- r->_namespace () == root2::namespace_ ())
-{
- root2&amp; r2 (static_cast&lt;root2&amp;> (*r));
-
- ...
-}
- </pre>
-
- <pre class="c++">
-// Serialization.
-//
-xml_schema::element_type&amp; r = ...
-
-string name (r._name ());
-string ns (r._namespace ());
-
-DOMDocument&amp; doc = ... // Create a new DOMDocument with name and ns.
-DOMElement&amp; e (*doc->getDocumentElement ());
-
-xml_schema::element_map::serialize (e, r);
-
-// Serialize DOMDocument to XML.
- </pre>
-
- <!-- -->
-
- <h2><a name="2.10">2.10 Mapping for Global Attributes</a></h2>
-
- <p>An XML Schema attribute definition is called global if it appears
- directly under the <code>schema</code> element. A global
- attribute does not have any mapping.
- </p>
-
- <!--
- When it is referenced from
- a local attribute definition (using the <code>ref</code> attribute)
- it is treated as a local attribute (see Section 2.8, "Mapping for
- Local Elements and Attributes").
- -->
-
- <h2><a name="2.11">2.11 Mapping for <code>xsi:type</code> and Substitution
- Groups</a></h2>
-
- <p>The mapping provides optional support for the XML Schema polymorphism
- features (<code>xsi:type</code> and substitution groups) which can
- be requested with the <code>--generate-polymorphic</code> option.
- When used, the dynamic type of a member may be different from
- its static type. Consider the following schema definition and
- instance document:
- </p>
-
- <pre class="xml">
-&lt;!-- test.xsd -->
-&lt;schema>
- &lt;complexType name="base">
- &lt;attribute name="text" type="string"/>
- &lt;/complexType>
-
- &lt;complexType name="derived">
- &lt;complexContent>
- &lt;extension base="base">
- &lt;attribute name="extra-text" type="string"/>
- &lt;/extension>
- &lt;/complexContent>
- &lt;/complexType>
-
- &lt;complexType name="root_type">
- &lt;sequence>
- &lt;element name="item" type="base" maxOccurs="unbounded"/>
- &lt;/sequence>
- &lt;/complexType>
-
- &lt;element name="root" type="root_type"/>
-&lt;/schema>
-
-&lt;!-- test.xml -->
-&lt;root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- &lt;item text="hello"/>
- &lt;item text="hello" extra-text="world" xsi:type="derived"/>
-&lt;/root>
- </pre>
-
- <p>In the resulting object model, the container for
- the <code>root::item</code> member will have two elements:
- the first element's type will be <code>base</code> while
- the second element's (dynamic) type will be
- <code>derived</code>. This can be discovered using the
- <code>dynamic_cast</code> operator as shown in the following
- example:
- </p>
-
- <pre class="c++">
-void
-f (root&amp; r)
-{
- for (root::item_const_iterator i (r.item ().begin ());
- i != r.item ().end ()
- ++i)
- {
- if (derived* d = dynamic_cast&lt;derived*> (&amp;(*i)))
- {
- // derived
- }
- else
- {
- // base
- }
- }
-}
- </pre>
-
- <p>The <code>_clone</code> virtual function should be used instead of
- copy constructors to make copies of members that might use
- polymorphism:
- </p>
-
- <pre class="c++">
-void
-f (root&amp; r)
-{
- for (root::item_const_iterator i (r.item ().begin ());
- i != r.item ().end ()
- ++i)
- {
- std::auto_ptr&lt;base> c (i->_clone ());
- }
-}
- </pre>
-
- <p>The mapping can often automatically determine which types are
- polymorphic based on the substitution group declarations. However,
- if your XML vocabulary is not using substitution groups or if
- substitution groups are defined in a separate schema, then you will
- need to use the <code>--polymorphic-type</code> option to specify
- which types are polymorphic. When using this option you only need
- to specify the root of a polymorphic type hierarchy and the mapping
- will assume that all the derived types are also polymorphic.
- Also note that you need to specify this option when compiling every
- schema file that references the polymorphic type. Consider the following
- two schemas as an example:</p>
-
- <pre class="xml">
-&lt;!-- base.xsd -->
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;xs:complexType name="base">
- &lt;xs:sequence>
- &lt;xs:element name="b" type="xs:int"/>
- &lt;/xs:sequence>
- &lt;/xs:complexType>
-
- &lt;!-- substitution group root -->
- &lt;xs:element name="base" type="base"/>
-
-&lt;/xs:schema>
- </pre>
-
- <pre class="xml">
-&lt;!-- derived.xsd -->
-&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- &lt;include schemaLocation="base.xsd"/>
-
- &lt;xs:complexType name="derived">
- &lt;xs:complexContent>
- &lt;xs:extension base="base">
- &lt;xs:sequence>
- &lt;xs:element name="d" type="xs:string"/>
- &lt;/xs:sequence>
- &lt;/xs:extension>
- &lt;/xs:complexContent>
- &lt;/xs:complexType>
-
- &lt;xs:element name="derived" type="derived" substitutionGroup="base"/>
-
-&lt;/xs:schema>
- </pre>
-
- <p>In this example we need to specify "<code>--polymorphic-type base</code>"
- when compiling both schemas because the substitution group is declared
- in a schema other than the one defining type <code>base</code>.</p>
-
- <p>You can also indicate that all types should be treated as polymorphic
- with the <code>--polymorphic-type-all</code>. However, this may result
- in slower generated code with a greater footprint.</p>
-
-
- <!-- Mapping for any and anyAttribute -->
-
-
- <h2><a name="2.12">2.12 Mapping for <code>any</code> and <code>anyAttribute</code></a></h2>
-
- <p>For the XML Schema <code>any</code> and <code>anyAttribute</code>
- wildcards an optional mapping can be requested with the
- <code>--generate-wildcard</code> option. The mapping represents
- the content matched by wildcards as DOM fragments. Because the
- DOM API is used to access such content, the Xerces-C++ runtime
- should be initialized by the application prior to parsing and
- should remain initialized for the lifetime of objects with
- the wildcard content. For more information on the Xerces-C++
- runtime initialization see <a href="#3.1">Section 3.1,
- "Initializing the Xerces-C++ Runtime"</a>.
- </p>
-
- <p>The mapping for <code>any</code> is similar to the mapping for
- local elements (see <a href="#2.8">Section 2.8, "Mapping for Local
- Elements and Attributes"</a>) except that the type used in the
- wildcard mapping is <code>xercesc::DOMElement</code>. As with local
- elements, the mapping divides all possible cardinality combinations
- into three cardinality classes: <i>one</i>, <i>optional</i>, and
- <i>sequence</i>.
- </p>
-
- <p>The mapping for <code>anyAttribute</code> represents the attributes
- matched by this wildcard as a set of <code>xercesc::DOMAttr</code>
- objects with a key being the attribute's name and namespace.</p>
-
- <p>Similar to local elements and attributes, the <code>any</code> and
- <code>anyAttribute</code> wildcards are mapped to a set of public type
- definitions (typedefs) and a set of public accessor and modifier
- functions. Type definitions have names derived from <code>"any"</code>
- for the <code>any</code> wildcard and <code>"any_attribute"</code>
- for the <code>anyAttribute</code> wildcard. The accessor and modifier
- functions are named <code>"any"</code> for the <code>any</code> wildcard
- and <code>"any_attribute"</code> for the <code>anyAttribute</code>
- wildcard. Subsequent wildcards in the same type have escaped names
- such as <code>"any1"</code> or <code>"any_attribute1"</code>.
- </p>
-
- <p>Because Xerces-C++ DOM nodes always belong to a <code>DOMDocument</code>,
- each type with a wildcard has an associated <code>DOMDocument</code>
- object. The reference to this object can be obtained using the accessor
- function called <code>dom_document</code>. The access to the document
- object from the application code may be necessary to create or modify
- the wildcard content. For example:
- </p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;any namespace="##other"/>
- &lt;/sequence>
- &lt;anyAttribute namespace="##other"/>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // any
- //
- const xercesc::DOMElement&amp;
- any () const;
-
- void
- any (const xercesc::DOMElement&amp;);
-
- ...
-
- // any_attribute
- //
- typedef attribute_set any_attribute_set;
- typedef any_attribute_set::iterator any_attribute_iterator;
- typedef any_attribute_set::const_iterator any_attribute_const_iterator;
-
- const any_attribute_set&amp;
- any_attribute () const;
-
- any_attribute_set&amp;
- any_attribute ();
-
- ...
-
- // DOMDocument object for wildcard content.
- //
- const xercesc::DOMDocument&amp;
- dom_document () const;
-
- xercesc::DOMDocument&amp;
- dom_document ();
-
- ...
-};
- </pre>
-
-
- <p>Names and semantics of type definitions for the wildcards as well
- as signatures of the accessor and modifier functions depend on the
- wildcard type as well as the cardinality class for the <code>any</code>
- wildcard. They are described in the following sub-sections.
- </p>
-
-
- <h3><a name="2.12.1">2.12.1 Mapping for <code>any</code> with the One Cardinality Class</a></h3>
-
- <p>For <code>any</code> with the One cardinality class,
- there are no type definitions. The accessor functions come in
- constant and non-constant versions. The constant accessor function
- returns a constant reference to <code>xercesc::DOMElement</code> and
- can be used for read-only access. The non-constant version returns
- an unrestricted reference to <code>xercesc::DOMElement</code> and can
- be used for read-write access.
- </p>
-
- <p>The first modifier function expects an argument of type reference
- to constant <code>xercesc::DOMElement</code> and makes a deep copy
- of its argument. The second modifier function expects an argument of
- type pointer to <code>xercesc::DOMElement</code>. This modifier
- function assumes ownership of its argument and expects the element
- object to be created using the DOM document associated with this
- instance. For example:
- </p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;any namespace="##other"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Accessors.
- //
- const xercesc::DOMElement&amp;
- any () const;
-
- xercesc::DOMElement&amp;
- any ();
-
- // Modifiers.
- //
- void
- any (const xercesc::DOMElement&amp;);
-
- void
- any (xercesc::DOMElement*);
-
- ...
-
-};
- </pre>
-
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o, const xercesc::DOMElement&amp; e)
-{
- using namespace xercesc;
-
- DOMElement&amp; e1 (o.any ()); // get
- o.any (e) // set, deep copy
- DOMDocument&amp; doc (o.dom_document ());
- o.any (doc.createElement (...)); // set, assumes ownership
-}
- </pre>
-
- <h3><a name="2.12.2">2.12.2 Mapping for <code>any</code> with the Optional Cardinality Class</a></h3>
-
- <p>For <code>any</code> with the Optional cardinality class, the type
- definitions consist of an alias for the container type with name
- <code>any_optional</code> (or <code>any1_optional</code>, etc., for
- subsequent wildcards in the type definition).
- </p>
-
- <p>Unlike accessor functions for the One cardinality class, accessor
- functions for the Optional cardinality class return references to
- corresponding containers rather than directly to <code>DOMElement</code>.
- The accessor functions come in constant and non-constant versions.
- The constant accessor function returns a constant reference to
- the container and can be used for read-only access. The non-constant
- version returns an unrestricted reference to the container
- and can be used for read-write access.
- </p>
-
- <p>The modifier functions are overloaded for <code>xercesc::DOMElement</code>
- and the container type. The first modifier function expects an argument of
- type reference to constant <code>xercesc::DOMElement</code> and
- makes a deep copy of its argument. The second modifier function
- expects an argument of type pointer to <code>xercesc::DOMElement</code>.
- This modifier function assumes ownership of its argument and expects
- the element object to be created using the DOM document associated
- with this instance. The third modifier function expects an argument
- of type reference to constant of the container type and makes a
- deep copy of its argument. For instance:
- </p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;any namespace="##other" minOccurs="0"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Type definitions.
- //
- typedef element_optional any_optional;
-
- // Accessors.
- //
- const any_optional&amp;
- any () const;
-
- any_optional&amp;
- any ();
-
- // Modifiers.
- //
- void
- any (const xercesc::DOMElement&amp;);
-
- void
- any (xercesc::DOMElement*);
-
- void
- any (const any_optional&amp;);
-
- ...
-
-};
- </pre>
-
-
- <p>The <code>element_optional</code> container is a
- specialization of the <code>optional</code> class template described
- in <a href="#2.8.2">Section 2.8.2, "Mapping for Members with the Optional
- Cardinality Class"</a>. Its interface is presented below:
- </p>
-
- <pre class="c++">
-class element_optional
-{
-public:
- explicit
- element_optional (xercesc::DOMDocument&amp;);
-
- // Makes a deep copy.
- //
- element_optional (const xercesc::DOMElement&amp;, xercesc::DOMDocument&amp;);
-
- // Assumes ownership.
- //
- element_optional (xercesc::DOMElement*, xercesc::DOMDocument&amp;);
-
- element_optional (const element_optional&amp;, xercesc::DOMDocument&amp;);
-
-public:
- element_optional&amp;
- operator= (const xercesc::DOMElement&amp;);
-
- element_optional&amp;
- operator= (const element_optional&amp;);
-
- // Pointer-like interface.
- //
-public:
- const xercesc::DOMElement*
- operator-> () const;
-
- xercesc::DOMElement*
- operator-> ();
-
- const xercesc::DOMElement&amp;
- operator* () const;
-
- xercesc::DOMElement&amp;
- operator* ();
-
- typedef void (element_optional::*bool_convertible) ();
- operator bool_convertible () const;
-
- // Get/set interface.
- //
-public:
- bool
- present () const;
-
- const xercesc::DOMElement&amp;
- get () const;
-
- xercesc::DOMElement&amp;
- get ();
-
- // Makes a deep copy.
- //
- void
- set (const xercesc::DOMElement&amp;);
-
- // Assumes ownership.
- //
- void
- set (xercesc::DOMElement*);
-
- void
- reset ();
-};
-
-bool
-operator== (const element_optional&amp;, const element_optional&amp;);
-
-bool
-operator!= (const element_optional&amp;, const element_optional&amp;);
- </pre>
-
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o, const xercesc::DOMElement&amp; e)
-{
- using namespace xercesc;
-
- DOMDocument&amp; doc (o.dom_document ());
-
- if (o.any ().present ()) // test
- {
- DOMElement&amp; e1 (o.any ().get ()); // get
- o.any ().set (e); // set, deep copy
- o.any ().set (doc.createElement (...)); // set, assumes ownership
- o.any ().reset (); // reset
- }
-
- // Same as above but using pointer notation:
- //
- if (o.member ()) // test
- {
- DOMElement&amp; e1 (*o.any ()); // get
- o.any (e); // set, deep copy
- o.any (doc.createElement (...)); // set, assumes ownership
- o.any ().reset (); // reset
- }
-}
- </pre>
-
-
-
- <h3><a name="2.12.3">2.12.3 Mapping for <code>any</code> with the Sequence Cardinality Class</a></h3>
-
- <p>For <code>any</code> with the Sequence cardinality class, the type
- definitions consist of an alias of the container type with name
- <code>any_sequence</code> (or <code>any1_sequence</code>, etc., for
- subsequent wildcards in the type definition), an alias of the iterator
- type with name <code>any_iterator</code> (or <code>any1_iterator</code>,
- etc., for subsequent wildcards in the type definition), and an alias
- of the constant iterator type with name <code>any_const_iterator</code>
- (or <code>any1_const_iterator</code>, etc., for subsequent wildcards
- in the type definition).
- </p>
-
- <p>The accessor functions come in constant and non-constant versions.
- The constant accessor function returns a constant reference to the
- container and can be used for read-only access. The non-constant
- version returns an unrestricted reference to the container and can
- be used for read-write access.
- </p>
-
- <p>The modifier function expects an argument of type reference to
- constant of the container type. The modifier function makes
- a deep copy of its argument. For instance:
- </p>
-
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;any namespace="##other" minOccurs="unbounded"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Type definitions.
- //
- typedef element_sequence any_sequence;
- typedef any_sequence::iterator any_iterator;
- typedef any_sequence::const_iterator any_const_iterator;
-
- // Accessors.
- //
- const any_sequence&amp;
- any () const;
-
- any_sequence&amp;
- any ();
-
- // Modifier.
- //
- void
- any (const any_sequence&amp;);
-
- ...
-
-};
- </pre>
-
- <p>The <code>element_sequence</code> container is a
- specialization of the <code>sequence</code> class template described
- in <a href="#2.8.3">Section 2.8.3, "Mapping for Members with the
- Sequence Cardinality Class"</a>. Its interface is similar to
- the sequence interface as defined by the ISO/ANSI Standard for
- C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences") and is
- presented below:
- </p>
-
- <pre class="c++">
-class element_sequence
-{
-public:
- typedef xercesc::DOMElement value_type;
- typedef xercesc::DOMElement* pointer;
- typedef const xercesc::DOMElement* const_pointer;
- typedef xercesc::DOMElement&amp; reference;
- typedef const xercesc::DOMElement&amp; const_reference;
-
- typedef &lt;implementation-defined> iterator;
- typedef &lt;implementation-defined> const_iterator;
- typedef &lt;implementation-defined> reverse_iterator;
- typedef &lt;implementation-defined> const_reverse_iterator;
-
- typedef &lt;implementation-defined> size_type;
- typedef &lt;implementation-defined> difference_type;
- typedef &lt;implementation-defined> allocator_type;
-
-public:
- explicit
- element_sequence (xercesc::DOMDocument&amp;);
-
- // DOMElement cannot be default-constructed.
- //
- // explicit
- // element_sequence (size_type n);
-
- element_sequence (size_type n,
- const xercesc::DOMElement&amp;,
- xercesc::DOMDocument&amp;);
-
- template &lt;typename I>
- element_sequence (const I&amp; begin,
- const I&amp; end,
- xercesc::DOMDocument&amp;);
-
- element_sequence (const element_sequence&amp;, xercesc::DOMDocument&amp;);
-
- element_sequence&amp;
- operator= (const element_sequence&amp;);
-
-public:
- void
- assign (size_type n, const xercesc::DOMElement&amp;);
-
- template &lt;typename I>
- void
- assign (const I&amp; begin, const I&amp; end);
-
-public:
- // This version of resize can only be used to shrink the
- // sequence because DOMElement cannot be default-constructed.
- //
- void
- resize (size_type);
-
- void
- resize (size_type, const xercesc::DOMElement&amp;);
-
-public:
- size_type
- size () const;
-
- size_type
- max_size () const;
-
- size_type
- capacity () const;
-
- bool
- empty () const;
-
- void
- reserve (size_type);
-
- void
- clear ();
-
-public:
- const_iterator
- begin () const;
-
- const_iterator
- end () const;
-
- iterator
- begin ();
-
- iterator
- end ();
-
- const_reverse_iterator
- rbegin () const;
-
- const_reverse_iterator
- rend () const
-
- reverse_iterator
- rbegin ();
-
- reverse_iterator
- rend ();
-
-public:
- xercesc::DOMElement&amp;
- operator[] (size_type);
-
- const xercesc::DOMElement&amp;
- operator[] (size_type) const;
-
- xercesc::DOMElement&amp;
- at (size_type);
-
- const xercesc::DOMElement&amp;
- at (size_type) const;
-
- xercesc::DOMElement&amp;
- front ();
-
- const xercesc::DOMElement&amp;
- front () const;
-
- xercesc::DOMElement&amp;
- back ();
-
- const xercesc::DOMElement&amp;
- back () const;
-
-public:
- // Makes a deep copy.
- //
- void
- push_back (const xercesc::DOMElement&amp;);
-
- // Assumes ownership.
- //
- void
- push_back (xercesc::DOMElement*);
-
- void
- pop_back ();
-
- // Makes a deep copy.
- //
- iterator
- insert (iterator position, const xercesc::DOMElement&amp;);
-
- // Assumes ownership.
- //
- iterator
- insert (iterator position, xercesc::DOMElement*);
-
- void
- insert (iterator position, size_type n, const xercesc::DOMElement&amp;);
-
- template &lt;typename I>
- void
- insert (iterator position, const I&amp; begin, const I&amp; end);
-
- iterator
- erase (iterator position);
-
- iterator
- erase (iterator begin, iterator end);
-
-public:
- // Note that the DOMDocument object of the two sequences being
- // swapped should be the same.
- //
- void
- swap (sequence&amp; x);
-};
-
-inline bool
-operator== (const element_sequence&amp;, const element_sequence&amp;);
-
-inline bool
-operator!= (const element_sequence&amp;, const element_sequence&amp;);
- </pre>
-
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o, const xercesc::DOMElement&amp; e)
-{
- using namespace xercesc;
-
- object::any_sequence&amp; s (o.any ());
-
- // Iteration.
- //
- for (object::any_iterator i (s.begin ()); i != s.end (); ++i)
- {
- DOMElement&amp; e (*i);
- }
-
- // Modification.
- //
- s.push_back (e); // deep copy
- DOMDocument&amp; doc (o.dom_document ());
- s.push_back (doc.createElement (...)); // assumes ownership
-}
- </pre>
-
- <h3><a name="2.12.4">2.12.4 Element Wildcard Order</a></h3>
-
- <p>Similar to elements, element wildcards in ordered types
- (<a href="#2.8.4">Section 2.8.4, "Element Order"</a>) are assigned
- content ids and are included in the content order sequence.
- Continuing with the bank transactions example started in Section
- 2.8.4, we can extend the batch by allowing custom transactions:</p>
-
- <pre class="xml">
-&lt;complexType name="batch">
- &lt;choice minOccurs="0" maxOccurs="unbounded">
- &lt;element name="withdraw" type="withdraw"/>
- &lt;element name="deposit" type="deposit"/>
- &lt;any namespace="##other" processContents="lax"/>
- &lt;/choice>
-&lt;/complexType>
- </pre>
-
- <p>This will lead to the following changes in the generated
- <code>batch</code> C++ class:</p>
-
- <pre class="c++">
-class batch: public xml_schema::type
-{
-public:
- ...
-
- // any
- //
- typedef element_sequence any_sequence;
- typedef any_sequence::iterator any_iterator;
- typedef any_sequence::const_iterator any_const_iterator;
-
- static const std::size_t any_id = 3UL;
-
- const any_sequence&amp;
- any () const;
-
- any_sequence&amp;
- any ();
-
- void
- any (const any_sequence&amp;);
-
- ...
-};
- </pre>
-
- <p>With this change we also need to update the iteration code to handle
- the new content id:</p>
-
- <pre class="c++">
-for (batch::content_order_const_iterator i (b.content_order ().begin ());
- i != b.content_order ().end ();
- ++i)
-{
- switch (i->id)
- {
- ...
-
- case batch::any_id:
- {
- const DOMElement&amp; e (b.any ()[i->index]);
- ...
- break;
- }
-
- ...
- }
-}
- </pre>
-
- <p>For the complete working code that shows the use of wildcards in
- ordered types refer to the <code>order/element</code> example in
- the <code>examples/cxx/tree/</code> directory in the XSD
- distribution.</p>
-
- <h3><a name="2.12.5">2.12.5 Mapping for <code>anyAttribute</code></a></h3>
-
- <p>For <code>anyAttribute</code> the type definitions consist of an alias
- of the container type with name <code>any_attribute_set</code>
- (or <code>any1_attribute_set</code>, etc., for subsequent wildcards
- in the type definition), an alias of the iterator type with name
- <code>any_attribute_iterator</code> (or <code>any1_attribute_iterator</code>,
- etc., for subsequent wildcards in the type definition), and an alias
- of the constant iterator type with name <code>any_attribute_const_iterator</code>
- (or <code>any1_attribute_const_iterator</code>, etc., for subsequent
- wildcards in the type definition).
- </p>
-
- <p>The accessor functions come in constant and non-constant versions.
- The constant accessor function returns a constant reference to the
- container and can be used for read-only access. The non-constant
- version returns an unrestricted reference to the container and can
- be used for read-write access.
- </p>
-
- <p>The modifier function expects an argument of type reference to
- constant of the container type. The modifier function makes
- a deep copy of its argument. For instance:
- </p>
-
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- ...
- &lt;/sequence>
- &lt;anyAttribute namespace="##other"/>
-&lt;/complexType>
- </pre>
-
- <p>is mapped to:</p>
-
- <pre class="c++">
-class object: public xml_schema::type
-{
-public:
- // Type definitions.
- //
- typedef attribute_set any_attribute_set;
- typedef any_attribute_set::iterator any_attribute_iterator;
- typedef any_attribute_set::const_iterator any_attribute_const_iterator;
-
- // Accessors.
- //
- const any_attribute_set&amp;
- any_attribute () const;
-
- any_attribute_set&amp;
- any_attribute ();
-
- // Modifier.
- //
- void
- any_attribute (const any_attribute_set&amp;);
-
- ...
-
-};
- </pre>
-
- <p>The <code>attribute_set</code> class is an associative container
- similar to the <code>std::set</code> class template as defined by
- the ISO/ANSI Standard for C++ (ISO/IEC 14882:1998, Section 23.3.3,
- "Class template set") with the key being the attribute's name
- and namespace. Unlike <code>std::set</code>, <code>attribute_set</code>
- allows searching using names and namespaces instead of
- <code>xercesc::DOMAttr</code> objects. It is defined in an
- implementation-specific namespace and its interface is presented
- below:
- </p>
-
- <pre class="c++">
-class attribute_set
-{
-public:
- typedef xercesc::DOMAttr key_type;
- typedef xercesc::DOMAttr value_type;
- typedef xercesc::DOMAttr* pointer;
- typedef const xercesc::DOMAttr* const_pointer;
- typedef xercesc::DOMAttr&amp; reference;
- typedef const xercesc::DOMAttr&amp; const_reference;
-
- typedef &lt;implementation-defined> iterator;
- typedef &lt;implementation-defined> const_iterator;
- typedef &lt;implementation-defined> reverse_iterator;
- typedef &lt;implementation-defined> const_reverse_iterator;
-
- typedef &lt;implementation-defined> size_type;
- typedef &lt;implementation-defined> difference_type;
- typedef &lt;implementation-defined> allocator_type;
-
-public:
- attribute_set (xercesc::DOMDocument&amp;);
-
- template &lt;typename I>
- attribute_set (const I&amp; begin, const I&amp; end, xercesc::DOMDocument&amp;);
-
- attribute_set (const attribute_set&amp;, xercesc::DOMDocument&amp;);
-
- attribute_set&amp;
- operator= (const attribute_set&amp;);
-
-public:
- const_iterator
- begin () const;
-
- const_iterator
- end () const;
-
- iterator
- begin ();
-
- iterator
- end ();
-
- const_reverse_iterator
- rbegin () const;
-
- const_reverse_iterator
- rend () const;
-
- reverse_iterator
- rbegin ();
-
- reverse_iterator
- rend ();
-
-public:
- size_type
- size () const;
-
- size_type
- max_size () const;
-
- bool
- empty () const;
-
- void
- clear ();
-
-public:
- // Makes a deep copy.
- //
- std::pair&lt;iterator, bool>
- insert (const xercesc::DOMAttr&amp;);
-
- // Assumes ownership.
- //
- std::pair&lt;iterator, bool>
- insert (xercesc::DOMAttr*);
-
- // Makes a deep copy.
- //
- iterator
- insert (iterator position, const xercesc::DOMAttr&amp;);
-
- // Assumes ownership.
- //
- iterator
- insert (iterator position, xercesc::DOMAttr*);
-
- template &lt;typename I>
- void
- insert (const I&amp; begin, const I&amp; end);
-
-public:
- void
- erase (iterator position);
-
- size_type
- erase (const std::basic_string&lt;C>&amp; name);
-
- size_type
- erase (const std::basic_string&lt;C>&amp; namespace_,
- const std::basic_string&lt;C>&amp; name);
-
- size_type
- erase (const XMLCh* name);
-
- size_type
- erase (const XMLCh* namespace_, const XMLCh* name);
-
- void
- erase (iterator begin, iterator end);
-
-public:
- size_type
- count (const std::basic_string&lt;C>&amp; name) const;
-
- size_type
- count (const std::basic_string&lt;C>&amp; namespace_,
- const std::basic_string&lt;C>&amp; name) const;
-
- size_type
- count (const XMLCh* name) const;
-
- size_type
- count (const XMLCh* namespace_, const XMLCh* name) const;
-
- iterator
- find (const std::basic_string&lt;C>&amp; name);
-
- iterator
- find (const std::basic_string&lt;C>&amp; namespace_,
- const std::basic_string&lt;C>&amp; name);
-
- iterator
- find (const XMLCh* name);
-
- iterator
- find (const XMLCh* namespace_, const XMLCh* name);
-
- const_iterator
- find (const std::basic_string&lt;C>&amp; name) const;
-
- const_iterator
- find (const std::basic_string&lt;C>&amp; namespace_,
- const std::basic_string&lt;C>&amp; name) const;
-
- const_iterator
- find (const XMLCh* name) const;
-
- const_iterator
- find (const XMLCh* namespace_, const XMLCh* name) const;
-
-public:
- // Note that the DOMDocument object of the two sets being
- // swapped should be the same.
- //
- void
- swap (attribute_set&amp;);
-};
-
-bool
-operator== (const attribute_set&amp;, const attribute_set&amp;);
-
-bool
-operator!= (const attribute_set&amp;, const attribute_set&amp;);
- </pre>
-
- <p>The following code shows how one could use this mapping:</p>
-
- <pre class="c++">
-void
-f (object&amp; o, const xercesc::DOMAttr&amp; a)
-{
- using namespace xercesc;
-
- object::any_attribute_set&amp; s (o.any_attribute ());
-
- // Iteration.
- //
- for (object::any_attribute_iterator i (s.begin ()); i != s.end (); ++i)
- {
- DOMAttr&amp; a (*i);
- }
-
- // Modification.
- //
- s.insert (a); // deep copy
- DOMDocument&amp; doc (o.dom_document ());
- s.insert (doc.createAttribute (...)); // assumes ownership
-
- // Searching.
- //
- object::any_attribute_iterator i (s.find ("name"));
- i = s.find ("http://www.w3.org/XML/1998/namespace", "lang");
-}
- </pre>
-
- <!-- Mapping for Mixed Content Models -->
-
- <h2><a name="2.13">2.13 Mapping for Mixed Content Models</a></h2>
-
- <p>For XML Schema types with mixed content models C++/Tree provides
- mapping support only if the type is marked as ordered
- (<a href="#2.8.4">Section 2.8.4, "Element Order"</a>). Use the
- <code>--ordered-type-mixed</code> XSD compiler option to
- automatically mark all types with mixed content as ordered.</p>
-
- <p>For an ordered type with mixed content, C++/Tree adds an extra
- text content sequence that is used to store the text fragments.
- This text content sequence is also assigned the content id and
- its entries are included in the content order sequence, just
- like elements. As a result, it is possible to capture the order
- between elements and text fragments.</p>
-
- <p>As an example, consider the following schema that describes text
- with embedded links:</p>
-
- <pre class="xml">
-&lt;complexType name="anchor">
- &lt;simpleContent>
- &lt;extension base="string">
- &lt;attribute name="href" type="anyURI" use="required"/>
- &lt;/extension>
- &lt;/simpleContent>
-&lt;/complexType>
-
-&lt;complexType name="text" mixed="true">
- &lt;sequence>
- &lt;element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
- &lt;/sequence>
-&lt;/complexType>
- </pre>
-
- <p>The generated <code>text</code> C++ class will provide the following
- API (assuming it is marked as ordered):</p>
-
- <pre class="c++">
-class text: public xml_schema::type
-{
-public:
- // a
- //
- typedef anchor a_type;
- typedef sequence&lt;a_type> a_sequence;
- typedef a_sequence::iterator a_iterator;
- typedef a_sequence::const_iterator a_const_iterator;
-
- static const std::size_t a_id = 1UL;
-
- const a_sequence&amp;
- a () const;
-
- a_sequence&amp;
- a ();
-
- void
- a (const a_sequence&amp;);
-
- // text_content
- //
- typedef xml_schema::string text_content_type;
- typedef sequence&lt;text_content_type> text_content_sequence;
- typedef text_content_sequence::iterator text_content_iterator;
- typedef text_content_sequence::const_iterator text_content_const_iterator;
-
- static const std::size_t text_content_id = 2UL;
-
- const text_content_sequence&amp;
- text_content () const;
-
- text_content_sequence&amp;
- text_content ();
-
- void
- text_content (const text_content_sequence&amp;);
-
- // content_order
- //
- typedef xml_schema::content_order content_order_type;
- typedef std::vector&lt;content_order_type> content_order_sequence;
- typedef content_order_sequence::iterator content_order_iterator;
- typedef content_order_sequence::const_iterator content_order_const_iterator;
-
- const content_order_sequence&amp;
- content_order () const;
-
- content_order_sequence&amp;
- content_order ();
-
- void
- content_order (const content_order_sequence&amp;);
-
- ...
-};
- </pre>
-
- <p>Given this interface we can iterate over both link elements
- and text in content order. The following code fragment converts
- our format to plain text with references.</p>
-
- <pre class="c++">
-const text&amp; t = ...
-
-for (text::content_order_const_iterator i (t.content_order ().begin ());
- i != t.content_order ().end ();
- ++i)
-{
- switch (i->id)
- {
- case text::a_id:
- {
- const anchor&amp; a (t.a ()[i->index]);
- cerr &lt;&lt; a &lt;&lt; "[" &lt;&lt; a.href () &lt;&lt; "]";
- break;
- }
- case text::text_content_id:
- {
- const xml_schema::string&amp; s (t.text_content ()[i->index]);
- cerr &lt;&lt; s;
- break;
- }
- default:
- {
- assert (false); // Unknown content id.
- }
- }
-}
- </pre>
-
- <p>For the complete working code that shows the use of mixed content
- in ordered types refer to the <code>order/mixed</code> example in
- the <code>examples/cxx/tree/</code> directory in the XSD
- distribution.</p>
-
- <!-- Parsing -->
-
-
- <h1><a name="3">3 Parsing</a></h1>
-
- <p>This chapter covers various aspects of parsing XML instance
- documents in order to obtain corresponding tree-like object
- model.
- </p>
-
- <p>Each global XML Schema element in the form:</p>
-
- <pre class="xml">
-&lt;element name="name" type="type"/>
- </pre>
-
- <p>is mapped to 14 overloaded C++ functions in the form:</p>
-
- <pre class="c++">
-// Read from a URI or a local file.
-//
-
-std::[auto|unique]_ptr&lt;type>
-name (const std::basic_string&lt;C>&amp; uri,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (const std::basic_string&lt;C>&amp; uri,
- xml_schema::error_handler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (const std::basic_string&lt;C>&amp; uri,
- xercesc::DOMErrorHandler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-
-// Read from std::istream.
-//
-
-std::[auto|unique]_ptr&lt;type>
-name (std::istream&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (std::istream&amp;,
- xml_schema::error_handler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (std::istream&amp;,
- xercesc::DOMErrorHandler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-
-std::[auto|unique]_ptr&lt;type>
-name (std::istream&amp;,
- const std::basic_string&lt;C>&amp; id,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (std::istream&amp;,
- const std::basic_string&lt;C>&amp; id,
- xml_schema::error_handler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (std::istream&amp;,
- const std::basic_string&lt;C>&amp; id,
- xercesc::DOMErrorHandler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-
-// Read from InputSource.
-//
-
-std::[auto|unique]_ptr&lt;type>
-name (xercesc::InputSource&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (xercesc::InputSource&amp;,
- xml_schema::error_handler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (xercesc::InputSource&amp;,
- xercesc::DOMErrorHandler&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-
-// Read from DOM.
-//
-
-std::[auto|unique]_ptr&lt;type>
-name (const xercesc::DOMDocument&amp;,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
-
-std::[auto|unique]_ptr&lt;type>
-name (xml_schema::dom::[auto|unique]_ptr&lt;xercesc::DOMDocument>,
- xml_schema::flags = 0,
- const xml_schema::properties&amp; = xml_schema::properties ());
- </pre>
-
- <p>You can choose between reading an XML instance from a local file,
- URI, <code>std::istream</code>, <code>xercesc::InputSource</code>,
- or a pre-parsed DOM instance in the form of
- <code>xercesc::DOMDocument</code>. All the parsing functions
- return a dynamically allocated object model as either
- <code>std::auto_ptr</code> or <code>std::unique_ptr</code>,
- depending on the C++ standard selected. Each of these parsing
- functions is discussed in more detail in the following sections.
- </p>
-
- <h2><a name="3.1">3.1 Initializing the Xerces-C++ Runtime</a></h2>
-
- <p>Some parsing functions expect you to initialize the Xerces-C++
- runtime while others initialize and terminate it as part of their
- work. The general rule is as follows: if a function has any arguments
- or return a value that is an instance of a Xerces-C++ type, then
- this function expects you to initialize the Xerces-C++ runtime.
- Otherwise, the function initializes and terminates the runtime for
- you. Note that it is legal to have nested calls to the Xerces-C++
- initialize and terminate functions as long as the calls are balanced.
- </p>
-
- <p>You can instruct parsing functions that initialize and terminate
- the runtime not to do so by passing the
- <code>xml_schema::flags::dont_initialize</code> flag (see
- <a href="#3.2">Section 3.2, "Flags and Properties"</a>).
- </p>
-
-
- <h2><a name="3.2">3.2 Flags and Properties</a></h2>
-
- <p>Parsing flags and properties are the last two arguments of every
- parsing function. They allow you to fine-tune the process of
- instance validation and parsing. Both arguments are optional.
- </p>
-
-
- <p>The following flags are recognized by the parsing functions:</p>
-
- <dl>
- <dt><code>xml_schema::flags::keep_dom</code></dt>
- <dd>Keep association between DOM nodes and the resulting
- object model nodes. For more information about DOM association
- refer to <a href="#5.1">Section 5.1, "DOM Association"</a>.</dd>
-
- <dt><code>xml_schema::flags::own_dom</code></dt>
- <dd>Assume ownership of the DOM document passed. This flag only
- makes sense together with the <code>keep_dom</code> flag in
- the call to the parsing function with the
- <code>xml_schema::dom::[auto|unique]_ptr&lt;DOMDocument></code>
- argument.</dd>
-
- <dt><code>xml_schema::flags::dont_validate</code></dt>
- <dd>Do not validate instance documents against schemas.</dd>
-
- <dt><code>xml_schema::flags::dont_initialize</code></dt>
- <dd>Do not initialize the Xerces-C++ runtime.</dd>
- </dl>
-
- <p>You can pass several flags by combining them using the bit-wise OR
- operator. For example:</p>
-
- <pre class="c++">
-using xml_schema::flags;
-
-std::auto_ptr&lt;type> r (
- name ("test.xml", flags::keep_dom | flags::dont_validate));
- </pre>
-
- <p>By default, validation of instance documents is turned on even
- though parsers generated by XSD do not assume instance
- documents are valid. They include a number of checks that prevent
- construction of inconsistent object models. This,
- however, does not mean that an instance document that was
- successfully parsed by the XSD-generated parsers is
- valid per the corresponding schema. If an instance document is not
- "valid enough" for the generated parsers to construct consistent
- object model, one of the exceptions defined in
- <code>xml_schema</code> namespace is thrown (see
- <a href="#3.3">Section 3.3, "Error Handling"</a>).
- </p>
-
- <p>For more information on the Xerces-C++ runtime initialization
- refer to <a href="#3.1">Section 3.1, "Initializing the Xerces-C++
- Runtime"</a>.
- </p>
-
- <p>The <code>xml_schema::properties</code> class allows you to
- programmatically specify schema locations to be used instead
- of those specified with the <code>xsi::schemaLocation</code>
- and <code>xsi::noNamespaceSchemaLocation</code> attributes
- in instance documents. The interface of the <code>properties</code>
- class is presented below:
- </p>
-
- <pre class="c++">
-class properties
-{
-public:
- void
- schema_location (const std::basic_string&lt;C>&amp; namespace_,
- const std::basic_string&lt;C>&amp; location);
- void
- no_namespace_schema_location (const std::basic_string&lt;C>&amp; location);
-};
- </pre>
-
- <p>Note that all locations are relative to an instance document unless
- they are URIs. For example, if you want to use a local file as your
- schema, then you will need to pass
- <code>file:///absolute/path/to/your/schema</code> as the location
- argument.
- </p>
-
- <h2><a name="3.3">3.3 Error Handling</a></h2>
-
- <p>As discussed in <a href="#2.2">Section 2.2, "Error Handling"</a>,
- the mapping uses the C++ exception handling mechanism as its primary
- way of reporting error conditions. However, to handle recoverable
- parsing and validation errors and warnings, a callback interface maybe
- preferred by the application.</p>
-
- <p>To better understand error handling and reporting strategies employed
- by the parsing functions, it is useful to know that the
- transformation of an XML instance document to a statically-typed
- tree happens in two stages. The first stage, performed by Xerces-C++,
- consists of parsing an XML document into a DOM instance. For short,
- we will call this stage the XML-DOM stage. Validation, if not disabled,
- happens during this stage. The second stage,
- performed by the generated parsers, consist of parsing the DOM
- instance into the statically-typed tree. We will call this stage
- the DOM-Tree stage. Additional checks are performed during this
- stage in order to prevent construction of inconsistent tree which
- could otherwise happen when validation is disabled, for example.</p>
-
- <p>All parsing functions except the one that operates on a DOM instance
- come in overloaded triples. The first function in such a triple
- reports error conditions exclusively by throwing exceptions. It
- accumulates all the parsing and validation errors of the XML-DOM
- stage and throws them in a single instance of the
- <code>xml_schema::parsing</code> exception (described below).
- The second and the third functions in the triple use callback
- interfaces to report parsing and validation errors and warnings.
- The two callback interfaces are <code>xml_schema::error_handler</code>
- and <code>xercesc::DOMErrorHandler</code>. For more information
- on the <code>xercesc::DOMErrorHandler</code> interface refer to
- the Xerces-C++ documentation. The <code>xml_schema::error_handler</code>
- interface is presented below:
- </p>
-
- <pre class="c++">
-class error_handler
-{
-public:
- struct severity
- {
- enum value
- {
- warning,
- error,
- fatal
- };
- };
-
- virtual bool
- handle (const std::basic_string&lt;C>&amp; id,
- unsigned long line,
- unsigned long column,
- severity,
- const std::basic_string&lt;C>&amp; message) = 0;
-
- virtual
- ~error_handler ();
-};
- </pre>
-
- <p>The <code>id</code> argument of the <code>error_handler::handle</code>
- function identifies the resource being parsed (e.g., a file name or
- URI).
- </p>
-
- <p>By returning <code>true</code> from the <code>handle</code> function
- you instruct the parser to recover and continue parsing. Returning
- <code>false</code> results in termination of the parsing process.
- An error with the <code>fatal</code> severity level results in
- termination of the parsing process no matter what is returned from
- the <code>handle</code> function. It is safe to throw an exception
- from the <code>handle</code> function.
- </p>
-
- <p>The DOM-Tree stage reports error conditions exclusively by throwing
- exceptions. Individual exceptions thrown by the parsing functions
- are described in the following sub-sections.
- </p>
-
-
- <h3><a name="3.3.1">3.3.1 <code>xml_schema::parsing</code></a></h3>
-
- <pre class="c++">
-struct severity
-{
- enum value
- {
- warning,
- error
- };
-
- severity (value);
- operator value () const;
-};
-
-struct error
-{
- error (severity,
- const std::basic_string&lt;C>&amp; id,
- unsigned long line,
- unsigned long column,
- const std::basic_string&lt;C>&amp; message);
-
- severity
- severity () const;
-
- const std::basic_string&lt;C>&amp;
- id () const;
-
- unsigned long
- line () const;
-
- unsigned long
- column () const;
-
- const std::basic_string&lt;C>&amp;
- message () const;
-};
-
-std::basic_ostream&lt;C>&amp;
-operator&lt;&lt; (std::basic_ostream&lt;C>&amp;, const error&amp;);
-
-struct diagnostics: std::vector&lt;error>
-{
-};
-
-std::basic_ostream&lt;C>&amp;
-operator&lt;&lt; (std::basic_ostream&lt;C>&amp;, const diagnostics&amp;);
-
-struct parsing: virtual exception
-{
- parsing ();
- parsing (const diagnostics&amp;);
-
- const diagnostics&amp;
- diagnostics () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::parsing</code> exception is thrown if there
- were parsing or validation errors reported during the XML-DOM stage.
- If no callback interface was provided to the parsing function, the
- exception contains a list of errors and warnings accessible using
- the <code>diagnostics</code> function. The usual conditions when
- this exception is thrown include malformed XML instances and, if
- validation is turned on, invalid instance documents.
- </p>
-
- <h3><a name="3.3.2">3.3.2 <code>xml_schema::expected_element</code></a></h3>
-
- <pre class="c++">
-struct expected_element: virtual exception
-{
- expected_element (const std::basic_string&lt;C>&amp; name,
- const std::basic_string&lt;C>&amp; namespace_);
-
-
- const std::basic_string&lt;C>&amp;
- name () const;
-
- const std::basic_string&lt;C>&amp;
- namespace_ () const;
-
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::expected_element</code> exception is thrown
- when an expected element is not encountered by the DOM-Tree stage.
- The name and namespace of the expected element can be obtained using
- the <code>name</code> and <code>namespace_</code> functions respectively.
- </p>
-
-
- <h3><a name="3.3.3">3.3.3 <code>xml_schema::unexpected_element</code></a></h3>
-
- <pre class="c++">
-struct unexpected_element: virtual exception
-{
- unexpected_element (const std::basic_string&lt;C>&amp; encountered_name,
- const std::basic_string&lt;C>&amp; encountered_namespace,
- const std::basic_string&lt;C>&amp; expected_name,
- const std::basic_string&lt;C>&amp; expected_namespace)
-
-
- const std::basic_string&lt;C>&amp;
- encountered_name () const;
-
- const std::basic_string&lt;C>&amp;
- encountered_namespace () const;
-
-
- const std::basic_string&lt;C>&amp;
- expected_name () const;
-
- const std::basic_string&lt;C>&amp;
- expected_namespace () const;
-
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::unexpected_element</code> exception is thrown
- when an unexpected element is encountered by the DOM-Tree stage.
- The name and namespace of the encountered element can be obtained
- using the <code>encountered_name</code> and
- <code>encountered_namespace</code> functions respectively. If an
- element was expected instead of the encountered one, its name
- and namespace can be obtained using the <code>expected_name</code> and
- <code>expected_namespace</code> functions respectively. Otherwise
- these functions return empty strings.
- </p>
-
- <h3><a name="3.3.4">3.3.4 <code>xml_schema::expected_attribute</code></a></h3>
-
- <pre class="c++">
-struct expected_attribute: virtual exception
-{
- expected_attribute (const std::basic_string&lt;C>&amp; name,
- const std::basic_string&lt;C>&amp; namespace_);
-
-
- const std::basic_string&lt;C>&amp;
- name () const;
-
- const std::basic_string&lt;C>&amp;
- namespace_ () const;
-
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::expected_attribute</code> exception is thrown
- when an expected attribute is not encountered by the DOM-Tree stage.
- The name and namespace of the expected attribute can be obtained using
- the <code>name</code> and <code>namespace_</code> functions respectively.
- </p>
-
-
- <h3><a name="3.3.5">3.3.5 <code>xml_schema::unexpected_enumerator</code></a></h3>
-
- <pre class="c++">
-struct unexpected_enumerator: virtual exception
-{
- unexpected_enumerator (const std::basic_string&lt;C>&amp; enumerator);
-
- const std::basic_string&lt;C>&amp;
- enumerator () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::unexpected_enumerator</code> exception is thrown
- when an unexpected enumerator is encountered by the DOM-Tree stage.
- The enumerator can be obtained using the <code>enumerator</code>
- functions.
- </p>
-
- <h3><a name="3.3.6">3.3.6 <code>xml_schema::expected_text_content</code></a></h3>
-
- <pre class="c++">
-struct expected_text_content: virtual exception
-{
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::expected_text_content</code> exception is thrown
- when a content other than text is encountered and the text content was
- expected by the DOM-Tree stage.
- </p>
-
- <h3><a name="3.3.7">3.3.7 <code>xml_schema::no_type_info</code></a></h3>
-
- <pre class="c++">
-struct no_type_info: virtual exception
-{
- no_type_info (const std::basic_string&lt;C>&amp; type_name,
- const std::basic_string&lt;C>&amp; type_namespace);
-
- const std::basic_string&lt;C>&amp;
- type_name () const;
-
- const std::basic_string&lt;C>&amp;
- type_namespace () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::no_type_info</code> exception is thrown
- when there is no type information associated with a type specified
- by the <code>xsi:type</code> attribute. This exception is thrown
- by the DOM-Tree stage. The name and namespace of the type in question
- can be obtained using the <code>type_name</code> and
- <code>type_namespace</code> functions respectively. Usually, catching
- this exception means that you haven't linked the code generated
- from the schema defining the type in question with your application
- or this schema has been compiled without the
- <code>--generate-polymorphic</code> option.
- </p>
-
-
- <h3><a name="3.3.8">3.3.8 <code>xml_schema::not_derived</code></a></h3>
-
- <pre class="c++">
-struct not_derived: virtual exception
-{
- not_derived (const std::basic_string&lt;C>&amp; base_type_name,
- const std::basic_string&lt;C>&amp; base_type_namespace,
- const std::basic_string&lt;C>&amp; derived_type_name,
- const std::basic_string&lt;C>&amp; derived_type_namespace);
-
- const std::basic_string&lt;C>&amp;
- base_type_name () const;
-
- const std::basic_string&lt;C>&amp;
- base_type_namespace () const;
-
-
- const std::basic_string&lt;C>&amp;
- derived_type_name () const;
-
- const std::basic_string&lt;C>&amp;
- derived_type_namespace () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::not_derived</code> exception is thrown
- when a type specified by the <code>xsi:type</code> attribute is
- not derived from the expected base type. This exception is thrown
- by the DOM-Tree stage. The name and namespace of the expected
- base type can be obtained using the <code>base_type_name</code> and
- <code>base_type_namespace</code> functions respectively. The name
- and namespace of the offending type can be obtained using the
- <code>derived_type_name</code> and
- <code>derived_type_namespace</code> functions respectively.
- </p>
-
- <h3><a name="3.3.9">3.3.9 <code>xml_schema::no_prefix_mapping</code></a></h3>
-
- <pre class="c++">
-struct no_prefix_mapping: virtual exception
-{
- no_prefix_mapping (const std::basic_string&lt;C>&amp; prefix);
-
- const std::basic_string&lt;C>&amp;
- prefix () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::no_prefix_mapping</code> exception is thrown
- during the DOM-Tree stage if a namespace prefix is encountered for
- which a prefix-namespace mapping hasn't been provided. The namespace
- prefix in question can be obtained using the <code>prefix</code>
- function.
- </p>
-
- <h2><a name="3.4">3.4 Reading from a Local File or URI</a></h2>
-
- <p>Using a local file or URI is the simplest way to parse an XML instance.
- For example:</p>
-
- <pre class="c++">
-using std::auto_ptr;
-
-auto_ptr&lt;type> r1 (name ("test.xml"));
-auto_ptr&lt;type> r2 (name ("https://www.codesynthesis.com/test.xml"));
- </pre>
-
- <p>Or, in the C++11 mode:</p>
-
- <pre class="c++">
-using std::unique_ptr;
-
-unique_ptr&lt;type> r1 (name ("test.xml"));
-unique_ptr&lt;type> r2 (name ("https://www.codesynthesis.com/test.xml"));
- </pre>
-
- <h2><a name="3.5">3.5 Reading from <code>std::istream</code></a></h2>
-
- <p>When using an <code>std::istream</code> instance, you may also
- pass an optional resource id. This id is used to identify the
- resource (for example in error messages) as well as to resolve
- relative paths. For instance:</p>
-
- <pre class="c++">
-using std::auto_ptr;
-
-{
- std::ifstream ifs ("test.xml");
- auto_ptr&lt;type> r (name (ifs, "test.xml"));
-}
-
-{
- std::string str ("..."); // Some XML fragment.
- std::istringstream iss (str);
- auto_ptr&lt;type> r (name (iss));
-}
- </pre>
-
- <h2><a name="3.6">3.6 Reading from <code>xercesc::InputSource</code></a></h2>
-
- <p>Reading from a <code>xercesc::InputSource</code> instance
- is similar to the <code>std::istream</code> case except
- the resource id is maintained by the <code>InputSource</code>
- object. For instance:</p>
-
- <pre class="c++">
-xercesc::StdInInputSource is;
-std::auto_ptr&lt;type> r (name (is));
- </pre>
-
- <h2><a name="3.7">3.7 Reading from DOM</a></h2>
-
- <p>Reading from a <code>xercesc::DOMDocument</code> instance allows
- you to setup a custom XML-DOM stage. Things like DOM
- parser reuse, schema pre-parsing, and schema caching can be achieved
- with this approach. For more information on how to obtain DOM
- representation from an XML instance refer to the Xerces-C++
- documentation. In addition, the
- <a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree Mapping
- FAQ</a> shows how to parse an XML instance to a Xerces-C++
- DOM document using the XSD runtime utilities.
- </p>
-
- <p>The last parsing function is useful when you would like to perform
- your own XML-to-DOM parsing and associate the resulting DOM document
- with the object model nodes. The automatic <code>DOMDocument</code>
- pointer is reset and the resulting object model assumes ownership
- of the DOM document passed. For example:</p>
-
- <pre class="c++">
-// C++98 version.
-//
-xml_schema::dom::auto_ptr&lt;xercesc::DOMDocument> doc = ...
-
-std::auto_ptr&lt;type> r (
- name (doc, xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
-
-// At this point doc is reset to 0.
-
-// C++11 version.
-//
-xml_schema::dom::unique_ptr&lt;xercesc::DOMDocument> doc = ...
-
-std::unique_ptr&lt;type> r (
- name (std::move (doc),
- xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
-
-// At this point doc is reset to 0.
- </pre>
-
- <h1><a name="4">4 Serialization</a></h1>
-
- <p>This chapter covers various aspects of serializing a
- tree-like object model to DOM or XML.
- In this regard, serialization is complimentary to the reverse
- process of parsing a DOM or XML instance into an object model
- which is discussed in <a href="#3">Chapter 3,
- "Parsing"</a>. Note that the generation of the serialization code
- is optional and should be explicitly requested with the
- <code>--generate-serialization</code> option. See the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a> for more information.
- </p>
-
- <p>Each global XML Schema element in the form:
- </p>
-
-
- <pre class="xml">
-&lt;xsd:element name="name" type="type"/>
- </pre>
-
- <p>is mapped to 8 overloaded C++ functions in the form:</p>
-
- <pre class="c++">
-// Serialize to std::ostream.
-//
-void
-name (std::ostream&amp;,
- const type&amp;,
- const xml_schema::namespace_fomap&amp; =
- xml_schema::namespace_infomap (),
- const std::basic_string&lt;C>&amp; encoding = "UTF-8",
- xml_schema::flags = 0);
-
-void
-name (std::ostream&amp;,
- const type&amp;,
- xml_schema::error_handler&amp;,
- const xml_schema::namespace_infomap&amp; =
- xml_schema::namespace_infomap (),
- const std::basic_string&lt;C>&amp; encoding = "UTF-8",
- xml_schema::flags = 0);
-
-void
-name (std::ostream&amp;,
- const type&amp;,
- xercesc::DOMErrorHandler&amp;,
- const xml_schema::namespace_infomap&amp; =
- xml_schema::namespace_infomap (),
- const std::basic_string&lt;C>&amp; encoding = "UTF-8",
- xml_schema::flags = 0);
-
-
-// Serialize to XMLFormatTarget.
-//
-void
-name (xercesc::XMLFormatTarget&amp;,
- const type&amp;,
- const xml_schema::namespace_infomap&amp; =
- xml_schema::namespace_infomap (),
- const std::basic_string&lt;C>&amp; encoding = "UTF-8",
- xml_schema::flags = 0);
-
-void
-name (xercesc::XMLFormatTarget&amp;,
- const type&amp;,
- xml_schema::error_handler&amp;,
- const xml_schema::namespace_infomap&amp; =
- xml_schema::namespace_infomap (),
- const std::basic_string&lt;C>&amp; encoding = "UTF-8",
- xml_schema::flags = 0);
-
-void
-name (xercesc::XMLFormatTarget&amp;,
- const type&amp;,
- xercesc::DOMErrorHandler&amp;,
- const xml_schema::namespace_infomap&amp; =
- xml_schema::namespace_infomap (),
- const std::basic_string&lt;C>&amp; encoding = "UTF-8",
- xml_schema::flags = 0);
-
-
-// Serialize to DOM.
-//
-xml_schema::dom::[auto|unique]_ptr&lt;xercesc::DOMDocument>
-name (const type&amp;,
- const xml_schema::namespace_infomap&amp;
- xml_schema::namespace_infomap (),
- xml_schema::flags = 0);
-
-void
-name (xercesc::DOMDocument&amp;,
- const type&amp;,
- xml_schema::flags = 0);
- </pre>
-
- <p>You can choose between writing XML to <code>std::ostream</code> or
- <code>xercesc::XMLFormatTarget</code> and creating a DOM instance
- in the form of <code>xercesc::DOMDocument</code>. Serialization
- to <code>ostream</code> or <code>XMLFormatTarget</code> requires a
- considerably less work while serialization to DOM provides
- for greater flexibility. Each of these serialization functions
- is discussed in more detail in the following sections.
- </p>
-
-
- <h2><a name="4.1">4.1 Initializing the Xerces-C++ Runtime</a></h2>
-
- <p>Some serialization functions expect you to initialize the Xerces-C++
- runtime while others initialize and terminate it as part of their
- work. The general rule is as follows: if a function has any arguments
- or return a value that is an instance of a Xerces-C++ type, then
- this function expects you to initialize the Xerces-C++ runtime.
- Otherwise, the function initializes and terminates the runtime for
- you. Note that it is legal to have nested calls to the Xerces-C++
- initialize and terminate functions as long as the calls are balanced.
- </p>
-
- <p>You can instruct serialization functions that initialize and terminate
- the runtime not to do so by passing the
- <code>xml_schema::flags::dont_initialize</code> flag (see
- <a href="#4.3">Section 4.3, "Flags"</a>).
- </p>
-
- <h2><a name="4.2">4.2 Namespace Infomap and Character Encoding</a></h2>
-
- <p>When a document being serialized uses XML namespaces, custom
- prefix-namespace associations can to be established. If custom
- prefix-namespace mapping is not provided then generic prefixes
- (<code>p1</code>, <code>p2</code>, etc) are automatically assigned
- to namespaces as needed. Also, if
- you would like the resulting instance document to contain the
- <code>schemaLocation</code> or <code>noNamespaceSchemaLocation</code>
- attributes, you will need to provide namespace-schema associations.
- The <code>xml_schema::namespace_infomap</code> class is used
- to capture this information:</p>
-
- <pre class="c++">
-struct namespace_info
-{
- namespace_info ();
- namespace_info (const std::basic_string&lt;C>&amp; name,
- const std::basic_string&lt;C>&amp; schema);
-
- std::basic_string&lt;C> name;
- std::basic_string&lt;C> schema;
-};
-
-// Map of namespace prefix to namespace_info.
-//
-struct namespace_infomap: public std::map&lt;std::basic_string&lt;C>,
- namespace_info>
-{
-};
- </pre>
-
- <p>Consider the following associations as an example:</p>
-
- <pre class="c++">
-xml_schema::namespace_infomap map;
-
-map["t"].name = "https://www.codesynthesis.com/test";
-map["t"].schema = "test.xsd";
- </pre>
-
- <p>This map, if passed to one of the serialization functions,
- could result in the following XML fragment:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;t:name xmlns:t="https://www.codesynthesis.com/test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="https://www.codesynthesis.com/test test.xsd">
- </pre>
-
- <p>As you can see, the serialization function automatically added namespace
- mapping for the <code>xsi</code> prefix. You can change this by
- providing your own prefix:</p>
-
- <pre class="c++">
-xml_schema::namespace_infomap map;
-
-map["xsn"].name = "http://www.w3.org/2001/XMLSchema-instance";
-
-map["t"].name = "https://www.codesynthesis.com/test";
-map["t"].schema = "test.xsd";
- </pre>
-
- <p>This could result in the following XML fragment:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;t:name xmlns:t="https://www.codesynthesis.com/test"
- xmlns:xsn="http://www.w3.org/2001/XMLSchema-instance"
- xsn:schemaLocation="https://www.codesynthesis.com/test test.xsd">
- </pre>
-
- <p>To specify the location of a schema without a namespace you can use
- an empty prefix as in the example below: </p>
-
- <pre class="c++">
-xml_schema::namespace_infomap map;
-
-map[""].schema = "test.xsd";
- </pre>
-
- <p>This would result in the following XML fragment:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="test.xsd">
- </pre>
-
- <p>To make a particular namespace default you can use an empty
- prefix, for example:</p>
-
- <pre class="c++">
-xml_schema::namespace_infomap map;
-
-map[""].name = "https://www.codesynthesis.com/test";
-map[""].schema = "test.xsd";
- </pre>
-
- <p>This could result in the following XML fragment:</p>
-
- <pre class="xml">
-&lt;?xml version="1.0" ?>
-&lt;name xmlns="https://www.codesynthesis.com/test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="https://www.codesynthesis.com/test test.xsd">
- </pre>
-
-
- <p>Another bit of information that you can pass to the serialization
- functions is the character encoding method that you would like to use.
- Common values for this argument are <code>"US-ASCII"</code>,
- <code>"ISO8859-1"</code>, <code>"UTF-8"</code>,
- <code>"UTF-16BE"</code>, <code>"UTF-16LE"</code>,
- <code>"UCS-4BE"</code>, and <code>"UCS-4LE"</code>. The default
- encoding is <code>"UTF-8"</code>. For more information on
- encoding methods see the
- "<a href="http://en.wikipedia.org/wiki/Character_code">Character
- Encoding</a>" article from Wikipedia.
- </p>
-
- <h2><a name="4.3">4.3 Flags</a></h2>
-
- <p>Serialization flags are the last argument of every serialization
- function. They allow you to fine-tune the process of serialization.
- The flags argument is optional.
- </p>
-
-
- <p>The following flags are recognized by the serialization
- functions:</p>
-
- <dl>
- <dt><code>xml_schema::flags::dont_initialize</code></dt>
- <dd>Do not initialize the Xerces-C++ runtime.</dd>
-
- <dt><code>xml_schema::flags::dont_pretty_print</code></dt>
- <dd>Do not add extra spaces or new lines that make the resulting XML
- slightly bigger but easier to read.</dd>
-
- <dt><code>xml_schema::flags::no_xml_declaration</code></dt>
- <dd>Do not write XML declaration (&lt;?xml ... ?>).</dd>
- </dl>
-
- <p>You can pass several flags by combining them using the bit-wise OR
- operator. For example:</p>
-
- <pre class="c++">
-std::auto_ptr&lt;type> r = ...
-std::ofstream ofs ("test.xml");
-xml_schema::namespace_infomap map;
-name (ofs,
- *r,
- map,
- "UTF-8",
- xml_schema::flags::no_xml_declaration |
- xml_schema::flags::dont_pretty_print);
- </pre>
-
- <p>For more information on the Xerces-C++ runtime initialization
- refer to <a href="#4.1">Section 4.1, "Initializing the Xerces-C++
- Runtime"</a>.
- </p>
-
- <h2><a name="4.4">4.4 Error Handling</a></h2>
-
- <p>As with the parsing functions (see <a href="#3.3">Section 3.3,
- "Error Handling"</a>), to better understand error handling and
- reporting strategies employed by the serialization functions, it
- is useful to know that the transformation of a statically-typed
- tree to an XML instance document happens in two stages. The first
- stage, performed by the generated code, consist of building a DOM
- instance from the statically-typed tree . For short, we will call
- this stage the Tree-DOM stage. The second stage, performed by
- Xerces-C++, consists of serializing the DOM instance into the XML
- document. We will call this stage the DOM-XML stage.
- </p>
-
- <p>All serialization functions except the two that serialize into
- a DOM instance come in overloaded triples. The first function
- in such a triple reports error conditions exclusively by throwing
- exceptions. It accumulates all the serialization errors of the
- DOM-XML stage and throws them in a single instance of the
- <code>xml_schema::serialization</code> exception (described below).
- The second and the third functions in the triple use callback
- interfaces to report serialization errors and warnings. The two
- callback interfaces are <code>xml_schema::error_handler</code> and
- <code>xercesc::DOMErrorHandler</code>. The
- <code>xml_schema::error_handler</code> interface is described in
- <a href="#3.3">Section 3.3, "Error Handling"</a>. For more information
- on the <code>xercesc::DOMErrorHandler</code> interface refer to the
- Xerces-C++ documentation.
- </p>
-
- <p>The Tree-DOM stage reports error conditions exclusively by throwing
- exceptions. Individual exceptions thrown by the serialization functions
- are described in the following sub-sections.
- </p>
-
- <h3><a name="4.4.1">4.4.1 <code>xml_schema::serialization</code></a></h3>
-
- <pre class="c++">
-struct serialization: virtual exception
-{
- serialization ();
- serialization (const diagnostics&amp;);
-
- const diagnostics&amp;
- diagnostics () const;
-
- virtual const char*
- what () const throw ();
-};
- </pre>
-
- <p>The <code>xml_schema::diagnostics</code> class is described in
- <a href="#3.3.1">Section 3.3.1, "<code>xml_schema::parsing</code>"</a>.
- The <code>xml_schema::serialization</code> exception is thrown if
- there were serialization errors reported during the DOM-XML stage.
- If no callback interface was provided to the serialization function,
- the exception contains a list of errors and warnings accessible using
- the <code>diagnostics</code> function.
- </p>
-
-
- <h3><a name="4.4.2">4.4.2 <code>xml_schema::unexpected_element</code></a></h3>
-
- <p>The <code>xml_schema::unexpected_element</code> exception is
- described in <a href="#3.3.3">Section 3.3.3,
- "<code>xml_schema::unexpected_element</code>"</a>. It is thrown
- by the serialization functions during the Tree-DOM stage if the
- root element name of the provided DOM instance does not match with
- the name of the element this serialization function is for.
- </p>
-
- <h3><a name="4.4.3">4.4.3 <code>xml_schema::no_type_info</code></a></h3>
-
- <p>The <code>xml_schema::no_type_info</code> exception is
- described in <a href="#3.3.7">Section 3.3.7,
- "<code>xml_schema::no_type_info</code>"</a>. It is thrown
- by the serialization functions during the Tree-DOM stage when there
- is no type information associated with a dynamic type of an
- element. Usually, catching this exception means that you haven't
- linked the code generated from the schema defining the type in
- question with your application or this schema has been compiled
- without the <code>--generate-polymorphic</code> option.
- </p>
-
- <h2><a name="4.5">4.5 Serializing to <code>std::ostream</code></a></h2>
-
- <p>In order to serialize to <code>std::ostream</code> you will need
- an object model, an output stream and, optionally, a namespace
- infomap. For instance:</p>
-
- <pre class="c++">
-// Obtain the object model.
-//
-std::auto_ptr&lt;type> r = ...
-
-// Prepare namespace mapping and schema location information.
-//
-xml_schema::namespace_infomap map;
-
-map["t"].name = "https://www.codesynthesis.com/test";
-map["t"].schema = "test.xsd";
-
-// Write it out.
-//
-name (std::cout, *r, map);
- </pre>
-
- <p>Note that the output stream is treated as a binary stream. This
- becomes important when you use a character encoding that is wider
- than 8-bit <code>char</code>, for instance UTF-16 or UCS-4. For
- example, things will most likely break if you try to serialize
- to <code>std::ostringstream</code> with UTF-16 or UCS-4 as an
- encoding. This is due to the special value,
- <code>'\0'</code>, that will most likely occur as part of such
- serialization and it won't have the special meaning assumed by
- <code>std::ostringstream</code>.
- </p>
-
-
- <h2><a name="4.6">4.6 Serializing to <code>xercesc::XMLFormatTarget</code></a></h2>
-
- <p>Serializing to an <code>xercesc::XMLFormatTarget</code> instance
- is similar the <code>std::ostream</code> case. For instance:
- </p>
-
- <pre class="c++">
-using std::auto_ptr;
-
-// Obtain the object model.
-//
-auto_ptr&lt;type> r = ...
-
-// Prepare namespace mapping and schema location information.
-//
-xml_schema::namespace_infomap map;
-
-map["t"].name = "https://www.codesynthesis.com/test";
-map["t"].schema = "test.xsd";
-
-using namespace xercesc;
-
-XMLPlatformUtils::Initialize ();
-
-{
- // Choose a target.
- //
- auto_ptr&lt;XMLFormatTarget> ft;
-
- if (argc != 2)
- {
- ft = auto_ptr&lt;XMLFormatTarget> (new StdOutFormatTarget ());
- }
- else
- {
- ft = auto_ptr&lt;XMLFormatTarget> (
- new LocalFileFormatTarget (argv[1]));
- }
-
- // Write it out.
- //
- name (*ft, *r, map);
-}
-
-XMLPlatformUtils::Terminate ();
- </pre>
-
- <p>Note that we had to initialize the Xerces-C++ runtime before we
- could call this serialization function.</p>
-
- <h2><a name="4.7">4.7 Serializing to DOM</a></h2>
-
- <p>The mapping provides two overloaded functions that implement
- serialization to a DOM instance. The first creates a DOM instance
- for you and the second serializes to an existing DOM instance.
- While serializing to a new DOM instance is similar to serializing
- to <code>std::ostream</code> or <code>xercesc::XMLFormatTarget</code>,
- serializing to an existing DOM instance requires quite a bit of work
- from your side. You will need to set all the custom namespace mapping
- attributes as well as the <code>schemaLocation</code> and/or
- <code>noNamespaceSchemaLocation</code> attributes. The following
- listing should give you an idea about what needs to be done:
- </p>
-
- <pre class="c++">
-// Obtain the object model.
-//
-std::auto_ptr&lt;type> r = ...
-
-using namespace xercesc;
-
-XMLPlatformUtils::Initialize ();
-
-{
- // Create a DOM instance. Set custom namespace mapping and schema
- // location attributes.
- //
- DOMDocument&amp; doc = ...
-
- // Serialize to DOM.
- //
- name (doc, *r);
-
- // Serialize the DOM document to XML.
- //
- ...
-}
-
-XMLPlatformUtils::Terminate ();
- </pre>
-
- <p>For more information on how to create and serialize a DOM instance
- refer to the Xerces-C++ documentation. In addition, the
- <a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree Mapping
- FAQ</a> shows how to implement these operations using the XSD
- runtime utilities.
- </p>
-
- <h1><a name="5">5 Additional Functionality</a></h1>
-
- <p>The C++/Tree mapping provides a number of optional features
- that can be useful in certain situations. They are described
- in the following sections.</p>
-
- <h2><a name="5.1">5.1 DOM Association</a></h2>
-
- <p>Normally, after parsing is complete, the DOM document which
- was used to extract the data is discarded. However, the parsing
- functions can be instructed to preserve the DOM document
- and create an association between the DOM nodes and object model
- nodes. When there is an association between the DOM and
- object model nodes, you can obtain the corresponding DOM element
- or attribute node from an object model node as well as perform
- the reverse transition: obtain the corresponding object model
- from a DOM element or attribute node.</p>
-
- <p>Maintaining DOM association is normally useful when the application
- needs access to XML constructs that are not preserved in the
- object model, for example, XML comments.
- Another useful aspect of DOM association is the ability of the
- application to navigate the document tree using the generic DOM
- interface (for example, with the help of an XPath processor)
- and then move back to the statically-typed object model. Note
- also that while you can change the underlying DOM document,
- these changes are not reflected in the object model and will
- be ignored during serialization. If you need to not only access
- but also modify some aspects of XML that are not preserved in
- the object model, then type customization with custom parsing
- constructors and serialization operators should be used instead.</p>
-
- <p>To request DOM association you will need to pass the
- <code>xml_schema::flags::keep_dom</code> flag to one of the
- parsing functions (see <a href="#3.2">Section 3.2,
- "Flags and Properties"</a> for more information). In this case the
- DOM document is retained and will be released when the object model
- is deleted. Note that since DOM nodes "out-live" the parsing function
- call, you need to initialize the Xerces-C++ runtime before calling
- one of the parsing functions with the <code>keep_dom</code> flag and
- terminate it after the object model is destroyed (see
- <a href="#3.1">Section 3.1, "Initializing the Xerces-C++ Runtime"</a>).</p>
-
- <p>If the <code>keep_dom</code> flag is passed
- as the second argument to the copy constructor and the copy
- being made is of a complete tree, then the DOM association
- is also maintained in the copy by cloning the underlying
- DOM document and reestablishing the associations. For example:</p>
-
- <pre class="c++">
-using namespace xercesc;
-
-XMLPlatformUtils::Initialize ();
-
-{
- // Parse XML to object model.
- //
- std::auto_ptr&lt;type> r (root (
- "root.xml",
- xml_schema::flags::keep_dom |
- xml_schema::flags::dont_initialize));
-
- // Copy without DOM association.
- //
- type copy1 (*r);
-
- // Copy with DOM association.
- //
- type copy2 (*r, xml_schema::flags::keep_dom);
-}
-
-XMLPlatformUtils::Terminate ();
- </pre>
-
-
- <p>To obtain the corresponding DOM node from an object model node
- you will need to call the <code>_node</code> accessor function
- which returns a pointer to <code>DOMNode</code>. You can then query
- this DOM node's type and cast it to either <code>DOMAttr*</code>
- or <code>DOMElement*</code>. To obtain the corresponding object
- model node from a DOM node, the DOM user data API is used. The
- <code>xml_schema::dom::tree_node_key</code> variable contains
- the key for object model nodes. The following schema and code
- fragment show how to navigate from DOM to object model nodes
- and in the opposite direction:</p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="a" type="string"/>
- &lt;/sequence>
-&lt;/complexType>
-
-&lt;element name="root" type="object"/>
- </pre>
-
- <pre class="c++">
-using namespace xercesc;
-
-XMLPlatformUtils::Initialize ();
-
-{
- // Parse XML to object model.
- //
- std::auto_ptr&lt;type> r (root (
- "root.xml",
- xml_schema::flags::keep_dom |
- xml_schema::flags::dont_initialize));
-
- DOMNode* n = r->_node ();
- assert (n->getNodeType () == DOMNode::ELEMENT_NODE);
- DOMElement* re = static_cast&lt;DOMElement*> (n);
-
- // Get the 'a' element. Note that it is not necessarily the
- // first child node of 'root' since there could be whitespace
- // nodes before it.
- //
- DOMElement* ae;
-
- for (n = re->getFirstChild (); n != 0; n = n->getNextSibling ())
- {
- if (n->getNodeType () == DOMNode::ELEMENT_NODE)
- {
- ae = static_cast&lt;DOMElement*> (n);
- break;
- }
- }
-
- // Get from the 'a' DOM element to xml_schema::string object model
- // node.
- //
- xml_schema::type&amp; t (
- *reinterpret_cast&lt;xml_schema::type*> (
- ae->getUserData (xml_schema::dom::tree_node_key)));
-
- xml_schema::string&amp; a (dynamic_cast&lt;xml_schema::string&amp;> (t));
-}
-
-XMLPlatformUtils::Terminate ();
- </pre>
-
- <p>The 'mixed' example which can be found in the XSD distribution
- shows how to handle the mixed content using DOM association.</p>
-
- <h2><a name="5.2">5.2 Binary Serialization</a></h2>
-
- <p>Besides reading from and writing to XML, the C++/Tree mapping
- also allows you to save the object model to and load it from a
- number of predefined as well as custom data representation
- formats. The predefined binary formats are CDR (Common Data
- Representation) and XDR (eXternal Data Representation). A
- custom format can easily be supported by providing
- insertion and extraction operators for basic types.</p>
-
- <p>Binary serialization saves only the data without any meta
- information or markup. As a result, saving to and loading
- from a binary representation can be an order of magnitude
- faster than parsing and serializing the same data in XML.
- Furthermore, the resulting representation is normally several
- times smaller than the equivalent XML representation. These
- properties make binary serialization ideal for internal data
- exchange and storage. A typical application that uses this
- facility stores the data and communicates within the
- system using a binary format and reads/writes the data
- in XML when communicating with the outside world.</p>
-
- <p>In order to request the generation of insertion operators and
- extraction constructors for a specific predefined or custom
- data representation stream, you will need to use the
- <code>--generate-insertion</code> and <code>--generate-extraction</code>
- compiler options. See the
- <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
- Compiler Command Line Manual</a> for more information.</p>
-
- <p>Once the insertion operators and extraction constructors are
- generated, you can use the <code>xml_schema::istream</code>
- and <code>xml_schema::ostream</code> wrapper stream templates
- to save the object model to and load it from a specific format.
- The following code fragment shows how to do this using ACE
- (Adaptive Communication Environment) CDR streams as an example:</p>
-
- <pre class="xml">
-&lt;complexType name="object">
- &lt;sequence>
- &lt;element name="a" type="string"/>
- &lt;element name="b" type="int"/>
- &lt;/sequence>
-&lt;/complexType>
-
-&lt;element name="root" type="object"/>
- </pre>
-
- <pre class="c++">
-// Parse XML to object model.
-//
-std::auto_ptr&lt;type> r (root ("root.xml"));
-
-// Save to a CDR stream.
-//
-ACE_OutputCDR ace_ocdr;
-xml_schema::ostream&lt;ACE_OutputCDR> ocdr (ace_ocdr);
-
-ocdr &lt;&lt; *r;
-
-// Load from a CDR stream.
-//
-ACE_InputCDR ace_icdr (buf, size);
-xml_schema::istream&lt;ACE_InputCDR> icdr (ace_icdr);
-
-std::auto_ptr&lt;object> copy (new object (icdr));
-
-// Serialize to XML.
-//
-root (std::cout, *copy);
- </pre>
-
- <p>The XSD distribution contains a number of examples that
- show how to save the object model to and load it from
- CDR, XDR, and a custom format.</p>
-
- <!-- Appendix A -->
-
-
- <h1><a name="A">Appendix A &mdash; Default and Fixed Values</a></h1>
-
- <p>The following table summarizes the effect of default and fixed
- values (specified with the <code>default</code> and <code>fixed</code>
- attributes, respectively) on attribute and element values. The
- <code>default</code> and <code>fixed</code> attributes are mutually
- exclusive. It is also worthwhile to note that the fixed value semantics
- is a superset of the default value semantics.
- </p>
-
- <!-- border="1" is necessary for html2ps -->
- <table id="default-fixed" border="1">
- <tr>
- <th></th>
- <th></th>
- <th colspan="2">default</th>
- <th colspan="2">fixed</th>
- </tr>
-
- <!-- element -->
-
- <tr>
- <th rowspan="4">element</th>
- <th rowspan="2">not present</th>
- <th>optional</th>
- <th>required</th>
- <th>optional</th>
- <th>required</th>
- </tr>
- <tr>
- <td>not present</td>
- <td>invalid instance</td>
- <td>not present</td>
- <td>invalid instance</td>
- </tr>
-
-
- <tr>
- <th>empty</th>
- <td colspan="2">default value is used</td>
- <td colspan="2">fixed value is used</td>
- </tr>
-
- <tr>
- <th>value</th>
- <td colspan="2">value is used</td>
- <td colspan="2">value is used provided it's the same as fixed</td>
- </tr>
-
- <!-- attribute -->
-
- <!-- element -->
-
- <tr>
- <th rowspan="4">attribute</th>
- <th rowspan="2">not present</th>
- <th>optional</th>
- <th>required</th>
- <th>optional</th>
- <th>required</th>
- </tr>
- <tr>
- <td>default value is used</td>
- <td>invalid schema</td>
- <td>fixed value is used</td>
- <td>invalid instance</td>
- </tr>
-
-
- <tr>
- <th>empty</th>
- <td colspan="2">empty value is used</td>
- <td colspan="2">empty value is used provided it's the same as fixed</td>
- </tr>
-
- <tr>
- <th>value</th>
- <td colspan="2">value is used</td>
- <td colspan="2">value is used provided it's the same as fixed</td>
- </tr>
-
- </table>
-
- </div>
-</div>
-
-
-</body>
-</html>
diff --git a/doc/cxx/tree/manual/makefile b/doc/cxx/tree/manual/makefile
deleted file mode 100644
index 7d46c91..0000000
--- a/doc/cxx/tree/manual/makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# file : doc/cxx/tree/manual/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(out_base)/cxx-tree-manual.ps $(out_base)/cxx-tree-manual.pdf
-
-
-$(out_base)/cxx-tree-manual.ps: $(src_base)/index.xhtml \
- $(src_base)/manual.html2ps \
- | $(out_base)/.
- $(call message,html2ps $<,html2ps -f $(src_base)/manual.html2ps -o $@ $<)
-
-$(out_base)/cxx-tree-manual.pdf: $(out_base)/cxx-tree-manual.ps | $(out_base)/.
- $(call message,ps2pdf $<,ps2pdf14 $< $@)
-
-# Install & Dist.
-#
-$(install): path := $(subst $(src_root)/doc/,,$(src_base))
-$(dist): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(out_base)/cxx-tree-manual.ps $(out_base)/cxx-tree-manual.pdf
- $(call install-data,$(src_base)/index.xhtml,$(install_doc_dir)/xsd/$(path)/index.xhtml)
- $(call install-data,$(out_base)/cxx-tree-manual.ps,$(install_doc_dir)/xsd/$(path)/cxx-tree-manual.ps)
- $(call install-data,$(out_base)/cxx-tree-manual.pdf,$(install_doc_dir)/xsd/$(path)/cxx-tree-manual.pdf)
-
-$(dist): $(out_base)/cxx-tree-manual.ps $(out_base)/cxx-tree-manual.pdf
- $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml)
- $(call install-data,$(out_base)/cxx-tree-manual.ps,$(dist_prefix)/$(path)/cxx-tree-manual.ps)
- $(call install-data,$(out_base)/cxx-tree-manual.pdf,$(dist_prefix)/$(path)/cxx-tree-manual.pdf)
-
-$(dist-win): $(dist)
-
-
-# Clean
-#
-$(clean):
-ifneq ($(xsd_clean_gen),n)
- $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-manual.ps)
- $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-tree-manual.pdf)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/install.make)
diff --git a/doc/cxx/tree/manual/manual.html2ps b/doc/cxx/tree/manual/manual.html2ps
deleted file mode 100644
index a4b4491..0000000
--- a/doc/cxx/tree/manual/manual.html2ps
+++ /dev/null
@@ -1,66 +0,0 @@
-@html2ps {
- option {
- toc: hb;
- colour: 1;
- hyphenate: 1;
- titlepage: 1;
- }
-
- datefmt: "%B %Y";
-
- titlepage {
- content: "
-<div align=center>
- <h1><big>C++/Tree Mapping User Manual</big></h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
- <h1>&nbsp;</h1>
-</div>
- <p>Revision $[revision] &nbsp;&nbsp;&nbsp; $D</p>
- <p>Copyright &#169; 2009-2020 Code Synthesis Tools CC.</p>
-
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the
- <a href='https://www.codesynthesis.com/licenses/fdl-1.2.txt'>GNU Free
- Documentation License, version 1.2</a>; with no Invariant Sections,
- no Front-Cover Texts and no Back-Cover Texts.
- </p>
-
- <p>This document is available in the following formats:
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/index.xhtml'>XHTML</a>,
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf'>PDF</a>, and
- <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps'>PostScript</a>.</p>";
- }
-
- toc {
- indent: 2em;
- }
-
- header {
- odd-right: $H;
- even-left: $H;
- }
-
- footer {
- odd-left: $D;
- odd-center: $T, v$[revision];
- odd-right: $N;
-
- even-left: $N;
- even-center: $T, v$[revision];
- even-right: $D;
- }
-}
-
-body {
- font-size: 12pt;
- text-align: justify;
-}
-
-pre {
- font-size: 10pt;
-}
diff --git a/doc/cxx/tree/reference/footer.html b/doc/cxx/tree/reference/footer.html
deleted file mode 100644
index 53291d6..0000000
--- a/doc/cxx/tree/reference/footer.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<hr size="1">
-<div style="text-align: center; font-size: 80%;">
- Copyright &#169; 2009-2020 Code Synthesis Tools CC.
-</div>
-</body>
-</html>
diff --git a/doc/cxx/tree/reference/libxsd.doxygen b/doc/cxx/tree/reference/libxsd.doxygen
deleted file mode 100644
index b98074a..0000000
--- a/doc/cxx/tree/reference/libxsd.doxygen
+++ /dev/null
@@ -1,1291 +0,0 @@
-# Doxyfile 1.5.4
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file that
-# follow. The default is UTF-8 which is also the encoding used for all text before
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
-# possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = "C++/Tree Mapping Runtime Library"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
-# include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = YES
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct (or union) is
-# documented as struct with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code where the coding convention is that all structs are
-# typedef'ed and only the typedef is referenced never the struct's name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be extracted
-# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
-# where file will be replaced with the base name of the file that contains the anonymous
-# namespace. By default anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = YES
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = \
-../../../../libxsd/xsd/cxx/tree/buffer.hxx \
-../../../../libxsd/xsd/cxx/tree/types.hxx \
-../../../../libxsd/xsd/cxx/tree/date-time.hxx \
-../../../../libxsd/xsd/cxx/tree/elements.hxx \
-../../../../libxsd/xsd/cxx/tree/element-map.hxx \
-../../../../libxsd/xsd/cxx/tree/exceptions.hxx
-
-# This tag can be used to specify the character encoding of the source files that
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the output.
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output. If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
-# then you must also enable this option. If you don't then doxygen will produce
-# a warning and turn it on anyway
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = YES
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-# C++98 version.
-#
-PREDEFINED = XSD_AUTO_PTR=std::auto_ptr
-
-# C++11 version.
-#
-# PREDEFINED = XSD_AUTO_PTR=std::unique_ptr
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE = libxsd.doxytag
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
-# be found in the default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
-# generate a caller dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the number
-# of direct children of the root node in a graph is already larger than
-# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-
-DOT_TRANSPARENT = YES
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/doc/cxx/tree/reference/makefile b/doc/cxx/tree/reference/makefile
deleted file mode 100644
index 5df62c9..0000000
--- a/doc/cxx/tree/reference/makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-.PHONY: all
-all: libxsd.doxytag
-
-headers := \
-../../../../libxsd/xsd/cxx/tree/buffer.hxx \
-../../../../libxsd/xsd/cxx/tree/types.hxx \
-../../../../libxsd/xsd/cxx/tree/date-time.hxx \
-../../../../libxsd/xsd/cxx/tree/elements.hxx \
-../../../../libxsd/xsd/cxx/tree/exceptions.hxx
-
-libxsd.doxytag: libxsd.doxygen footer.html $(headers)
- doxygen $<
-
-.PHONY: clean
-clean:
- rm -f libxsd.doxytag
- rm -rf html
-
diff --git a/doc/doc.sh b/doc/doc.sh
deleted file mode 100755
index 36528fd..0000000
--- a/doc/doc.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#! /usr/bin/env bash
-
-version=4.1.0.a11
-
-trap 'exit 1' ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
-date="$(date +"%B %Y")"
-copyright="$(sed -n -re 's%^Copyright \(c\) (.+)\.$%\1%p' ../LICENSE)"
-
-while [ $# -gt 0 ]; do
- case $1 in
- --clean)
- rm -f xsd.xhtml xsd.1
- rm -f cxx/parser/guide/cxx-parser-guide.{ps,pdf}
- rm -f cxx/tree/guide/cxx-tree-guide.{ps,pdf}
- rm -f cxx/tree/manual/cxx-tree-manual.{ps,pdf}
- exit 0
- ;;
- *)
- error "unexpected $1"
- ;;
- esac
-done
-
-ops=(\
--v project="xsd" \
--v version="$version" \
--v date="$date" \
--v copyright="$copyright" \
--I ../xsd \
---stdout \
---suppress-undocumented \
---exclude-base)
-
-# XHTML
-#
-# Common options.
-#
-cli "${ops[@]}" --generate-html --class CXX::options --class options \
---html-prologue-file xsd-prologue.xhtml \
-../xsd/cxx/options.cli >xsd.xhtml
-
-# C++/Tree options.
-#
-cli "${ops[@]}" --generate-html \
---html-prologue-file xsd-tree-header.xhtml \
-../xsd/cxx/tree/options.cli >>xsd.xhtml
-
-# C++/Parser options.
-#
-cli "${ops[@]}" --generate-html \
---html-prologue-file xsd-parser-header.xhtml \
---html-epilogue-file xsd-epilogue.xhtml \
-../xsd/cxx/parser/options.cli >>xsd.xhtml
-
-# MAN
-#
-# Common options.
-#
-cli "${ops[@]}" --generate-man --class CXX::options --class options \
---man-prologue-file xsd-prologue.1 \
-../xsd/cxx/options.cli >xsd.1
-
-# C++/Tree options.
-#
-cli "${ops[@]}" --generate-man \
---man-prologue-file xsd-tree-header.1 \
-../xsd/cxx/tree/options.cli >>xsd.1
-
-# C++/Parser options.
-#
-cli "${ops[@]}" --generate-man \
---man-prologue-file xsd-parser-header.1 \
---man-epilogue-file xsd-epilogue.1 \
-../xsd/cxx/parser/options.cli >>xsd.1
-
-# PS, PDF
-#
-# C++/Parser guide.
-#
-html2ps -f cxx/parser/guide/guide.html2ps \
--o cxx/parser/guide/cxx-parser-guide.ps cxx/parser/guide/index.xhtml
-
-ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
-cxx/parser/guide/cxx-parser-guide.ps cxx/parser/guide/cxx-parser-guide.pdf
-
-# C++/Tree guide.
-#
-html2ps -f cxx/tree/guide/guide.html2ps \
--o cxx/tree/guide/cxx-tree-guide.ps cxx/tree/guide/index.xhtml
-
-ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
-cxx/tree/guide/cxx-tree-guide.ps cxx/tree/guide/cxx-tree-guide.pdf
-
-# C++/Tree manual.
-#
-html2ps -f cxx/tree/manual/manual.html2ps \
--o cxx/tree/manual/cxx-tree-manual.ps cxx/tree/manual/index.xhtml
-
-ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
-cxx/tree/manual/cxx-tree-manual.ps cxx/tree/manual/cxx-tree-manual.pdf
diff --git a/doc/makefile b/doc/makefile
deleted file mode 100644
index fcce4f7..0000000
--- a/doc/makefile
+++ /dev/null
@@ -1,142 +0,0 @@
-# file : doc/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/cli/stub.make,\
- cli: cli,cli-rules: cli_rules)
-
-# Build.
-#
-$(default): \
-$(out_base)/cxx/ \
-$(out_base)/xsd.xhtml \
-$(out_base)/xsd.1
-
-# Man/html pages.
-#
-$(out_base)/xsd.xhtml $(out_base)/xsd.1: cli := $(cli)
-$(out_base)/xsd.xhtml $(out_base)/xsd.1: cli_options += -I $(src_root)/xsd
-
-$(out_base)/xsd.xhtml $(out_base)/xsd.1: \
-$(src_root)/xsd/options.cli \
-$(src_root)/xsd/cxx/options.cli \
-$(src_root)/xsd/cxx/tree/options.cli \
-$(src_root)/xsd/cxx/parser/options.cli
-
-# Assemble the options from different files in a specific order.
-#
-
-# XHTML
-#
-$(out_base)/xsd.xhtml: $(src_base)/xsd-prologue.xhtml \
- $(src_base)/xsd-epilogue.xhtml \
- $(src_base)/xsd-tree-header.xhtml \
- $(src_base)/xsd-parser-header.xhtml \
- | $(out_base)/.
-# Common options.
-#
- $(call message,cli-html $$1,$(cli) $(cli_options) --generate-html \
---stdout --suppress-undocumented --exclude-base --class CXX::options \
---class options --html-prologue-file $(src_base)/xsd-prologue.xhtml \
-$$1 >$@, $(src_root)/xsd/cxx/options.cli)
-
-# C++/Tree options.
-#
- $(call message,cli-html $$1,$(cli) $(cli_options) --generate-html \
---stdout --suppress-undocumented --exclude-base \
---html-prologue-file $(src_base)/xsd-tree-header.xhtml \
-$$1 >>$@, $(src_root)/xsd/cxx/tree/options.cli)
-
-# C++/Parser options.
-#
- $(call message,cli-html $$1,$(cli) $(cli_options) --generate-html \
---stdout --suppress-undocumented --exclude-base \
---html-prologue-file $(src_base)/xsd-parser-header.xhtml \
---html-epilogue-file $(src_base)/xsd-epilogue.xhtml \
-$$1 >>$@, $(src_root)/xsd/cxx/parser/options.cli)
-
-# MAN
-#
-$(out_base)/xsd.1: $(src_base)/xsd-prologue.1 \
- $(src_base)/xsd-epilogue.1 \
- $(src_base)/xsd-tree-header.1 \
- $(src_base)/xsd-parser-header.1 \
- | $(out_base)/.
-# Common options.
-#
- $(call message,cli-man $$1,$(cli) $(cli_options) --generate-man \
---stdout --suppress-undocumented --exclude-base --class CXX::options \
---class options --man-prologue-file $(src_base)/xsd-prologue.1 \
-$$1 >$@, $(src_root)/xsd/cxx/options.cli)
-
-# C++/Tree options.
-#
- $(call message,cli-man $$1,$(cli) $(cli_options) --generate-man \
---stdout --suppress-undocumented --exclude-base \
---man-prologue-file $(src_base)/xsd-tree-header.1 \
-$$1 >>$@, $(src_root)/xsd/cxx/tree/options.cli)
-
-# C++/Parser options.
-#
- $(call message,cli-man $$1,$(cli) $(cli_options) --generate-man \
---stdout --suppress-undocumented --exclude-base \
---man-prologue-file $(src_base)/xsd-parser-header.1 \
---man-epilogue-file $(src_base)/xsd-epilogue.1 \
-$$1 >>$@, $(src_root)/xsd/cxx/parser/options.cli)
-
-
-# Install.
-#
-$(install): $(out_base)/cxx/.install \
- $(out_base)/xsd.xhtml \
- $(out_base)/xsd.1
- $(call install-data,$(src_base)/default.css,$(install_doc_dir)/xsd/default.css)
- $(call install-data,$(out_base)/xsd.xhtml,$(install_doc_dir)/xsd/xsd.xhtml)
- $(call install-data,$(src_base)/custom-literals.xsd,$(install_doc_dir)/xsd/custom-literals.xsd)
- $(call install-data,$(out_base)/xsd.1,$(install_man_dir)/man1/xsd.1)
-
-# Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(dist-common): $(out_base)/xsd.xhtml \
- $(out_base)/xsd.1
- $(call install-data,$(src_base)/default.css,$(dist_prefix)/doc/default.css)
- $(call install-data,$(out_base)/xsd.xhtml,$(dist_prefix)/doc/xsd.xhtml)
- $(call install-data,$(out_base)/xsd.1,$(dist_prefix)/doc/xsd.1)
- $(call install-data,$(src_base)/custom-literals.xsd,$(dist_prefix)/doc/custom-literals.xsd)
-
-$(dist): $(dist-common) $(out_base)/cxx/.dist
-$(dist-win): $(dist-common) $(out_base)/cxx/.dist-win
-
-# Clean.
-#
-$(clean): $(out_base)/cxx/.clean
-ifneq ($(xsd_clean_gen),n)
- $(call message,rm $$1,rm -f $$1,$(out_base)/xsd.1)
- $(call message,rm $$1,rm -f $$1,$(out_base)/xsd.xhtml)
-endif
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(out_base)/xsd.xhtml $(out_base)/xsd.1: | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := xsd.1 xsd.xhtml
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-$(call include,$(bld_root)/install.make)
-$(call import,$(src_base)/cxx/makefile)
diff --git a/doc/xsd-prologue.1 b/doc/xsd-prologue.1
deleted file mode 100644
index 50872b4..0000000
--- a/doc/xsd-prologue.1
+++ /dev/null
@@ -1,119 +0,0 @@
-.\" Process this file with
-.\" groff -man -Tascii xsd.1
-.\"
-.TH XSD 1 "July 2014" "XSD 4.1.0"
-.SH NAME
-xsd \- W3C XML Schema to C++ Compiler
-.\"
-.\"
-.\"
-.\"--------------------------------------------------------------------
-.SH SYNOPSIS
-.\"--------------------------------------------------------------------
-.B xsd
-.I command
-.B [
-.I options
-.B ]
-.I file
-.B [
-.I file
-.B ...]
-.in
-.B xsd help
-.B [
-.I command
-.B ]
-.in
-.B xsd version
-.\"
-.\"
-.\"
-.\"--------------------------------------------------------------------
-.SH DESCRIPTION
-.\"--------------------------------------------------------------------
-.B xsd
-generates vocabulary-specific, statically-typed C++ mapping from W3C XML
-Schema definitions. Particular mapping to produce is selected by a
-.IR command .
-Each mapping has a number of mapping-specific
-.I options
-that should appear, if any, after the
-.IR command .
-Input files should be W3C XML Schema definitions. The exact set of the
-generated files depends on the selected mapping and options.
-.\"
-.\"
-.\"
-.\"--------------------------------------------------------------------
-.SH COMMANDS
-.\"--------------------------------------------------------------------
-.IP \fBcxx-tree\fR
-Generate the C++/Tree mapping. For each input file in the form
-.B name.xsd
-the following C++ files are generated:
-.B name.hxx
-(header file),
-.B name.ixx
-(inline file, generated only if the
-.B --generate-inline
-option is specified),
-.B name.cxx
-(source file), and
-.B name-fwd.hxx
-(forward declaration file, generated only if the
-.B --generate-forward
-option is specified).
-
-.IP \fBcxx-parser\fR
-Generate the C++/Parser mapping. For each input file in the form
-.B name.xsd
-the following C++ files are generated:
-.B name-pskel.hxx
-(parser skeleton header file),
-.B name-pskel.ixx
-(parser skeleton inline file, generated only if the
-.B --generate-inline
-option is specified), and
-.B name-pskel.cxx
-(parser skeleton source file). If the
-.B --generate-noop-impl
-or
-.B --generate-print-impl
-option is specified, the following additional sample implementation files
-are generated:
-.B name-pimpl.hxx
-(parser implementation header file) and
-.B name-pimpl.cxx
-(parser implementation source file). If the
-.B --generate-test-driver
-option is specified, the additional
-.B name-driver.cxx
-test driver file is generated.
-
-.IP \fBhelp\fR
-Print usage information and exit. Use
-.PP
-.RS
-.RS 3
-.B xsd help
-.I command
-.RE
-.PP
-for command-specific help.
-.RE
-.IP \fBversion\fR
-Print version and exit.
-.\"--------------------------------------------------------------------
-.SH OPTIONS
-.\"--------------------------------------------------------------------
-Command-specific
-.IR options ,
-if any, should appear after the corresponding
-.IR command .
-
-.\"
-.\" Common options.
-.\"
-.SS common options
-.
diff --git a/doc/xsd-prologue.xhtml b/doc/xsd-prologue.xhtml
deleted file mode 100644
index 6facbe8..0000000
--- a/doc/xsd-prologue.xhtml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head>
- <title>XSD 4.1.0 Compiler Command Line Manual</title>
-
- <meta name="copyright" content="&#169; $copyright$"/>
- <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,code,generator,manual,man,page"/>
- <meta name="description" content="XSD Compiler Command Line Manual"/>
-
- <link rel="stylesheet" type="text/css" href="default.css" />
-
-<style type="text/css">
-
- #synopsis {
- list-style-type: none;
- }
-
- #synopsis li {
- padding-top : 0.0em;
- padding-bottom : 0.0em;
- }
-
- #commands dt {
- padding-top : 0.4em;
- }
-
- #commands dd {
- padding-bottom : 0.4em;
- padding-left : 2em;
- }
-
- .options {
- margin: 1em 0 1em 0;
- }
-
- .options dt {
- margin: 1em 0 0 0;
- }
-
- .options dd {
- margin: .1em 0 0 4.5em;
- }
-
-</style>
-</head>
-
-<body>
-<div id="container">
- <div id="content">
-
- <h1>NAME</h1>
-
- <p>xsd - W3C XML Schema to C++ Compiler</p>
-
- <h1>SYNOPSIS</h1>
-
- <dl id="synopsis">
- <dt><code><b>xsd</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
- <dt><code><b>xsd help</b> [<i>command</i>]</code></dt>
- <dt><code><b>xsd version</b></code></dt>
- </dl>
-
- <h1>DESCRIPTION</h1>
-
- <p><code><b>xsd</b></code> generates vocabulary-specific, statically-typed
- C++ mapping from W3C XML Schema definitions. Particular mapping to
- produce is selected by a <code><i>command</i></code>. Each mapping has
- a number of mapping-specific <code><i>options</i></code> that should
- appear, if any, after the <code><i>command</i></code>. Input files should
- be W3C XML Schema definitions. The exact set of the generated files depends
- on the selected mapping and options.</p>
-
- <h1>COMMANDS</h1>
-
- <dl id="commands">
- <dt><code><b>cxx-tree</b></code></dt>
- <dd>Generate the C++/Tree mapping. For each input file in the form
- <code><b>name.xsd</b></code> the following C++ files are generated:
- <code><b>name.hxx</b></code> (header file),
- <code><b>name.ixx</b></code> (inline file, generated only if the
- <code><b>--generate-inline</b></code> option is specified),
- <code><b>name.cxx</b></code> (source file), and
- <code><b>name-fwd.hxx</b></code> (forward declaration file, generated
- only if the <code><b>--generate-forward</b></code> option is
- specified).</dd>
-
- <dt><code><b>cxx-parser</b></code></dt>
- <dd>Generate the C++/Parser mapping. For each input file in the form
- <code><b>name.xsd</b></code> the following C++ files are generated:
- <code><b>name-pskel.hxx</b></code> (parser skeleton header file),
- <code><b>name-pskel.ixx</b></code> (parser skeleton inline file,
- generated only if the <code><b>--generate-inline</b></code>
- option is specified), and
- <code><b>name-pskel.cxx</b></code> (parser skeleton source file).
- If the <code><b>--generate-noop-impl</b></code> or
- <code><b>--generate-print-impl</b></code> option is specified,
- the following additional sample implementation files are generated:
- <code><b>name-pimpl.hxx</b></code> (parser implementation header
- file) and
- <code><b>name-pimpl.cxx</b></code> (parser implementation source
- file). If the <code><b>--generate-test-driver</b></code> option
- is specified, the additional <code><b>name-driver.cxx</b></code>
- test driver file is generated.</dd>
-
- <dt><code><b>help</b></code></dt>
- <dd>Print usage information and exit. Use
- <p><code><b>xsd help</b> <i>command</i></code></p>
- for command-specific help.
- </dd>
-
- <dt><code><b>version</b></code></dt>
- <dd>Print version and exit.</dd>
- </dl>
-
- <h1>OPTIONS</h1>
-
- <p>Command-specific <code><i>options</i></code>, if any, should appear
- after the corresponding <code><i>command</i></code>.</p>
-
- <h2>COMMON OPTIONS</h2>
diff --git a/examples/cxx/parser/generated/library.xml b/examples/cxx/parser/generated/library.xml
deleted file mode 100644
index b1ac98c..0000000
--- a/examples/cxx/parser/generated/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/library/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP" available="true" >
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/parser/generated/library.xsd b/examples/cxx/parser/generated/library.xsd
deleted file mode 100644
index 71e4005..0000000
--- a/examples/cxx/parser/generated/library.xsd
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/library/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:string"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:string"/>
- <xsd:element name="died" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF"/> <!-- Book -->
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" use="required"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/generated/makefile b/examples/cxx/parser/generated/makefile
deleted file mode 100644
index cfce1a7..0000000
--- a/examples/cxx/parser/generated/makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-# file : examples/cxx/parser/generated/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-
-obj := $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.o) $(xsd:.xsd=-pimpl.o) $(xsd:.xsd=-driver.o))
-dep := $(obj:.o=.o.d)
-
-
-driver := $(out_base)/$(xsd:.xsd=-driver)
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) \
- $(xsd:.xsd=-pskel.ixx) \
- $(xsd:.xsd=-pskel.cxx) \
- $(xsd:.xsd=-pimpl.hxx) \
- $(xsd:.xsd=-pimpl.cxx) \
- $(xsd:.xsd=-driver.cxx)
-
-gen := $(addprefix $(out_base)/,$(genf))
-
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-print-impl --generate-test-driver \
---force-overwrite
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pimpl.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := $(xsd:.xsd=-driver) $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-
-xsd_parser_impl_suffix := -pimpl
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/hello/driver.cxx b/examples/cxx/parser/hello/driver.cxx
deleted file mode 100644
index e261e10..0000000
--- a/examples/cxx/parser/hello/driver.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-// file : examples/cxx/parser/hello/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <string>
-#include <iostream>
-
-#include "hello-pskel.hxx"
-
-using namespace std;
-
-struct hello_pimpl: hello_pskel
-{
- virtual void
- greeting (const string& greeting)
- {
- greeting_ = greeting;
- }
-
- virtual void
- name (const string& name)
- {
- cout << greeting_ << ", " << name << "!" << endl;
- }
-
-private:
- string greeting_;
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " hello.xml" << endl;
- return 1;
- }
-
- try
- {
- // Construct the parser.
- //
- xml_schema::string_pimpl string_p;
- hello_pimpl hello_p;
-
- hello_p.greeting_parser (string_p);
- hello_p.name_parser (string_p);
-
- // Parse the XML instance document. The second argument to the
- // document's constructor is the document's root element name.
- //
- xml_schema::document doc_p (hello_p, "hello");
-
- hello_p.pre ();
- doc_p.parse (argv[1]);
- hello_p.post_hello ();
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/hello/hello.xml b/examples/cxx/parser/hello/hello.xml
deleted file mode 100644
index dd0c13d..0000000
--- a/examples/cxx/parser/hello/hello.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/hello/hello.xml
-copyright : not copyrighted - public domain
-
--->
-
-<hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="hello.xsd">
-
- <greeting>Hello</greeting>
-
- <name>sun</name>
- <name>moon</name>
- <name>world</name>
-
-</hello>
diff --git a/examples/cxx/parser/hello/hello.xsd b/examples/cxx/parser/hello/hello.xsd
deleted file mode 100644
index be69957..0000000
--- a/examples/cxx/parser/hello/hello.xsd
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/hello/hello.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="hello">
- <xsd:sequence>
- <xsd:element name="greeting" type="xsd:string"/>
- <xsd:element name="name" type="xsd:string" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="hello" type="hello"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/hello/makefile b/examples/cxx/parser/hello/makefile
deleted file mode 100644
index 9317315..0000000
--- a/examples/cxx/parser/hello/makefile
+++ /dev/null
@@ -1,100 +0,0 @@
-# file : examples/cxx/parser/hello/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := hello.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/hello.xsd,$(install_doc_dir)/xsd/$(path)/hello.xsd)
- $(call install-data,$(src_base)/hello.xml,$(install_doc_dir)/xsd/$(path)/hello.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/hello.xsd,$(dist_prefix)/$(path)/hello.xsd)
- $(call install-data,$(src_base)/hello.xml,$(dist_prefix)/$(path)/hello.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/library/driver.cxx b/examples/cxx/parser/library/driver.cxx
deleted file mode 100644
index 3b63801..0000000
--- a/examples/cxx/parser/library/driver.cxx
+++ /dev/null
@@ -1,109 +0,0 @@
-// file : examples/cxx/parser/library/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <iostream>
-
-#include "library.hxx"
-#include "library-pimpl.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace library;
-
-
- // Construct the parser.
- //
- xml_schema::id_pimpl id_p;
- xml_schema::idref_pimpl idref_p;
- xml_schema::string_pimpl string_p;
- xml_schema::boolean_pimpl boolean_p;
-
- isbn_pimpl isbn_p;
-
- title_pimpl title_p;
- title_p.lang_parser (string_p);
-
- genre_pimpl genre_p;
-
- author_pimpl author_p;
- author_p.parsers (string_p, // name
- string_p, // born
- string_p, // died
- idref_p); // recommends
-
- book_pimpl book_p;
- book_p.parsers (isbn_p, // isbn
- title_p, // title
- genre_p, // genre
- author_p, // author
- boolean_p, // available
- id_p); // id
-
- catalog_pimpl catalog_p;
- catalog_p.book_parser (book_p);
-
-
- // Parse the XML instance document.
- //
- xml_schema::document doc_p (
- catalog_p,
- "http://www.codesynthesis.com/library", // root element namespace
- "catalog"); // root element name
-
- catalog_p.pre ();
- doc_p.parse (argv[1]);
- catalog c (catalog_p.post_catalog ());
-
-
- // Let's print what we've got.
- //
- for (catalog::const_iterator bi (c.begin ()); bi != c.end (); ++bi)
- {
- cerr << endl
- << "ID : " << bi->id () << endl
- << "ISBN : " << bi->isbn () << endl
- << "Title : " << bi->title () << endl
- << "Genre : " << bi->genre () << endl;
-
- for (book::authors::const_iterator ai (bi->author ().begin ());
- ai != bi->author ().end ();
- ++ai)
- {
- cerr << "Author : " << ai->name () << endl;
- cerr << " Born : " << ai->born () << endl;
-
- if (!ai->died ().empty ())
- cerr << " Died : " << ai->died () << endl;
-
- if (!ai->recommends ().empty ())
- {
- cerr << " Recommends : " << ai->recommends () << endl;
- }
- }
-
- cerr << "Available : " << std::boolalpha << bi->available () << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/library/library-pimpl.cxx b/examples/cxx/parser/library/library-pimpl.cxx
deleted file mode 100644
index 7a1e484..0000000
--- a/examples/cxx/parser/library/library-pimpl.cxx
+++ /dev/null
@@ -1,183 +0,0 @@
-// file : examples/cxx/parser/library/library-pimpl.cxx
-// copyright : not copyrighted - public domain
-
-#include "library-pimpl.hxx"
-
-namespace library
-{
- // isbn_impl
- //
- isbn isbn_pimpl::
- post_isbn ()
- {
- return post_unsigned_int ();
- }
-
- // title_pimpl
- //
- void title_pimpl::
- _pre ()
- {
- title_.lang ("");
- }
-
- void title_pimpl::
- lang (const std::string& lang)
- {
- title_.lang (lang);
- }
-
- title title_pimpl::
- post_title ()
- {
- title_.assign (post_string ());
- return title_;
- }
-
- // genre_pimpl
- //
- genre genre_pimpl::
- post_genre ()
- {
- genre r (romance);
- std::string v (post_string ());
-
- if (v == "romance") r = romance; else
- if (v == "fiction") r = fiction; else
- if (v == "horror") r = horror; else
- if (v == "history") r = history; else
- if (v == "philosophy") r = philosophy;
-
- return r;
- }
-
- // person_pimpl
- //
- void person_pimpl::
- _pre ()
- {
- person_.died ("");
- }
-
- void person_pimpl::
- name (const std::string& name)
- {
- person_.name (name);
- }
-
- void person_pimpl::
- born (const std::string& born)
- {
- person_.born (born);
- }
-
- void person_pimpl::
- died (const std::string& died)
- {
- person_.died (died);
- }
-
- person person_pimpl::
- post_person ()
- {
- return person_;
- }
-
- // author_pimpl
- //
- void author_pimpl::
- _pre ()
- {
- person_pimpl::_pre ();
- author_.recommends ("");
- }
-
- void author_pimpl::
- recommends (const std::string& recommends)
- {
- author_.recommends (recommends);
- }
-
- author author_pimpl::
- post_author ()
- {
- person p (post_person ());
-
- author_.name (p.name ());
- author_.born (p.born ());
- author_.died (p.died ());
-
- return author_;
- }
-
- // book_pimpl
- //
- void book_pimpl::
- _pre ()
- {
- book_.author ().clear ();
- }
-
- void book_pimpl::
- isbn (library::isbn isbn)
- {
- book_.isbn (isbn);
- }
-
- void book_pimpl::
- title (const library::title& title)
- {
- book_.title (title);
- }
-
- void book_pimpl::
- genre (library::genre genre)
- {
- book_.genre (genre);
- }
-
- void book_pimpl::
- author (const library::author& author)
- {
- book_.author ().push_back (author);
- }
-
- void book_pimpl::
- available (bool available)
- {
- book_.available (available);
- }
-
- void book_pimpl::
- id (const std::string& id)
- {
- book_.id (id);
- }
-
- book book_pimpl::
- post_book ()
- {
- return book_;
- }
-
- // catalog_pimpl
- //
- void catalog_pimpl::
- _pre ()
- {
- catalog_.clear ();
- }
-
- void catalog_pimpl::
- book (const library::book& book)
- {
- catalog_.push_back (book);
- }
-
- catalog catalog_pimpl::
- post_catalog ()
- {
- return catalog_;
- }
-}
-
diff --git a/examples/cxx/parser/library/library-pimpl.hxx b/examples/cxx/parser/library/library-pimpl.hxx
deleted file mode 100644
index 5d0dcc1..0000000
--- a/examples/cxx/parser/library/library-pimpl.hxx
+++ /dev/null
@@ -1,135 +0,0 @@
-// file : examples/cxx/parser/library/library-pimpl.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef LIBRARY_PIMPL_HXX
-#define LIBRARY_PIMPL_HXX
-
-#include "library.hxx"
-#include "library-pskel.hxx"
-
-namespace library
-{
- //
- //
- struct isbn_pimpl: isbn_pskel, xml_schema::unsigned_int_pimpl
- {
- virtual isbn
- post_isbn ();
- };
-
- //
- //
- struct title_pimpl: title_pskel, xml_schema::string_pimpl
- {
- virtual void
- _pre ();
-
- virtual void
- lang (const std::string&);
-
- virtual title
- post_title ();
-
- private:
- title title_;
- };
-
- //
- //
- struct genre_pimpl: genre_pskel, xml_schema::string_pimpl
- {
- virtual genre
- post_genre ();
- };
-
- //
- //
- struct person_pimpl: virtual person_pskel
- {
- virtual void
- _pre ();
-
- virtual void
- name (const std::string&);
-
- virtual void
- born (const std::string&);
-
- virtual void
- died (const std::string&);
-
- virtual person
- post_person ();
-
- private:
- person person_;
- };
-
- //
- //
- struct author_pimpl: author_pskel, person_pimpl
- {
- virtual void
- _pre ();
-
- virtual void
- recommends (const std::string&);
-
- virtual author
- post_author ();
-
- private:
- author author_;
- };
-
- //
- //
- struct book_pimpl: book_pskel
- {
- virtual void
- _pre ();
-
- virtual void
- isbn (library::isbn);
-
- virtual void
- title (const library::title&);
-
- virtual void
- genre (library::genre);
-
- virtual void
- author (const library::author&);
-
- virtual void
- available (bool);
-
- virtual void
- id (const std::string&);
-
- virtual book
- post_book ();
-
- private:
- book book_;
- };
-
- //
- //
- struct catalog_pimpl: catalog_pskel
- {
- virtual void
- _pre ();
-
- virtual void
- book (const library::book&);
-
- virtual catalog
- post_catalog ();
-
- private:
- catalog catalog_;
- };
-}
-
-#endif // LIBRARY_PIMPL_HXX
diff --git a/examples/cxx/parser/library/library.hxx b/examples/cxx/parser/library/library.hxx
deleted file mode 100644
index 552e7a5..0000000
--- a/examples/cxx/parser/library/library.hxx
+++ /dev/null
@@ -1,241 +0,0 @@
-// file : examples/cxx/parser/library/library.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef LIBRARY_HXX
-#define LIBRARY_HXX
-
-#include <string>
-#include <vector>
-
-namespace library
-{
- //
- //
- typedef unsigned int isbn;
-
-
- //
- //
- struct title: std::string
- {
- // lang
- //
- const std::string&
- lang () const
- {
- return lang_;
- }
-
- void
- lang (const std::string& lang)
- {
- lang_ = lang;
- }
-
- private:
- std::string lang_;
- };
-
-
- //
- //
- enum genre
- {
- romance,
- fiction,
- horror,
- history,
- philosophy
- };
-
-
- //
- //
- struct person
- {
- // name
- //
- const std::string&
- name () const
- {
- return name_;
- }
-
- void
- name (const std::string& name)
- {
- name_ = name;
- }
-
- // born
- //
- const std::string&
- born () const
- {
- return born_;
- }
-
- void
- born (const std::string& born)
- {
- born_ = born;
- }
-
-
- // died
- //
- const std::string&
- died () const
- {
- return died_;
- }
-
- void
- died (const std::string& died)
- {
- died_ = died;
- }
-
- private:
- std::string name_;
- std::string born_;
- std::string died_;
- };
-
-
- //
- //
- struct author: person
- {
- // recommends
- //
- const std::string&
- recommends () const
- {
- return recommends_;
- }
-
- void
- recommends (const std::string& recommends)
- {
- recommends_ = recommends;
- }
-
- private:
- std::string recommends_;
- };
-
-
- //
- //
- struct book
- {
- // isbn
- //
- library::isbn
- isbn () const
- {
- return isbn_;
- }
-
- void
- isbn (const library::isbn& isbn)
- {
- isbn_ = isbn;
- }
-
-
- // title
- //
- library::title
- title () const
- {
- return title_;
- }
-
- void
- title (const library::title& title)
- {
- title_ = title;
- }
-
-
- // genre
- //
- library::genre
- genre () const
- {
- return genre_;
- }
-
- void
- genre (const library::genre& genre)
- {
- genre_ = genre;
- }
-
-
- // author
- //
- typedef std::vector<library::author> authors;
-
- const authors&
- author () const
- {
- return author_;
- }
-
- authors&
- author ()
- {
- return author_;
- }
-
-
- // available
- //
- bool
- available () const
- {
- return available_;
- }
-
- void
- available (bool available)
- {
- available_ = available;
- }
-
-
- // id
- //
- const std::string&
- id () const
- {
- return id_;
- }
-
- void
- id (const std::string& id)
- {
- id_ = id;
- }
-
- private:
- library::isbn isbn_;
- library::title title_;
- library::genre genre_;
-
- authors author_;
-
- bool available_;
- std::string id_;
- };
-
-
- //
- //
- typedef std::vector<book> catalog;
-}
-
-#endif // LIBRARY_HXX
diff --git a/examples/cxx/parser/library/library.map b/examples/cxx/parser/library/library.map
deleted file mode 100644
index 3a49b49..0000000
--- a/examples/cxx/parser/library/library.map
+++ /dev/null
@@ -1,15 +0,0 @@
-# file : examples/cxx/parser/library/library.map
-# copyright : not copyrighted - public domain
-
-namespace http://www.codesynthesis.com/library ::library
-{
- include "library.hxx";
-
- isbn isbn isbn;
- title title;
- genre genre genre;
- person person;
- author author;
- book book;
- catalog catalog;
-}
diff --git a/examples/cxx/parser/library/library.xml b/examples/cxx/parser/library/library.xml
deleted file mode 100644
index b1ac98c..0000000
--- a/examples/cxx/parser/library/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/library/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP" available="true" >
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/parser/library/library.xsd b/examples/cxx/parser/library/library.xsd
deleted file mode 100644
index 71e4005..0000000
--- a/examples/cxx/parser/library/library.xsd
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/library/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:string"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:string"/>
- <xsd:element name="died" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF"/> <!-- Book -->
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" use="required"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/library/makefile b/examples/cxx/parser/library/makefile
deleted file mode 100644
index fc6cdaf..0000000
--- a/examples/cxx/parser/library/makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-# file : examples/cxx/parser/library/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx library-pimpl.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-inline --type-map $(src_base)/library.map
-$(gen): $(out_root)/xsd/xsd $(src_base)/library.map
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
- $(call install-data,$(src_base)/library.map,$(install_doc_dir)/xsd/$(path)/library.map)
- $(call install-data,$(src_base)/library.hxx,$(install_doc_dir)/xsd/$(path)/library.hxx)
- $(call install-data,$(src_base)/library-pimpl.hxx,$(install_doc_dir)/xsd/$(path)/library-pimpl.hxx)
- $(call install-data,$(src_base)/library-pimpl.cxx,$(install_doc_dir)/xsd/$(path)/library-pimpl.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
- $(call install-data,$(src_base)/library.map,$(dist_prefix)/$(path)/library.map)
- $(call install-data,$(src_base)/library.hxx,$(dist_prefix)/$(path)/library.hxx)
- $(call install-data,$(src_base)/library-pimpl.hxx,$(dist_prefix)/$(path)/library-pimpl.hxx)
- $(call install-data,$(src_base)/library-pimpl.cxx,$(dist_prefix)/$(path)/library-pimpl.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/makefile b/examples/cxx/parser/makefile
deleted file mode 100644
index 449557a..0000000
--- a/examples/cxx/parser/makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# file : examples/cxx/parser/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-examples := generated hello library mixin mixed multiroot performance \
-polymorphism polyroot wildcard
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build
-#
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples)))
-
-
-# Install & Dist.
-#
-$(install) $(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(examples)))
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
-
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): export dirs := $(examples)
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,parser-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,parser-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,parser-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,parser-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,parser-vc12.sln)
- $(call meta-vctest,parser-vc8.sln,$(src_root)/dist/examples/test.bat,test.bat)
-
-# Clean
-#
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples)))
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-$(call include,$(bld_root)/meta/vctest.make)
-
-
-$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile))
diff --git a/examples/cxx/parser/mixed/anchor.hxx b/examples/cxx/parser/mixed/anchor.hxx
deleted file mode 100644
index 3adc90b..0000000
--- a/examples/cxx/parser/mixed/anchor.hxx
+++ /dev/null
@@ -1,33 +0,0 @@
-// file : examples/cxx/parser/mixed/anchor.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef ANCHOR_HXX
-#define ANCHOR_HXX
-
-#include <string>
-
-struct anchor
-{
- anchor (const std::string& text, const std::string& uri)
- : uri_ (uri), text_ (text)
- {
- }
-
- const std::string&
- text () const
- {
- return text_;
- }
-
- const std::string&
- uri () const
- {
- return uri_;
- }
-
-private:
- std::string uri_;
- std::string text_;
-};
-
-#endif // ANCHOR_HXX
diff --git a/examples/cxx/parser/mixed/driver.cxx b/examples/cxx/parser/mixed/driver.cxx
deleted file mode 100644
index 3f3cc65..0000000
--- a/examples/cxx/parser/mixed/driver.cxx
+++ /dev/null
@@ -1,100 +0,0 @@
-// file : examples/cxx/parser/mixed/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <string>
-#include <vector>
-#include <iostream>
-
-#include "anchor.hxx"
-#include "text-pskel.hxx"
-
-using namespace std;
-
-struct anchor_pimpl: anchor_pskel, xml_schema::string_pimpl
-{
- virtual void
- href (const std::string& uri)
- {
- uri_ = uri;
- }
-
- virtual anchor
- post_anchor ()
- {
- return anchor (post_string (), uri_);
- }
-
-private:
- std::string uri_;
-};
-
-
-struct text_pimpl: text_pskel
-{
- virtual void
- a (const anchor& a)
- {
- cout << a.text () << "[" << anchors_.size () << "]";
- anchors_.push_back (a);
- }
-
- virtual void
- _any_characters (const xml_schema::ro_string& s)
- {
- cout << s;
- }
-
- virtual void
- post_text ()
- {
- for (anchors::const_iterator i (anchors_.begin ());
- i != anchors_.end ();
- ++i)
- {
- cout << "[" << i - anchors_.begin () << "] " << i->uri () << endl;
- }
- }
-
-private:
- typedef vector<anchor> anchors;
- anchors anchors_;
-};
-
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " text.xml" << endl;
- return 1;
- }
-
- try
- {
- // Construct the parser.
- //
- xml_schema::string_pimpl string_p;
- anchor_pimpl anchor_p;
- text_pimpl text_p;
-
- anchor_p.href_parser (string_p);
- text_p.a_parser (anchor_p);
-
- xml_schema::document doc_p (text_p, "text");
-
- text_p.pre ();
- doc_p.parse (argv[1]);
- text_p.post_text ();
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/mixed/makefile b/examples/cxx/parser/mixed/makefile
deleted file mode 100644
index 7104250..0000000
--- a/examples/cxx/parser/mixed/makefile
+++ /dev/null
@@ -1,106 +0,0 @@
-# file : examples/cxx/parser/mixed/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := text.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --type-map $(src_base)/text.map
-$(gen): $(out_root)/xsd/xsd $(src_base)/text.map
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/text.xsd,$(install_doc_dir)/xsd/$(path)/text.xsd)
- $(call install-data,$(src_base)/text.xml,$(install_doc_dir)/xsd/$(path)/text.xml)
- $(call install-data,$(src_base)/text.map,$(install_doc_dir)/xsd/$(path)/text.map)
- $(call install-data,$(src_base)/anchor.hxx,$(install_doc_dir)/xsd/$(path)/anchor.hxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/text.xsd,$(dist_prefix)/$(path)/text.xsd)
- $(call install-data,$(src_base)/text.xml,$(dist_prefix)/$(path)/text.xml)
- $(call install-data,$(src_base)/text.map,$(dist_prefix)/$(path)/text.map)
- $(call install-data,$(src_base)/anchor.hxx,$(dist_prefix)/$(path)/anchor.hxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/mixed/text.map b/examples/cxx/parser/mixed/text.map
deleted file mode 100644
index 85971c4..0000000
--- a/examples/cxx/parser/mixed/text.map
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : examples/cxx/parser/mixed/text.map
-# copyright : not copyrighted - public domain
-
-include "anchor.hxx";
-
-anchor ::anchor;
diff --git a/examples/cxx/parser/mixed/text.xml b/examples/cxx/parser/mixed/text.xml
deleted file mode 100644
index bfdc881..0000000
--- a/examples/cxx/parser/mixed/text.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/text/text.xml
-copyright : not copyrighted - public domain
-
--->
-
-<text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="text.xsd">
-
-The first paragraph of this text talks about <a href="http://en.wikipedia.org/wiki/time">time</a>.
-
-And this paragraph talks about <a href="http://en.wikipedia.org/wiki/space">space</a>.
-
-</text>
diff --git a/examples/cxx/parser/mixed/text.xsd b/examples/cxx/parser/mixed/text.xsd
deleted file mode 100644
index 92e300c..0000000
--- a/examples/cxx/parser/mixed/text.xsd
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/mixed/text.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="anchor">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="href" type="xsd:string" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:complexType name="text" mixed="true">
- <xsd:sequence>
- <xsd:element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="text" type="text"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/mixin/driver.cxx b/examples/cxx/parser/mixin/driver.cxx
deleted file mode 100644
index 04466a1..0000000
--- a/examples/cxx/parser/mixin/driver.cxx
+++ /dev/null
@@ -1,103 +0,0 @@
-// file : examples/cxx/parser/mixin/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory>
-#include <iostream>
-
-#include "types.hxx"
-#include "schema-pskel.hxx"
-
-using namespace std;
-
-struct base_pimpl: virtual base_pskel
-{
- virtual void
- pre ()
- {
- base_.reset (new ::base);
- }
-
- virtual void
- a (bool v)
- {
- base_->a (v);
- }
-
- virtual base*
- post_base ()
- {
- return base_.release ();
- }
-
-protected:
- auto_ptr<base> base_;
-};
-
-// Implement derived parser by mixing-in base's implementation.
-//
-struct derived_pimpl: derived_pskel, base_pimpl
-{
- virtual void
- pre ()
- {
- // Override base's pre() with the new implementation that
- // instantiates derived instead of base.
- //
- base_.reset (new ::derived);
- }
-
- virtual void
- b (int v)
- {
- // We could also store a pointer to derived in derived_impl to
- // avoid casting.
- //
- static_cast< ::derived* > (base_.get ())->b (v);
- }
-
- virtual derived*
- post_derived ()
- {
- return static_cast<derived*> (base_.release ());
- }
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " instance.xml" << endl;
- return 1;
- }
-
- try
- {
- // Construct the parser.
- //
- xml_schema::boolean_pimpl bool_p;
- xml_schema::int_pimpl int_p;
- derived_pimpl derived_p;
-
- derived_p.parsers (bool_p, int_p);
-
- xml_schema::document doc_p (derived_p, "root");
-
- derived_p.pre ();
- doc_p.parse (argv[1]);
- auto_ptr<derived> d (derived_p.post_derived ());
-
- cerr << "a: " << boolalpha << d->a () << endl;
- cerr << "b: " << d->b () << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/mixin/instance.xml b/examples/cxx/parser/mixin/instance.xml
deleted file mode 100644
index 253f348..0000000
--- a/examples/cxx/parser/mixin/instance.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/mixin/instance.xml
-copyright : not copyrighted - public domain
-
--->
-
-<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="schema.xsd">
-
- <a>true</a>
- <b>1</b>
-
-</root>
diff --git a/examples/cxx/parser/mixin/makefile b/examples/cxx/parser/mixin/makefile
deleted file mode 100644
index c4203d8..0000000
--- a/examples/cxx/parser/mixin/makefile
+++ /dev/null
@@ -1,106 +0,0 @@
-# file : examples/cxx/parser/mixin/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := schema.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --type-map $(src_base)/schema.map
-$(gen): $(out_root)/xsd/xsd $(src_base)/schema.map
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/schema.xsd,$(install_doc_dir)/xsd/$(path)/schema.xsd)
- $(call install-data,$(src_base)/instance.xml,$(install_doc_dir)/xsd/$(path)/instance.xml)
- $(call install-data,$(src_base)/schema.map,$(install_doc_dir)/xsd/$(path)/schema.map)
- $(call install-data,$(src_base)/types.hxx,$(install_doc_dir)/xsd/$(path)/types.hxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/schema.xsd,$(dist_prefix)/$(path)/schema.xsd)
- $(call install-data,$(src_base)/instance.xml,$(dist_prefix)/$(path)/instance.xml)
- $(call install-data,$(src_base)/schema.map,$(dist_prefix)/$(path)/schema.map)
- $(call install-data,$(src_base)/types.hxx,$(dist_prefix)/$(path)/types.hxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/mixin/schema.map b/examples/cxx/parser/mixin/schema.map
deleted file mode 100644
index a93c881..0000000
--- a/examples/cxx/parser/mixin/schema.map
+++ /dev/null
@@ -1,7 +0,0 @@
-# file : examples/cxx/parser/mixin/schema.map
-# copyright : not copyrighted - public domain
-
-include "types.hxx";
-
-base ::base*;
-derived ::derived*;
diff --git a/examples/cxx/parser/mixin/schema.xsd b/examples/cxx/parser/mixin/schema.xsd
deleted file mode 100644
index d2d195d..0000000
--- a/examples/cxx/parser/mixin/schema.xsd
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/mixin/schema.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="base">
- <xsd:sequence>
- <xsd:element name="a" type="xsd:boolean"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="derived">
- <xsd:complexContent>
- <xsd:extension base="base">
- <xsd:sequence>
- <xsd:element name="b" type="xsd:int"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:element name="root" type="derived"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/mixin/types.hxx b/examples/cxx/parser/mixin/types.hxx
deleted file mode 100644
index 930033d..0000000
--- a/examples/cxx/parser/mixin/types.hxx
+++ /dev/null
@@ -1,43 +0,0 @@
-// file : examples/cxx/parser/mixin/types.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef TYPES_HXX
-#define TYPES_HXX
-
-struct base
-{
- bool
- a () const
- {
- return a_;
- }
-
- void
- a (bool v)
- {
- a_ = v;
- }
-
-private:
- bool a_;
-};
-
-struct derived: base
-{
- int
- b () const
- {
- return b_;
- }
-
- void
- b (int v)
- {
- b_ = v;
- }
-
-private:
- int b_;
-};
-
-#endif // TYPES_HXX
diff --git a/examples/cxx/parser/multiroot/balance.xml b/examples/cxx/parser/multiroot/balance.xml
deleted file mode 100644
index 71ed493..0000000
--- a/examples/cxx/parser/multiroot/balance.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/multiroot/balance.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:balance xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
-
-</p:balance>
diff --git a/examples/cxx/parser/multiroot/deposit.xml b/examples/cxx/parser/multiroot/deposit.xml
deleted file mode 100644
index 70f0c77..0000000
--- a/examples/cxx/parser/multiroot/deposit.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/multiroot/deposit.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:deposit xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
- <amount>1000000</amount>
-
-</p:deposit>
diff --git a/examples/cxx/parser/multiroot/driver.cxx b/examples/cxx/parser/multiroot/driver.cxx
deleted file mode 100644
index 3b32898..0000000
--- a/examples/cxx/parser/multiroot/driver.cxx
+++ /dev/null
@@ -1,161 +0,0 @@
-// file : examples/cxx/parser/multiroot/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "protocol.hxx"
-#include "protocol-pimpl.hxx"
-
-using std::cerr;
-using std::endl;
-using xml_schema::ro_string;
-
-namespace protocol
-{
- // Customize the xml_schema::document object to handle our protocol
- // vocabulary with multiple root elements.
- //
- class document: public xml_schema::document
- {
- public:
- document (balance_pskel& balance_p, withdraw_pskel& withdraw_p)
- : balance_p_ (balance_p), withdraw_p_ (withdraw_p)
- {
- }
-
- request*
- result ()
- {
- return result_.release ();
- }
-
- protected:
- // This function is called to obtain the root element type parser.
- // If the returned pointed is 0 then the whole document content
- // is ignored. The type argument is used to handle polymorphic
- // XML documents and is not used in this example (see the polyroot
- // example for more information on this argument).
- //
- virtual xml_schema::parser_base*
- start_root_element (const ro_string& ns,
- const ro_string& name,
- const ro_string* /* type */)
- {
- if (ns == "http://www.codesynthesis.com/protocol")
- {
- if (name == "balance")
- {
- balance_p_.pre ();
-
- return &balance_p_;
- }
- else if (name == "withdraw")
- {
- balance_p_.pre ();
-
- return &withdraw_p_;
- }
- }
-
- cerr << "ignoring unknown request: " << ns << "#" << name << endl;
-
- return 0;
- }
-
- // This function is called to indicate the completion of document
- // parsing. The parser argument contains the pointer returned by
- // start_root_element.
- //
- virtual void
- end_root_element (const ro_string& /* ns */,
- const ro_string& /* name */,
- xml_schema::parser_base* parser)
- {
- // We could have handled the result directly in this function
- // instead of storing it in the result_ variable.
- //
- if (parser == &balance_p_)
- {
- result_.reset (balance_p_.post_balance ());
- }
- else if (parser == &withdraw_p_)
- {
- result_.reset (withdraw_p_.post_withdraw ());
- }
- else
- result_.reset (0);
- }
-
-
- private:
- std::auto_ptr<request> result_;
-
- balance_pskel& balance_p_;
- withdraw_pskel& withdraw_p_;
- };
-}
-
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " request.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace protocol;
-
- // Construct the parser.
- //
- xml_schema::unsigned_int_pimpl unsigned_int_p;
-
- balance_pimpl balance_p;
- withdraw_pimpl withdraw_p;
-
- balance_p.parsers (unsigned_int_p); // account
-
- withdraw_p.parsers (unsigned_int_p, // account
- unsigned_int_p); // amount
-
- // Parse the XML instance document.
- //
- document doc_p (balance_p, withdraw_p);
-
- // pre() and post() will be called as part of the start_root_element()
- // and end_root_element() calls.
- //
- doc_p.parse (argv[1]);
- std::auto_ptr<request> r (doc_p.result ());
-
- // Let's print what we've got.
- //
- if (balance* b = dynamic_cast<balance*> (r.get ()))
- {
- cerr << "balance request for acc# " << b->account () << endl;
- }
- else if (withdraw* w = dynamic_cast<withdraw*> (r.get ()))
- {
- cerr << "withdrawal request for acc# " << w->account () << ", "
- << "amount: " << w->amount () << endl;
- }
- else
- {
- cerr << "unknown request" << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/multiroot/makefile b/examples/cxx/parser/multiroot/makefile
deleted file mode 100644
index a8557d6..0000000
--- a/examples/cxx/parser/multiroot/makefile
+++ /dev/null
@@ -1,112 +0,0 @@
-# file : examples/cxx/parser/multiroot/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := protocol.xsd
-cxx := driver.cxx protocol-pimpl.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --type-map $(src_base)/protocol.map
-$(gen): $(out_root)/xsd/xsd $(src_base)/protocol.map
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/protocol.xsd,$(install_doc_dir)/xsd/$(path)/protocol.xsd)
- $(call install-data,$(src_base)/balance.xml,$(install_doc_dir)/xsd/$(path)/balance.xml)
- $(call install-data,$(src_base)/deposit.xml,$(install_doc_dir)/xsd/$(path)/deposit.xml)
- $(call install-data,$(src_base)/withdraw.xml,$(install_doc_dir)/xsd/$(path)/withdraw.xml)
- $(call install-data,$(src_base)/protocol.map,$(install_doc_dir)/xsd/$(path)/protocol.map)
- $(call install-data,$(src_base)/protocol.hxx,$(install_doc_dir)/xsd/$(path)/protocol.hxx)
- $(call install-data,$(src_base)/protocol-pimpl.hxx,$(install_doc_dir)/xsd/$(path)/protocol-pimpl.hxx)
- $(call install-data,$(src_base)/protocol-pimpl.cxx,$(install_doc_dir)/xsd/$(path)/protocol-pimpl.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/protocol.xsd,$(dist_prefix)/$(path)/protocol.xsd)
- $(call install-data,$(src_base)/balance.xml,$(dist_prefix)/$(path)/balance.xml)
- $(call install-data,$(src_base)/deposit.xml,$(dist_prefix)/$(path)/deposit.xml)
- $(call install-data,$(src_base)/withdraw.xml,$(dist_prefix)/$(path)/withdraw.xml)
- $(call install-data,$(src_base)/protocol.map,$(dist_prefix)/$(path)/protocol.map)
- $(call install-data,$(src_base)/protocol.hxx,$(dist_prefix)/$(path)/protocol.hxx)
- $(call install-data,$(src_base)/protocol-pimpl.hxx,$(dist_prefix)/$(path)/protocol-pimpl.hxx)
- $(call install-data,$(src_base)/protocol-pimpl.cxx,$(dist_prefix)/$(path)/protocol-pimpl.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/multiroot/protocol-pimpl.cxx b/examples/cxx/parser/multiroot/protocol-pimpl.cxx
deleted file mode 100644
index b5ec1b2..0000000
--- a/examples/cxx/parser/multiroot/protocol-pimpl.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : examples/cxx/parser/multiroot/protocol-pimpl.cxx
-// copyright : not copyrighted - public domain
-
-#include "protocol-pimpl.hxx"
-
-namespace protocol
-{
- // request_pimpl
- //
- void request_pimpl::
- account (unsigned int account)
- {
- account_ = account;
- }
-
- request* request_pimpl::
- post_request ()
- {
- // This parser is never used directly.
- //
- return 0;
- }
-
- // balance_pimpl
- //
- balance* balance_pimpl::
- post_balance ()
- {
- return new balance (account_);
- }
-
- // withdraw_pimpl
- //
- void withdraw_pimpl::
- amount (unsigned int amount)
- {
- amount_ = amount;
- }
-
- withdraw* withdraw_pimpl::
- post_withdraw ()
- {
- return new withdraw (account_, amount_);
- }
-}
-
diff --git a/examples/cxx/parser/multiroot/protocol-pimpl.hxx b/examples/cxx/parser/multiroot/protocol-pimpl.hxx
deleted file mode 100644
index c0693cb..0000000
--- a/examples/cxx/parser/multiroot/protocol-pimpl.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-// file : examples/cxx/parser/multiroot/protocol-pimpl.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef PROTOCOL_PIMPL_HXX
-#define PROTOCOL_PIMPL_HXX
-
-#include "protocol.hxx"
-#include "protocol-pskel.hxx"
-
-namespace protocol
-{
- class request_pimpl: public virtual request_pskel
- {
- public:
- virtual void
- account (unsigned int);
-
- virtual request*
- post_request ();
-
- protected:
- unsigned int account_;
- };
-
- class balance_pimpl: public virtual balance_pskel,
- public request_pimpl
- {
- public:
- virtual balance*
- post_balance ();
- };
-
- class withdraw_pimpl: public virtual withdraw_pskel,
- public request_pimpl
- {
- public:
- virtual void
- amount (unsigned int);
-
- virtual withdraw*
- post_withdraw ();
-
- private:
- unsigned int amount_;
- };
-}
-
-#endif // PROTOCOL_PIMPL_HXX
diff --git a/examples/cxx/parser/multiroot/protocol.hxx b/examples/cxx/parser/multiroot/protocol.hxx
deleted file mode 100644
index bbf5b56..0000000
--- a/examples/cxx/parser/multiroot/protocol.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-// file : examples/cxx/parser/multiroot/protocol.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef PROTOCOL_HXX
-#define PROTOCOL_HXX
-
-namespace protocol
-{
- class request
- {
- public:
- virtual
- ~request ()
- {
- }
-
- unsigned int
- account () const
- {
- return account_;
- }
-
- protected:
- request (unsigned int account)
- : account_ (account)
- {
- }
-
- private:
- unsigned int account_;
- };
-
- class balance: public request
- {
- public:
- balance (unsigned int account)
- : request (account)
- {
- }
- };
-
- class withdraw: public request
- {
- public:
- withdraw (unsigned int account, unsigned int amount)
- : request (account), amount_ (amount)
- {
- }
-
- unsigned int
- amount () const
- {
- return amount_;
- }
-
- private:
- unsigned int amount_;
- };
-}
-
-#endif // PROTOCOL_HXX
diff --git a/examples/cxx/parser/multiroot/protocol.map b/examples/cxx/parser/multiroot/protocol.map
deleted file mode 100644
index 8d8ac9f..0000000
--- a/examples/cxx/parser/multiroot/protocol.map
+++ /dev/null
@@ -1,11 +0,0 @@
-# file : examples/cxx/parser/multiroot/protocol.map
-# copyright : not copyrighted - public domain
-
-namespace http://www.codesynthesis.com/protocol ::protocol
-{
- include "protocol.hxx";
-
- request request*;
- balance balance*;
- withdraw withdraw*;
-}
diff --git a/examples/cxx/parser/multiroot/protocol.xsd b/examples/cxx/parser/multiroot/protocol.xsd
deleted file mode 100644
index e0ecc29..0000000
--- a/examples/cxx/parser/multiroot/protocol.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/multiroot/protocol.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:p="http://www.codesynthesis.com/protocol"
- targetNamespace="http://www.codesynthesis.com/protocol">
-
- <xsd:complexType name="request">
- <xsd:sequence>
- <xsd:element name="account" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="balance">
- <xsd:complexContent>
- <xsd:extension base="p:request"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="withdraw">
- <xsd:complexContent>
- <xsd:extension base="p:request">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="deposit">
- <xsd:complexContent>
- <xsd:extension base="p:request">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:element name="balance" type="p:balance"/>
- <xsd:element name="withdraw" type="p:withdraw"/>
- <xsd:element name="deposit" type="p:deposit"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/multiroot/withdraw.xml b/examples/cxx/parser/multiroot/withdraw.xml
deleted file mode 100644
index 6d5cb39..0000000
--- a/examples/cxx/parser/multiroot/withdraw.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/multiroot/withdraw.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:withdraw xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
- <amount>1000000</amount>
-
-</p:withdraw>
diff --git a/examples/cxx/parser/performance/README b/examples/cxx/parser/performance/README
deleted file mode 100644
index 39aecca..0000000
--- a/examples/cxx/parser/performance/README
+++ /dev/null
@@ -1,42 +0,0 @@
-This example measures the performance of XML parsing in the C++/Parser
-mapping. It also shows how to structure your code to achieve the maximum
-performance for this operation.
-
-The example consists of the following files:
-
-test.xsd
- XML Schema which describes the test vocabulary.
-
-test-50k.xml
- Test XML document.
-
-gen.cxx
- Program to generate a test document of desired size.
-
-time.hxx
-time.cxx
- Class definition that represents time.
-
-test-pskel.hxx
-test-pskel.ixx
-test-pskel.cxx
- Parser skeletons generated by the XSD compiler from test.xsd.
-
-driver.cxx
- Driver for the example. It first parses the command line arguments
- and reads the entire document into a memory buffer. It then creates
- a SAX parser and pre-parses and caches the schema if validation is
- enabled (Xerces-C++ only). Finally, it runs the performance
- measurement loop which on each iteration parses the XML document
- from the in-memory buffer.
-
-To run the example on a test XML document simply execute:
-
-$ ./driver test-50k.xml
-
-The -v option can be used to turn on validation in the underlying XML
-parser (only makes sense for Xerces-C++, off by default). The -i option
-can be used to specify the number of parsing iterations (1000 by default).
-For example:
-
-$ ./driver -v -i 100 test-50k.xml
diff --git a/examples/cxx/parser/performance/driver.cxx b/examples/cxx/parser/performance/driver.cxx
deleted file mode 100644
index 302464e..0000000
--- a/examples/cxx/parser/performance/driver.cxx
+++ /dev/null
@@ -1,341 +0,0 @@
-// file : examples/cxx/parser/performance/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <string>
-#include <memory> // std::auto_ptr
-#include <cstddef> // std::size_t
-#include <fstream>
-#include <sstream>
-#include <iostream>
-
-#include "time.hxx"
-#include "test-pskel.hxx"
-
-#ifdef _XERCES_VERSION
-# include <xercesc/sax2/SAX2XMLReader.hpp>
-# include <xercesc/sax2/XMLReaderFactory.hpp>
-# include <xercesc/framework/MemBufInputSource.hpp>
-# include <xercesc/validators/common/Grammar.hpp>
-# include <xercesc/util/PlatformUtils.hpp>
-# include <xercesc/util/XMLUni.hpp>
-
-# include <xsd/cxx/xml/sax/bits/error-handler-proxy.hxx>
-# include <xsd/cxx/parser/error-handler.hxx>
-#endif
-
-// No-op parser implementation.
-//
-namespace test
-{
- struct enum_pimpl: enum_pskel, xml_schema::string_pimpl
- {
- virtual void
- post_enum ()
- {
- }
- };
-
- struct record_pimpl: record_pskel
- {
- virtual void
- int_ (unsigned int)
- {
- }
-
- virtual void
- double_ (double)
- {
- }
-
- virtual void
- name (const std::string&)
- {
- }
-
- virtual void
- string (const std::string&)
- {
- }
-
- virtual void
- choice1 (const std::string&)
- {
- }
-
- virtual void
- choice2 (const std::string&)
- {
- }
-
- virtual void
- choice3 (const std::string&)
- {
- }
-
- virtual void
- choice4 (const std::string&)
- {
- }
-
- virtual void
- apple (bool)
- {
- }
-
- virtual void
- orange (unsigned long long)
- {
- }
- };
-
- struct root_pimpl: root_pskel
- {
- };
-}
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc < 2)
- {
- cerr << "usage: " << argv[0] << " [-v] [-i <count>] test.xml" << endl
- << "\t -v turn on validation (default is off)" << endl
- << "\t -i number of iterations to perform (default is 1000)" << endl;
- return 1;
- }
-
- bool validate (false);
- unsigned long iter (1000);
- const char* file (0);
-
- // Parse command line arguments.
- //
- for (int i (1); i < argc; ++i)
- {
- string arg (argv[i]);
-
- if (arg == "-v")
- {
- validate = true;
- }
- else if (arg == "-i")
- {
- if (++i == argc)
- {
- cerr << "argument expected for the -i option" << endl;
- return 1;
- }
-
- iter = 0;
- istringstream is (argv[i]);
- is >> iter;
-
- if (iter == 0)
- {
- cerr << "invalid argument for the -i option" << endl;
- return 1;
- }
- }
- else
- {
- file = argv[i];
- break;
- }
- }
-
- if (file == 0)
- {
- cerr << "no input file specified" << endl;
- return 1;
- }
-
- try
- {
- // Instantiate and connect parsers.
- //
- xml_schema::unsigned_int_pimpl unsigned_int_p;
- xml_schema::double_pimpl double_p;
- xml_schema::ncname_pimpl ncname_p;
- xml_schema::string_pimpl string_p;
- xml_schema::boolean_pimpl boolean_p;
- xml_schema::unsigned_long_pimpl unsigned_long_p;
-
- test::enum_pimpl enum_p;
- test::record_pimpl record_p;
- test::root_pimpl root_p;
-
- record_p.parsers (unsigned_int_p,
- double_p,
- ncname_p,
- string_p,
- string_p,
- string_p,
- string_p,
- string_p,
- enum_p,
- boolean_p,
- unsigned_long_p);
-
- root_p.parsers (record_p);
-
- // Read the fine into in-memory buffer.
- //
- ifstream ifs;
- ifs.exceptions (ios_base::failbit);
- ifs.open (file, ios::in | ios::ate);
-
- size_t size (ifs.tellg ());
- ifs.seekg (0, ios::beg);
-
- char* buf = new char[size];
- ifs.read (buf, size);
- ifs.close ();
-
- cerr << "document size: " << size << " bytes" << endl
- << "iterations: " << iter << endl;
-
- os::time time (0);
- xml_schema::document doc (root_p, "test", "root");
-
-#ifdef _XERCES_VERSION
-
- // Xerces-C++ as the underlying XML parser.
- //
- using namespace xercesc;
-
- namespace xml = xsd::cxx::xml;
- namespace parser = xsd::cxx::parser;
-
- XMLPlatformUtils::Initialize ();
-
- {
- MemBufInputSource is (
- reinterpret_cast<XMLByte*> (buf), size, file, false);
- is.setCopyBufToStream (false);
-
- auto_ptr<SAX2XMLReader> parser (XMLReaderFactory::createXMLReader ());
-
- parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
- parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
- parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
-
- if (validate)
- {
- parser->setFeature (XMLUni::fgSAX2CoreValidation, true);
- parser->setFeature (XMLUni::fgXercesSchema, true);
- parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- parser->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // Initialize the schema cache. To detect schema errors we will
- // need an error handler.
- //
- parser::error_handler<char> eh;
- xml::sax::bits::error_handler_proxy<char> ehp (eh);
- parser->setErrorHandler (&ehp);
-
- if (!parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true))
- {
- // In Xerces-C++ grammar loading failure results in just a warning.
- // Make it a fatal error.
- //
- eh.handle ("test.xsd", 0, 0,
- parser::error_handler<char>::severity::fatal,
- "unable to load schema");
- }
-
- eh.throw_if_failed ();
- parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
-
-#if _XERCES_VERSION >= 30100
- parser->setFeature (XMLUni::fgXercesLoadSchema, false);
-#endif
- }
- else
- {
- parser->setFeature (XMLUni::fgSAX2CoreValidation, false);
- parser->setFeature (XMLUni::fgXercesSchema, false);
- parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
- }
-
- os::time start;
-
- for (unsigned long i (0); i < iter; ++i)
- {
- root_p.pre ();
- doc.parse (is, *parser);
- root_p.post_root ();
- }
-
- os::time end;
- time = end - start;
- }
-
- XMLPlatformUtils::Terminate ();
-
-#else
-
- // Expat as the underlying XML parser.
- //
- XML_Parser xml_parser (XML_ParserCreateNS (0, ' '));
- string public_id (file);
-
- os::time start;
-
- for (unsigned long i (0); i < iter; ++i)
- {
- // Using the low-level Expat-specific API to parse the memory
- // buffer.
- //
- root_p.pre ();
- doc.parse_begin (xml_parser, public_id);
-
- XML_Parse (xml_parser, buf, size, 1);
-
- doc.parse_end ();
- root_p.post_root ();
-
- XML_ParserReset (xml_parser, 0);
- }
-
- os::time end;
- time = end - start;
-
- XML_ParserFree (xml_parser);
-
-#endif
-
- delete[] buf;
-
- cerr << "time: " << time << " sec" << endl;
-
- double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
-
- // Calculate throughput in documents/sec.
- //
- double tpd ((iter / ms) * 1000000);
- cerr << "throughput: " << tpd << " documents/sec" << endl;
-
- // Calculate throughput in MBytes/sec.
- //
- double tpb (((size * iter) / ms) * 1000000/(1024*1024));
- cerr << "throughput: " << tpb << " MBytes/sec" << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/performance/makefile b/examples/cxx/parser/performance/makefile
deleted file mode 100644
index 9a7a26b..0000000
--- a/examples/cxx/parser/performance/makefile
+++ /dev/null
@@ -1,108 +0,0 @@
-# file : examples/cxx/parser/performance/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx time.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-inline
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/test.xsd,$(install_doc_dir)/xsd/$(path)/test.xsd)
- $(call install-data,$(src_base)/test-50k.xml,$(install_doc_dir)/xsd/$(path)/test-50k.xml)
- $(call install-data,$(src_base)/time.hxx,$(install_doc_dir)/xsd/$(path)/time.hxx)
- $(call install-data,$(src_base)/time.cxx,$(install_doc_dir)/xsd/$(path)/time.cxx)
- $(call install-data,$(src_base)/gen.cxx,$(install_doc_dir)/xsd/$(path)/gen.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/test.xsd,$(dist_prefix)/$(path)/test.xsd)
- $(call install-data,$(src_base)/test-50k.xml,$(dist_prefix)/$(path)/test-50k.xml)
- $(call install-data,$(src_base)/time.hxx,$(dist_prefix)/$(path)/time.hxx)
- $(call install-data,$(src_base)/time.cxx,$(dist_prefix)/$(path)/time.cxx)
- $(call install-data,$(src_base)/gen.cxx,$(dist_prefix)/$(path)/gen.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/performance/test.xsd b/examples/cxx/parser/performance/test.xsd
deleted file mode 100644
index bb59c2a..0000000
--- a/examples/cxx/parser/performance/test.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/performance/test.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<schema targetNamespace="test" xmlns:t="test"
- xmlns="http://www.w3.org/2001/XMLSchema">
-
- <simpleType name="enum">
- <restriction base="string">
- <enumeration value="romance"/>
- <enumeration value="fiction"/>
- <enumeration value="horror"/>
- <enumeration value="history"/>
- <enumeration value="philosophy"/>
- </restriction>
- </simpleType>
-
- <complexType name="record">
- <sequence>
- <element name="int" type="unsignedInt"/>
- <element name="double" type="double"/>
- <element name="name" type="NCName"/>
- <element name="string" type="string" minOccurs="0" maxOccurs="1"/>
- <choice>
- <element name="choice1" type="string"/>
- <element name="choice2" type="string"/>
- <element name="choice3" type="string"/>
- <element name="choice4" type="string"/>
- </choice>
- <element name="enum" type="t:enum"/>
- </sequence>
- <attribute name="apple" type="boolean"/>
- <attribute name="orange" type="unsignedLong" use="required"/>
- </complexType>
-
- <complexType name="root">
- <sequence>
- <element name="record" type="t:record" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <element name="root" type="t:root"/>
-
-</schema>
diff --git a/examples/cxx/parser/performance/time.cxx b/examples/cxx/parser/performance/time.cxx
deleted file mode 100644
index aca5c74..0000000
--- a/examples/cxx/parser/performance/time.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : examples/cxx/parser/performance/time.cxx
-// copyright : not copyrighted - public domain
-
-#include "time.hxx"
-
-#if defined (WIN32) || defined (__WIN32__)
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h> // GetSystemTimeAsFileTime
-#else
-# include <time.h> // gettimeofday
-# include <sys/time.h> // timeval
-#endif
-
-#include <ostream> // std::ostream
-#include <iomanip> // std::setfill, std::setw
-
-namespace os
-{
- time::
- time ()
- {
-#if defined (WIN32) || defined (__WIN32__)
- FILETIME ft;
- GetSystemTimeAsFileTime (&ft);
- unsigned long long v (
- ((unsigned long long) (ft.dwHighDateTime) << 32) + ft.dwLowDateTime);
-
- sec_ = static_cast<unsigned long> (v / 10000000ULL);
- nsec_ = static_cast<unsigned long> ((v % 10000000ULL) * 100);
-#else
- timeval tv;
- if (gettimeofday(&tv, 0) != 0)
- throw failed ();
-
- sec_ = static_cast<unsigned long> (tv.tv_sec);
- nsec_ = static_cast<unsigned long> (tv.tv_usec * 1000);
-#endif
- }
-
- std::ostream&
- operator<< (std::ostream& o, time const& t)
- {
- return o << t.sec () << '.'
- << std::setfill ('0') << std::setw (9) << t.nsec ();
- }
-}
diff --git a/examples/cxx/parser/performance/time.hxx b/examples/cxx/parser/performance/time.hxx
deleted file mode 100644
index 3b2f040..0000000
--- a/examples/cxx/parser/performance/time.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-// file : examples/cxx/parser/performance/time.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef TIME_HXX
-#define TIME_HXX
-
-#include <iosfwd> // std::ostream&
-
-namespace os
-{
- class time
- {
- public:
- class failed {};
-
- // Create a time object representing the current time.
- //
- time ();
-
- time (unsigned long long nsec)
- {
- sec_ = static_cast<unsigned long> (nsec / 1000000000ULL);
- nsec_ = static_cast<unsigned long> (nsec % 1000000000ULL);
- }
-
- time (unsigned long sec, unsigned long nsec)
- {
- sec_ = sec;
- nsec_ = nsec;
- }
-
- public:
- unsigned long
- sec () const
- {
- return sec_;
- }
-
- unsigned long
- nsec () const
- {
- return nsec_;
- }
-
- public:
- class overflow {};
- class underflow {};
-
- time
- operator+= (time const& b)
- {
- unsigned long long tmp = 0ULL + nsec_ + b.nsec_;
-
- sec_ += static_cast<unsigned long> (b.sec_ + tmp / 1000000000ULL);
- nsec_ = static_cast<unsigned long> (tmp % 1000000000ULL);
-
- return *this;
- }
-
- time
- operator-= (time const& b)
- {
- if (*this < b)
- throw underflow ();
-
- sec_ -= b.sec_;
-
- if (nsec_ < b.nsec_)
- {
- --sec_;
- nsec_ += 1000000000ULL - b.nsec_;
- }
- else
- nsec_ -= b.nsec_;
-
- return *this;
- }
-
- friend time
- operator+ (time const& a, time const& b)
- {
- time r (a);
- r += b;
- return r;
- }
-
- friend time
- operator- (time const& a, time const& b)
- {
- time r (a);
- r -= b;
- return r;
- }
-
- friend bool
- operator < (time const& a, time const& b)
- {
- return (a.sec_ < b.sec_) || (a.sec_ == b.sec_ && a.nsec_ < b.nsec_);
- }
-
- private:
- unsigned long sec_;
- unsigned long nsec_;
- };
-
- std::ostream&
- operator<< (std::ostream&, time const&);
-}
-
-#endif // TIME_HXX
diff --git a/examples/cxx/parser/polymorphism/driver.cxx b/examples/cxx/parser/polymorphism/driver.cxx
deleted file mode 100644
index ffbe48b..0000000
--- a/examples/cxx/parser/polymorphism/driver.cxx
+++ /dev/null
@@ -1,70 +0,0 @@
-// file : examples/cxx/parser/polymorphism/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <iostream>
-
-#include "supermen-pimpl.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " supermen.xml" << endl;
- return 1;
- }
-
- try
- {
- // Construct the parser.
- //
- xml_schema::string_pimpl string_p;
- xml_schema::boolean_pimpl boolean_p;
- xml_schema::unsigned_int_pimpl unsigned_int_p;
-
- person_pimpl person_p;
- superman_pimpl superman_p;
- batman_pimpl batman_p;
-
- xml_schema::parser_map_impl person_map;
-
- supermen_pimpl supermen_p;
-
-
- person_p.parsers (string_p);
- superman_p.parsers (string_p, boolean_p);
- batman_p.parsers (string_p, boolean_p, unsigned_int_p);
-
- // Here we are specifying a parser map which containes several parsers
- // that can be used to parse the person element.
- //
- person_map.insert (person_p);
- person_map.insert (superman_p);
- person_map.insert (batman_p);
-
- supermen_p.person_parser (person_map);
-
- // Parse the XML document. The last argument to the document's
- // constructor indicates that we are parsing polymorphic XML
- // documents.
- //
- xml_schema::document doc_p (supermen_p, "supermen", true);
-
- supermen_p.pre ();
- doc_p.parse (argv[1]);
- supermen_p.post_supermen ();
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/polymorphism/makefile b/examples/cxx/parser/polymorphism/makefile
deleted file mode 100644
index 918c283..0000000
--- a/examples/cxx/parser/polymorphism/makefile
+++ /dev/null
@@ -1,105 +0,0 @@
-# file : examples/cxx/parser/polymorphism/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := supermen.xsd
-cxx := driver.cxx supermen-pimpl.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/supermen.xsd,$(install_doc_dir)/xsd/$(path)/supermen.xsd)
- $(call install-data,$(src_base)/supermen.xml,$(install_doc_dir)/xsd/$(path)/supermen.xml)
- $(call install-data,$(src_base)/supermen-pimpl.hxx,$(install_doc_dir)/xsd/$(path)/supermen-pimpl.hxx)
- $(call install-data,$(src_base)/supermen-pimpl.cxx,$(install_doc_dir)/xsd/$(path)/supermen-pimpl.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd)
- $(call install-data,$(src_base)/supermen.xml,$(dist_prefix)/$(path)/supermen.xml)
- $(call install-data,$(src_base)/supermen-pimpl.hxx,$(dist_prefix)/$(path)/supermen-pimpl.hxx)
- $(call install-data,$(src_base)/supermen-pimpl.cxx,$(dist_prefix)/$(path)/supermen-pimpl.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/polymorphism/supermen-pimpl.cxx b/examples/cxx/parser/polymorphism/supermen-pimpl.cxx
deleted file mode 100644
index f4b3bc6..0000000
--- a/examples/cxx/parser/polymorphism/supermen-pimpl.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-// file : examples/cxx/parser/polymorphism/supermen-pimpl.cxx
-// copyright : not copyrighted - public domain
-//
-
-#include <iostream>
-
-#include "supermen-pimpl.hxx"
-
-using std::cout;
-using std::endl;
-
-// person_pimpl
-//
-void person_pimpl::
-pre ()
-{
- cout << "starting to parse person" << endl;
-}
-
-void person_pimpl::
-name (const std::string& v)
-{
- cout << "name: " << v << endl;
-}
-
-void person_pimpl::
-post_person ()
-{
- cout << "finished parsing person" << endl
- << endl;
-}
-
-// superman_pimpl
-//
-void superman_pimpl::
-pre ()
-{
- cout << "starting to parse superman" << endl;
-}
-
-void superman_pimpl::
-can_fly (bool v)
-{
- cout << "can-fly: " << v << endl;
-}
-
-void superman_pimpl::
-post_person ()
-{
- post_superman ();
-}
-
-void superman_pimpl::
-post_superman ()
-{
- cout << "finished parsing superman" << endl
- << endl;
-}
-
-// batman_pimpl
-//
-void batman_pimpl::
-pre ()
-{
- cout << "starting to parse batman" << endl;
-}
-
-void batman_pimpl::
-wing_span (unsigned int v)
-{
- cout << "wing-span: " << v << endl;
-}
-
-void batman_pimpl::
-post_superman ()
-{
- post_batman ();
-}
-
-void batman_pimpl::
-post_batman ()
-{
- cout << "finished parsing batman" << endl
- << endl;
-}
diff --git a/examples/cxx/parser/polymorphism/supermen-pimpl.hxx b/examples/cxx/parser/polymorphism/supermen-pimpl.hxx
deleted file mode 100644
index eaf81e5..0000000
--- a/examples/cxx/parser/polymorphism/supermen-pimpl.hxx
+++ /dev/null
@@ -1,68 +0,0 @@
-// file : examples/cxx/parser/polymorphism/supermen-pimpl.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef SUPERMEN_PIMPL_HXX
-#define SUPERMEN_PIMPL_HXX
-
-#include "supermen-pskel.hxx"
-
-class person_pimpl: public virtual person_pskel
-{
-public:
- virtual void
- pre ();
-
- virtual void
- name (const std::string&);
-
- virtual void
- post_person ();
-};
-
-class superman_pimpl: public virtual superman_pskel,
- public person_pimpl
-{
-public:
- virtual void
- pre ();
-
- virtual void
- can_fly (bool);
-
- // By default, post_superman() calls post_person(). In case of
- // polymorphic parsing we want the opposite: post_person() calls
- // post_superman().
- //
- virtual void
- post_person ();
-
- virtual void
- post_superman ();
-};
-
-class batman_pimpl: public virtual batman_pskel,
- public superman_pimpl
-{
-public:
- virtual void
- pre ();
-
- virtual void
- wing_span (unsigned int);
-
- // By default, post_batman() calls post_superman(). In case of
- // polymorphic parsing we want the opposite: post_superman()
- // calls post_batman().
- //
- virtual void
- post_superman ();
-
- virtual void
- post_batman ();
-};
-
-class supermen_pimpl: public supermen_pskel
-{
-};
-
-#endif // SUPERMEN_PIMPL_HXX
diff --git a/examples/cxx/parser/polymorphism/supermen.xml b/examples/cxx/parser/polymorphism/supermen.xml
deleted file mode 100644
index 15054fa..0000000
--- a/examples/cxx/parser/polymorphism/supermen.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/polymorphism/supermen.xml
-copyright : not copyrighted - public domain
-
--->
-
-<supermen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="supermen.xsd">
-
- <person>
- <name>John Doe</name>
- </person>
-
- <superman can-fly="false">
- <name>James "007" Bond</name>
- </superman>
-
- <superman can-fly="true" wing-span="10" xsi:type="batman">
- <name>Bruce Wayne</name>
- </superman>
-
-</supermen>
diff --git a/examples/cxx/parser/polymorphism/supermen.xsd b/examples/cxx/parser/polymorphism/supermen.xsd
deleted file mode 100644
index c9029da..0000000
--- a/examples/cxx/parser/polymorphism/supermen.xsd
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/polymorphism/supermen.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- substitution group root -->
- <xsd:element name="person" type="person"/>
-
-
- <xsd:complexType name="superman">
- <xsd:complexContent>
- <xsd:extension base="person">
- <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:element name="superman" type="superman" substitutionGroup="person"/>
-
- <xsd:complexType name="batman">
- <xsd:complexContent>
- <xsd:extension base="superman">
- <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="supermen">
- <xsd:sequence>
- <xsd:element ref="person" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="supermen" type="supermen"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/polyroot/batman.xml b/examples/cxx/parser/polyroot/batman.xml
deleted file mode 100644
index fad0b71..0000000
--- a/examples/cxx/parser/polyroot/batman.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/polyroot/batman.xml
-copyright : not copyrighted - public domain
-
--->
-
-<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="supermen.xsd"
- xsi:type="batman" can-fly="true" wing-span="10">
-
- <name>Bruce Wayne</name>
-
-</person>
diff --git a/examples/cxx/parser/polyroot/driver.cxx b/examples/cxx/parser/polyroot/driver.cxx
deleted file mode 100644
index 1c9c778..0000000
--- a/examples/cxx/parser/polyroot/driver.cxx
+++ /dev/null
@@ -1,138 +0,0 @@
-// file : examples/cxx/parser/polyroot/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <map>
-#include <string>
-#include <iostream>
-
-#include "supermen-pimpl.hxx"
-
-using std::cerr;
-using std::endl;
-using xml_schema::ro_string;
-
-// Customize the xml_schema::document object to handle polymorphic
-// root element. For more information see the multiroot example.
-//
-class document: public xml_schema::document
-{
-public:
- document (const xml_schema::parser_map& parser_map)
- : xml_schema::document (true), // Indicate polymorphic parsing.
- parser_map_ (parser_map)
- {
- }
-
-protected:
- // This function is called to obtain the root element type parser.
- // If the returned pointer is 0 then the whole document content
- // is ignored. The type argument contains the XML Schema type
- // if xsi:type attribute was specified for this element and 0
- // otherwise.
- //
- virtual xml_schema::parser_base*
- start_root_element (const ro_string& ns,
- const ro_string& name,
- const ro_string* type)
- {
- if (name != "person" || !ns.empty ())
- return 0;
-
- xml_schema::parser_base* base;
-
- // Search the parser map.
- //
- if (type == 0)
- {
- // No xsi:type. Static type should be used.
- //
- ro_string st (person_pskel::_static_type ());
- base = parser_map_.find (st);
- }
- else
- {
- base = parser_map_.find (*type);
- }
-
- if (base != 0)
- {
- parser_used_ = dynamic_cast<person_pskel*> (base);
- parser_used_->pre ();
- }
- else
- parser_used_ = 0; // No parser for this type.
-
- return parser_used_;
- }
-
- // This function is called to indicate the completion of document
- // parsing. The parser argument contains the pointer returned by
- // start_root_element.
- //
- virtual void
- end_root_element (const ro_string& /* ns */,
- const ro_string& /* name */,
- xml_schema::parser_base* /* parser */)
- {
- // Instead of caching the current parser in parser_used_, we
- // could also dynamic_cast the parser argument to the person_pskel
- // type.
- //
- if (parser_used_)
- parser_used_->post_person ();
- }
-
-
-private:
- const xml_schema::parser_map& parser_map_;
- person_pskel* parser_used_;
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " instance.xml" << endl;
- return 1;
- }
-
- try
- {
- // Construct the parser.
- //
- xml_schema::string_pimpl string_p;
- xml_schema::boolean_pimpl boolean_p;
- xml_schema::unsigned_int_pimpl unsigned_int_p;
-
- person_pimpl person_p;
- superman_pimpl superman_p;
- batman_pimpl batman_p;
-
- person_p.parsers (string_p);
- superman_p.parsers (string_p, boolean_p);
- batman_p.parsers (string_p, boolean_p, unsigned_int_p);
-
- // Parse the XML document.
- //
- xml_schema::parser_map_impl person_map;
-
- person_map.insert (person_p);
- person_map.insert (superman_p);
- person_map.insert (batman_p);
-
- document doc_p (person_map);
-
- doc_p.parse (argv[1]);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/polyroot/makefile b/examples/cxx/parser/polyroot/makefile
deleted file mode 100644
index 08ceec3..0000000
--- a/examples/cxx/parser/polyroot/makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-# file : examples/cxx/parser/polyroot/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := supermen.xsd
-cxx := driver.cxx supermen-pimpl.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/supermen.xsd,$(install_doc_dir)/xsd/$(path)/supermen.xsd)
- $(call install-data,$(src_base)/batman.xml,$(install_doc_dir)/xsd/$(path)/batman.xml)
- $(call install-data,$(src_base)/person.xml,$(install_doc_dir)/xsd/$(path)/person.xml)
- $(call install-data,$(src_base)/superman.xml,$(install_doc_dir)/xsd/$(path)/superman.xml)
- $(call install-data,$(src_base)/supermen-pimpl.hxx,$(install_doc_dir)/xsd/$(path)/supermen-pimpl.hxx)
- $(call install-data,$(src_base)/supermen-pimpl.cxx,$(install_doc_dir)/xsd/$(path)/supermen-pimpl.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd)
- $(call install-data,$(src_base)/batman.xml,$(dist_prefix)/$(path)/batman.xml)
- $(call install-data,$(src_base)/person.xml,$(dist_prefix)/$(path)/person.xml)
- $(call install-data,$(src_base)/superman.xml,$(dist_prefix)/$(path)/superman.xml)
- $(call install-data,$(src_base)/supermen-pimpl.hxx,$(dist_prefix)/$(path)/supermen-pimpl.hxx)
- $(call install-data,$(src_base)/supermen-pimpl.cxx,$(dist_prefix)/$(path)/supermen-pimpl.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/parser/polyroot/person.xml b/examples/cxx/parser/polyroot/person.xml
deleted file mode 100644
index f463bea..0000000
--- a/examples/cxx/parser/polyroot/person.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/polyroot/person.xml
-copyright : not copyrighted - public domain
-
--->
-
-<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="supermen.xsd">
-
- <name>John Doe</name>
-
-</person>
diff --git a/examples/cxx/parser/polyroot/superman.xml b/examples/cxx/parser/polyroot/superman.xml
deleted file mode 100644
index c831f6c..0000000
--- a/examples/cxx/parser/polyroot/superman.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/polyroot/superman.xml
-copyright : not copyrighted - public domain
-
--->
-
-<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="supermen.xsd"
- xsi:type="superman" can-fly="false">
-
- <name>James "007" Bond</name>
-
-</person>
diff --git a/examples/cxx/parser/polyroot/supermen-pimpl.cxx b/examples/cxx/parser/polyroot/supermen-pimpl.cxx
deleted file mode 100644
index 62289e9..0000000
--- a/examples/cxx/parser/polyroot/supermen-pimpl.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-// file : examples/cxx/parser/polyroot/supermen-pimpl.cxx
-// copyright : not copyrighted - public domain
-//
-
-#include <iostream>
-
-#include "supermen-pimpl.hxx"
-
-using std::cout;
-using std::endl;
-
-// person_pimpl
-//
-void person_pimpl::
-pre ()
-{
- cout << "starting to parse person" << endl;
-}
-
-void person_pimpl::
-name (const std::string& v)
-{
- cout << "name: " << v << endl;
-}
-
-void person_pimpl::
-post_person ()
-{
- cout << "finished parsing person" << endl
- << endl;
-}
-
-// superman_pimpl
-//
-void superman_pimpl::
-pre ()
-{
- cout << "starting to parse superman" << endl;
-}
-
-void superman_pimpl::
-can_fly (bool v)
-{
- cout << "can-fly: " << v << endl;
-}
-
-void superman_pimpl::
-post_person ()
-{
- post_superman ();
-}
-
-void superman_pimpl::
-post_superman ()
-{
- cout << "finished parsing superman" << endl
- << endl;
-}
-
-// batman_pimpl
-//
-void batman_pimpl::
-pre ()
-{
- cout << "starting to parse batman" << endl;
-}
-
-void batman_pimpl::
-wing_span (unsigned int v)
-{
- cout << "wing-span: " << v << endl;
-}
-
-void batman_pimpl::
-post_superman ()
-{
- post_batman ();
-}
-
-void batman_pimpl::
-post_batman ()
-{
- cout << "finished parsing batman" << endl
- << endl;
-}
diff --git a/examples/cxx/parser/polyroot/supermen-pimpl.hxx b/examples/cxx/parser/polyroot/supermen-pimpl.hxx
deleted file mode 100644
index 49e8c74..0000000
--- a/examples/cxx/parser/polyroot/supermen-pimpl.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-// file : examples/cxx/parser/polyroot/supermen-pimpl.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef SUPERMEN_PIMPL_HXX
-#define SUPERMEN_PIMPL_HXX
-
-#include "supermen-pskel.hxx"
-
-class person_pimpl: public virtual person_pskel
-{
-public:
- virtual void
- pre ();
-
- virtual void
- name (const std::string&);
-
- virtual void
- post_person ();
-};
-
-class superman_pimpl: public virtual superman_pskel,
- public person_pimpl
-{
-public:
- virtual void
- pre ();
-
- virtual void
- can_fly (bool);
-
- // By default, post_superman() calls post_person(). In case of
- // polymorphic parsing we want the opposite: post_person() calls
- // post_superman().
- //
- virtual void
- post_person ();
-
- virtual void
- post_superman ();
-};
-
-class batman_pimpl: public virtual batman_pskel,
- public superman_pimpl
-{
-public:
- virtual void
- pre ();
-
- virtual void
- wing_span (unsigned int);
-
- // By default, post_batman() calls post_superman(). In case of
- // polymorphic parsing we want the opposite: post_superman()
- // calls post_batman().
- //
- virtual void
- post_superman ();
-
- virtual void
- post_batman ();
-};
-
-#endif // SUPERMEN_PIMPL_HXX
diff --git a/examples/cxx/parser/polyroot/supermen.xsd b/examples/cxx/parser/polyroot/supermen.xsd
deleted file mode 100644
index dc5d439..0000000
--- a/examples/cxx/parser/polyroot/supermen.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/polyroot/supermen.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="person" type="person"/>
-
- <xsd:complexType name="superman">
- <xsd:complexContent>
- <xsd:extension base="person">
- <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="batman">
- <xsd:complexContent>
- <xsd:extension base="superman">
- <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/wildcard/driver.cxx b/examples/cxx/parser/wildcard/driver.cxx
deleted file mode 100644
index fa82ec0..0000000
--- a/examples/cxx/parser/wildcard/driver.cxx
+++ /dev/null
@@ -1,239 +0,0 @@
-// file : examples/cxx/parser/wildcard/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <string>
-#include <memory>
-#include <iostream>
-
-#include "email-pskel.hxx"
-
-using namespace std;
-using xml_schema::ro_string;
-
-class binary_pimpl: public email::binary_pskel,
- public xml_schema::base64_binary_pimpl
-{
-public:
- virtual void
- name (const string& n)
- {
- cerr << "binary: " << n << endl;
- }
-
- virtual void
- mime (const string& t)
- {
- cerr << "type: " << t << endl
- << endl;
- }
-
- virtual void
- post_binary ()
- {
- auto_ptr<xml_schema::buffer> buf (post_base64_binary ());
-
- cerr << "size: " << buf->size () << endl
- << endl;
- }
-};
-
-class envelope_pimpl: public email::envelope_pskel
-{
-public:
- envelope_pimpl (xml_schema::unsigned_int_pskel& uint_p,
- xml_schema::string_pskel& string_p,
- email::binary_pskel& binary_p)
- : depth_ (0), cur_ (0),
- uint_p_ (uint_p), string_p_ (string_p), binary_p_ (binary_p)
- {
- }
-
- virtual void
- to (const string& addr)
- {
- cerr << "To: " << addr << endl;
- }
-
- virtual void
- from (const string& addr)
- {
- cerr << "From: " << addr << endl;
- }
-
- virtual void
- subject (const string& s)
- {
- cerr << "Subject: " << s << endl;
- }
-
- // Wildcard handling. All wildcard events are routed to these
- // four functions. It is our job to dispatch them to the right
- // parsers.
- //
- virtual void
- _start_any_element (const ro_string& ns,
- const ro_string& name,
- const ro_string* type)
- {
- if (depth_++ > 0)
- {
- // Nested wildcard element.
- //
- if (cur_)
- cur_->_start_element (ns, name, type);
- }
- else
- {
- // Top-level element matched by the any wildcard.
- //
- if (ns == "http://www.codesynthesis.com/email")
- {
- if (name == "text")
- {
- cur_ = &string_p_;
- string_p_.pre ();
- string_p_._pre_impl ();
- }
- else if (name == "binary")
- {
- cur_ = &binary_p_;
- binary_p_.pre ();
- binary_p_._pre_impl ();
- }
- }
-
- if (cur_ == 0)
- {
- cerr << "Unknown wildcard content: " << ns << "#" << name << endl;
- }
- }
- }
-
- virtual void
- _end_any_element (const ro_string& ns, const ro_string& name)
- {
- if (--depth_ > 0)
- {
- if (cur_)
- cur_->_end_element (ns, name);
- }
- else
- {
- if (ns == "http://www.codesynthesis.com/email")
- {
- if (name == "text")
- {
- string_p_._post_impl ();
- string text (string_p_.post_string ());
-
- cerr << text << endl
- << endl;
- }
- else if (name == "binary")
- {
- binary_p_._post_impl ();
- binary_p_.post_binary ();
- }
- }
-
- cur_ = 0;
- }
- }
-
- virtual void
- _any_attribute (const ro_string& ns,
- const ro_string& name,
- const ro_string& value)
- {
- if (depth_ > 0)
- {
- // Nested wildcard attribute.
- //
- if (cur_)
- cur_->_attribute (ns, name, value);
- }
- else
- {
- // Top-level attribute matched by the anyAttribute wildcard.
- //
- if (ns == "http://www.codesynthesis.com/email" && name == "thread-id")
- {
- uint_p_.pre ();
- uint_p_._pre_impl ();
- uint_p_._characters (value);
- uint_p_._post_impl ();
- unsigned int tid (uint_p_.post_unsigned_int ());
-
- cerr << "Thread-id: " << tid << endl;
- }
- }
- }
-
- virtual void
- _any_characters (const ro_string& s)
- {
- if (depth_ > 0)
- {
- if (cur_)
- cur_->_characters (s);
- }
- }
-
-private:
- size_t depth_;
- xml_schema::parser_base* cur_;
-
- // Parsers for the unsigned int, string and binary types.
- //
-private:
- xml_schema::unsigned_int_pskel& uint_p_;
- xml_schema::string_pskel& string_p_;
- email::binary_pskel& binary_p_;
-};
-
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " email.xml" << endl;
- return 1;
- }
-
- try
- {
- // Construct the parser.
- //
- xml_schema::unsigned_int_pimpl unsigned_int_p;
- xml_schema::string_pimpl string_p;
- binary_pimpl binary_p;
- envelope_pimpl envelope_p (unsigned_int_p, string_p, binary_p);
-
- binary_p.parsers (string_p, // name
- string_p); // mime
-
- envelope_p.parsers (string_p, // to
- string_p, // from
- string_p); // subject
-
- // Parse the XML instance document.
- //
- xml_schema::document doc_p (envelope_p,
- "http://www.codesynthesis.com/email",
- "message");
- envelope_p.pre ();
- doc_p.parse (argv[1]);
- envelope_p.post_envelope ();
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/parser/wildcard/email.xml b/examples/cxx/parser/wildcard/email.xml
deleted file mode 100644
index f5d0359..0000000
--- a/examples/cxx/parser/wildcard/email.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/wildcard/email.xml
-copyright : not copyrighted - public domain
-
--->
-
-<eml:message xmlns:eml="http://www.codesynthesis.com/email"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/email email.xsd"
- eml:thread-id="123456789">
-
- <to>Jane Doe &lt;jane@doe.com></to>
- <from>John Doe &lt;john@doe.com></from>
- <subject>Surfing pictures</subject>
-
- <eml:text>
-Hi Jane,
-
-Here are cool pictures of me surfing.
-
-Cheers,
-John
- </eml:text>
-
- <eml:binary name="pic1.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
- <eml:binary name="pic2.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
-
-</eml:message>
diff --git a/examples/cxx/parser/wildcard/email.xsd b/examples/cxx/parser/wildcard/email.xsd
deleted file mode 100644
index 087fc7e..0000000
--- a/examples/cxx/parser/wildcard/email.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/parser/wildcard/email.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:eml="http://www.codesynthesis.com/email"
- targetNamespace="http://www.codesynthesis.com/email">
-
- <!-- Predefined envolop body types. -->
-
- <xsd:element name="text" type="xsd:string"/>
-
- <xsd:complexType name="binary">
- <xsd:simpleContent>
- <xsd:extension base="xsd:base64Binary">
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="mime" type="xsd:string" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:element name="binary" type="eml:binary"/>
-
- <!-- Predefined envelop attributes. -->
-
- <xsd:attribute name="thread-id" type="xsd:unsignedInt"/>
-
-
- <xsd:complexType name="envelope">
- <xsd:sequence>
- <xsd:element name="to" type="xsd:string"/>
- <xsd:element name="from" type="xsd:string"/>
- <xsd:element name="subject" type="xsd:string"/>
-
- <!-- Extensible envelope body. -->
-
- <xsd:any namespace="##targetNamespace" processContents="strict"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:anyAttribute namespace="##targetNamespace" processContents="strict"/>
- </xsd:complexType>
-
- <xsd:element name="message" type="eml:envelope"/>
-
-</xsd:schema>
diff --git a/examples/cxx/parser/wildcard/makefile b/examples/cxx/parser/wildcard/makefile
deleted file mode 100644
index 5887375..0000000
--- a/examples/cxx/parser/wildcard/makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-# file : examples/cxx/parser/wildcard/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := email.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/email.xsd,$(install_doc_dir)/xsd/$(path)/email.xsd)
- $(call install-data,$(src_base)/email.xml,$(install_doc_dir)/xsd/$(path)/email.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/email.xsd,$(dist_prefix)/$(path)/email.xsd)
- $(call install-data,$(src_base)/email.xml,$(dist_prefix)/$(path)/email.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/binary/boost/boost-archive-extraction.hxx b/examples/cxx/tree/binary/boost/boost-archive-extraction.hxx
deleted file mode 100644
index 8a1c1ef..0000000
--- a/examples/cxx/tree/binary/boost/boost-archive-extraction.hxx
+++ /dev/null
@@ -1,188 +0,0 @@
-// file : examples/cxx/tree/binary/boost/boost-archive-insertion.cxx
-// copyright : not copyrighted - public domain
-
-#ifndef BOOST_ARCHIVE_EXTRACTION_HXX
-#define BOOST_ARCHIVE_EXTRACTION_HXX
-
-#include <cstddef> // std::size_t
-#include <string>
-
-#include <xsd/cxx/tree/buffer.hxx>
-#include <xsd/cxx/tree/istream.hxx>
-
-#include <boost/cstdint.hpp>
-
-namespace xsd
-{
- namespace cxx
- {
- namespace tree
- {
- // as_size
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_size<T>& x)
- {
- std::size_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- // 8-bit
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_int8<T>& x)
- {
- boost::int8_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_uint8<T>& x)
- {
- boost::uint8_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
-
- // 16-bit
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_int16<T>& x)
- {
- boost::int16_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_uint16<T>& x)
- {
- boost::uint16_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
-
- // 32-bit
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_int32<T>& x)
- {
- boost::int32_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_uint32<T>& x)
- {
- boost::uint32_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
-
- // 64-bit
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_int64<T>& x)
- {
- boost::int64_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_uint64<T>& x)
- {
- boost::uint64_t r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
-
- // Boolean
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_bool<T>& x)
- {
- bool r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
-
- // Floating-point
- //
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_float32<T>& x)
- {
- float r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- template <typename Archive, typename T>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, istream_common::as_float64<T>& x)
- {
- double r;
- s.impl () >> r;
- x.x_ = static_cast<T> (r);
- return s;
- }
-
- // Extraction of std::basic_string.
- //
-
- template <typename Archive, typename C>
- inline istream<Archive>&
- operator>> (istream<Archive>& s, std::basic_string<C>& x)
- {
- s.impl () >> x;
- return s;
- }
-
-
- // Extraction of a binary buffer.
- //
- template <typename Archive, typename C>
- istream<Archive>&
- operator>> (istream<Archive>& s, buffer<C>& x)
- {
- std::size_t size;
- s.impl () >> size;
- x.size (size);
- s.impl ().load_binary (x.data (), size);
- return s;
- }
- }
- }
-}
-
-#endif // BOOST_ARCHIVE_EXTRACTION_HXX
diff --git a/examples/cxx/tree/binary/boost/boost-archive-insertion.hxx b/examples/cxx/tree/binary/boost/boost-archive-insertion.hxx
deleted file mode 100644
index 4c89104..0000000
--- a/examples/cxx/tree/binary/boost/boost-archive-insertion.hxx
+++ /dev/null
@@ -1,177 +0,0 @@
-// file : examples/cxx/tree/binary/boost/boost-archive-insertion.cxx
-// copyright : not copyrighted - public domain
-
-#ifndef BOOST_ARCHIVE_INSERTION_HXX
-#define BOOST_ARCHIVE_INSERTION_HXX
-
-#include <cstddef> // std::size_t
-#include <string>
-
-#include <xsd/cxx/tree/buffer.hxx>
-#include <xsd/cxx/tree/ostream.hxx>
-
-#include <boost/cstdint.hpp>
-
-namespace xsd
-{
- namespace cxx
- {
- namespace tree
- {
- // as_size
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_size<T> x)
- {
- std::size_t v (static_cast<std::size_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
- // 8-bit
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_int8<T> x)
- {
- boost::int8_t v (static_cast<boost::int8_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_uint8<T> x)
- {
- boost::uint8_t v (static_cast<boost::uint8_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
-
- // 16-bit
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_int16<T> x)
- {
- boost::int16_t v (static_cast<boost::int16_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_uint16<T> x)
- {
- boost::uint16_t v (static_cast<boost::uint16_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
-
- // 32-bit
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_int32<T> x)
- {
- boost::int32_t v (static_cast<boost::int32_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_uint32<T> x)
- {
- boost::uint32_t v (static_cast<boost::uint32_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
-
- // 64-bit
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_int64<T> x)
- {
- boost::int64_t v (static_cast<boost::int64_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_uint64<T> x)
- {
- boost::uint64_t v (static_cast<boost::uint64_t> (x.x_));
- s.impl () << v;
- return s;
- }
-
-
- // Boolean
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_bool<T> x)
- {
- bool v (static_cast<bool> (x.x_));
- s.impl () << v;
- return s;
- }
-
-
- // Floating-point
- //
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_float32<T> x)
- {
- float v (static_cast<float> (x.x_));
- s.impl () << v;
- return s;
- }
-
- template <typename Archive, typename T>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, ostream_common::as_float64<T> x)
- {
- double v (static_cast<double> (x.x_));
- s.impl () << v;
- return s;
- }
-
-
- // Insertion of std::basic_string.
- //
- template <typename Archive, typename C>
- inline ostream<Archive>&
- operator<< (ostream<Archive>& s, const std::basic_string<C>& x)
- {
- s.impl () << x;
- return s;
- }
-
-
- // Insertion of a binary buffer.
- //
- template <typename Archive, typename C>
- ostream<Archive>&
- operator<< (ostream<Archive>& s, const buffer<C>& x)
- {
- // Boost.Serialization needs an lvalue.
- //
- std::size_t size (x.size());
- s.impl () << size;
- s.impl ().save_binary (x.data (), x.size ());
- return s;
- }
- }
- }
-}
-
-#endif // BOOST_ARCHIVE_INSERTION_HXX
diff --git a/examples/cxx/tree/binary/boost/driver.cxx b/examples/cxx/tree/binary/boost/driver.cxx
deleted file mode 100644
index df053b6..0000000
--- a/examples/cxx/tree/binary/boost/driver.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-// file : examples/cxx/tree/binary/boost/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cstring> // std::memcpy
-#include <sstream>
-#include <iostream>
-
-// You can generate insertion/extraction code for other archive
-// types (for example, binary, XML, etc).
-//
-#include <boost/archive/text_oarchive.hpp>
-#include <boost/archive/text_iarchive.hpp>
-
-#include "library.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace library;
- using boost::archive::text_oarchive;
- using boost::archive::text_iarchive;
-
- // Read in the file.
- //
- std::auto_ptr<catalog> c (catalog_ (argv[1]));
-
- cerr << *c << endl;
-
- // Save into a text archive.
- //
- std::ostringstream ostr;
- text_oarchive oa (ostr);
- xml_schema::ostream<text_oarchive> os (oa);
-
- os << *c;
-
- // Print the text representation.
- //
- std::string str (ostr.str ());
-
- cerr << endl
- << "text representation: " << endl
- << str << endl;
-
- // Load from a text archive.
- //
- std::istringstream istr (str);
- text_iarchive ia (istr);
- xml_schema::istream<text_iarchive> is (ia);
-
- std::auto_ptr<catalog> copy (new catalog (is));
-
- cerr << *copy << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/binary/boost/library.xml b/examples/cxx/tree/binary/boost/library.xml
deleted file mode 100644
index ceb4443..0000000
--- a/examples/cxx/tree/binary/boost/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/binary/boost/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/binary/boost/library.xsd b/examples/cxx/tree/binary/boost/library.xsd
deleted file mode 100644
index 4bfdd1e..0000000
--- a/examples/cxx/tree/binary/boost/library.xsd
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/binary/boost/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/binary/boost/makefile b/examples/cxx/tree/binary/boost/makefile
deleted file mode 100644
index 6e2f4d8..0000000
--- a/examples/cxx/tree/binary/boost/makefile
+++ /dev/null
@@ -1,131 +0,0 @@
-# file : examples/cxx/tree/binary/boost/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-ifeq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(call import,\
- $(scf_root)/import/libboost/serialization/stub.make,\
- l: boost_serialization.l,cpp-options: boost_serialization.l.cpp-options)
-endif
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) $(boost_serialization.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(boost_serialization.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options += --generate-ostream \
---hxx-prologue-file $(src_base)/library-prologue.hxx \
---generate-insertion boost::archive::text_oarchive \
---generate-extraction boost::archive::text_iarchive
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
- $(call install-data,$(src_base)/library-prologue.hxx,$(install_doc_dir)/xsd/$(path)/library-prologue.hxx)
- $(call install-data,$(src_base)/boost-archive-extraction.hxx,$(install_doc_dir)/xsd/$(path)/boost-archive-extraction.hxx)
- $(call install-data,$(src_base)/boost-archive-insertion.hxx,$(install_doc_dir)/xsd/$(path)/boost-archive-insertion.hxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
- $(call install-data,$(src_base)/library-prologue.hxx,$(dist_prefix)/$(path)/library-prologue.hxx)
- $(call install-data,$(src_base)/boost-archive-extraction.hxx,$(dist_prefix)/$(path)/boost-archive-extraction.hxx)
- $(call install-data,$(src_base)/boost-archive-insertion.hxx,$(dist_prefix)/$(path)/boost-archive-insertion.hxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,boost-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,boost-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,boost-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,boost-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,boost-vc12.sln)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/binary/cdr/driver.cxx b/examples/cxx/tree/binary/cdr/driver.cxx
deleted file mode 100644
index ec1ff32..0000000
--- a/examples/cxx/tree/binary/cdr/driver.cxx
+++ /dev/null
@@ -1,87 +0,0 @@
-// file : examples/cxx/tree/binary/cdr/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cstring> // std::memcpy
-#include <iostream>
-
-#include <ace/Log_Msg.h> // ACE_HEX_DUMP
-#include <ace/CDR_Stream.h>
-
-// The following two headers define XSD-specific insertion/extraction
-// operations for ACE CDR streams. You can use the content of these
-// headers as a guide to implementing insertion/extraction to/from
-// your own data representation streams:
-//
-// xsd/cxx/tree/ace-cdr-stream-insertion.hxx
-// xsd/cxx/tree/ace-cdr-stream-extraction.hxx
-
-#include "library.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace library;
-
- // Read in the file.
- //
- std::auto_ptr<catalog> c (catalog_ (argv[1]));
-
- cerr << *c << endl;
-
- // Save to a CDR stream.
- //
- ACE_OutputCDR ace_ocdr;
- xml_schema::ostream<ACE_OutputCDR> ocdr (ace_ocdr);
-
- ocdr << *c;
-
- // Print the binary representation and at the same time save
- // it into a continuous buffer.
- //
- cerr << endl
- << "binary representation size: " << ace_ocdr.total_length () << endl;
-
- xml_schema::buffer buf (ace_ocdr.total_length ());
- char* data (buf.data ());
-
- for (const ACE_Message_Block* mb = ace_ocdr.begin ();
- mb != 0;
- mb = mb->cont ())
- {
- std::memcpy (data, mb->rd_ptr (), mb->length ());
- data += mb->length ();
-
- ACE_HEX_DUMP ((LM_DEBUG, mb->rd_ptr (), mb->length ()));
- }
-
- // Load from a CDR stream. Note that ACE_InputCDR expects the
- // buffer to be properly aligned. Since our buffer is dynamically
- // allocated, its alignment should be good enough.
- //
- ACE_InputCDR ace_icdr (buf.data (), buf.size ());
- xml_schema::istream<ACE_InputCDR> icdr (ace_icdr);
-
- std::auto_ptr<catalog> copy (new catalog (icdr));
-
- cerr << *copy << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- return 0; // ACE makes our main() an ordinary function.
-}
diff --git a/examples/cxx/tree/binary/cdr/library.xml b/examples/cxx/tree/binary/cdr/library.xml
deleted file mode 100644
index 941c03f..0000000
--- a/examples/cxx/tree/binary/cdr/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/binary/cdr/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/binary/cdr/library.xsd b/examples/cxx/tree/binary/cdr/library.xsd
deleted file mode 100644
index 5659e1b..0000000
--- a/examples/cxx/tree/binary/cdr/library.xsd
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/binary/cdr/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/binary/cdr/makefile b/examples/cxx/tree/binary/cdr/makefile
deleted file mode 100644
index 82bf7b7..0000000
--- a/examples/cxx/tree/binary/cdr/makefile
+++ /dev/null
@@ -1,119 +0,0 @@
-# file : examples/cxx/tree/binary/cdr/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-ifeq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(call import,\
- $(scf_root)/import/libace/stub.make,\
- l: ace.l,cpp-options: ace.l.cpp-options)
-endif
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) $(ace.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(ace.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream \
---generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,cdr-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,cdr-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,cdr-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,cdr-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,cdr-vc12.sln)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/binary/makefile b/examples/cxx/tree/binary/makefile
deleted file mode 100644
index 03b8919..0000000
--- a/examples/cxx/tree/binary/makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-# file : examples/cxx/tree/binary/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-all_examples := boost cdr xdr
-build_examples :=
-
-ifeq ($(xsd_with_boost_serialization),y)
-build_examples += boost
-endif
-
-ifeq ($(xsd_with_ace),y)
-build_examples += cdr
-endif
-
-ifeq ($(xsd_with_xdr),y)
-build_examples += xdr
-endif
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples)))
-
-# Install & Dist.
-#
-$(install) $(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(all_examples)))
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
-
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples)))
-
-$(call include,$(bld_root)/install.make)
-
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile))
-else
-$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile))
-endif
diff --git a/examples/cxx/tree/binary/xdr/README b/examples/cxx/tree/binary/xdr/README
deleted file mode 100644
index 22d5693..0000000
--- a/examples/cxx/tree/binary/xdr/README
+++ /dev/null
@@ -1,34 +0,0 @@
-This example shows how to save/load the object model to/from XDR
-(eXternal Data Representation) binary format using XDR streams.
-The XDR API is available out of the box on most UNIX and GNU/Linux
-systems as part of Sun RPC. On Windows you may need to install a
-third-party library which provides the XDR API.
-
-The example consists of the following files:
-
-library.xsd
- XML Schema which describes a library of books.
-
-library.xml
- Sample XML instance document.
-
-library.hxx
-library.cxx
- C++ types that represent the given vocabulary as well as data
- representation stream insertion and extraction operations. These
- are generated by XSD from library.xsd. Note that the
- --generate-insertion and --generate-extraction options are used
- to generate the insertion and extraction operations for XDR
- stream.
-
-driver.cxx
- Driver for the example. It first calls one of the parsing functions
- that constructs the object model from the input XML file. It then
- saves the object model to the XDR representation and loads it back.
- Additionally, it prints the content of the object model before saving
- it to the XDR representation and after loading it from the XDR
- representation.
-
-To run the example on the sample XML instance document simply execute:
-
-$ ./driver library.xml
diff --git a/examples/cxx/tree/binary/xdr/driver.cxx b/examples/cxx/tree/binary/xdr/driver.cxx
deleted file mode 100644
index d109322..0000000
--- a/examples/cxx/tree/binary/xdr/driver.cxx
+++ /dev/null
@@ -1,148 +0,0 @@
-// file : examples/cxx/tree/binary/xdr/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cstring> // std::memcpy
-#include <cstddef> // std::size_t
-#include <iostream>
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-
-#include "library.hxx"
-
-using std::cerr;
-using std::endl;
-using std::size_t;
-
-// XDR output functions. Their implementations are provided after main().
-//
-struct underflow_info
-{
- xml_schema::buffer* buf;
- size_t pos;
-};
-
-extern "C" int
-overflow (void* user_data, char* buf, int n);
-
-extern "C" int
-underflow (void* user_data, char* buf, int n);
-
-// The xdrrec_create function (used below) has slightly different
-// prototypes on different platforms. To make this example portable
-// we will need to cast the actual function to the following common
-// prototype.
-//
-extern "C"
-typedef void (*xdrrec_create_p) (
- XDR*,
- unsigned int write_size,
- unsigned int read_size,
- void* user_data,
- int (*read) (void* user_data, char* buf, int n),
- int (*write) (void* user_data, char* buf, int n));
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace library;
-
- xdrrec_create_p xdrrec_create_ =
- reinterpret_cast<xdrrec_create_p> (::xdrrec_create);
-
- // Read in the file.
- //
- std::auto_ptr<catalog> c (catalog_ (argv[1]));
-
- cerr << *c << endl;
-
- // Save to an XDR stream.
- //
- XDR xdr;
- xml_schema::buffer buf;
-
- xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&buf), 0, &overflow);
- xdr.x_op = XDR_ENCODE;
-
- xml_schema::ostream<XDR> oxdr (xdr);
-
- oxdr << *c;
-
- xdrrec_endofrecord (&xdr, true); // Flush the data.
- xdr_destroy (&xdr);
-
- // The binary representation is now in the memory buffer 'buf'.
- // To get to the raw data use buf.data() and buf.size().
- //
- cerr << endl
- << "binary representation size: " << buf.size () << endl;
-
- // Load from an XDR stream.
- //
- underflow_info ui;
- ui.buf = &buf;
- ui.pos = 0;
-
- xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&ui), &underflow, 0);
- xdr.x_op = XDR_DECODE;
-
- xdrrec_skiprecord (&xdr);
-
- xml_schema::istream<XDR> ixdr (xdr);
-
- std::auto_ptr<catalog> copy (new catalog (ixdr));
-
- xdr_destroy (&xdr);
-
- cerr << *copy << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
-
-extern "C" int
-overflow (void* p, char* buf, int n_)
-{
- xml_schema::buffer* dst (reinterpret_cast<xml_schema::buffer*> (p));
- size_t n (static_cast<size_t> (n_));
-
- size_t size (dst->size ());
- size_t capacity (dst->capacity ());
-
- // Implement exponential growth.
- //
- if (size + n > capacity && size + n < capacity * 2)
- dst->capacity (capacity * 2);
-
- dst->size (size + n);
- std::memcpy (dst->data () + size, buf, n);
-
- return n;
-}
-
-extern "C" int
-underflow (void* p, char* buf, int n_)
-{
- underflow_info* ui (reinterpret_cast<underflow_info*> (p));
- size_t n (static_cast<size_t> (n_));
-
- size_t size (ui->buf->size () - ui->pos);
- n = size > n ? n : size;
-
- std::memcpy (buf, ui->buf->data () + ui->pos, n);
- ui->pos += n;
-
- return n;
-}
diff --git a/examples/cxx/tree/binary/xdr/library.xml b/examples/cxx/tree/binary/xdr/library.xml
deleted file mode 100644
index dab6afb..0000000
--- a/examples/cxx/tree/binary/xdr/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/binary/xdr/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/binary/xdr/library.xsd b/examples/cxx/tree/binary/xdr/library.xsd
deleted file mode 100644
index 7513e3b..0000000
--- a/examples/cxx/tree/binary/xdr/library.xsd
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/binary/xdr/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/binary/xdr/makefile b/examples/cxx/tree/binary/xdr/makefile
deleted file mode 100644
index 77a9249..0000000
--- a/examples/cxx/tree/binary/xdr/makefile
+++ /dev/null
@@ -1,113 +0,0 @@
-# file : examples/cxx/tree/binary/xdr/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) -lnsl
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream \
---generate-insertion XDR --generate-extraction XDR
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,xdr-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,xdr-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,xdr-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,xdr-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,xdr-vc12.sln)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/caching/README b/examples/cxx/tree/caching/README
deleted file mode 100644
index 64e5a1a..0000000
--- a/examples/cxx/tree/caching/README
+++ /dev/null
@@ -1,29 +0,0 @@
-This example shows how to use the C++/Tree mapping to parse several
-XML documents while reusing the underlying XML parser and caching the
-schemas used for validation.
-
-The example consists of the following files:
-
-library.xsd
- XML Schema which describes a library of books.
-
-library.xml
- Sample XML instance document.
-
-library.hxx
-library.cxx
- C++ types that represent the given vocabulary and a set of parsing
- functions that convert XML instance documents to a tree-like in-memory
- object model. These are generated by XSD from library.xsd.
-
-driver.cxx
- Driver for the example. It first sets up the Xerces-C++ DOM parser
- and caches the library.xsd schema for validation. It then performs
- ten iterations that parse the input file to a DOM document using
- the DOM parser and call one of the parsing functions that constructs
- the object model from this DOM document. On each iteration the driver
- prints a number of books in the object model to STDERR.
-
-To run the example on the sample XML instance document simply execute:
-
-$ ./driver library.xml
diff --git a/examples/cxx/tree/caching/driver.cxx b/examples/cxx/tree/caching/driver.cxx
deleted file mode 100644
index 2aa9396..0000000
--- a/examples/cxx/tree/caching/driver.cxx
+++ /dev/null
@@ -1,165 +0,0 @@
-// file : examples/cxx/tree/caching/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
-#include <xercesc/util/PlatformUtils.hpp>
-#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "library.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we
- // are doing the XML-to-DOM parsing ourselves.
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace xercesc;
- namespace xml = xsd::cxx::xml;
- namespace tree = xsd::cxx::tree;
-
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- xml::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, true);
- conf->setParameter (XMLUni::fgXercesSchema, true);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Initialize the schema cache.
- //
- if (!parser->loadGrammar ("library.xsd", Grammar::SchemaGrammarType, true))
- {
- // In Xerces-C++ grammar loading failure results in just a warning.
- // Make it a fatal error.
- //
- eh.handle ("library.xsd", 0, 0,
- tree::error_handler<char>::severity::fatal,
- "unable to load schema");
- }
-
- eh.throw_if_failed<xml_schema::parsing> ();
-
- // Use the loaded grammar during parsing.
- //
- conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
-
- // Disable loading schemas via other means (e.g., schemaLocation).
- //
- conf->setParameter (XMLUni::fgXercesLoadSchema, false);
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Parse XML documents.
- //
- for (unsigned long i (0); i < 10; ++i)
- {
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- // Wrap the standard input stream.
- //
- xml::sax::std_input_source isrc (ifs, argv[1]);
- Wrapper4InputSource wrap (&isrc, false);
-
- // Parse XML to DOM.
- //
- xml_schema::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<xml_schema::parsing> ();
-
- // Parse DOM to the object model.
- //
- auto_ptr<library::catalog> c (library::catalog_ (*doc));
-
- cerr << "catalog with " << c->book ().size () << " books" << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/caching/library.xml b/examples/cxx/tree/caching/library.xml
deleted file mode 100644
index 6d4d6f1..0000000
--- a/examples/cxx/tree/caching/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/caching/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/caching/library.xsd b/examples/cxx/tree/caching/library.xsd
deleted file mode 100644
index a46c558..0000000
--- a/examples/cxx/tree/caching/library.xsd
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/caching/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/caching/makefile b/examples/cxx/tree/caching/makefile
deleted file mode 100644
index d205c0f..0000000
--- a/examples/cxx/tree/caching/makefile
+++ /dev/null
@@ -1,100 +0,0 @@
-# file : examples/cxx/tree/caching/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/compression/compressed-format-target.cxx b/examples/cxx/tree/compression/compressed-format-target.cxx
deleted file mode 100644
index 1f183e2..0000000
--- a/examples/cxx/tree/compression/compressed-format-target.cxx
+++ /dev/null
@@ -1,152 +0,0 @@
-// file : examples/cxx/tree/compression/compressed-format-target.cxx
-// copyright : not copyrighted - public domain
-
-#include <ostream>
-#include <cstring> // std::memcpy
-
-#include "compressed-format-target.hxx"
-
-using namespace std;
-
-//
-// compression_failure
-//
-
-const char* compression_failure::
-what () const throw ()
-{
- return "compression failure";
-}
-
-//
-// compressed_format_target
-//
-
-compressed_format_target::
-compressed_format_target (ostream& os, compression_type t)
- : os_ (os), closed_ (false), n_ (0)
- {
- zs_.zalloc = Z_NULL;
- zs_.zfree = Z_NULL;
- zs_.opaque = Z_NULL;
-
- int window = 0;
-
- switch (t)
- {
- case raw:
- {
- window = -15;
- break;
- }
- case zlib:
- {
- window = 15;
- break;
- }
- case gzip:
- {
- window = 16 + 15;
- break;
- }
- }
-
- int r (deflateInit2 (&zs_,
- Z_DEFAULT_COMPRESSION,
- Z_DEFLATED,
- window,
- 8,
- Z_DEFAULT_STRATEGY));
- if (r != Z_OK)
- throw compression_failure (r);
- }
-
-compressed_format_target::
-~compressed_format_target ()
-{
- try
- {
- // Close the free the compression stream.
- //
- if (!closed_)
- close ();
- }
- catch (...)
- {
- }
-
- deflateEnd (&zs_);
-}
-
-void compressed_format_target::
-writeChars (const XMLByte* const buf,
- const XMLSize_t size,
- xercesc::XMLFormatter* const)
-{
- // Flush the buffer if the block is too large or if we don't have
- // any space left.
- //
- if ((size >= buf_size_ / 8 || n_ + size > buf_size_) && n_ != 0)
- {
- write (in_, n_);
- n_ = 0;
- }
-
- if (size < buf_size_ / 8)
- {
- memcpy (in_ + n_, reinterpret_cast<const char*> (buf), size);
- n_ += size;
- }
- else
- write (reinterpret_cast<const char*> (buf), size);
-}
-
-
-void compressed_format_target::
-flush ()
-{
- if (n_ != 0)
- {
- write (in_, n_);
- n_ = 0;
- }
-
- if (!os_.fail ())
- os_.flush ();
-}
-
-void compressed_format_target::
-close ()
-{
- write (in_, n_, true);
- n_ = 0;
-
- if (!os_.fail ())
- os_.flush ();
-
- closed_ = true;
-}
-
-void compressed_format_target::
-write (const char* buf, size_t size, bool flush)
-{
- zs_.next_in = reinterpret_cast<Bytef*> (const_cast<char*> (buf));
- zs_.avail_in = static_cast<uInt> (size);
-
- do
- {
- zs_.next_out = reinterpret_cast<Bytef*> (out_);
- zs_.avail_out = buf_size_;
-
- int r (deflate (&zs_, flush ? Z_FINISH : Z_NO_FLUSH));
-
- if (r != Z_OK && r != Z_BUF_ERROR && r != Z_STREAM_END)
- throw compression_failure (r);
-
- size_t n (buf_size_ - zs_.avail_out);
-
- if (!os_.fail () && n > 0)
- os_.write (out_, static_cast<streamsize> (n));
-
- } while (zs_.avail_out == 0);
-}
diff --git a/examples/cxx/tree/compression/compressed-format-target.hxx b/examples/cxx/tree/compression/compressed-format-target.hxx
deleted file mode 100644
index 835b676..0000000
--- a/examples/cxx/tree/compression/compressed-format-target.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-// file : examples/cxx/tree/compression/compressed-format-target.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef COMPRESSED_FORMAT_TARGET_HXX
-#define COMPRESSED_FORMAT_TARGET_HXX
-
-#include <zlib.h>
-
-#include <iosfwd>
-#include <cstddef> // std::size_t
-#include <exception>
-
-#include <xercesc/framework/XMLFormatter.hpp>
-
-struct compression_failure: std::exception
-{
- explicit
- compression_failure (int code)
- : code_ (code)
- {
- }
-
- int
- code () const
- {
- return code_;
- }
-
- const char*
- message () const
- {
- return zError (code_);
- }
-
- virtual const char*
- what () const throw ();
-
-private:
- int code_;
-};
-
-// Xerces-C++ XMLFormatTarget interface implementation with on-the-fly,
-// zlib-based compression.
-//
-class compressed_format_target: public xercesc::XMLFormatTarget
-{
-public:
- enum compression_type
- {
- raw,
- zlib,
- gzip
- };
-
- compressed_format_target (std::ostream&, compression_type);
-
- virtual
- ~compressed_format_target ();
-
- virtual void
- writeChars (const XMLByte* const buf,
- const XMLSize_t size,
- xercesc::XMLFormatter* const);
-
- virtual void
- flush ();
-
- // Close the compressed stream by writing out the zlib or gzip trailer.
- // This function is automatically called from the destructor but you
- // may want to call it explicitly to be able to catch any exceptions
- // that it might throw.
- //
- void
- close ();
-
-private:
- void
- write (const char* buf, std::size_t size, bool flush = false);
-
-private:
- std::ostream& os_;
- z_stream zs_;
- bool closed_;
-
- static const std::size_t buf_size_ = 65536;
- char in_[buf_size_];
- char out_[buf_size_];
- size_t n_;
-};
-
-#endif // COMPRESSED_FORMAT_TARGET_HXX
diff --git a/examples/cxx/tree/compression/compressed-input-source.cxx b/examples/cxx/tree/compression/compressed-input-source.cxx
deleted file mode 100644
index e25b169..0000000
--- a/examples/cxx/tree/compression/compressed-input-source.cxx
+++ /dev/null
@@ -1,195 +0,0 @@
-// file : examples/cxx/tree/compression/compressed-input-source.cxx
-// copyright : not copyrighted - public domain
-
-#include <istream>
-
-#include <xsd/cxx/xml/string.hxx>
-
-#include "compressed-input-source.hxx"
-
-using namespace std;
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-
-//
-// decompression_failure
-//
-
-const char* decompression_failure::
-what () const throw ()
-{
- return "decompression failure";
-}
-
-//
-// compressed_input_source
-//
-
-compressed_input_source::
-compressed_input_source (istream& is, compression_type t)
- : is_ (&is), type_ (t)
-{
-}
-
-compressed_input_source::
-compressed_input_source (istream& is,
- compression_type t,
- const string& sysid)
- : InputSource (xml::string (sysid).c_str ()), is_ (&is), type_ (t)
-{
-}
-
-compressed_input_source::
-compressed_input_source (istream& is,
- compression_type t,
- const string& sysid,
- const string& pubid)
- : xercesc::InputSource (xml::string (sysid).c_str (),
- xml::string (pubid).c_str ()),
- is_ (&is),
- type_ (t)
-{
-}
-
-BinInputStream* compressed_input_source::
-makeStream () const
-{
- if (is_ == 0)
- throw copy ();
-
- istream& is (*is_);
- is_ = 0;
- return new compressed_input_stream (
- is, static_cast<compressed_input_stream::compression_type> (type_));
-}
-
-//
-// compressed_input_stream
-//
-
-compressed_input_stream::
-compressed_input_stream (istream& is, compression_type t)
- : is_ (is), end_ (false), pos_ (0)
-{
- zs_.zalloc = Z_NULL;
- zs_.zfree = Z_NULL;
- zs_.opaque = Z_NULL;
- zs_.next_in = Z_NULL;
- zs_.avail_in = 0;
-
- int window = 0;
-
- switch (t)
- {
- case raw:
- {
- window = -15;
- break;
- }
- case zlib:
- {
- window = 15;
- break;
- }
- case gzip:
- {
- window = 16 + 15;
- break;
- }
- }
-
- int r (inflateInit2 (&zs_, window));
-
- if (r != Z_OK)
- throw decompression_failure (r);
-}
-
-compressed_input_stream::
-~compressed_input_stream ()
-{
- inflateEnd (&zs_);
-}
-
-XMLFilePos compressed_input_stream::
-curPos () const
-{
- return static_cast<XMLFilePos> (pos_);
-}
-
-XMLSize_t compressed_input_stream::
-readBytes (XMLByte* const buf, const XMLSize_t size)
-{
- if (end_)
- return 0;
-
- // Keep calling inflate() until we fill up the buffer or reach the
- // end of stream. If we run out of input data, call the underlying
- // stream for more.
- //
- zs_.next_out = reinterpret_cast<Bytef*> (buf);
- zs_.avail_out = static_cast<uInt> (size);
-
- int r;
-
- do
- {
- if (zs_.avail_in == 0)
- {
- zs_.avail_in = static_cast<uInt> (read ());
- zs_.next_in = reinterpret_cast<Bytef*> (const_cast<char*> (in_));
-
- if (zs_.avail_in == 0)
- throw decompression_failure (Z_DATA_ERROR);
- }
-
- r = inflate (&zs_, Z_NO_FLUSH);
-
- if (r != Z_OK && r != Z_STREAM_END)
- throw decompression_failure (r);
-
- } while (r != Z_STREAM_END && zs_.avail_out != 0);
-
- if (r == Z_STREAM_END)
- end_ = true;
-
- size_t n (size - zs_.avail_out);
- pos_ += n;
-
- return static_cast<XMLSize_t> (n);
-}
-
-const XMLCh* compressed_input_stream::
-getContentType () const
-{
- return 0;
-}
-
-size_t compressed_input_stream::
-read ()
-{
- // Some implementations don't clear gcount if you call read() on a
- // stream that is in the eof state.
- //
- if (is_.eof ())
- return 0;
-
- // Unset the exception failbit while we are working with the stream.
- //
- ios_base::iostate old (is_.exceptions ());
- is_.exceptions (old & ~ios_base::failbit);
-
- is_.read (in_, static_cast<streamsize> (buf_size_));
-
- // Clear the fail bit if it was caused by eof and restore the original
- // exception state. If there are any pending errors then the exception
- // will be thrown now.
- //
- if (is_.fail () && is_.eof ())
- is_.clear (is_.rdstate () & ~ios_base::failbit);
-
- is_.exceptions (old);
-
- // Make sure that if we failed, we won't be called again.
- //
- return !is_.fail () ? static_cast<size_t> (is_.gcount ()) : 0;
-}
diff --git a/examples/cxx/tree/compression/compressed-input-source.hxx b/examples/cxx/tree/compression/compressed-input-source.hxx
deleted file mode 100644
index 8065445..0000000
--- a/examples/cxx/tree/compression/compressed-input-source.hxx
+++ /dev/null
@@ -1,121 +0,0 @@
-// file : examples/cxx/tree/compression/compressed-input-source.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef COMPRESSED_INPUT_SOURCE_HXX
-#define COMPRESSED_INPUT_SOURCE_HXX
-
-#include <zlib.h>
-
-#include <iosfwd>
-#include <string>
-#include <cstddef> // std::size_t
-#include <exception>
-
-#include <xercesc/sax/InputSource.hpp>
-#include <xercesc/util/BinInputStream.hpp>
-
-struct decompression_failure: std::exception
-{
- explicit
- decompression_failure (int code)
- : code_ (code)
- {
- }
-
- int
- code () const
- {
- return code_;
- }
-
- const char*
- message () const
- {
- return zError (code_);
- }
-
- virtual const char*
- what () const throw ();
-
-private:
- int code_;
-};
-
-// Xerces-C++ InputSource interface implementation with on-the-fly, zlib-
-// based decompression.
-//
-class compressed_input_source: public xercesc::InputSource
-{
-public:
- enum compression_type
- {
- raw,
- zlib,
- gzip
- };
-
- compressed_input_source (std::istream&, compression_type);
-
- compressed_input_source (std::istream&,
- compression_type,
- const std::string& system_id);
-
- compressed_input_source (std::istream&,
- compression_type,
- const std::string& system_id,
- const std::string& public_id);
-
- struct copy {};
-
- // Throws the copy exception if this function is called more than once.
- //
- virtual xercesc::BinInputStream*
- makeStream () const;
-
-private:
- mutable std::istream* is_;
- compression_type type_;
-};
-
-// Xerces-C++ BinInputStream interface implementation with on-the-fly, zlib-
-// based decompression.
-//
-class compressed_input_stream: public xercesc::BinInputStream
-{
-public:
- enum compression_type
- {
- raw,
- zlib,
- gzip
- };
-
- compressed_input_stream (std::istream&, compression_type);
-
- virtual
- ~compressed_input_stream ();
-
- virtual XMLFilePos
- curPos () const;
-
- virtual XMLSize_t
- readBytes (XMLByte* const buf, const XMLSize_t size);
-
- virtual const XMLCh*
- getContentType () const;
-
-private:
- std::size_t
- read ();
-
-private:
- std::istream& is_;
- z_stream zs_;
- bool end_;
-
- static const std::size_t buf_size_ = 65536;
- char in_[buf_size_];
- std::size_t pos_; // Current decompressed stream position.
-};
-
-#endif // COMPRESSED_INPUT_SOURCE_HXX
diff --git a/examples/cxx/tree/compression/driver.cxx b/examples/cxx/tree/compression/driver.cxx
deleted file mode 100644
index 34238b1..0000000
--- a/examples/cxx/tree/compression/driver.cxx
+++ /dev/null
@@ -1,124 +0,0 @@
-// file : examples/cxx/tree/compression/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "library.hxx"
-
-#include "compressed-input-source.hxx"
-#include "compressed-format-target.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml.gz" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we are
- // using the Xerces-C++ input/output interfaces.
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace library;
-
- // Read in the XML file and obtain its object model.
- //
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1], ifstream::in | ifstream::binary);
-
- compressed_input_source cis (ifs, compressed_input_source::gzip, argv[1]);
-
- std::auto_ptr<catalog> c (
- catalog_ (cis, xml_schema::flags::dont_initialize));
-
-
- // Let's print what we've got.
- //
- for (catalog::book_const_iterator bi (c->book ().begin ());
- bi != c->book ().end ();
- ++bi)
- {
- cerr << endl
- << "ID : " << bi->id () << endl
- << "ISBN : " << bi->isbn () << endl
- << "Title : " << bi->title () << endl
- << "Genre : " << bi->genre () << endl;
-
- for (book::author_const_iterator ai (bi->author ().begin ());
- ai != bi->author ().end ();
- ++ai)
- {
- cerr << "Author : " << ai->name () << endl;
- cerr << " Born : " << ai->born () << endl;
-
- if (ai->died ())
- cerr << " Died : " << *ai->died () << endl;
-
- if (ai->recommends ())
- cerr << " Recommends : " << (*ai->recommends ())->title () << endl;
- }
-
- cerr << "Available : " << std::boolalpha << bi->available () << endl;
- }
-
- // Prepare namespace mapping and schema location information.
- //
- xml_schema::namespace_infomap map;
-
- map["lib"].name = "http://www.codesynthesis.com/library";
- map["lib"].schema = "library.xsd";
-
- ofstream ofs;
- ofs.exceptions (ofstream::badbit | ofstream::failbit | ofstream::eofbit);
- ofs.open ("out.xml.gz", ofstream::out | ofstream::binary);
-
- compressed_format_target cft (ofs, compressed_format_target::gzip);
-
- // Write it out.
- //
- catalog_ (cft, *c, map, "UTF-8", xml_schema::flags::dont_initialize);
-
- // Write out the compression stream trailer. If we don't do this
- // explicitly, it will be done automatically in the cft's destructor
- // but then any exceptions that might be throws will be ignored.
- //
- cft.close();
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const compression_failure& e)
- {
- cerr << "compression failure: " << e.message () << endl;
- r = 1;
- }
- catch (const decompression_failure& e)
- {
- cerr << "decompression failure: " << e.message () << endl;
- r = 1;
- }
- catch (const ios_base::failure&)
- {
- cerr << "file open or read/write failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/compression/library.xsd b/examples/cxx/tree/compression/library.xsd
deleted file mode 100644
index 728acc7..0000000
--- a/examples/cxx/tree/compression/library.xsd
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/compression/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/compression/makefile b/examples/cxx/tree/compression/makefile
deleted file mode 100644
index f6af7ea..0000000
--- a/examples/cxx/tree/compression/makefile
+++ /dev/null
@@ -1,127 +0,0 @@
-# file : examples/cxx/tree/compression/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx compressed-input-source.cxx compressed-format-target.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-ifeq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(call import,\
- $(scf_root)/import/libz/stub.make,\
- l: z.l,cpp-options: z.l.cpp-options)
-endif
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) $(z.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(z.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream --generate-serialization
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/compressed-format-target.hxx,$(install_doc_dir)/xsd/$(path)/compressed-format-target.hxx)
- $(call install-data,$(src_base)/compressed-format-target.cxx,$(install_doc_dir)/xsd/$(path)/compressed-format-target.cxx)
- $(call install-data,$(src_base)/compressed-input-source.hxx,$(install_doc_dir)/xsd/$(path)/compressed-input-source.hxx)
- $(call install-data,$(src_base)/compressed-input-source.cxx,$(install_doc_dir)/xsd/$(path)/compressed-input-source.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml.gz,$(install_doc_dir)/xsd/$(path)/library.xml.gz)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/compressed-format-target.hxx,$(dist_prefix)/$(path)/compressed-format-target.hxx)
- $(call install-data,$(src_base)/compressed-format-target.cxx,$(dist_prefix)/$(path)/compressed-format-target.cxx)
- $(call install-data,$(src_base)/compressed-input-source.hxx,$(dist_prefix)/$(path)/compressed-input-source.hxx)
- $(call install-data,$(src_base)/compressed-input-source.cxx,$(dist_prefix)/$(path)/compressed-input-source.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml.gz,$(dist_prefix)/$(path)/library.xml.gz)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,compression-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,compression-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,compression-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,compression-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,compression-vc12.sln)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
- $(call message,rm $$1,rm -f $$1,$(out_base)/out.xml.gz)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver out.xml.gz $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/calendar/calendar.xml b/examples/cxx/tree/custom/calendar/calendar.xml
deleted file mode 100644
index 5cc898a..0000000
--- a/examples/cxx/tree/custom/calendar/calendar.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/calendar/calendar.xml
-copyright : not copyrighted - public domain
-
--->
-
-<cal:events xmlns:cal="http://www.codesynthesis.com/calendar"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/calendar calendar.xsd">
-
- <event title="Bike ride" date="2006-09-04">
- Don't forget to change the tire.
- </event>
-
- <event title="Mountain hike" date="2006-09-05">
- Can be cancelled if it is too cold.
- </event>
-
-</cal:events>
diff --git a/examples/cxx/tree/custom/calendar/calendar.xsd b/examples/cxx/tree/custom/calendar/calendar.xsd
deleted file mode 100644
index 04b3af1..0000000
--- a/examples/cxx/tree/custom/calendar/calendar.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/calendar/calendar.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:cal="http://www.codesynthesis.com/calendar"
- targetNamespace="http://www.codesynthesis.com/calendar">
-
- <xsd:complexType name="event">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="title" type="xsd:string" use="required"/>
- <xsd:attribute name="date" type="xsd:date" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:complexType name="events">
- <xsd:sequence>
- <xsd:element name="event" type="cal:event" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="events" type="cal:events"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/custom/calendar/driver.cxx b/examples/cxx/tree/custom/calendar/driver.cxx
deleted file mode 100644
index a5b223e..0000000
--- a/examples/cxx/tree/custom/calendar/driver.cxx
+++ /dev/null
@@ -1,39 +0,0 @@
-// file : examples/cxx/tree/custom/calendar/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "calendar.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " calendar.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace calendar;
-
- std::auto_ptr<events> e (events_ (argv[1]));
-
- for (events::event_const_iterator i (e->event ().begin ());
- i != e->event ().end (); ++i)
- {
- cerr << i->date () << " " << i->title () << endl
- << *i << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/custom/calendar/makefile b/examples/cxx/tree/custom/calendar/makefile
deleted file mode 100644
index 169f9e3..0000000
--- a/examples/cxx/tree/custom/calendar/makefile
+++ /dev/null
@@ -1,136 +0,0 @@
-# file : examples/cxx/tree/custom/calendar/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := calendar.xsd
-cxx := driver.cxx xml-schema-custom.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-ifeq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(call import,\
- $(scf_root)/import/libboost/date-time/stub.make,\
- l: boost_date_time.l,cpp-options: boost_date_time.l.cpp-options)
-endif
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) $(boost_date_time.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(boost_date_time.l.cpp-options)
-
-# Header file for XML Schema namespace.
-#
-$(out_base)/xml-schema.hxx: $(out_root)/xsd/xsd
- $(call message,xsd $(src_base)/xml-schema.xsd,\
-$(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
---custom-type date \
---hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd)
-
-#
-#
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += \
---generate-inline \
---extern-xml-schema xml-schema.xsd
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/calendar.xsd,$(install_doc_dir)/xsd/$(path)/calendar.xsd)
- $(call install-data,$(src_base)/calendar.xml,$(install_doc_dir)/xsd/$(path)/calendar.xml)
- $(call install-data,$(src_base)/xml-schema-custom.hxx,$(install_doc_dir)/xsd/$(path)/xml-schema-custom.hxx)
- $(call install-data,$(src_base)/xml-schema-custom.cxx,$(install_doc_dir)/xsd/$(path)/xml-schema-custom.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/calendar.xsd,$(dist_prefix)/$(path)/calendar.xsd)
- $(call install-data,$(src_base)/calendar.xml,$(dist_prefix)/$(path)/calendar.xml)
- $(call install-data,$(src_base)/xml-schema-custom.hxx,$(dist_prefix)/$(path)/xml-schema-custom.hxx)
- $(call install-data,$(src_base)/xml-schema-custom.cxx,$(dist_prefix)/$(path)/xml-schema-custom.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,calendar-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,calendar-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,calendar-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,calendar-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,calendar-vc12.sln)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
- $(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/calendar/xml-schema-custom.cxx b/examples/cxx/tree/custom/calendar/xml-schema-custom.cxx
deleted file mode 100644
index 645880b..0000000
--- a/examples/cxx/tree/custom/calendar/xml-schema-custom.cxx
+++ /dev/null
@@ -1,56 +0,0 @@
-// file : examples/cxx/tree/custom/calendar/xml-schema-custom.cxx
-// copyright : not copyrighted - public domain
-
-// Include xml-schema.hxx instead of xml-schema-custom.hxx here.
-//
-#include "xml-schema.hxx"
-
-#include <xsd/cxx/xml/string.hxx> // xsd::cxx::xml::transcode
-#include <xsd/cxx/tree/text.hxx> // xsd::cxx::tree::text_content
-
-using namespace boost;
-using namespace boost::gregorian;
-
-namespace xml_schema
-{
- date::
- date (const xercesc::DOMElement& e, flags f, container* c)
- : simple_type (e, f, c),
- gregorian::date (
- from_simple_string (
- xsd::cxx::tree::text_content<char> (e)))
- {
- }
-
- date::
- date (const xercesc::DOMAttr& a, flags f, container* c)
- : simple_type (a, f, c),
- gregorian::date (
- from_simple_string (
- xsd::cxx::xml::transcode<char> (a.getValue ())))
- {
- }
-
- date::
- date (const std::string& s,
- const xercesc::DOMElement* e,
- flags f,
- container* c)
- : simple_type (s, e, f, c),
- gregorian::date (from_simple_string (s))
- {
- }
-
- date::
- date (const date& d, flags f, container* c)
- : simple_type (d, f, c),
- gregorian::date (d)
- {
- }
-
- date* date::
- _clone (flags f, container* c) const
- {
- return new date (*this, f, c);
- }
-}
diff --git a/examples/cxx/tree/custom/calendar/xml-schema-custom.hxx b/examples/cxx/tree/custom/calendar/xml-schema-custom.hxx
deleted file mode 100644
index 58f57e6..0000000
--- a/examples/cxx/tree/custom/calendar/xml-schema-custom.hxx
+++ /dev/null
@@ -1,33 +0,0 @@
-// file : examples/cxx/tree/custom/calendar/xml-schema-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use xml-schema.hxx instead. This
-// file is included into generated xml-schema.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-#include <boost/date_time/gregorian/gregorian.hpp> // boost::gregorian::date
-
-namespace xml_schema
-{
- class date: public simple_type,
- public boost::gregorian::date
- {
- public:
- // Parsing c-tors: element, attribute, and list item.
- //
- date (const xercesc::DOMElement&, flags = 0, container* = 0);
- date (const xercesc::DOMAttr&, flags = 0, container* = 0);
- date (const std::string&,
- const xercesc::DOMElement*,
- flags = 0,
- container* = 0);
-
- // Copy c-tor and _clone.
- //
- date (const date&, flags = 0, container* = 0);
-
- virtual date*
- _clone (flags = 0, container* = 0) const;
- };
-}
diff --git a/examples/cxx/tree/custom/comments/dom-parse.cxx b/examples/cxx/tree/custom/comments/dom-parse.cxx
deleted file mode 100644
index 9999f67..0000000
--- a/examples/cxx/tree/custom/comments/dom-parse.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-// file : examples/cxx/tree/custom/comments/dom-parse.cxx
-// copyright : not copyrighted - public domain
-
-#include "dom-parse.hxx"
-
-#include <istream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-xml::dom::auto_ptr<DOMDocument>
-parse (std::istream& is, const std::string& id, bool validate)
-{
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- xml::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Preserve comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, true);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable/Disable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, validate);
- conf->setParameter (XMLUni::fgXercesSchema, validate);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Prepare input stream.
- //
- xml::sax::std_input_source isrc (is, id);
- Wrapper4InputSource wrap (&isrc, false);
-
- xml::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<tree::parsing<char> > ();
-
- return doc;
-}
diff --git a/examples/cxx/tree/custom/comments/dom-parse.hxx b/examples/cxx/tree/custom/comments/dom-parse.hxx
deleted file mode 100644
index fea46d0..0000000
--- a/examples/cxx/tree/custom/comments/dom-parse.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-// file : examples/cxx/tree/custom/comments/dom-parse.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef DOM_PARSE
-#define DOM_PARSE
-
-#include <string>
-#include <iosfwd>
-
-#include <xercesc/dom/DOMDocument.hpp>
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-
-// Parse an XML document from the standard input stream with an
-// optional resource id. Resource id is used in diagnostics as
-// well as to locate schemas referenced from inside the document.
-//
-xsd::cxx::xml::dom::auto_ptr<xercesc::DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate);
-
-#endif // DOM_PARSE
diff --git a/examples/cxx/tree/custom/comments/driver.cxx b/examples/cxx/tree/custom/comments/driver.cxx
deleted file mode 100644
index 39b16f7..0000000
--- a/examples/cxx/tree/custom/comments/driver.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-// file : examples/cxx/tree/custom/commens/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOMDocument.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "people.hxx"
-#include "dom-parse.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " people.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we
- // are doing the XML-to-DOM parsing ourselves (see below).
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace people;
- namespace xml = xsd::cxx::xml;
-
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- // For performance reasons the internal XML to DOM parsing code
- // discards comments in the resulting DOM document. To overcome
- // this we are going to use our own parse() function from
- // dom-parse.hxx that preserves comments in the resulting DOM
- // documents.
- //
- xml_schema::dom::auto_ptr<xercesc::DOMDocument> doc (
- parse (ifs, argv[1], true));
-
- // Parse the DOM document to the object model.
- //
- std::auto_ptr<catalog> c (catalog_ (*doc));
-
- // Change the object model.
- //
- catalog::person_sequence& ps (c->person ());
-
- for (catalog::person_iterator i (ps.begin ()); i != ps.end (); ++i)
- {
- i->age (i->age () + 1);
- }
-
- person john ("John Doe", 30);
- john.comment ("Record for John Doe");
-
- ps.push_back (john);
-
- // Serialize.
- //
- xml_schema::namespace_infomap map;
-
- map["ppl"].name = "http://www.codesynthesis.com/people";
- map["ppl"].schema = "people.xsd";
-
- catalog_ (std::cout, *c, map);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/custom/comments/makefile b/examples/cxx/tree/custom/comments/makefile
deleted file mode 100644
index 478ab05..0000000
--- a/examples/cxx/tree/custom/comments/makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-# file : examples/cxx/tree/custom/comments/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := people.xsd
-cxx := driver.cxx xml-schema-custom.cxx dom-parse.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Header file for XML Schema namespace.
-#
-$(out_base)/xml-schema.hxx: $(out_root)/xsd/xsd
- $(call message,xsd $(src_base)/xml-schema.xsd,\
-$(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
---generate-serialization --custom-type anyType=/type_base \
---hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd)
-
-#
-#
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += \
---generate-inline \
---generate-serialization \
---extern-xml-schema xml-schema.xsd
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(install_doc_dir)/xsd/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(install_doc_dir)/xsd/$(path)/people.xml)
- $(call install-data,$(src_base)/xml-schema-custom.hxx,$(install_doc_dir)/xsd/$(path)/xml-schema-custom.hxx)
- $(call install-data,$(src_base)/xml-schema-custom.cxx,$(install_doc_dir)/xsd/$(path)/xml-schema-custom.cxx)
- $(call install-data,$(src_base)/dom-parse.hxx,$(install_doc_dir)/xsd/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(install_doc_dir)/xsd/$(path)/dom-parse.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml)
- $(call install-data,$(src_base)/xml-schema-custom.hxx,$(dist_prefix)/$(path)/xml-schema-custom.hxx)
- $(call install-data,$(src_base)/xml-schema-custom.cxx,$(dist_prefix)/$(path)/xml-schema-custom.cxx)
- $(call install-data,$(src_base)/dom-parse.hxx,$(dist_prefix)/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(dist_prefix)/$(path)/dom-parse.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
- $(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/comments/people.xml b/examples/cxx/tree/custom/comments/people.xml
deleted file mode 100644
index 55c08a1..0000000
--- a/examples/cxx/tree/custom/comments/people.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/comments/people.xml
-copyright : not copyrighted - public domain
-
--->
-
-<ppl:catalog xmlns:ppl="http://www.codesynthesis.com/people"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
-
- <person>
- <!--Record for Joe Dirt-->
- <name>Joe Dirt</name>
- <age>28</age>
- </person>
-
-</ppl:catalog>
diff --git a/examples/cxx/tree/custom/comments/people.xsd b/examples/cxx/tree/custom/comments/people.xsd
deleted file mode 100644
index e70dd2a..0000000
--- a/examples/cxx/tree/custom/comments/people.xsd
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/comments/people.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:ppl="http://www.codesynthesis.com/people"
- targetNamespace="http://www.codesynthesis.com/people">
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="age" type="xsd:unsignedShort"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="ppl:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/custom/comments/xml-schema-custom.cxx b/examples/cxx/tree/custom/comments/xml-schema-custom.cxx
deleted file mode 100644
index 67937d1..0000000
--- a/examples/cxx/tree/custom/comments/xml-schema-custom.cxx
+++ /dev/null
@@ -1,117 +0,0 @@
-// file : examples/cxx/tree/custom/comments/xml-schema-custom.cxx
-// copyright : not copyrighted - public domain
-
-// Include xml-schema.hxx instead of xml-schema-custom.hxx here.
-//
-#include "xml-schema.hxx"
-
-#include <xercesc/dom/DOMComment.hpp>
-#include <xercesc/dom/DOMDocument.hpp>
-
-#include <xsd/cxx/xml/string.hxx> // xml::transcode, xml::string
-
-namespace xml = xsd::cxx::xml;
-
-namespace xml_schema
-{
- type::
- type ()
- : type_base ()
- {
- }
-
- type::
- type (const xercesc::DOMElement& e, flags f, container* c)
- : type_base (e, f, c)
- {
- using namespace xercesc;
-
- // Here we are only handling a comment that is the first
- // node in the element's content.
- //
- const DOMNode* n (e.getFirstChild ());
-
- if (n != 0 && n->getNodeType () == DOMNode::COMMENT_NODE)
- {
- const DOMComment* c (static_cast<const DOMComment*> (n));
- comment_ = xml::transcode<char> (c->getData ());
- }
- }
-
- type::
- type (const xercesc::DOMAttr& a, flags f, container* c)
- : type_base (a, f, c)
- {
- // No comments for attributes.
- //
- }
-
- type::
- type (const std::string& s, const xercesc::DOMElement* e,
- flags f, container* c)
- : type_base (s, e, f, c)
- {
- // No comments for list items.
- //
- }
-
- type::
- type (const type& x, flags f, container* c)
- : type_base (x, f, c), comment_ (x.comment_)
- {
- }
-
- type* type::
- _clone (flags f, container* c) const
- {
- return new type (*this, f, c);
- }
-
- // Serialization operators.
- //
- void
- operator<< (xercesc::DOMElement& e, const type& x)
- {
- // Call our base first.
- //
- const type_base& b (x);
- e << b;
-
- // Add the comment if any.
- //
- const std::string s (x.comment ());
-
- if (!s.empty ())
- {
- using namespace xercesc;
-
- DOMDocument* doc (e.getOwnerDocument ());
- DOMComment* c (doc->createComment (xml::string (s).c_str ()));
- e.appendChild (c);
- }
- }
-
- void
- operator<< (xercesc::DOMAttr& a, const type& x)
- {
- // Call our base first.
- //
- const type_base& b (x);
- a << b;
-
- // No comments for attributes.
- //
- }
-
- void
- operator<< (xml_schema::list_stream& ls, const type& x)
- {
- // Call our base first.
- //
- const type_base& b (x);
- ls << b;
-
- // No comments for list items.
- //
- }
-}
diff --git a/examples/cxx/tree/custom/comments/xml-schema-custom.hxx b/examples/cxx/tree/custom/comments/xml-schema-custom.hxx
deleted file mode 100644
index 0442a44..0000000
--- a/examples/cxx/tree/custom/comments/xml-schema-custom.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-// file : examples/cxx/tree/custom/comments/xml-schema-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use xml-schema.hxx instead. This
-// file is included into generated xml-schema.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-#include <string>
-
-namespace xml_schema
-{
- // When customizing anyType always inherit from the original type.
- //
- class type: public type_base
- {
- public:
- type ();
- type (const xercesc::DOMElement&, flags = 0, container* = 0);
- type (const xercesc::DOMAttr&, flags = 0, container* = 0);
- type (const std::string&, const xercesc::DOMElement*,
- flags = 0, container* = 0);
- type (const type&, flags = 0, container* = 0);
-
- virtual type*
- _clone (flags = 0, container* = 0) const;
-
- public:
- // Comment manipulation API.
- //
- const std::string&
- comment () const
- {
- return comment_;
- }
-
- void
- comment (const std::string& c)
- {
- comment_ = c;
- }
-
- private:
- std::string comment_;
- };
-
- // New serialization operators.
- //
- void
- operator<< (xercesc::DOMElement&, const type&);
-
- void
- operator<< (xercesc::DOMAttr&, const type&);
-
- void
- operator<< (xml_schema::list_stream&, const type&);
-}
diff --git a/examples/cxx/tree/custom/contacts/contacts-custom.cxx b/examples/cxx/tree/custom/contacts/contacts-custom.cxx
deleted file mode 100644
index 8bb0e22..0000000
--- a/examples/cxx/tree/custom/contacts/contacts-custom.cxx
+++ /dev/null
@@ -1,50 +0,0 @@
-// file : examples/cxx/tree/custom/contacts/contacts-custom.cxx
-// copyright : not copyrighted - public domain
-
-#include <ostream>
-
-// Include contacts.hxx instead of contacts-custom.hxx here.
-//
-#include "contacts.hxx"
-
-namespace contacts
-{
- // We implement the following constructs by simply forwarding
- // to our base.
- //
- contact::
- contact (const name_type& n,
- const email_type& e,
- const phone_type& p)
- : contact_base (n, e, p)
- {
- }
-
- contact::
- contact (const xercesc::DOMElement& e,
- xml_schema::flags f,
- xml_schema::container* c)
- : contact_base (e, f, c)
- {
- }
-
- contact::
- contact (const contact& x,
- xml_schema::flags f,
- xml_schema::container* c)
- : contact_base (x, f, c)
- {
- }
-
- contact* contact::
- _clone (xml_schema::flags f, xml_schema::container* c) const
- {
- return new contact (*this, f, c);
- }
-
- void contact::
- print (std::ostream& os) const
- {
- os << name () << " e| " << email () << " t| " << phone () << std::endl;
- }
-}
diff --git a/examples/cxx/tree/custom/contacts/contacts-custom.hxx b/examples/cxx/tree/custom/contacts/contacts-custom.hxx
deleted file mode 100644
index 65d6244..0000000
--- a/examples/cxx/tree/custom/contacts/contacts-custom.hxx
+++ /dev/null
@@ -1,43 +0,0 @@
-// file : examples/cxx/tree/custom/contacts/contacts-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use contacts.hxx instead. This
-// file is included into generated contacts.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-#include <iosfwd> // std::ostream
-
-namespace contacts
-{
- class contact: public contact_base
- {
- // The following constructor signatures are copied from
- // contact_base except for the copy constructor and the
- // _clone function where we had to change the type from
- // contact_base to contact.
- //
- public:
- contact (const name_type&,
- const email_type&,
- const phone_type&);
-
- contact (const xercesc::DOMElement&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- contact (const contact&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- virtual contact*
- _clone (xml_schema::flags = 0,
- xml_schema::container* = 0) const;
-
- // Our customizations.
- //
- public:
- void
- print (std::ostream&) const;
- };
-}
diff --git a/examples/cxx/tree/custom/contacts/contacts.xml b/examples/cxx/tree/custom/contacts/contacts.xml
deleted file mode 100644
index 331e692..0000000
--- a/examples/cxx/tree/custom/contacts/contacts.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/contacts/contacts.xml
-copyright : not copyrighted - public domain
-
--->
-
-<cts:catalog xmlns:cts="http://www.codesynthesis.com/contacts"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/contacts contacts.xsd">
-
- <contact>
- <name>Joe Dirt</name>
- <email>joe@dirt.com</email>
- <phone>555 DIRT</phone>
- </contact>
-
-</cts:catalog>
diff --git a/examples/cxx/tree/custom/contacts/contacts.xsd b/examples/cxx/tree/custom/contacts/contacts.xsd
deleted file mode 100644
index d6110fe..0000000
--- a/examples/cxx/tree/custom/contacts/contacts.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/contacts/contacts.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:cts="http://www.codesynthesis.com/contacts"
- targetNamespace="http://www.codesynthesis.com/contacts">
-
- <xsd:complexType name="contact">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="email" type="xsd:string"/>
- <xsd:element name="phone" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="contact" type="cts:contact" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:element name="catalog" type="cts:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/custom/contacts/driver.cxx b/examples/cxx/tree/custom/contacts/driver.cxx
deleted file mode 100644
index ae8a2da..0000000
--- a/examples/cxx/tree/custom/contacts/driver.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-// file : examples/cxx/tree/custom/contacts/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "contacts.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " contacts.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace contacts;
-
- std::auto_ptr<catalog> c (catalog_ (argv[1]));
-
- for (catalog::contact_const_iterator i (c->contact ().begin ());
- i != c->contact ().end (); ++i)
- {
- i->print (cerr);
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/custom/contacts/makefile b/examples/cxx/tree/custom/contacts/makefile
deleted file mode 100644
index 400b41d..0000000
--- a/examples/cxx/tree/custom/contacts/makefile
+++ /dev/null
@@ -1,112 +0,0 @@
-# file : examples/cxx/tree/custom/contacts/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := contacts.xsd
-cxx := driver.cxx contacts-custom.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-# We have to double-escape '#' because the message function
-# (which is used in command scripts) expands things twice.
-#
-$(gen): xsd_options += \
---generate-inline \
---custom-type contact=/contact_base \
---hxx-epilogue '\#include "contacts-custom.hxx"'
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/contacts.xsd,$(install_doc_dir)/xsd/$(path)/contacts.xsd)
- $(call install-data,$(src_base)/contacts.xml,$(install_doc_dir)/xsd/$(path)/contacts.xml)
- $(call install-data,$(src_base)/contacts-custom.hxx,$(install_doc_dir)/xsd/$(path)/contacts-custom.hxx)
- $(call install-data,$(src_base)/contacts-custom.cxx,$(install_doc_dir)/xsd/$(path)/contacts-custom.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/contacts.xsd,$(dist_prefix)/$(path)/contacts.xsd)
- $(call install-data,$(src_base)/contacts.xml,$(dist_prefix)/$(path)/contacts.xml)
- $(call install-data,$(src_base)/contacts-custom.hxx,$(dist_prefix)/$(path)/contacts-custom.hxx)
- $(call install-data,$(src_base)/contacts-custom.cxx,$(dist_prefix)/$(path)/contacts-custom.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/double/double-custom.cxx b/examples/cxx/tree/custom/double/double-custom.cxx
deleted file mode 100644
index 6aad908..0000000
--- a/examples/cxx/tree/custom/double/double-custom.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-// file : examples/cxx/tree/custom/double/double-custom.cxx
-// copyright : not copyrighted - public domain
-
-// Include xml-schema.hxx instead of double-custom.hxx here.
-//
-#include "xml-schema.hxx"
-
-#include <limits>
-#include <locale>
-#include <sstream>
-
-#include <xsd/cxx/ro-string.hxx>
-#include <xsd/cxx/zc-istream.hxx>
-
-using namespace std;
-
-// Parsing.
-//
-namespace xsd
-{
- namespace cxx
- {
- namespace tree
- {
- double traits<double, char, schema_type::double_>::
- create (const std::string& s,
- const xercesc::DOMElement*,
- flags,
- type*)
- {
- // This type cannot have whitespaces in its values. As result we
- // don't need to waste time collapsing whitespaces. All we need to
- // do is trim the string representation which can be done without
- // copying.
- //
- ro_string<char> tmp (s);
- trim (tmp);
-
- zc_istream<char> is (tmp);
- is.imbue (locale::classic ());
-
- double t;
- is >> t;
-
- return t;
- }
- }
- }
-}
-
-// Serialization.
-//
-namespace XERCES_CPP_NAMESPACE
-{
- void
- operator<< (xercesc::DOMElement& e, const xml_schema::as_double& d)
- {
- ostringstream os;
- os.imbue (locale::classic ());
-
- os.precision (2);
- os << fixed << d.x;
-
- e << os.str ();
- }
-
- void
- operator<< (xercesc::DOMAttr& a, const xml_schema::as_double& d)
- {
- ostringstream os;
- os.imbue (locale::classic ());
-
- os.precision (2);
- os << fixed << d.x;
-
- a << os.str ();
- }
-}
-
-namespace xsd
-{
- namespace cxx
- {
- namespace tree
- {
- void
- operator<< (xml_schema::list_stream& ls,
- const xml_schema::as_double& d)
- {
- ls.os_.imbue (locale::classic ());
- ls.os_.precision (2);
- ls.os_ << fixed << d.x;
- }
- }
- }
-}
diff --git a/examples/cxx/tree/custom/double/double-custom.hxx b/examples/cxx/tree/custom/double/double-custom.hxx
deleted file mode 100644
index 1516211..0000000
--- a/examples/cxx/tree/custom/double/double-custom.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-// file : examples/cxx/tree/custom/double/double-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use xml-schema.hxx instead. This
-// file is included into generated xml-schema.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-#include <xsd/cxx/xml/string.hxx> // xml::transcode
-#include <xsd/cxx/tree/text.hxx> // text_content
-
-// Parsing.
-//
-namespace xsd
-{
- namespace cxx
- {
- namespace tree
- {
- template<>
- struct traits<double, char, schema_type::double_>
- {
- static double
- create (const xercesc::DOMElement& e, flags f, type* c)
- {
- return create (text_content<char> (e), 0, f, c);
- }
-
- static double
- create (const xercesc::DOMAttr& a, flags f, type* c)
- {
- return create (xml::transcode<char> (a.getValue ()), 0, f, c);
- }
-
- static double
- create (const std::string& s,
- const xercesc::DOMElement*,
- flags,
- type*);
- };
- }
- }
-}
-
-// Serialization.
-//
-namespace XERCES_CPP_NAMESPACE
-{
- void
- operator<< (xercesc::DOMElement& e, const xml_schema::as_double& d);
-
- void
- operator<< (xercesc::DOMAttr& a, const xml_schema::as_double& d);
-}
-
-namespace xsd
-{
- namespace cxx
- {
- namespace tree
- {
- void
- operator<< (xml_schema::list_stream& ls,
- const xml_schema::as_double& d);
- }
- }
-}
diff --git a/examples/cxx/tree/custom/double/driver.cxx b/examples/cxx/tree/custom/double/driver.cxx
deleted file mode 100644
index 8b102a5..0000000
--- a/examples/cxx/tree/custom/double/driver.cxx
+++ /dev/null
@@ -1,31 +0,0 @@
-// file : examples/cxx/tree/custom/double/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <iostream>
-
-#include "order.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main ()
-{
- try
- {
- // Order one Airbus A380.
- //
- order o;
- o.item ().push_back (item ("Airbus A380", 317000000.90));
-
-
- // Serialize.
- //
- order_ (std::cout, o);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/custom/double/makefile b/examples/cxx/tree/custom/double/makefile
deleted file mode 100644
index 7a5e22f..0000000
--- a/examples/cxx/tree/custom/double/makefile
+++ /dev/null
@@ -1,111 +0,0 @@
-# file : examples/cxx/tree/custom/double/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := order.xsd
-cxx := driver.cxx double-custom.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-$(out_base)/xml-schema.hxx: $(out_root)/xsd/xsd
- $(call message,xsd $(src_base)/xml-schema.xsd,\
-$(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
---generate-serialization --custom-type double=double \
---hxx-epilogue '#include "double-custom.hxx"' xml-schema.xsd)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization \
---extern-xml-schema xml-schema.xsd
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/order.xsd,$(install_doc_dir)/xsd/$(path)/order.xsd)
- $(call install-data,$(src_base)/double-custom.hxx,$(install_doc_dir)/xsd/$(path)/double-custom.hxx)
- $(call install-data,$(src_base)/double-custom.cxx,$(install_doc_dir)/xsd/$(path)/double-custom.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/order.xsd,$(dist_prefix)/$(path)/order.xsd)
- $(call install-data,$(src_base)/double-custom.hxx,$(dist_prefix)/$(path)/double-custom.hxx)
- $(call install-data,$(src_base)/double-custom.cxx,$(dist_prefix)/$(path)/double-custom.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
- $(call message,rm $$1,rm -f $$1,$(out_base)/xml-schema.hxx)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver xml-schema.hxx $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/double/order.xsd b/examples/cxx/tree/custom/double/order.xsd
deleted file mode 100644
index 9cf1a1d..0000000
--- a/examples/cxx/tree/custom/double/order.xsd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/double/order.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="item">
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="price" type="xsd:double" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="order">
- <xsd:sequence>
- <xsd:element name="item" type="item" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="order" type="order"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/custom/makefile b/examples/cxx/tree/custom/makefile
deleted file mode 100644
index e2662a4..0000000
--- a/examples/cxx/tree/custom/makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# file : examples/cxx/tree/custom/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-all_examples := comments contacts double mixed taxonomy wildcard calendar
-build_examples := comments contacts double mixed taxonomy wildcard
-
-ifeq ($(xsd_with_boost_date_time),y)
-build_examples += calendar
-endif
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples)))
-
-# Install & Dist.
-#
-$(install) $(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(all_examples)))
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
-
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,custom-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,custom-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,custom-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,custom-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,custom-vc12.sln)
-
-
-# Clean.
-#
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples)))
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile))
-else
-$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile))
-endif
-
diff --git a/examples/cxx/tree/custom/mixed/driver.cxx b/examples/cxx/tree/custom/mixed/driver.cxx
deleted file mode 100644
index 0378f18..0000000
--- a/examples/cxx/tree/custom/mixed/driver.cxx
+++ /dev/null
@@ -1,123 +0,0 @@
-// file : examples/cxx/tree/custom/mixed/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "people.hxx"
-
-// The following transcode() utility function is handy when working with
-// Xerces. Include it after the generated header in order to get only char
-// or wchar_t version depending on how you compiled your schemas.
-//
-#include <xsd/cxx/xml/string.hxx>
-
-using std::cerr;
-using std::endl;
-using namespace xercesc;
-
-
-void
-xhtml2txt (const DOMElement*);
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " people.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // The Xerces-C++ DOM document that will be used to store the XHTML
- // fragments "out-live" the call to the parsing function. Therefore
- // we need to initialize the Xerces-C++ runtime ourselves.
- //
- XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace people;
-
- // Parse.
- //
- std::auto_ptr<directory> d (
- directory_ (argv[1], xml_schema::flags::dont_initialize));
-
- // Print what we've got.
- //
- const directory::person_sequence& s (d->person ());
-
- for (directory::person_const_iterator i (s.begin ()); i != s.end (); ++i)
- {
- cerr << "First : " << i->first_name () << endl
- << "Last : " << i->last_name () << endl
- << "Gender : " << i->gender () << endl
- << "Age : " << i->age () << endl;
-
- const bio& b (i->bio ());
- const DOMElement* xhtml (b.xhtml ());
-
- if (xhtml != 0)
- {
- cerr << "Bio : " << endl;
- xhtml2txt (xhtml);
- }
-
- cerr << endl;
- }
-
- // Serialize.
- //
- xml_schema::namespace_infomap map;
-
- map["ppl"].name = "http://www.codesynthesis.com/people";
- map["ppl"].schema = "people.xsd";
-
- directory_ (
- std::cout, *d, map, "UTF-8", xml_schema::flags::dont_initialize);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
-
- XMLPlatformUtils::Terminate ();
- return r;
-}
-
-// Primitive XHTML to text converter that just prints all the text
-// nodes and ignores everything else.
-//
-void
-xhtml2txt (const DOMElement* e)
-{
- namespace xml = xsd::cxx::xml;
-
- for (const DOMNode* n (e->getFirstChild ());
- n != 0;
- n = n->getNextSibling ())
- {
- switch (n->getNodeType ())
- {
- case DOMNode::TEXT_NODE:
- {
- cerr << xml::transcode<char> (n->getTextContent ());
- break;
- }
- case DOMNode::ELEMENT_NODE:
- {
- xhtml2txt (static_cast<const DOMElement*> (n));
- break;
- }
- default:
- break; // Ignore all other nodes (e.g., comments, etc).
- }
- }
-}
diff --git a/examples/cxx/tree/custom/mixed/makefile b/examples/cxx/tree/custom/mixed/makefile
deleted file mode 100644
index c191271..0000000
--- a/examples/cxx/tree/custom/mixed/makefile
+++ /dev/null
@@ -1,114 +0,0 @@
-# file : examples/cxx/tree/custom/mixed/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := people.xsd
-cxx := driver.cxx people-custom.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-# We have to double-escape '#' because the message function
-# (which is used in command scripts) expands things twice.
-#
-$(gen): xsd_options += \
---generate-inline \
---generate-serialization \
---custom-type bio=/bio_base \
---hxx-epilogue '\#include "people-custom.hxx"'
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(install_doc_dir)/xsd/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(install_doc_dir)/xsd/$(path)/people.xml)
- $(call install-data,$(src_base)/people-custom.hxx,$(install_doc_dir)/xsd/$(path)/people-custom.hxx)
- $(call install-data,$(src_base)/people-custom.cxx,$(install_doc_dir)/xsd/$(path)/people-custom.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml)
- $(call install-data,$(src_base)/people-custom.hxx,$(dist_prefix)/$(path)/people-custom.hxx)
- $(call install-data,$(src_base)/people-custom.cxx,$(dist_prefix)/$(path)/people-custom.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/mixed/people-custom.cxx b/examples/cxx/tree/custom/mixed/people-custom.cxx
deleted file mode 100644
index 7cd1947..0000000
--- a/examples/cxx/tree/custom/mixed/people-custom.cxx
+++ /dev/null
@@ -1,89 +0,0 @@
-// file : examples/cxx/tree/custom/mixed/people-custom.cxx
-// copyright : not copyrighted - public domain
-
-#include <ostream>
-
-// Include people.hxx instead of people-custom.hxx here.
-//
-#include "people.hxx"
-
-namespace people
-{
- using namespace xercesc;
-
- const XMLCh ls[] = {chLatin_L, chLatin_S, chNull};
-
- bio::
- bio ()
- : xhtml_ (0)
- {
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls));
-
- doc_.reset (impl->createDocument ());
- }
-
- bio::
- bio (const DOMElement& e,
- xml_schema::flags f,
- xml_schema::container* c)
- : bio_base (e, f, c), xhtml_ (0)
- {
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls));
-
- doc_.reset (impl->createDocument ());
-
- // Copy the xhtml element. Assume the first child element in
- // e is always xhtml.
- //
- for (DOMNode* n (e.getFirstChild ()); n != 0; n = n->getNextSibling ())
- {
- if (n->getNodeType () == DOMNode::ELEMENT_NODE)
- {
- xhtml_ = static_cast<DOMElement*> (doc_->importNode (n, true));
- break;
- }
- }
- }
-
- bio::
- bio (const bio& d,
- xml_schema::flags f,
- xml_schema::container* c)
- : bio_base (d, f, c), xhtml_ (0)
- {
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls));
-
- doc_.reset (impl->createDocument ());
-
- xhtml_ = static_cast<DOMElement*> (
- doc_->importNode (const_cast<DOMElement*> (d.xhtml_), true));
- }
-
- bio* bio::
- _clone (xml_schema::flags f, xml_schema::container* c) const
- {
- return new bio (*this, f, c);
- }
-
- void
- operator<< (DOMElement& e, const bio& x)
- {
- // Allow our base to serialize first.
- //
- const bio_base& b (x);
- e << b;
-
- // Copy the XHTML fragment if we have one.
- //
- const DOMElement* xhtml (x.xhtml ());
-
- if (xhtml != 0)
- {
- DOMDocument* doc (e.getOwnerDocument ());
- e.appendChild (doc->importNode (const_cast<DOMElement*> (xhtml), true));
- }
- }
-}
diff --git a/examples/cxx/tree/custom/mixed/people-custom.hxx b/examples/cxx/tree/custom/mixed/people-custom.hxx
deleted file mode 100644
index 54dfb21..0000000
--- a/examples/cxx/tree/custom/mixed/people-custom.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-// file : examples/cxx/tree/custom/mixed/people-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use people.hxx instead. This
-// file is included into generated people.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-#include <cassert>
-#include <xercesc/dom/DOM.hpp>
-
-namespace people
-{
- class bio: public bio_base
- {
- // Standard constructors.
- //
- public:
- bio ();
-
- bio (const xercesc::DOMElement&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- bio (const bio&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- virtual bio*
- _clone (xml_schema::flags = 0,
- xml_schema::container* = 0) const;
-
- // XHTML bio as a DOM document.
- //
- public:
- const xercesc::DOMElement*
- xhtml () const
- {
- return xhtml_;
- }
-
- xercesc::DOMElement*
- xhtml ()
- {
- return xhtml_;
- }
-
- // The element should belong to the DOMDocument returned by
- // the dom_document() functions.
- //
- void
- xhtml (xercesc::DOMElement* e)
- {
- assert (e->getOwnerDocument () == doc_.get ());
-
- if (xhtml_ != 0)
- xhtml_->release ();
-
- xhtml_ = e;
- }
-
- const xercesc::DOMDocument&
- dom_document () const
- {
- return *doc_;
- }
-
- xercesc::DOMDocument&
- dom_document ()
- {
- return *doc_;
- }
-
- private:
- xercesc::DOMElement* xhtml_;
- xml_schema::dom::auto_ptr<xercesc::DOMDocument> doc_;
- };
-
- // Serialization operator.
- //
- void
- operator<< (xercesc::DOMElement&, const bio&);
-}
diff --git a/examples/cxx/tree/custom/mixed/people.xml b/examples/cxx/tree/custom/mixed/people.xml
deleted file mode 100644
index 47e68b9..0000000
--- a/examples/cxx/tree/custom/mixed/people.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/mixed/people.xml
-copyright : not copyrighted - public domain
-
--->
-
-<ppl:directory xmlns:ppl="http://www.codesynthesis.com/people"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
-
- <person>
- <first-name>John</first-name>
- <last-name>Doe</last-name>
- <gender>male</gender>
- <age>32</age>
- <bio>
- <xhtml xmlns="http://www.w3.org/1999/xhtml">
- <p>Married to Jane Doe.</p>
- </xhtml>
- </bio>
- </person>
-
- <person>
- <first-name>Jane</first-name>
- <last-name>Doe</last-name>
- <gender>female</gender>
- <age>28</age>
- <bio>
- <xhtml xmlns="http://www.w3.org/1999/xhtml">
- <p>Married to John Doe.</p>
- </xhtml>
- </bio>
- </person>
-
-</ppl:directory>
diff --git a/examples/cxx/tree/custom/mixed/people.xsd b/examples/cxx/tree/custom/mixed/people.xsd
deleted file mode 100644
index 03e6c97..0000000
--- a/examples/cxx/tree/custom/mixed/people.xsd
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/mixed/people.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:ppl="http://www.codesynthesis.com/people"
- targetNamespace="http://www.codesynthesis.com/people">
-
- <xsd:simpleType name="gender">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="male"/>
- <xsd:enumeration value="female"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="bio" mixed="true">
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="first-name" type="xsd:string"/>
- <xsd:element name="last-name" type="xsd:string"/>
- <xsd:element name="gender" type="ppl:gender"/>
- <xsd:element name="age" type="xsd:unsignedShort"/>
- <xsd:element name="bio" type="ppl:bio"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="directory">
- <xsd:sequence>
- <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="directory" type="ppl:directory"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/custom/taxonomy/driver.cxx b/examples/cxx/tree/custom/taxonomy/driver.cxx
deleted file mode 100644
index ec562f6..0000000
--- a/examples/cxx/tree/custom/taxonomy/driver.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-// file : examples/cxx/tree/custom/taxonomy/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "people.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " people.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace people;
-
- std::auto_ptr<catalog> c (catalog_ (argv[1]));
-
- for (catalog::person_const_iterator i (c->person ().begin ());
- i != c->person ().end (); ++i)
- {
- i->print (cerr);
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/custom/taxonomy/makefile b/examples/cxx/tree/custom/taxonomy/makefile
deleted file mode 100644
index bc041af..0000000
--- a/examples/cxx/tree/custom/taxonomy/makefile
+++ /dev/null
@@ -1,121 +0,0 @@
-# file : examples/cxx/tree/custom/taxonomy/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := people.xsd
-cxx := driver.cxx people-custom.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=-fwd.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-# We have to double-escape '#' because the message function
-# (which is used in command scripts) expands things twice.
-#
-$(gen): xsd_options += \
---generate-inline \
---generate-forward \
---generate-polymorphic \
---polymorphic-type person \
---custom-type "person=person_impl<person_base>/person_base" \
---custom-type "superman=superman_impl<superman_base>/superman_base" \
---custom-type "batman=batman_impl<batman_base>/batman_base" \
---fwd-prologue '\#include "people-custom-fwd.hxx"' \
---hxx-prologue '\#include "people-custom.hxx"'
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(install_doc_dir)/xsd/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(install_doc_dir)/xsd/$(path)/people.xml)
- $(call install-data,$(src_base)/people-custom.hxx,$(install_doc_dir)/xsd/$(path)/people-custom.hxx)
- $(call install-data,$(src_base)/people-custom.cxx,$(install_doc_dir)/xsd/$(path)/people-custom.cxx)
- $(call install-data,$(src_base)/people-custom-fwd.hxx,$(install_doc_dir)/xsd/$(path)/people-custom-fwd.hxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml)
- $(call install-data,$(src_base)/people-custom.hxx,$(dist_prefix)/$(path)/people-custom.hxx)
- $(call install-data,$(src_base)/people-custom.cxx,$(dist_prefix)/$(path)/people-custom.cxx)
- $(call install-data,$(src_base)/people-custom-fwd.hxx,$(dist_prefix)/$(path)/people-custom-fwd.hxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx b/examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx
deleted file mode 100644
index 2c26bf5..0000000
--- a/examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use people-fwd.hxx instead. This
-// file is included into generated people-fwd.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-namespace people
-{
- template <typename base>
- class person_impl;
-
- template <typename base>
- class superman_impl;
-
- template <typename base>
- class batman_impl;
-}
diff --git a/examples/cxx/tree/custom/taxonomy/people-custom.cxx b/examples/cxx/tree/custom/taxonomy/people-custom.cxx
deleted file mode 100644
index a06a6ea..0000000
--- a/examples/cxx/tree/custom/taxonomy/people-custom.cxx
+++ /dev/null
@@ -1,156 +0,0 @@
-// file : examples/cxx/tree/custom/taxonomy/people-custom.cxx
-// copyright : not copyrighted - public domain
-
-#include <ostream>
-
-// Include people.hxx instead of people-custom.hxx here.
-//
-#include "people.hxx"
-
-namespace people
-{
- // person_impl
- //
- template <typename base>
- person_impl<base>::
- person_impl (const xml_schema::string& name)
- : base (name)
- {
- }
-
- template <typename base>
- person_impl<base>::
- person_impl (const xercesc::DOMElement& e,
- xml_schema::flags f,
- xml_schema::container* c)
- : base (e, f, c)
- {
- }
-
- template <typename base>
- person_impl<base>::
- person_impl (const person_impl& p,
- xml_schema::flags f,
- xml_schema::container* c)
- : base (p, f, c)
- {
- }
-
- template <typename base>
- person_impl<base>* person_impl<base>::
- _clone (xml_schema::flags f, xml_schema::container* c) const
- {
- return new person_impl (*this, f, c);
- }
-
- template <typename base>
- void person_impl<base>::
- print (std::ostream& os) const
- {
- os << this->name () << std::endl;
- }
-
- // Explicitly instantiate person_impl class template for person_base.
- //
- template class person_impl<person_base>;
-
-
- // superman_impl
- //
- template <typename base>
- superman_impl<base>::
- superman_impl (const xml_schema::string& name, bool can_fly)
- : base (name, can_fly)
- {
- }
-
- template <typename base>
- superman_impl<base>::
- superman_impl (const xercesc::DOMElement& e,
- xml_schema::flags f,
- xml_schema::container* c)
- : base (e, f, c)
- {
- }
-
- template <typename base>
- superman_impl<base>::
- superman_impl (const superman_impl& s,
- xml_schema::flags f,
- xml_schema::container* c)
- : base (s, f, c)
- {
- }
-
- template <typename base>
- superman_impl<base>* superman_impl<base>::
- _clone (xml_schema::flags f, xml_schema::container* c) const
- {
- return new superman_impl (*this, f, c);
- }
-
- template <typename base>
- void superman_impl<base>::
- print (std::ostream& os) const
- {
- if (this->can_fly ())
- os << "Flying superman ";
- else
- os << "Superman ";
-
- os << this->name () << std::endl;
- }
-
- // Explicitly instantiate superman_impl class template for superman_base.
- //
- template class superman_impl<superman_base>;
-
-
- // batman_impl
- //
- template <typename base>
- batman_impl<base>::
- batman_impl (const xml_schema::string& name,
- bool can_fly,
- unsigned int wing_span)
- : base (name, can_fly, wing_span)
- {
- }
-
- template <typename base>
- batman_impl<base>::
- batman_impl (const xercesc::DOMElement& e,
- xml_schema::flags f,
- xml_schema::container* c)
- : base (e, f, c)
- {
- }
-
- template <typename base>
- batman_impl<base>::
- batman_impl (const batman_impl& s,
- xml_schema::flags f,
- xml_schema::container* c)
- : base (s, f, c)
- {
- }
-
- template <typename base>
- batman_impl<base>* batman_impl<base>::
- _clone (xml_schema::flags f, xml_schema::container* c) const
- {
- return new batman_impl (*this, f, c);
- }
-
- template <typename base>
- void batman_impl<base>::
- print (std::ostream& os) const
- {
- os << "Batman " << this->name () << " with " <<
- this->wing_span () << "m wing span" << std::endl;
- }
-
- // Explicitly instantiate batman_impl class template for batman_base.
- //
- template class batman_impl<batman_base>;
-}
diff --git a/examples/cxx/tree/custom/taxonomy/people-custom.hxx b/examples/cxx/tree/custom/taxonomy/people-custom.hxx
deleted file mode 100644
index a60edc8..0000000
--- a/examples/cxx/tree/custom/taxonomy/people-custom.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-// file : examples/cxx/tree/custom/taxonomy/people-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use people.hxx instead. This
-// file is included into generated people.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-#include <iosfwd> // std::ostream
-
-// Include people-fwd.hxx here so that we can refer to the generated
-// types.
-//
-#include "people-fwd.hxx"
-
-namespace people
-{
- //
- //
- template <typename base>
- class person_impl: public base
- {
- public:
- person_impl (const xml_schema::string& name);
-
- person_impl (const xercesc::DOMElement&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- person_impl (const person_impl&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- virtual person_impl*
- _clone (xml_schema::flags = 0,
- xml_schema::container* = 0) const;
-
- public:
- virtual void
- print (std::ostream&) const;
- };
-
-
- //
- //
- template <typename base>
- class superman_impl: public base
- {
- public:
- superman_impl (const xml_schema::string& name, bool can_fly);
-
- superman_impl (const xercesc::DOMElement&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- superman_impl (const superman_impl&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- virtual superman_impl*
- _clone (xml_schema::flags = 0,
- xml_schema::container* = 0) const;
-
- public:
- virtual void
- print (std::ostream&) const;
- };
-
-
- //
- //
- template <typename base>
- class batman_impl: public base
- {
- public:
- batman_impl (const xml_schema::string& name,
- bool can_fly,
- unsigned int wing_span);
-
- batman_impl (const xercesc::DOMElement&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- batman_impl (const batman_impl&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- virtual batman_impl*
- _clone (xml_schema::flags = 0,
- xml_schema::container* = 0) const;
-
- public:
- virtual void
- print (std::ostream&) const;
- };
-}
diff --git a/examples/cxx/tree/custom/taxonomy/people.xml b/examples/cxx/tree/custom/taxonomy/people.xml
deleted file mode 100644
index b53b576..0000000
--- a/examples/cxx/tree/custom/taxonomy/people.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/taxonomy/people.xml
-copyright : not copyrighted - public domain
-
--->
-
-<ppl:catalog xmlns:ppl="http://www.codesynthesis.com/people"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
-
- <person>
- <name>Joe Dirt</name>
- </person>
-
- <person xsi:type="ppl:superman" can-fly="false">
- <name>James "007" Bond</name>
- </person>
-
- <person xsi:type="ppl:batman" can-fly="true" wing-span="10">
- <name>Bruce Wayne</name>
- </person>
-
-</ppl:catalog>
diff --git a/examples/cxx/tree/custom/taxonomy/people.xsd b/examples/cxx/tree/custom/taxonomy/people.xsd
deleted file mode 100644
index 1181270..0000000
--- a/examples/cxx/tree/custom/taxonomy/people.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/taxonomy/people.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:ppl="http://www.codesynthesis.com/people"
- targetNamespace="http://www.codesynthesis.com/people">
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="superman">
- <xsd:complexContent>
- <xsd:extension base="ppl:person">
- <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="batman">
- <xsd:complexContent>
- <xsd:extension base="ppl:superman">
- <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="ppl:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/custom/wildcard/driver.cxx b/examples/cxx/tree/custom/wildcard/driver.cxx
deleted file mode 100644
index d29f125..0000000
--- a/examples/cxx/tree/custom/wildcard/driver.cxx
+++ /dev/null
@@ -1,47 +0,0 @@
-// file : examples/cxx/tree/custom/wildcard/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "wildcard.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " wildcard.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace wildcard;
-
- // Parse.
- //
- std::auto_ptr<data> d (data_ (argv[1]));
-
- // Print.
- //
- cerr << *d << endl;
-
- // Serialize.
- //
- xml_schema::namespace_infomap map;
-
- map["wc"].name = "http://www.codesynthesis.com/wildcard";
- map["wc"].schema = "wildcard.xsd";
-
- data_ (std::cout, *d, map);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/custom/wildcard/makefile b/examples/cxx/tree/custom/wildcard/makefile
deleted file mode 100644
index ed8801c..0000000
--- a/examples/cxx/tree/custom/wildcard/makefile
+++ /dev/null
@@ -1,115 +0,0 @@
-# file : examples/cxx/tree/custom/wildcard/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := wildcard.xsd
-cxx := driver.cxx wildcard-custom.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-# We have to double-escape '#' because the message function
-# (which is used in command scripts) expands things twice.
-#
-$(gen): xsd_options += \
---generate-inline \
---generate-ostream \
---generate-serialization \
---custom-type data=/data_base \
---hxx-epilogue '\#include "wildcard-custom.hxx"'
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/wildcard.xsd,$(install_doc_dir)/xsd/$(path)/wildcard.xsd)
- $(call install-data,$(src_base)/wildcard.xml,$(install_doc_dir)/xsd/$(path)/wildcard.xml)
- $(call install-data,$(src_base)/wildcard-custom.hxx,$(install_doc_dir)/xsd/$(path)/wildcard-custom.hxx)
- $(call install-data,$(src_base)/wildcard-custom.cxx,$(install_doc_dir)/xsd/$(path)/wildcard-custom.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/wildcard.xsd,$(dist_prefix)/$(path)/wildcard.xsd)
- $(call install-data,$(src_base)/wildcard.xml,$(dist_prefix)/$(path)/wildcard.xml)
- $(call install-data,$(src_base)/wildcard-custom.hxx,$(dist_prefix)/$(path)/wildcard-custom.hxx)
- $(call install-data,$(src_base)/wildcard-custom.cxx,$(dist_prefix)/$(path)/wildcard-custom.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx b/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx
deleted file mode 100644
index 006f93a..0000000
--- a/examples/cxx/tree/custom/wildcard/wildcard-custom.cxx
+++ /dev/null
@@ -1,84 +0,0 @@
-// file : examples/cxx/tree/custom/wildcard/wildcard-custom.cxx
-// copyright : not copyrighted - public domain
-
-#include <ostream>
-
-// Include wildcard.hxx instead of wildcard-custom.hxx here.
-//
-#include "wildcard.hxx"
-
-namespace wildcard
-{
- data::
- data (const xml_schema::string& d)
- : data_base (d), scope_present_ (false)
- {
- }
-
- data::
- data (const xercesc::DOMElement& e,
- xml_schema::flags f,
- xml_schema::container* c)
- : data_base (e, f, c), scope_present_ (false)
- {
- // Check if we've got the scope attribute.
- //
- namespace xml = xsd::cxx::xml;
- xml::string name ("scope");
-
- if (e.hasAttribute (name.c_str ()))
- {
- scope (xml::transcode<char> (e.getAttribute (name.c_str ())));
- }
- }
-
- data::
- data (const data& d,
- xml_schema::flags f,
- xml_schema::container* c)
- : data_base (d, f, c),
- scope_present_ (d.scope_present_),
- scope_ (d.scope_)
- {
- }
-
- data* data::
- _clone (xml_schema::flags f, xml_schema::container* c) const
- {
- return new data (*this, f, c);
- }
-
- void
- operator<< (xercesc::DOMElement& e, const data& x)
- {
- // Use our base to serialize data and id.
- //
- const data_base& b (x);
- e << b;
-
- // Add the scope attribute if present.
- //
- if (x.scope_present ())
- {
- namespace xml = xsd::cxx::xml;
- xml::string name ("scope");
- xml::string value (x.scope ());
-
- e.setAttribute (name.c_str (), value.c_str ());
- }
- }
-
- std::ostream&
- operator<< (std::ostream& os, const data& x)
- {
- // Use our base to print date and id.
- //
- const data_base& b (x);
- os << b;
-
- if (x.scope_present ())
- os << std::endl << "scope: " << x.scope ();
-
- return os;
- }
-}
diff --git a/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx b/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
deleted file mode 100644
index 0546d38..0000000
--- a/examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-// file : examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
-// copyright : not copyrighted - public domain
-
-// Do not include this file directly, use wildcard.hxx instead. This
-// file is included into generated wildcard.hxx so we do not need to
-// guard against multiple inclusions.
-//
-
-namespace wildcard
-{
- class data: public data_base
- {
- // Standard constructors.
- //
- public:
- data (const xml_schema::string&);
-
- data (const xercesc::DOMElement&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- data (const data&,
- xml_schema::flags = 0,
- xml_schema::container* = 0);
-
- virtual data*
- _clone (xml_schema::flags = 0,
- xml_schema::container* = 0) const;
-
- // Our customizations.
- //
- public:
- bool
- scope_present () const
- {
- return scope_present_;
- }
-
- const xml_schema::string&
- scope () const
- {
- return scope_;
- }
-
- void
- scope (const xml_schema::string& s)
- {
- scope_present_ = true;
- scope_ = s;
- }
-
- private:
- bool scope_present_;
- xml_schema::string scope_;
- };
-
- // Serialization operator.
- //
- void
- operator<< (xercesc::DOMElement&, const data&);
-
- // std::ostream insertion operator.
- //
- std::ostream&
- operator<< (std::ostream&, const data&);
-}
diff --git a/examples/cxx/tree/custom/wildcard/wildcard.xml b/examples/cxx/tree/custom/wildcard/wildcard.xml
deleted file mode 100644
index 80f215a..0000000
--- a/examples/cxx/tree/custom/wildcard/wildcard.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/wildcard/wildcard.xml
-copyright : not copyrighted - public domain
-
--->
-
-<wc:data xmlns:wc="http://www.codesynthesis.com/wildcard"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/wildcard wildcard.xsd"
- id="1"
- scope="global">abc123</wc:data>
diff --git a/examples/cxx/tree/custom/wildcard/wildcard.xsd b/examples/cxx/tree/custom/wildcard/wildcard.xsd
deleted file mode 100644
index 1a32b1e..0000000
--- a/examples/cxx/tree/custom/wildcard/wildcard.xsd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/custom/wildcard/wildcard.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:wc="http://www.codesynthesis.com/wildcard"
- targetNamespace="http://www.codesynthesis.com/wildcard">
-
- <xsd:complexType name="data">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="id" type="xsd:unsignedInt"/>
- <xsd:anyAttribute namespace="##any" processContents="skip"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:element name="data" type="wc:data"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/embedded/driver.cxx b/examples/cxx/tree/embedded/driver.cxx
deleted file mode 100644
index 5ceafa4..0000000
--- a/examples/cxx/tree/embedded/driver.cxx
+++ /dev/null
@@ -1,183 +0,0 @@
-// file : examples/cxx/tree/embedded/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
-#include <xercesc/util/PlatformUtils.hpp>
-#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
-
-#include <xsd/cxx/xml/string.hxx>
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "library.hxx"
-#include "library-schema.hxx"
-#include "grammar-input-stream.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we
- // are doing the XML-to-DOM parsing ourselves.
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace xercesc;
- namespace xml = xsd::cxx::xml;
- namespace tree = xsd::cxx::tree;
-
- // Create and load the grammar pool.
- //
- MemoryManager* mm (XMLPlatformUtils::fgMemoryManager);
-
- auto_ptr<XMLGrammarPool> gp (new XMLGrammarPoolImpl (mm));
-
- try
- {
- grammar_input_stream is (library_schema, sizeof (library_schema));
- gp->deserializeGrammars(&is);
- }
- catch(const XSerializationException& e)
- {
- cerr << "unable to load schema: " <<
- xml::transcode<char> (e.getMessage ()) << endl;
- return 1;
- }
-
- // Lock the grammar pool. This is necessary if we plan to use the
- // same grammar pool in multiple threads (this way we can reuse the
- // same grammar in multiple parsers). Locking the pool disallows any
- // modifications to the pool, such as an attempt by one of the threads
- // to cache additional schemas.
- //
- gp->lockPool ();
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- xml::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (
- DOMImplementationLS::MODE_SYNCHRONOUS, 0, mm, gp.get ()));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, true);
- conf->setParameter (XMLUni::fgXercesSchema, true);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // Use the loaded grammar during parsing.
- //
- conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
-
- // Disable loading schemas via other means (e.g., schemaLocation).
- //
- conf->setParameter (XMLUni::fgXercesLoadSchema, false);
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Parse XML documents.
- //
- for (unsigned long i (0); i < 10; ++i)
- {
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- // Wrap the standard input stream.
- //
- xml::sax::std_input_source isrc (ifs, argv[1]);
- Wrapper4InputSource wrap (&isrc, false);
-
- // Parse XML to DOM.
- //
- xml_schema::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<xml_schema::parsing> ();
-
- // Parse DOM to the object model.
- //
- auto_ptr<library::catalog> c (library::catalog_ (*doc));
-
- cerr << "catalog with " << c->book ().size () << " books" << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/embedded/grammar-input-stream.cxx b/examples/cxx/tree/embedded/grammar-input-stream.cxx
deleted file mode 100644
index f3a6d52..0000000
--- a/examples/cxx/tree/embedded/grammar-input-stream.cxx
+++ /dev/null
@@ -1,95 +0,0 @@
-// file : examples/cxx/tree/embedded/grammar-input-stream.cxx
-// copyright : not copyrighted - public domain
-
-#include <cassert>
-#include "grammar-input-stream.hxx"
-
-grammar_input_stream::
-grammar_input_stream (const XMLByte* data, std::size_t size)
- : data_ (data),
- size_ (size),
- pos_ (0),
- vpos_ (0),
- cseq_ (0),
- add_zero_ (false)
-{
-}
-
-XMLFilePos grammar_input_stream::
-curPos () const
-{
- return static_cast<XMLFilePos> (vpos_);
-}
-
-XMLSize_t grammar_input_stream::
-readBytes (XMLByte* const buf, const XMLSize_t size)
-{
- std::size_t i (0);
-
- // Add a zero from the alternating sequence if it didn't
- // fit on the previous read.
- //
- if (add_zero_)
- {
- buf[i++] = 0;
- add_zero_ = false;
- }
-
- // If have an unfinished sequential sequence, output it now.
- //
- if (cseq_ != 0 && !alt_)
- {
- for (; cseq_ != 0 && i < size; --cseq_)
- buf[i++] = 0;
- }
-
- for (; i < size && pos_ < size_;)
- {
- XMLByte b = buf[i++] = data_[pos_++];
-
- // See if we are in a compression sequence.
- //
- if (cseq_ != 0)
- {
- if (i < size)
- buf[i++] = 0;
- else
- add_zero_ = true; // Add it on the next read.
-
- cseq_--;
- continue;
- }
-
- // If we are not in a compression sequence and this byte is
- // not zero then we are done.
- //
- if (b != 0)
- continue;
-
- // We have a zero.
- //
- assert (pos_ < size_); // There has to be another byte.
- unsigned char v (static_cast<unsigned char> (data_[pos_++]));
- alt_ = (v & 128) != 0;
- cseq_ = v & 127;
-
- // If it is a sequential sequence, output as many zeros as
- // we can.
- //
- if (!alt_)
- {
- for (; cseq_ != 0 && i < size; --cseq_)
- buf[i++] = 0;
- }
- }
-
- vpos_ += i;
-
- return static_cast<XMLSize_t> (i);
-}
-
-const XMLCh* grammar_input_stream::
-getContentType () const
-{
- return 0;
-}
diff --git a/examples/cxx/tree/embedded/grammar-input-stream.hxx b/examples/cxx/tree/embedded/grammar-input-stream.hxx
deleted file mode 100644
index ed12b7c..0000000
--- a/examples/cxx/tree/embedded/grammar-input-stream.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-// file : examples/cxx/tree/embedded/grammar-input-stream.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef GRAMMAR_INPUT_STREAM_HXX
-#define GRAMMAR_INPUT_STREAM_HXX
-
-#include <cstddef>
-#include <xercesc/util/BinInputStream.hpp>
-
-// Memory buffer input stream with the special-purpose schema
-// grammar decompression.
-//
-class grammar_input_stream: public xercesc::BinInputStream
-{
-public :
- grammar_input_stream (const XMLByte* data, std::size_t size);
-
- virtual XMLFilePos
- curPos () const;
-
- virtual XMLSize_t
- readBytes (XMLByte* const buf, const XMLSize_t size);
-
- virtual const XMLCh*
- getContentType () const;
-
-private :
- const XMLByte* data_;
- std::size_t size_;
- std::size_t pos_;
- std::size_t vpos_;
-
- // Compression data.
- //
- size_t cseq_; // Number of bytes left in a compression sequence.
- bool alt_; // Alternating or sequential sequence.
- bool add_zero_; // Add a zero on the next read.
-};
-
-#endif // GRAMMAR_INPUT_STREAM_HXX
diff --git a/examples/cxx/tree/embedded/library.xml b/examples/cxx/tree/embedded/library.xml
deleted file mode 100644
index f57c042..0000000
--- a/examples/cxx/tree/embedded/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/embedded/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/embedded/library.xsd b/examples/cxx/tree/embedded/library.xsd
deleted file mode 100644
index 6a9ad01..0000000
--- a/examples/cxx/tree/embedded/library.xsd
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/embedded/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/embedded/makefile b/examples/cxx/tree/embedded/makefile
deleted file mode 100644
index 1b68643..0000000
--- a/examples/cxx/tree/embedded/makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-# file : examples/cxx/tree/embedded/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx grammar-input-stream.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o) \
-$(xsd:.xsd=-schema.o))
-obj2 := $(out_base)/xsdbin.o
-dep := $(obj:.o=.o.d) $(obj2:.o=.o.d)
-
-driver := $(out_base)/driver
-xsdbin := $(out_base)/xsdbin
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-$(xsdbin): $(obj2) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(obj2) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-genf += $(xsd:.xsd=-schema.hxx) $(xsd:.xsd=-schema.cxx)
-
-.PRECIOUS: $(out_base)/%-schema.hxx $(out_base)/%-schema.cxx
-$(out_base)/%: xsdbin := $(xsdbin)
-$(out_base)/%-schema.hxx $(out_base)/%-schema.cxx: $(src_base)/%.xsd $(xsdbin)
- $(call message,xsdbin $<,$(xsdbin) --output-dir $(out_base) $<)
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/xsdbin.cxx,$(install_doc_dir)/xsd/$(path)/xsdbin.cxx)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/grammar-input-stream.hxx,$(install_doc_dir)/xsd/$(path)/grammar-input-stream.hxx)
- $(call install-data,$(src_base)/grammar-input-stream.cxx,$(install_doc_dir)/xsd/$(path)/grammar-input-stream.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/xsdbin.cxx,$(dist_prefix)/$(path)/xsdbin.cxx)
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/grammar-input-stream.hxx,$(dist_prefix)/$(path)/grammar-input-stream.hxx)
- $(call install-data,$(src_base)/grammar-input-stream.cxx,$(dist_prefix)/$(path)/grammar-input-stream.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- # Note: solution files are not automatically generated.
-
-# Clean.
-#
-$(clean): files := $(out_base)/$(xsd:.xsd=-schema.?xx)
-$(clean): $(driver).o.clean $(xsdbin).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(obj2)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
- $(call message,rm '$(out_base)/*-schema.?xx',rm -f $(files))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver xsdbin $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/embedded/xsdbin.cxx b/examples/cxx/tree/embedded/xsdbin.cxx
deleted file mode 100644
index c28590f..0000000
--- a/examples/cxx/tree/embedded/xsdbin.cxx
+++ /dev/null
@@ -1,494 +0,0 @@
-// file : examples/cxx/tree/embedded/xsdbin.cxx
-// copyright : not copyrighted - public domain
-
-// This program loads the XML Schema file(s) and converts them to
-// the Xerces-C++ binary schema format which can then be embedded
-// into C++ programs and used to validate XML documents. The output
-// is written as a C++ source file containing the array with the
-// binary data.
-//
-
-#include <string>
-#include <memory> // std::auto_ptr
-#include <cstddef> // std::size_t
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/util/XMLUni.hpp>
-#include <xercesc/util/XMLString.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-#include <xercesc/util/XercesVersion.hpp>
-
-#include <xercesc/internal/BinMemOutputStream.hpp>
-#include <xercesc/validators/common/Grammar.hpp>
-
-#include <xercesc/sax/ErrorHandler.hpp>
-#include <xercesc/sax/SAXParseException.hpp>
-#include <xercesc/sax2/SAX2XMLReader.hpp>
-#include <xercesc/sax2/XMLReaderFactory.hpp>
-
-#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
-
-using namespace std;
-using namespace xercesc;
-
-class error_handler: public ErrorHandler
-{
-public:
- error_handler ()
- : failed_ (false)
- {
- }
-
- bool
- failed () const
- {
- return failed_;
- }
-
- enum severity {s_warning, s_error, s_fatal};
-
- virtual void
- warning (const SAXParseException&);
-
- virtual void
- error (const SAXParseException&);
-
- virtual void
- fatalError (const SAXParseException&);
-
- virtual void
- resetErrors ()
- {
- failed_ = false;
- }
-
- void
- handle (const SAXParseException&, severity);
-
-private:
- bool failed_;
-};
-
-void
-cxx_escape (string&);
-
-int
-main (int argc, char* argv[])
-{
- const char* hxx_suffix = "-schema.hxx";
- const char* cxx_suffix = "-schema.cxx";
-
- string name;
- string base;
- string outdir;
-
- struct usage
- {
- usage (bool e = true): error (e) {}
- bool error;
- };
-
- int argi (1);
- bool multi_import (true);
- bool verbose (false);
-
- try
- {
- for (; argi < argc; ++argi)
- {
- string a (argv[argi]);
-
- if (a == "--help")
- throw usage (false);
- else if (a == "--verbose")
- {
- verbose = true;
- }
- else if (a == "--hxx-suffix")
- {
- if (++argi >= argc)
- throw usage ();
-
- hxx_suffix = argv[argi];
- }
- else if (a == "--cxx-suffix")
- {
- if (++argi >= argc)
- throw usage ();
-
- cxx_suffix = argv[argi];
- }
- else if (a == "--output-dir")
- {
- if (++argi >= argc)
- throw usage ();
-
- outdir = argv[argi];
- }
- else if (a == "--array-name")
- {
- if (++argi >= argc)
- throw usage ();
-
- name = argv[argi];
- }
- else if (a == "--disable-multi-import")
- {
- multi_import = false;
- }
- else
- break;
- }
-
- if (argi >= argc)
- {
- cerr << "no input file specified" << endl;
- throw usage ();
- }
-
- base = argv[argi];
- }
- catch (usage const& e)
- {
- ostream& o (e.error ? cerr : cout);
-
- o << "Usage: " << argv[0] << " [options] <files>" << endl
- << "Options:" << endl
- << " --help Print usage information and exit." << endl
- << " --verbose Print progress information." << endl
- << " --output-dir <dir> Write generated files to <dir>." << endl
- << " --hxx-suffix <sfx> Header file suffix instead of '-schema.hxx'." << endl
- << " --cxx-suffix <sfx> Source file suffix instead of '-schema.cxx'." << endl
- << " --array-name <name> Binary data array name." << endl
- << " --disable-multi-import Disable multiple import support." << endl
- << endl;
-
- return e.error ? 0 : 1;
- }
-
- XMLPlatformUtils::Initialize ();
-
- {
- MemoryManager* mm (XMLPlatformUtils::fgMemoryManager);
-
- auto_ptr<XMLGrammarPool> gp (new XMLGrammarPoolImpl (mm));
-
- // Load the schemas into grammar pool.
- //
- {
- auto_ptr<SAX2XMLReader> parser (
- XMLReaderFactory::createXMLReader (mm, gp.get ()));
-
- parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
- parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
- parser->setFeature (XMLUni::fgSAX2CoreValidation, true);
- parser->setFeature (XMLUni::fgXercesSchema, true);
- parser->setFeature (XMLUni::fgXercesSchemaFullChecking, true);
- parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- parser->setFeature (XMLUni::fgXercesHandleMultipleImports, multi_import);
-#endif
-
- error_handler eh;
- parser->setErrorHandler (&eh);
-
- for (; argi < argc; ++argi)
- {
- if (verbose)
- cerr << "loading " << argv[argi] << endl;
-
- if (!parser->loadGrammar (argv[argi], Grammar::SchemaGrammarType, true))
- {
- cerr << argv[argi] << ": error: unable to load" << endl;
- return 1;
- }
-
- if (eh.failed ())
- return 1;
- }
- }
-
- // Get the binary representation.
- //
- BinMemOutputStream data;
-
- try
- {
- gp->serializeGrammars (&data);
- }
- catch (const XSerializationException& e)
- {
- char* msg (XMLString::transcode (e.getMessage ()));
- cerr << "error: " << msg << endl;
- XMLString::release (&msg);
- return 1;
- }
-
- size_t n (static_cast<size_t> (data.curPos ()));
- const unsigned char* buf (
- static_cast<const unsigned char*> (data.getRawBuffer ()));
-
- if (verbose)
- cerr << "uncomressed data size " << n << " bytes" << endl;
-
- // Compress zeros.
- //
- size_t cn (0);
- unsigned char* cbuf = new unsigned char[n];
-
- size_t cseq (0); // Number of bytes left in a compression sequence.
- bool alt (false); // Alternating or sequential sequence.
-
- for (size_t i (0); i < n;)
- {
- unsigned char v (buf[i++]);
-
- // See if we are in a compression sequence.
- //
- if (cseq != 0)
- {
- // See if this byte needs to be copied.
- //
- if (alt && cseq % 2 == 0)
- cbuf[cn++] = v;
-
- cseq--;
- continue;
- }
-
- // If we are not in a compression sequence and this byte is
- // not zero then simply copy it.
- //
- if (v != 0)
- {
- cbuf[cn++] = v;
- continue;
- }
-
- // We have a zero.
- //
- cbuf[cn++] = 0;
-
- // See if we can start a new compression sequence.
- //
- if (i < n)
- {
- if (buf[i] == 0)
- {
- // Sequential sequence. See how far it runs.
- //
- alt = false;
-
- for (cseq = 1; cseq < 127 && cseq + i < n; cseq++)
- if (buf[cseq + i] != 0)
- break;
- }
- else if (i + 1 < n && buf[i + 1] == 0)
- {
- // Alternating sequence. See how far it runs.
- //
- alt = true;
-
- for (cseq = 1; cseq < 127 && cseq * 2 + i + 1 < n; cseq++)
- {
- if (buf[cseq * 2 + i + 1] != 0)
- break;
-
- // For longer sequences prefer sequential to alternating.
- //
- if (cseq > 2 &&
- buf[cseq * 2 + i] == 0 &&
- buf[(cseq - 1) * 2 + i] == 0 &&
- buf[(cseq - 2) * 2 + i] == 0)
- {
- cseq -= 2;
- break;
- }
- }
-
- cseq *= 2;
- }
- }
-
- if (cseq != 0)
- {
- cbuf[cn++] = static_cast<unsigned char> (
- alt ? (128 | cseq / 2) : cseq);
- }
- else
- cbuf[cn++] = 0;
- }
-
- if (verbose)
- cerr << "comressed data size " << cn << " bytes" << endl;
-
- buf = cbuf;
- n = cn;
-
- // Figure out the file names.
- //
- string::size_type p (base.rfind ('/')), p1 (base.rfind ('\\'));
-
- if (p1 != string::npos && (p == string::npos || p1 > p))
- p = p1;
-
- if (p != string::npos)
- base = string (base, p + 1);
-
- p = base.rfind ('.');
-
- if (p != string::npos)
- base.resize (p);
-
- string hxx (base + hxx_suffix);
- string cxx (base + cxx_suffix);
-
- if (!outdir.empty ())
- {
-#if defined (WIN32) || defined (__WIN32__)
- hxx = outdir + '\\' + hxx;
- cxx = outdir + '\\' + cxx;
-#else
- hxx = outdir + '/' + hxx;
- cxx = outdir + '/' + cxx;
-#endif
- }
-
- if (name.empty ())
- {
- name = base + "_schema";
- cxx_escape (name);
- }
-
- // Write header.
- //
- {
- ofstream os (hxx.c_str ());
-
- if (!os.is_open ())
- {
- cerr << hxx << ": error: unable to open" << endl;
- return 1;
- }
-
- os << "// Automatically generated. Do not edit." << endl
- << "//" << endl
- << endl
- << "#include <xercesc/util/XercesDefs.hpp>" << endl
- << endl
- << "extern const XMLByte " << name << "[" << n << "UL];" << endl;
- }
-
- {
- ofstream os (cxx.c_str ());
-
- if (!os.is_open ())
- {
- cerr << cxx << ": error: unable to open" << endl;
- return 1;
- }
-
- os << "// Automatically generated. Do not edit." << endl
- << "//" << endl
- << endl
- << "#include <xercesc/util/XercesDefs.hpp>" << endl
- << "#include <xercesc/util/XercesVersion.hpp>" << endl
- << endl
- << "#if XERCES_GRAMMAR_SERIALIZATION_LEVEL != " <<
- XERCES_GRAMMAR_SERIALIZATION_LEVEL << endl
- << "# error incompatible Xerces-C++ version detected" << endl
- << "#endif" << endl
- << endl
- << "extern const XMLByte " << name << "[" << n << "UL] =" << endl
- << "{";
-
- for (size_t i (0); i < n; ++i)
- {
- if (i != 0)
- os << ',';
-
- os << (i % 12 == 0 ? "\n " : " ") << "0x";
- os.width (2);
- os.fill ('0');
- os << hex << static_cast<unsigned short> (buf[i]);
- }
-
- os << endl
- << "};" << endl
- << endl;
- }
-
- delete[] cbuf;
- }
-
- XMLPlatformUtils::Terminate ();
-}
-
-void
-cxx_escape (string& s)
-{
- for (string::size_type i (0); i < s.size (); ++i)
- {
- char& c (s[i]);
-
- if (i == 0)
- {
- if (!((c >= 'a' && c <= 'z') ||
- (c >= 'A' && c <= 'Z') ||
- c == '_'))
- c = '_';
- }
- else
- {
- if (!((c >= 'a' && c <= 'z') ||
- (c >= 'A' && c <= 'Z') ||
- (c >= '0' && c <= '9') ||
- c == '_'))
- c = '_';
- }
- }
-}
-
-void error_handler::
-warning (const SAXParseException& e)
-{
- handle (e, s_warning);
-}
-
-void error_handler::
-error (const SAXParseException& e)
-{
- failed_ = true;
- handle (e, s_error);
-}
-
-void error_handler::
-fatalError (const SAXParseException& e)
-{
- failed_ = true;
- handle (e, s_fatal);
-}
-
-void error_handler::
-handle (const SAXParseException& e, severity s)
-{
- const XMLCh* xid (e.getPublicId ());
-
- if (xid == 0)
- xid = e.getSystemId ();
-
- char* id (XMLString::transcode (xid));
- char* msg (XMLString::transcode (e.getMessage ()));
-
- cerr << id << ":"
- << e.getLineNumber () << ":" << e.getColumnNumber () << " "
- << (s == s_warning ? "warning: " : "error: ") << msg << endl;
-
- XMLString::release (&id);
- XMLString::release (&msg);
-}
diff --git a/examples/cxx/tree/hello/driver.cxx b/examples/cxx/tree/hello/driver.cxx
deleted file mode 100644
index b6629b3..0000000
--- a/examples/cxx/tree/hello/driver.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-// file : examples/cxx/tree/hello/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "hello.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " hello.xml" << endl;
- return 1;
- }
-
- try
- {
- auto_ptr<hello_t> h (hello (argv[1]));
-
- for (hello_t::name_const_iterator i (h->name ().begin ());
- i != h->name ().end ();
- ++i)
- {
- cout << h->greeting () << ", " << *i << "!" << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/hello/hello.xml b/examples/cxx/tree/hello/hello.xml
deleted file mode 100644
index 8b25b5b..0000000
--- a/examples/cxx/tree/hello/hello.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/hello/hello.xml
-copyright : not copyrighted - public domain
-
--->
-
-<hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="hello.xsd">
-
- <greeting>Hello</greeting>
-
- <name>sun</name>
- <name>moon</name>
- <name>world</name>
-
-</hello>
diff --git a/examples/cxx/tree/hello/hello.xsd b/examples/cxx/tree/hello/hello.xsd
deleted file mode 100644
index 8326ff0..0000000
--- a/examples/cxx/tree/hello/hello.xsd
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/hello/hello.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="hello_t">
-
- <xsd:annotation>
- <xsd:documentation>
- The hello_t type consists of a greeting phrase and a
- collection of names to which this greeting applies.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:element name="greeting" type="xsd:string">
- <xsd:annotation>
- <xsd:documentation>
- The greeting element contains the greeting phrase
- for this hello object.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="name" type="xsd:string" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- The name elements contains names to be greeted.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="hello" type="hello_t">
- <xsd:annotation>
- <xsd:documentation>
- The hello element is a root of the Hello XML vocabulary.
- Every conforming document should start with this element.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/hello/makefile b/examples/cxx/tree/hello/makefile
deleted file mode 100644
index 57d7f49..0000000
--- a/examples/cxx/tree/hello/makefile
+++ /dev/null
@@ -1,100 +0,0 @@
-# file : examples/cxx/tree/hello/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := hello.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/hello.xsd,$(install_doc_dir)/xsd/$(path)/hello.xsd)
- $(call install-data,$(src_base)/hello.xml,$(install_doc_dir)/xsd/$(path)/hello.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/hello.xsd,$(dist_prefix)/$(path)/hello.xsd)
- $(call install-data,$(src_base)/hello.xml,$(dist_prefix)/$(path)/hello.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/library/driver.cxx b/examples/cxx/tree/library/driver.cxx
deleted file mode 100644
index 5913ddf..0000000
--- a/examples/cxx/tree/library/driver.cxx
+++ /dev/null
@@ -1,130 +0,0 @@
-// file : examples/cxx/tree/library/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "library.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- try
- {
- using namespace library;
-
- // Read in the XML file and obtain its object model.
- //
- std::auto_ptr<catalog> c (catalog_ (argv[1]));
-
-
- // Let's print what we've got.
- //
- for (catalog::book_const_iterator bi (c->book ().begin ());
- bi != c->book ().end ();
- ++bi)
- {
- cerr << endl
- << "ID : " << bi->id () << endl
- << "ISBN : " << bi->isbn () << endl
- << "Title : " << bi->title () << endl
- << "Genre : " << bi->genre () << endl;
-
- for (book::author_const_iterator ai (bi->author ().begin ());
- ai != bi->author ().end ();
- ++ai)
- {
- cerr << "Author : " << ai->name () << endl;
- cerr << " Born : " << ai->born () << endl;
-
- if (ai->died ())
- cerr << " Died : " << *ai->died () << endl;
-
- if (ai->recommends ())
- cerr << " Recommends : " << (*ai->recommends ())->title () << endl;
- }
-
- cerr << "Available : " << std::boolalpha << bi->available () << endl;
- }
-
-
- // Now we are going to modify the object model and serialize it
- // back to XML.
- //
-
- catalog::book_sequence& books (c->book ());
-
-
- // Get rid of all unavailable books.
- //
- for (catalog::book_iterator bi (books.begin ()); bi != books.end ();)
- {
- if (!bi->available ())
- bi = books.erase (bi);
- else
- ++bi;
- }
-
-
- // Insert a new book.
- //
- book b (679776443, // ISBN
- "Dead Souls", // Title
- genre::philosophy, // Genre
- "DS"); // ID
-
- b.author ().push_back (author ("Nikolai Gogol",
- xml_schema::date (1809, 3, 31)));
-
- books.insert (books.begin (), b);
-
-
- // Because we removed all unavailable books, some IDREFs might be
- // broken. Let's fix this.
- //
- for (catalog::book_iterator bi (books.begin ()); bi != books.end (); ++bi)
- {
- for (book::author_iterator ai (bi->author ().begin ());
- ai != bi->author ().end ();
- ++ai)
- {
- author::recommends_optional& c (ai->recommends ());
-
- if (c.present ())
- {
- author::recommends_type& ref (c.get ());
-
- if (!ref)
- c.reset ();
- }
- }
- }
-
-
- // Prepare namespace mapping and schema location information.
- //
- xml_schema::namespace_infomap map;
-
- map["lib"].name = "http://www.codesynthesis.com/library";
- map["lib"].schema = "library.xsd";
-
-
- // Write it out.
- //
- catalog_ (std::cout, *c, map);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/library/library.xml b/examples/cxx/tree/library/library.xml
deleted file mode 100644
index ca4ca9c..0000000
--- a/examples/cxx/tree/library/library.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/library/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/library/library.xsd b/examples/cxx/tree/library/library.xsd
deleted file mode 100644
index b183efc..0000000
--- a/examples/cxx/tree/library/library.xsd
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/library/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/library/makefile b/examples/cxx/tree/library/makefile
deleted file mode 100644
index ea9bfed..0000000
--- a/examples/cxx/tree/library/makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-# file : examples/cxx/tree/library/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-inline --generate-ostream \
---generate-serialization
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/makefile b/examples/cxx/tree/makefile
deleted file mode 100644
index acfedcd..0000000
--- a/examples/cxx/tree/makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-# file : examples/cxx/tree/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-all_examples := binary caching embedded custom hello library messaging \
-mixed multiroot order performance polymorphism secure streaming wildcard \
-compression xpath
-
-build_examples := binary caching embedded custom hello library messaging \
-mixed multiroot order performance polymorphism secure streaming wildcard
-
-ifeq ($(xsd_with_zlib),y)
-build_examples += compression
-endif
-
-ifeq ($(xsd_with_xqilla),y)
-build_examples += xpath
-endif
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples)))
-
-# Install & Dist.
-#
-$(install) $(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(all_examples)))
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
-
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): export dirs := $(shell find $(src_base) -type d -exec test -f {}/driver.cxx ';' -printf '%P ')
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,tree-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,tree-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,tree-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,tree-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,tree-vc12.sln)
- $(call meta-vctest,tree-vc8.sln,$(src_root)/dist/examples/test.bat,test.bat)
-
-# Clean.
-#
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples)))
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-$(call include,$(bld_root)/meta/vctest.make)
-
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile))
-else
-$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile))
-endif
diff --git a/examples/cxx/tree/messaging/balance.xml b/examples/cxx/tree/messaging/balance.xml
deleted file mode 100644
index 83b9692..0000000
--- a/examples/cxx/tree/messaging/balance.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/messaging/balance.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:balance xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
-
-</p:balance>
diff --git a/examples/cxx/tree/messaging/deposit.xml b/examples/cxx/tree/messaging/deposit.xml
deleted file mode 100644
index c59153d..0000000
--- a/examples/cxx/tree/messaging/deposit.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/messaging/deposit.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:deposit xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
- <amount>1000000</amount>
-
-</p:deposit>
diff --git a/examples/cxx/tree/messaging/dom-parse.cxx b/examples/cxx/tree/messaging/dom-parse.cxx
deleted file mode 100644
index 61f9f4a..0000000
--- a/examples/cxx/tree/messaging/dom-parse.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-// file : examples/cxx/tree/messaging/dom-parse.cxx
-// copyright : not copyrighted - public domain
-
-#include "dom-parse.hxx"
-
-#include <istream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-xml::dom::auto_ptr<DOMDocument>
-parse (std::istream& is, const std::string& id, bool validate)
-{
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- xml::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable/Disable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, validate);
- conf->setParameter (XMLUni::fgXercesSchema, validate);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Prepare input stream.
- //
- xml::sax::std_input_source isrc (is, id);
- Wrapper4InputSource wrap (&isrc, false);
-
- xml::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<tree::parsing<char> > ();
-
- return doc;
-}
diff --git a/examples/cxx/tree/messaging/dom-parse.hxx b/examples/cxx/tree/messaging/dom-parse.hxx
deleted file mode 100644
index 6eccacd..0000000
--- a/examples/cxx/tree/messaging/dom-parse.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-// file : examples/cxx/tree/messaging/dom-parse.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef DOM_PARSE
-#define DOM_PARSE
-
-#include <string>
-#include <iosfwd>
-
-#include <xercesc/dom/DOMDocument.hpp>
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-
-// Parse an XML document from the standard input stream with an
-// optional resource id. Resource id is used in diagnostics as
-// well as to locate schemas referenced from inside the document.
-//
-xsd::cxx::xml::dom::auto_ptr<xercesc::DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate);
-
-#endif // DOM_PARSE
diff --git a/examples/cxx/tree/messaging/dom-serialize.cxx b/examples/cxx/tree/messaging/dom-serialize.cxx
deleted file mode 100644
index dbf3370..0000000
--- a/examples/cxx/tree/messaging/dom-serialize.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-// file : examples/cxx/tree/messaging/dom-serialize.cxx
-// copyright : not copyrighted - public domain
-
-#include "dom-serialize.hxx"
-
-#include <ostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp>
-
-#include <xsd/cxx/xml/string.hxx>
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-#include <xsd/cxx/xml/dom/serialization-source.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-void
-serialize (std::ostream& os,
- const xercesc::DOMDocument& doc,
- const std::string& encoding)
-{
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
-
- xml::dom::ostream_format_target oft (os);
-
- // Create a DOMSerializer.
- //
- xml::dom::auto_ptr<DOMLSSerializer> writer (
- impl->createLSSerializer ());
-
- DOMConfiguration* conf (writer->getDomConfig ());
-
- // Set error handler.
- //
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Set some generally nice features.
- //
- conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true);
- conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true);
- conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false);
-
- xml::dom::auto_ptr<DOMLSOutput> out (impl->createLSOutput ());
- out->setEncoding (xml::string (encoding).c_str ());
- out->setByteStream (&oft);
-
- writer->write (&doc, out.get ());
-
- eh.throw_if_failed<tree::serialization<char> > ();
-}
diff --git a/examples/cxx/tree/messaging/dom-serialize.hxx b/examples/cxx/tree/messaging/dom-serialize.hxx
deleted file mode 100644
index f80e22b..0000000
--- a/examples/cxx/tree/messaging/dom-serialize.hxx
+++ /dev/null
@@ -1,20 +0,0 @@
-// file : examples/cxx/tree/messaging/dom-serialize.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef DOM_SERIALIZE
-#define DOM_SERIALIZE
-
-#include <string>
-#include <iosfwd>
-
-#include <xercesc/dom/DOMDocument.hpp>
-
-// Serialize a DOM document to XML which is written to the standard
-// output stream.
-//
-void
-serialize (std::ostream& os,
- const xercesc::DOMDocument& doc,
- const std::string& encoding = "UTF-8");
-
-#endif // DOM_SERIALIZE
diff --git a/examples/cxx/tree/messaging/driver.cxx b/examples/cxx/tree/messaging/driver.cxx
deleted file mode 100644
index 095e2cd..0000000
--- a/examples/cxx/tree/messaging/driver.cxx
+++ /dev/null
@@ -1,144 +0,0 @@
-// file : examples/cxx/tree/messaging/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <string>
-#include <fstream>
-#include <typeinfo>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include <xsd/cxx/xml/string.hxx>
-
-#include "dom-parse.hxx"
-#include "dom-serialize.hxx"
-
-#include "protocol.hxx"
-
-using namespace std;
-using namespace protocol;
-using namespace xercesc;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " request.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we
- // are doing the XML-to-DOM parsing ourselves.
- //
- XMLPlatformUtils::Initialize ();
-
- try
- {
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- auto_ptr<xml_schema::element_type> req, res;
-
- // Parse the XML request to a DOM document using the parse()
- // function from dom-parse.hxx.
- //
- {
- xml_schema::dom::auto_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
- DOMElement& root (*doc->getDocumentElement ());
-
- req = xml_schema::element_map::parse (root);
- }
-
- // We can test which request we've got either using RTTI or by
- // comparing the element names, as shown below.
- //
- if (balance* b = dynamic_cast<balance*> (req.get ()))
- {
- account_t& a (b->value ());
-
- cerr << "balance request for acc# " << a.account () << endl;
-
- res.reset (new success (balance_t (a.account (), 1000)));
- }
- else if (req->_name () == withdraw::name ())
- {
- withdraw& w (static_cast<withdraw&> (*req));
- change_t& c (w.value ());
-
- wcerr << "withdrawal request for acc# " << c.account () << ", "
- << "amount: " << c.amount () << endl;
-
- if (c.amount () > 1000)
- res.reset (new insufficient_funds (balance_t (c.account (), 1000)));
- else
- res.reset (new success (balance_t (c.account (), 1000 - c.amount ())));
-
- }
- else if (req->_name () == deposit::name ())
- {
- deposit& d (static_cast<deposit&> (*req));
- change_t& c (d.value ());
-
- wcerr << "deposit request for acc# " << c.account () << ", "
- << "amount: " << c.amount () << endl;
-
- res.reset (new success (balance_t (c.account (), 1000 + c.amount ())));
- }
-
- // Serialize the response to a DOM document.
- //
- namespace xml = xsd::cxx::xml;
-
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- const string& name (res->_name ());
- const string& ns (res->_namespace ());
-
- xml_schema::dom::auto_ptr<DOMDocument> doc (
- impl->createDocument (
- xml::string (ns).c_str (),
- xml::string ("p:" + name).c_str (),
- 0));
-
- xml_schema::element_map::serialize (*doc->getDocumentElement (), *res);
-
- // Serialize the DOM document to XML using the serialize() function
- // from dom-serialize.hxx.
- //
- cout << "response:" << endl
- << endl;
-
- serialize (cout, *doc);
- }
- catch (const xml_schema::no_element_info& e)
- {
- // This exception indicates that we tried to parse or serialize
- // an unknown element.
- //
- cerr << "unknown request: " << e.element_namespace () << "#" <<
- e.element_name () << endl;
- r = 1;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/messaging/makefile b/examples/cxx/tree/messaging/makefile
deleted file mode 100644
index 3b7deae..0000000
--- a/examples/cxx/tree/messaging/makefile
+++ /dev/null
@@ -1,116 +0,0 @@
-# file : examples/cxx/tree/messaging/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := protocol.xsd
-cxx := driver.cxx dom-parse.cxx dom-serialize.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options += --root-element-all --generate-element-type \
---generate-element-map --generate-serialization
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/protocol.xsd,$(install_doc_dir)/xsd/$(path)/protocol.xsd)
- $(call install-data,$(src_base)/balance.xml,$(install_doc_dir)/xsd/$(path)/balance.xml)
- $(call install-data,$(src_base)/deposit.xml,$(install_doc_dir)/xsd/$(path)/deposit.xml)
- $(call install-data,$(src_base)/withdraw.xml,$(install_doc_dir)/xsd/$(path)/withdraw.xml)
- $(call install-data,$(src_base)/dom-parse.hxx,$(install_doc_dir)/xsd/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(install_doc_dir)/xsd/$(path)/dom-parse.cxx)
- $(call install-data,$(src_base)/dom-serialize.hxx,$(install_doc_dir)/xsd/$(path)/dom-serialize.hxx)
- $(call install-data,$(src_base)/dom-serialize.cxx,$(install_doc_dir)/xsd/$(path)/dom-serialize.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/protocol.xsd,$(dist_prefix)/$(path)/protocol.xsd)
- $(call install-data,$(src_base)/balance.xml,$(dist_prefix)/$(path)/balance.xml)
- $(call install-data,$(src_base)/deposit.xml,$(dist_prefix)/$(path)/deposit.xml)
- $(call install-data,$(src_base)/withdraw.xml,$(dist_prefix)/$(path)/withdraw.xml)
- $(call install-data,$(src_base)/dom-parse.hxx,$(dist_prefix)/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(dist_prefix)/$(path)/dom-parse.cxx)
- $(call install-data,$(src_base)/dom-serialize.hxx,$(dist_prefix)/$(path)/dom-serialize.hxx)
- $(call install-data,$(src_base)/dom-serialize.cxx,$(dist_prefix)/$(path)/dom-serialize.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/messaging/protocol.xsd b/examples/cxx/tree/messaging/protocol.xsd
deleted file mode 100644
index b371ba7..0000000
--- a/examples/cxx/tree/messaging/protocol.xsd
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/messaging/protocol.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:p="http://www.codesynthesis.com/protocol"
- targetNamespace="http://www.codesynthesis.com/protocol">
-
- <!-- types -->
-
- <xsd:complexType name="account_t">
- <xsd:sequence>
- <xsd:element name="account" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="change_t">
- <xsd:complexContent>
- <xsd:extension base="p:account_t">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="balance_t">
- <xsd:complexContent>
- <xsd:extension base="p:account_t">
- <xsd:sequence>
- <xsd:element name="balance" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- request elements -->
-
- <xsd:element name="balance" type="p:account_t"/>
- <xsd:element name="withdraw" type="p:change_t"/>
- <xsd:element name="deposit" type="p:change_t"/>
-
- <!-- response elements -->
-
- <xsd:element name="success" type="p:balance_t"/>
- <xsd:element name="insufficient-funds" type="p:balance_t"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/messaging/withdraw.xml b/examples/cxx/tree/messaging/withdraw.xml
deleted file mode 100644
index 1f309f3..0000000
--- a/examples/cxx/tree/messaging/withdraw.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/messaging/withdraw.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:withdraw xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
- <amount>1000000</amount>
-
-</p:withdraw>
diff --git a/examples/cxx/tree/mixed/driver.cxx b/examples/cxx/tree/mixed/driver.cxx
deleted file mode 100644
index 17c3b55..0000000
--- a/examples/cxx/tree/mixed/driver.cxx
+++ /dev/null
@@ -1,122 +0,0 @@
-// file : examples/cxx/tree/mixed/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-
-#include "text.hxx"
-
-// The following transcode() utility function is handy when working with
-// Xerces. Include it after the generated header in order to get only char
-// or wchar_t version depending on how you compiled your schemas.
-//
-#include <xsd/cxx/xml/string.hxx>
-
-using std::cout;
-using std::cerr;
-using std::endl;
-using std::auto_ptr;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " text.xml" << endl;
- return 1;
- }
-
- using namespace xercesc;
-
- int r (0);
-
- // The Xerces-C++ DOM objects that will be associated with the
- // document tree "out-live" the call to the parsing function.
- // Therefore we need to initialize the Xerces-C++ runtime
- // ourselves.
- //
- XMLPlatformUtils::Initialize ();
-
- try
- {
- auto_ptr<text> t (
- text_ (argv[1],
- xml_schema::flags::keep_dom |
- xml_schema::flags::dont_initialize));
-
- // The DOM association can be recreated in a copy (the underlying
- // DOM document is cloned) if explicitly requested with the keep_dom
- // flag and only if this copy is "complete", i.e., made from the root
- // of the tree.
- //
- text copy (*t, xml_schema::flags::keep_dom);
-
- // Print text.
- //
- {
- namespace xml = xsd::cxx::xml;
-
- unsigned long ref (0);
- DOMNode* root (copy._node ());
-
- for (DOMNode* n (root->getFirstChild ());
- n != 0;
- n = n->getNextSibling ())
- {
- switch (n->getNodeType ())
- {
- case DOMNode::TEXT_NODE:
- {
- cout << xml::transcode<char> (n->getTextContent ());
- break;
- }
- case DOMNode::ELEMENT_NODE:
- {
- // Let's get back to a tree node from this DOM node.
- //
- xml_schema::type& t (
- *reinterpret_cast<xml_schema::type*> (
- n->getUserData (xml_schema::dom::tree_node_key)));
-
- anchor& a (dynamic_cast<anchor&> (t));
-
- cout << a << "[" << ref << "]";
-
- // Or we could continue using DOM interface:
- //
- //cout << xml::transcode<char> (n->getTextContent ())
- // << "[" << ref << "]";
-
- ++ref;
- break;
- }
- default:
- break; // Ignore all other nodes (e.g., comments, etc).
- }
- }
- }
-
- // Print references.
- //
- {
- unsigned long r (0);
-
- for (text::a_const_iterator i (copy.a ().begin ());
- i != copy.a ().end ();
- ++i, ++r)
- {
- cout << "[" << r << "] " << i->href () << endl;
- }
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
-
- XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/mixed/makefile b/examples/cxx/tree/mixed/makefile
deleted file mode 100644
index 831dd03..0000000
--- a/examples/cxx/tree/mixed/makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-# file : examples/cxx/tree/mixed/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := text.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/text.xsd,$(install_doc_dir)/xsd/$(path)/text.xsd)
- $(call install-data,$(src_base)/text.xml,$(install_doc_dir)/xsd/$(path)/text.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/text.xsd,$(dist_prefix)/$(path)/text.xsd)
- $(call install-data,$(src_base)/text.xml,$(dist_prefix)/$(path)/text.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/mixed/text.xml b/examples/cxx/tree/mixed/text.xml
deleted file mode 100644
index 21e32af..0000000
--- a/examples/cxx/tree/mixed/text.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/mixed/text.xml
-copyright : not copyrighted - public domain
-
--->
-
-<text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="text.xsd">
-
-The first paragraph of this text talks about <a href="http://en.wikipedia.org/wiki/time">time</a>.
-
-And this paragraph talks about <a href="http://en.wikipedia.org/wiki/space">space</a>.
-
-</text>
diff --git a/examples/cxx/tree/mixed/text.xsd b/examples/cxx/tree/mixed/text.xsd
deleted file mode 100644
index 9777f8a..0000000
--- a/examples/cxx/tree/mixed/text.xsd
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/mixed/text.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="anchor">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="href" type="xsd:anyURI" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:complexType name="text" mixed="true">
- <xsd:sequence>
- <xsd:element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="text" type="text"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/multiroot/balance.xml b/examples/cxx/tree/multiroot/balance.xml
deleted file mode 100644
index 68b434a..0000000
--- a/examples/cxx/tree/multiroot/balance.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/multiroot/balance.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:balance xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
-
-</p:balance>
diff --git a/examples/cxx/tree/multiroot/deposit.xml b/examples/cxx/tree/multiroot/deposit.xml
deleted file mode 100644
index 4d9449a..0000000
--- a/examples/cxx/tree/multiroot/deposit.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/multiroot/deposit.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:deposit xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
- <amount>1000000</amount>
-
-</p:deposit>
diff --git a/examples/cxx/tree/multiroot/dom-parse.cxx b/examples/cxx/tree/multiroot/dom-parse.cxx
deleted file mode 100644
index 98fc82e..0000000
--- a/examples/cxx/tree/multiroot/dom-parse.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-// file : examples/cxx/tree/multiroot/dom-parse.cxx
-// copyright : not copyrighted - public domain
-
-#include "dom-parse.hxx"
-
-#include <istream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-xml::dom::auto_ptr<DOMDocument>
-parse (std::istream& is, const std::string& id, bool validate)
-{
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- xml::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable/Disable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, validate);
- conf->setParameter (XMLUni::fgXercesSchema, validate);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Prepare input stream.
- //
- xml::sax::std_input_source isrc (is, id);
- Wrapper4InputSource wrap (&isrc, false);
-
- xml::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<tree::parsing<char> > ();
-
- return doc;
-}
diff --git a/examples/cxx/tree/multiroot/dom-parse.hxx b/examples/cxx/tree/multiroot/dom-parse.hxx
deleted file mode 100644
index c2ab0fb..0000000
--- a/examples/cxx/tree/multiroot/dom-parse.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-// file : examples/cxx/tree/multiroot/dom-parse.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef DOM_PARSE
-#define DOM_PARSE
-
-#include <string>
-#include <iosfwd>
-
-#include <xercesc/dom/DOMDocument.hpp>
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-
-// Parse an XML document from the standard input stream with an
-// optional resource id. Resource id is used in diagnostics as
-// well as to locate schemas referenced from inside the document.
-//
-xsd::cxx::xml::dom::auto_ptr<xercesc::DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate);
-
-#endif // DOM_PARSE
diff --git a/examples/cxx/tree/multiroot/driver.cxx b/examples/cxx/tree/multiroot/driver.cxx
deleted file mode 100644
index 9497ef1..0000000
--- a/examples/cxx/tree/multiroot/driver.cxx
+++ /dev/null
@@ -1,124 +0,0 @@
-// file : examples/cxx/tree/multiroot/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include <xsd/cxx/xml/string.hxx> // xml::transcode
-
-#include "dom-parse.hxx"
-
-#include "protocol.hxx"
-
-using namespace std;
-using namespace protocol;
-
-// Parse an XML document and return a pointer to request_t which can
-// then be tested with dynamic_cast. If your vocabulary does not have
-// a common base type for all root element types then you can use
-// xml_schema::type which is a base for all generated types.
-//
-auto_ptr<request_t>
-parse (istream& is, const string& id)
-{
- using namespace xercesc;
- namespace xml = xsd::cxx::xml;
-
- // Parse an XML instance to a DOM document using the parse()
- // function from dom-parse.hxx.
- //
- xml_schema::dom::auto_ptr<DOMDocument> doc (parse (is, id, true));
-
- DOMElement* root (doc->getDocumentElement ());
-
- string ns (xml::transcode<char> (root->getNamespaceURI ()));
- string name (xml::transcode<char> (root->getLocalName ()));
-
- auto_ptr<request_t> r;
-
- // We could have handled the result directly in this function
- // instead of returning it as an opaque pointer and using
- // dynamic_cast later to figure out which request we are dealing
- // with.
- //
- if (ns == "http://www.codesynthesis.com/protocol")
- {
- if (name == "balance")
- {
- // Use the balance parsing function.
- //
- r.reset (balance (*doc).release ());
- }
- else if (name == "withdraw")
- {
- // Use the withdraw parsing function.
- //
- r.reset (withdraw (*doc).release ());
- }
- }
-
- if (r.get () == 0)
- cerr << "ignoring unknown request: " << ns << "#" << name << endl;
-
- return r;
-}
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " request.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we
- // are doing the XML-to-DOM parsing ourselves.
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- auto_ptr<request_t> r (parse (ifs, argv[1]));
-
- // Let's print what we've got.
- //
- if (balance_t* b = dynamic_cast<balance_t*> (r.get ()))
- {
- cerr << "balance request for acc# " << b->account () << endl;
- }
- else if (withdraw_t* w = dynamic_cast<withdraw_t*> (r.get ()))
- {
- cerr << "withdrawal request for acc# " << w->account () << ", "
- << "amount: " << w->amount () << endl;
- }
- else
- {
- cerr << "unknown request" << endl;
- }
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/multiroot/makefile b/examples/cxx/tree/multiroot/makefile
deleted file mode 100644
index 55c473a..0000000
--- a/examples/cxx/tree/multiroot/makefile
+++ /dev/null
@@ -1,108 +0,0 @@
-# file : examples/cxx/tree/multiroot/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := protocol.xsd
-cxx := driver.cxx dom-parse.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --root-element-all
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/protocol.xsd,$(install_doc_dir)/xsd/$(path)/protocol.xsd)
- $(call install-data,$(src_base)/balance.xml,$(install_doc_dir)/xsd/$(path)/balance.xml)
- $(call install-data,$(src_base)/deposit.xml,$(install_doc_dir)/xsd/$(path)/deposit.xml)
- $(call install-data,$(src_base)/withdraw.xml,$(install_doc_dir)/xsd/$(path)/withdraw.xml)
- $(call install-data,$(src_base)/dom-parse.hxx,$(install_doc_dir)/xsd/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(install_doc_dir)/xsd/$(path)/dom-parse.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/protocol.xsd,$(dist_prefix)/$(path)/protocol.xsd)
- $(call install-data,$(src_base)/balance.xml,$(dist_prefix)/$(path)/balance.xml)
- $(call install-data,$(src_base)/deposit.xml,$(dist_prefix)/$(path)/deposit.xml)
- $(call install-data,$(src_base)/withdraw.xml,$(dist_prefix)/$(path)/withdraw.xml)
- $(call install-data,$(src_base)/dom-parse.hxx,$(dist_prefix)/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(dist_prefix)/$(path)/dom-parse.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/multiroot/protocol.xsd b/examples/cxx/tree/multiroot/protocol.xsd
deleted file mode 100644
index 1121824..0000000
--- a/examples/cxx/tree/multiroot/protocol.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/multiroot/protocol.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:p="http://www.codesynthesis.com/protocol"
- targetNamespace="http://www.codesynthesis.com/protocol">
-
- <xsd:complexType name="request_t">
- <xsd:sequence>
- <xsd:element name="account" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="balance_t">
- <xsd:complexContent>
- <xsd:extension base="p:request_t"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="withdraw_t">
- <xsd:complexContent>
- <xsd:extension base="p:request_t">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="deposit_t">
- <xsd:complexContent>
- <xsd:extension base="p:request_t">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:element name="balance" type="p:balance_t"/>
- <xsd:element name="withdraw" type="p:withdraw_t"/>
- <xsd:element name="deposit" type="p:deposit_t"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/multiroot/withdraw.xml b/examples/cxx/tree/multiroot/withdraw.xml
deleted file mode 100644
index 8f1dc54..0000000
--- a/examples/cxx/tree/multiroot/withdraw.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/multiroot/withdraw.xml
-copyright : not copyrighted - public domain
-
--->
-
-<p:withdraw xmlns:p="http://www.codesynthesis.com/protocol"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
-
- <account>123456789</account>
- <amount>1000000</amount>
-
-</p:withdraw>
diff --git a/examples/cxx/tree/order/element/driver.cxx b/examples/cxx/tree/order/element/driver.cxx
deleted file mode 100644
index 0ea6d6f..0000000
--- a/examples/cxx/tree/order/element/driver.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-// file : examples/cxx/tree/order/element/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cassert>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "transactions.hxx"
-
-// The following string class keeps us sane when working with Xerces.
-// Include it after the generated header in order to get only char or
-// wchar_t version depending on how you compiled your schemas.
-//
-#include <xsd/cxx/xml/string.hxx>
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " transactions.xml" << endl;
- return 1;
- }
-
- using namespace xercesc;
-
- int r (0);
-
- // The Xerces-C++ DOM objects that will be used to store the
- // content matched by the wildcard "out-lives" the call to the
- // parsing function. Therefore we need to initialize the
- // Xerces-C++ runtime ourselves.
- //
- XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace transactions;
-
- // Parse the batch.
- //
- std::auto_ptr<batch> b (
- batch_ (argv[1], xml_schema::flags::dont_initialize));
-
- // Print what we've got in content order.
- //
- for (batch::content_order_const_iterator i (b->content_order ().begin ());
- i != b->content_order ().end ();
- ++i)
- {
- switch (i->id)
- {
- case batch::balance_id:
- {
- const balance& t (b->balance ()[i->index]);
- cerr << t.account () << " balance" << endl;
- break;
- }
- case batch::withdraw_id:
- {
- const withdraw& t (b->withdraw ()[i->index]);
- cerr << t.account () << " withdraw " << t.amount () << endl;
- break;
- }
- case batch::deposit_id:
- {
- const deposit& t (b->deposit ()[i->index]);
- cerr << t.account () << " deposit " << t.amount () << endl;
- break;
- }
- case batch::any_id:
- {
- namespace xml = xsd::cxx::xml;
-
- const DOMElement& e (b->any ()[i->index]);
- cerr << xml::transcode<char> (e.getLocalName ()) << endl;
- break;
- }
- default:
- {
- assert (false); // Unknown content id.
- }
- }
- }
-
- cerr << endl;
-
- // Modify the transaction batch. First remove the last transaction.
- // Note that we have to update both the content itself and content
- // order sequences.
- //
- batch::content_order_sequence& co (b->content_order ());
-
- co.pop_back ();
- b->withdraw ().pop_back ();
-
- // Now add a few more transactions. Again we have to add both the
- // content and its ordering. The order information consists of the
- // content id and, in case of a sequence, the index.
- //
- b->deposit ().push_back (deposit (123456789, 100000));
- co.push_back (
- batch::content_order_type (
- batch::deposit_id, b->deposit ().size () - 1));
-
- // The next transaction we add at the beginning of the batch.
- //
- b->balance ().push_back (balance (123456789));
- co.insert (co.begin (),
- batch::content_order_type (
- batch::balance_id, b->balance ().size () - 1));
-
- // Note also that when we merely modify the content of one
- // of the elements in place, we don't need to update its
- // order. For example:
- //
- b->deposit ()[0].amount (2000000);
-
- // Serialize the modified transaction batch back to XML.
- //
- xml_schema::namespace_infomap map;
-
- map[""].name = "http://www.codesynthesis.com/transactions";
- map[""].schema = "transactions.xsd";
- map["te"].name = "http://www.codesynthesis.com/transactions-extras";
-
- batch_ (std::cout,
- *b,
- map,
- "UTF-8",
- xml_schema::flags::dont_initialize);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
-
- XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/order/element/makefile b/examples/cxx/tree/order/element/makefile
deleted file mode 100644
index 8116787..0000000
--- a/examples/cxx/tree/order/element/makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-# file : examples/cxx/tree/order/element/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := transactions.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) -lnsl
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --generate-wildcard \
---ordered-type batch
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/transactions.xsd,$(install_doc_dir)/xsd/$(path)/transactions.xsd)
- $(call install-data,$(src_base)/transactions.xml,$(install_doc_dir)/xsd/$(path)/transactions.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/transactions.xsd,$(dist_prefix)/$(path)/transactions.xsd)
- $(call install-data,$(src_base)/transactions.xml,$(dist_prefix)/$(path)/transactions.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/order/element/transactions.xml b/examples/cxx/tree/order/element/transactions.xml
deleted file mode 100644
index 4c317c2..0000000
--- a/examples/cxx/tree/order/element/transactions.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/order/element/transactions.xml
-copyright : not copyrighted - public domain
-
--->
-
-<batch xmlns="http://www.codesynthesis.com/transactions"
- xmlns:te="http://www.codesynthesis.com/transactions-extras"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/transactions transactions.xsd">
- <deposit>
- <account>123456789</account>
- <amount>1000000</amount>
- </deposit>
-
- <balance>
- <account>123456789</account>
- </balance>
-
- <te:block>
- <account>123456789</account>
- <amount>500000</amount>
- </te:block>
-
- <withdraw>
- <account>123456789</account>
- <amount>500000</amount>
- </withdraw>
-</batch>
diff --git a/examples/cxx/tree/order/element/transactions.xsd b/examples/cxx/tree/order/element/transactions.xsd
deleted file mode 100644
index 053aac4..0000000
--- a/examples/cxx/tree/order/element/transactions.xsd
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/order/element/transactions.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:t="http://www.codesynthesis.com/transactions"
- targetNamespace="http://www.codesynthesis.com/transactions"
- elementFormDefault="qualified">
-
- <xsd:complexType name="transaction">
- <xsd:sequence>
- <xsd:element name="account" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="balance">
- <xsd:complexContent>
- <xsd:extension base="t:transaction"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="withdraw">
- <xsd:complexContent>
- <xsd:extension base="t:transaction">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="deposit">
- <xsd:complexContent>
- <xsd:extension base="t:transaction">
- <xsd:sequence>
- <xsd:element name="amount" type="xsd:unsignedInt"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="batch">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="balance" type="t:balance"/>
- <xsd:element name="withdraw" type="t:withdraw"/>
- <xsd:element name="deposit" type="t:deposit"/>
- <xsd:any namespace="##other" processContents="lax"/>
- </xsd:choice>
- </xsd:complexType>
-
- <xsd:element name="batch" type="t:batch"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/order/makefile b/examples/cxx/tree/order/makefile
deleted file mode 100644
index c807937..0000000
--- a/examples/cxx/tree/order/makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# file : examples/cxx/tree/order/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-all_examples := element mixed
-build_examples := element mixed
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples)))
-
-# Install & Dist.
-#
-$(install) $(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base))
-
-$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(all_examples)))
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
-
-$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples)))
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples)))
-
-$(call include,$(bld_root)/install.make)
-
-ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile))
-else
-$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile))
-endif
diff --git a/examples/cxx/tree/order/mixed/driver.cxx b/examples/cxx/tree/order/mixed/driver.cxx
deleted file mode 100644
index 9606b67..0000000
--- a/examples/cxx/tree/order/mixed/driver.cxx
+++ /dev/null
@@ -1,89 +0,0 @@
-// file : examples/cxx/tree/order/mixed/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cassert>
-#include <iostream>
-
-#include "text.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " text.xml" << endl;
- return 1;
- }
-
- try
- {
- std::auto_ptr<text> t (text_ (argv[1]));
-
- // Print what we've got in content order.
- //
- for (text::content_order_const_iterator i (t->content_order ().begin ());
- i != t->content_order ().end ();
- ++i)
- {
- switch (i->id)
- {
- case text::a_id:
- {
- const anchor& a (t->a ()[i->index]);
- cerr << a << "[" << a.href () << "]";
- break;
- }
- case text::text_content_id:
- {
- const xml_schema::string& s (t->text_content ()[i->index]);
- cerr << s;
- break;
- }
- default:
- {
- assert (false); // Unknown content id.
- }
- }
- }
-
- cerr << endl;
-
- // Modify the document. Note that we have to update both the content
- // itself and content order sequences.
- //
- typedef text::content_order_type order_type;
-
- text::content_order_sequence& co (t->content_order ());
- text::text_content_sequence& tc (t->text_content ());
-
- tc.push_back ("The last paragraph doesn't talk about ");
- co.push_back (order_type (text::text_content_id, tc.size () - 1));
-
- t->a ().push_back (anchor ("anything", "http://en.wikipedia.org"));
- co.push_back (order_type (text::a_id, t->a ().size () - 1));
-
- tc.push_back (" in particular.\n\n");
- co.push_back (order_type (text::text_content_id, tc.size () - 1));
-
- // Serialize the modified document back to XML.
- //
- xml_schema::namespace_infomap map;
-
- map[""].schema = "text.xsd";
-
- text_ (std::cout,
- *t,
- map,
- "UTF-8",
- xml_schema::flags::dont_pretty_print);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/order/mixed/makefile b/examples/cxx/tree/order/mixed/makefile
deleted file mode 100644
index 26e2783..0000000
--- a/examples/cxx/tree/order/mixed/makefile
+++ /dev/null
@@ -1,98 +0,0 @@
-# file : examples/cxx/tree/order/mixed/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := text.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) -lnsl
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --ordered-type-mixed
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/text.xsd,$(install_doc_dir)/xsd/$(path)/text.xsd)
- $(call install-data,$(src_base)/text.xml,$(install_doc_dir)/xsd/$(path)/text.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/text.xsd,$(dist_prefix)/$(path)/text.xsd)
- $(call install-data,$(src_base)/text.xml,$(dist_prefix)/$(path)/text.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/order/mixed/text.xml b/examples/cxx/tree/order/mixed/text.xml
deleted file mode 100644
index ac80159..0000000
--- a/examples/cxx/tree/order/mixed/text.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/order/mixed/text.xml
-copyright : not copyrighted - public domain
-
--->
-
-<text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="text.xsd">
-
-The first paragraph of this text talks about <a href="http://en.wikipedia.org/wiki/time">time</a>.
-
-And this paragraph talks about <a href="http://en.wikipedia.org/wiki/space">space</a>.
-
-</text>
diff --git a/examples/cxx/tree/order/mixed/text.xsd b/examples/cxx/tree/order/mixed/text.xsd
deleted file mode 100644
index e45abcd..0000000
--- a/examples/cxx/tree/order/mixed/text.xsd
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/order/mixed/text.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="anchor">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="href" type="xsd:anyURI" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:complexType name="text" mixed="true">
- <xsd:sequence>
- <xsd:element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="text" type="text"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/performance/README b/examples/cxx/tree/performance/README
deleted file mode 100644
index cb79cc2..0000000
--- a/examples/cxx/tree/performance/README
+++ /dev/null
@@ -1,58 +0,0 @@
-This example measures the performance of parsing and serialization in
-the C++/Tree mapping. It also shows how to structure your code to
-achieve the maximum performance for these two operations.
-
-The example consists of the following files:
-
-test.xsd
- XML Schema which describes the test vocabulary.
-
-test-50k.xml
- Test XML document.
-
-gen.cxx
- Program to generate a test document of desired size.
-
-time.hxx
-time.cxx
- Class definition that represents time.
-
-test.hxx
-test.ixx
-test.cxx
- C++ types that represent the given vocabulary, a set of parsing
- functions that convert XML documents to a tree-like in-memory object
- model, and a set of serialization functions that convert the object
- model back to XML. These are generated by the XSD compiler from
- test.xsd.
-
-parsing.cxx
- Parsing performance test. It first reads the entire document into
- a memory buffer. It then creates a DOM parser and pre-parses and
- caches the schema if validation is enabled. Finally, it runs the
- performance measurement loop which on each iteration parses the
- XML document from the in-memory buffer into DOM and then DOM to
- the object model.
-
-serialization.cxx
- Serialization performance test. It first parses the XML document
- into the object model. It then creates a memory buffer into which
- the document is serialized and a DOM serializer. Finally, it runs
- the performance measurement loop which on each iteration serializes
- the object model to DOM and DOM to XML.
-
-driver.cxx
- Driver for the example. It first parses the command line arguments.
- It then initializes the Xerces-C++ runtime and calls the parsing
- and serialization tests described above.
-
-To run the example on a test XML document simply execute:
-
-$ ./driver test-50k.xml
-
-The -v option can be used to turn on validation in the underlying XML
-parser (off by default). The -i option can be used to specify the
-number of parsing and serialization iterations (1000 by default). For
-example:
-
-$ ./driver -v -i 100 test-50k.xml
diff --git a/examples/cxx/tree/performance/driver.cxx b/examples/cxx/tree/performance/driver.cxx
deleted file mode 100644
index b626e4d..0000000
--- a/examples/cxx/tree/performance/driver.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-// file : examples/cxx/tree/performance/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <string>
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/util/PlatformUtils.hpp>
-
-using namespace std;
-
-// See parsing.cxx
-//
-bool
-parsing (const char* file, unsigned long iter, bool validate);
-
-// See serialization.cxx
-//
-bool
-serialization (const char* file, unsigned long iter);
-
-int
-main (int argc, char* argv[])
-{
- if (argc < 2)
- {
- cerr << "usage: " << argv[0] << " [-v] [-i <count>] test.xml" << endl
- << "\t -v turn on validation (default is off)" << endl
- << "\t -i number of iterations to perform (default is 1000)" << endl;
- return 1;
- }
-
- bool validate (false);
- unsigned long iter (1000);
- const char* file (0);
-
- // Parse command line arguments.
- //
- for (int i (1); i < argc; ++i)
- {
- std::string arg (argv[i]);
-
- if (arg == "-v")
- {
- validate = true;
- }
- else if (arg == "-i")
- {
- if (++i == argc)
- {
- cerr << "argument expected for the -i option" << endl;
- return 1;
- }
-
- iter = 0;
- istringstream is (argv[i]);
- is >> iter;
-
- if (iter == 0)
- {
- cerr << "invalid argument for the -i option" << endl;
- return 1;
- }
- }
- else
- {
- file = argv[i];
- break;
- }
- }
-
- if (file == 0)
- {
- cerr << "no input file specified" << endl;
- return 1;
- }
-
- int r (0);
-
- xercesc::XMLPlatformUtils::Initialize ();
-
- // Call parsing and serialization tests.
- //
- if (!parsing (file, iter, validate) || !serialization (file, iter))
- r = 1;
-
- xercesc::XMLPlatformUtils::Terminate ();
-
- return r;
-}
diff --git a/examples/cxx/tree/performance/gen.cxx b/examples/cxx/tree/performance/gen.cxx
deleted file mode 100644
index b6392c0..0000000
--- a/examples/cxx/tree/performance/gen.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <fstream>
-#include <sstream>
-#include <iostream>
-
-using namespace std;
-
-static const char* enums[] =
-{
- "romance",
- "fiction",
- "horror",
- "history",
- "philosophy"
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 3)
- {
- cerr << "usage: " << argv[0] << " <count> <output-file>" << endl;
- return 1;
- }
-
- unsigned long n (0);
- istringstream is (argv[1]);
- is >> n;
-
- if (n == 0)
- {
- cerr << "record count argument should be a positive number" << endl;
- return 1;
- }
-
- ofstream ofs (argv[2]);
-
- if (!ofs.is_open ())
- {
- cerr << "unable to open '" << argv[2] << "' in write mode" << endl;
- return 1;
- }
-
- ofs << "<t:root xmlns:t='test' " <<
- "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " <<
- "xsi:schemaLocation='test test.xsd'>";
-
- unsigned short ch (1), en (0);
-
- for (unsigned long i (0); i < n; ++i)
- {
- ofs << "<record orange=\"" << i << "\"";
-
- if (i % 2 == 0)
- ofs << " apple=\"true\"";
-
- ofs << ">"
- << "<int>42</int>"
- << "<double>42345.4232</double>"
- << "<name>name123_45</name>";
-
- if (i % 2 == 1)
- ofs << "<string>one two three</string>";
-
- ofs << "<choice" << ch << ">" << ch << " choice</choice" << ch << ">"
- << "<enum>" << enums[en] << "</enum>"
- << "</record>";
-
- if (++ch > 4)
- ch = 1;
-
- if (++en > 4)
- en = 0;
- }
-
- ofs << "</t:root>";
-}
diff --git a/examples/cxx/tree/performance/makefile b/examples/cxx/tree/performance/makefile
deleted file mode 100644
index d5201e8..0000000
--- a/examples/cxx/tree/performance/makefile
+++ /dev/null
@@ -1,110 +0,0 @@
-# file : examples/cxx/tree/performance/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx parsing.cxx serialization.cxx time.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-inline --generate-serialization
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/parsing.cxx,$(install_doc_dir)/xsd/$(path)/parsing.cxx)
- $(call install-data,$(src_base)/serialization.cxx,$(install_doc_dir)/xsd/$(path)/serialization.cxx)
- $(call install-data,$(src_base)/test.xsd,$(install_doc_dir)/xsd/$(path)/test.xsd)
- $(call install-data,$(src_base)/test-50k.xml,$(install_doc_dir)/xsd/$(path)/test-50k.xml)
- $(call install-data,$(src_base)/time.hxx,$(install_doc_dir)/xsd/$(path)/time.hxx)
- $(call install-data,$(src_base)/time.cxx,$(install_doc_dir)/xsd/$(path)/time.cxx)
- $(call install-data,$(src_base)/gen.cxx,$(install_doc_dir)/xsd/$(path)/gen.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/parsing.cxx,$(dist_prefix)/$(path)/parsing.cxx)
- $(call install-data,$(src_base)/serialization.cxx,$(dist_prefix)/$(path)/serialization.cxx)
- $(call install-data,$(src_base)/test.xsd,$(dist_prefix)/$(path)/test.xsd)
- $(call install-data,$(src_base)/test-50k.xml,$(dist_prefix)/$(path)/test-50k.xml)
- $(call install-data,$(src_base)/time.hxx,$(dist_prefix)/$(path)/time.hxx)
- $(call install-data,$(src_base)/time.cxx,$(dist_prefix)/$(path)/time.cxx)
- $(call install-data,$(src_base)/gen.cxx,$(dist_prefix)/$(path)/gen.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/performance/parsing.cxx b/examples/cxx/tree/performance/parsing.cxx
deleted file mode 100644
index bf7f667..0000000
--- a/examples/cxx/tree/performance/parsing.cxx
+++ /dev/null
@@ -1,172 +0,0 @@
-// file : examples/cxx/tree/performance/parsing.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cstddef> // std::size_t
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/dom/DOMLSParser.hpp>
-#include <xercesc/dom/DOMImplementation.hpp>
-#include <xercesc/dom/DOMImplementationRegistry.hpp>
-
-#include <xercesc/validators/common/Grammar.hpp>
-
-#include <xercesc/framework/MemBufInputSource.hpp>
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xercesc/util/XMLUniDefs.hpp>
-
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "time.hxx"
-#include "test.hxx"
-
-using namespace std;
-
-bool
-parsing (const char* file, unsigned long iter, bool validate)
-{
- try
- {
- cerr << "parsing:" << endl;
-
- ifstream ifs;
- ifs.exceptions (ios_base::failbit);
- ifs.open (file, ios::in | ios::ate);
-
- size_t size (ifs.tellg ());
- ifs.seekg (0, ios::beg);
-
- char* buf = new char[size];
- ifs.read (buf, size);
- ifs.close ();
-
- cerr << " document size: " << size << " bytes" << endl
- << " iterations: " << iter << endl;
-
- // Create XML parser that we are going to use in all iterations.
- //
- using namespace xercesc;
-
- const XMLCh ls_id[] =
- {xercesc::chLatin_L, xercesc::chLatin_S, xercesc::chNull};
-
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- // Use the error handler implementation provided by the XSD runtime.
- //
- xsd::cxx::tree::error_handler<char> eh;
- xsd::cxx::xml::dom::bits::error_handler_proxy<char> ehp (eh);
-
- xml_schema::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- conf->setParameter (XMLUni::fgDOMComments, false);
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
- conf->setParameter (XMLUni::fgDOMEntities, false);
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Set error handler.
- //
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- if (validate)
- {
- conf->setParameter (XMLUni::fgDOMValidate, true);
- conf->setParameter (XMLUni::fgXercesSchema, true);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // If we are validating, pre-load and cache the schema.
- //
- if (!parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true))
- {
- // In Xerces-C++ grammar loading failure results in just a warning.
- // Make it a fatal error.
- //
- eh.handle ("test.xsd", 0, 0,
- xsd::cxx::tree::error_handler<char>::severity::fatal,
- "unable to load schema");
- }
-
- eh.throw_if_failed<xml_schema::parsing> ();
- conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
- conf->setParameter (XMLUni::fgXercesLoadSchema, false);
- }
- else
- {
- conf->setParameter (XMLUni::fgDOMValidate, false);
- conf->setParameter (XMLUni::fgXercesSchema, false);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
- }
-
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Create memory buffer input source.
- //
- MemBufInputSource is (
- reinterpret_cast<XMLByte*> (buf), size, file, false);
- is.setCopyBufToStream (false);
- Wrapper4InputSource wis (&is, false);
-
- // Parsing loop.
- //
- os::time start;
-
- for (unsigned long i (0); i < iter; ++i)
- {
- // First parse XML to DOM reusing the parser we created above.
- //
- xml_schema::dom::auto_ptr<DOMDocument> doc (parser->parse (&wis));
- eh.throw_if_failed<xml_schema::parsing> ();
-
- // Then parse DOM to the object model.
- //
- auto_ptr<test::root> r (test::root_ (*doc));
- }
-
- os::time end;
- os::time time (end - start);
-
- delete[] buf;
-
- cerr << " time: " << time << " sec" << endl;
-
- double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
-
- // Calculate throughput in documents/sec.
- //
- double tpd ((iter / ms) * 1000000);
- cerr << " throughput: " << tpd << " documents/sec" << endl;
-
- // Calculate throughput in MBytes/sec.
- //
- double tpb (((size * iter) / ms) * 1000000/(1024*1024));
- cerr << " throughput: " << tpb << " MBytes/sec" << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return false;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return false;
- }
-
- return true;
-}
diff --git a/examples/cxx/tree/performance/serialization.cxx b/examples/cxx/tree/performance/serialization.cxx
deleted file mode 100644
index 08e5740..0000000
--- a/examples/cxx/tree/performance/serialization.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-// file : examples/cxx/tree/performance/serialization.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <cstddef> // std::size_t
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/dom/DOMLSOutput.hpp>
-#include <xercesc/dom/DOMLSSerializer.hpp>
-#include <xercesc/dom/DOMImplementation.hpp>
-#include <xercesc/dom/DOMImplementationRegistry.hpp>
-
-#include <xercesc/framework/MemBufFormatTarget.hpp>
-
-#include <xercesc/util/XMLUniDefs.hpp>
-
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "time.hxx"
-#include "test.hxx"
-
-using namespace std;
-
-bool
-serialization (const char* file, unsigned long iter)
-{
- try
- {
- using namespace xercesc;
-
- cerr << "serialization:" << endl;
-
- // Get the object model using the standard parsing function.
- //
- auto_ptr<test::root> r (
- test::root_ (file,
- xml_schema::flags::dont_initialize |
- xml_schema::flags::dont_validate));
-
- // Serialize it to the in-memory buffer. This makes sure the buffer
- // pre-allocates enough memory.
- //
- xml_schema::namespace_infomap map;
- map["t"].name = "test";
- map["t"].schema = "test.xsd";
-
- MemBufFormatTarget ft (10240);
- test::root_ (ft, *r, map, "UTF-8",
- xml_schema::flags::dont_initialize |
- xml_schema::flags::dont_pretty_print |
- xml_schema::flags::no_xml_declaration);
-
- size_t size (ft.getLen ());
- cerr << " document size: " << size << " bytes" << endl
- << " iterations: " << iter << endl;
-
- // Create XML serializer that we are going to use in all iterations.
- //
- const XMLCh ls_id[] =
- {xercesc::chLatin_L, xercesc::chLatin_S, xercesc::chNull};
-
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- // Use the error handler implementation provided by the XSD runtime.
- //
- xsd::cxx::tree::error_handler<char> eh;
- xsd::cxx::xml::dom::bits::error_handler_proxy<char> ehp (eh);
-
- xml_schema::dom::auto_ptr<DOMLSSerializer> writer (
- impl->createLSSerializer ());
-
- DOMConfiguration* conf (writer->getDomConfig ());
-
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
- conf->setParameter (XMLUni::fgDOMXMLDeclaration, false);
-
- xml_schema::dom::auto_ptr<DOMLSOutput> out (impl->createLSOutput ());
-
- out->setByteStream (&ft);
-
- // Serialization loop.
- //
- os::time start;
-
- for (unsigned long i (0); i < iter; ++i)
- {
- // First serialize the object model to DOM.
- //
- xml_schema::dom::auto_ptr<DOMDocument> doc (test::root_ (*r, map));
-
- ft.reset ();
-
- // Then serialize DOM to XML reusing the serializer we created above.
- //
- writer->write (doc.get (), out.get ());
- eh.throw_if_failed<xml_schema::serialization> ();
- }
-
- os::time end;
- os::time time (end - start);
-
- cerr << " time: " << time << " sec" << endl;
-
- double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
-
- // Calculate throughput in documents/sec.
- //
- double tpd ((iter / ms) * 1000000);
- cerr << " throughput: " << tpd << " documents/sec" << endl;
-
- // Calculate throughput in MBytes/sec.
- //
- double tpb (((size * iter) / ms) * 1000000/(1024*1024));
- cerr << " throughput: " << tpb << " MBytes/sec" << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return false;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return false;
- }
-
- return true;
-}
diff --git a/examples/cxx/tree/performance/test.xsd b/examples/cxx/tree/performance/test.xsd
deleted file mode 100644
index d9b5778..0000000
--- a/examples/cxx/tree/performance/test.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/performance/test.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<schema targetNamespace="test" xmlns:t="test"
- xmlns="http://www.w3.org/2001/XMLSchema">
-
- <simpleType name="enum">
- <restriction base="string">
- <enumeration value="romance"/>
- <enumeration value="fiction"/>
- <enumeration value="horror"/>
- <enumeration value="history"/>
- <enumeration value="philosophy"/>
- </restriction>
- </simpleType>
-
- <complexType name="record">
- <sequence>
- <element name="int" type="unsignedInt"/>
- <element name="double" type="double"/>
- <element name="name" type="NCName"/>
- <element name="string" type="string" minOccurs="0" maxOccurs="1"/>
- <choice>
- <element name="choice1" type="string"/>
- <element name="choice2" type="string"/>
- <element name="choice3" type="string"/>
- <element name="choice4" type="string"/>
- </choice>
- <element name="enum" type="t:enum"/>
- </sequence>
- <attribute name="apple" type="boolean"/>
- <attribute name="orange" type="unsignedLong" use="required"/>
- </complexType>
-
- <complexType name="root">
- <sequence>
- <element name="record" type="t:record" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <element name="root" type="t:root"/>
-
-</schema>
diff --git a/examples/cxx/tree/performance/time.cxx b/examples/cxx/tree/performance/time.cxx
deleted file mode 100644
index 6bec91b..0000000
--- a/examples/cxx/tree/performance/time.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : examples/cxx/tree/performance/time.cxx
-// copyright : not copyrighted - public domain
-
-#include "time.hxx"
-
-#if defined (WIN32) || defined (__WIN32__)
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h> // GetSystemTimeAsFileTime
-#else
-# include <time.h> // gettimeofday
-# include <sys/time.h> // timeval
-#endif
-
-#include <ostream> // std::ostream
-#include <iomanip> // std::setfill, std::setw
-
-namespace os
-{
- time::
- time ()
- {
-#if defined (WIN32) || defined (__WIN32__)
- FILETIME ft;
- GetSystemTimeAsFileTime (&ft);
- unsigned long long v (
- ((unsigned long long) (ft.dwHighDateTime) << 32) + ft.dwLowDateTime);
-
- sec_ = static_cast<unsigned long> (v / 10000000ULL);
- nsec_ = static_cast<unsigned long> ((v % 10000000ULL) * 100);
-#else
- timeval tv;
- if (gettimeofday(&tv, 0) != 0)
- throw failed ();
-
- sec_ = static_cast<unsigned long> (tv.tv_sec);
- nsec_ = static_cast<unsigned long> (tv.tv_usec * 1000);
-#endif
- }
-
- std::ostream&
- operator<< (std::ostream& o, time const& t)
- {
- return o << t.sec () << '.'
- << std::setfill ('0') << std::setw (9) << t.nsec ();
- }
-}
diff --git a/examples/cxx/tree/performance/time.hxx b/examples/cxx/tree/performance/time.hxx
deleted file mode 100644
index ea71e83..0000000
--- a/examples/cxx/tree/performance/time.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-// file : examples/cxx/tree/performance/time.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef TIME_HXX
-#define TIME_HXX
-
-#include <iosfwd> // std::ostream&
-
-namespace os
-{
- class time
- {
- public:
- class failed {};
-
- // Create a time object representing the current time.
- //
- time ();
-
- time (unsigned long long nsec)
- {
- sec_ = static_cast<unsigned long> (nsec / 1000000000ULL);
- nsec_ = static_cast<unsigned long> (nsec % 1000000000ULL);
- }
-
- time (unsigned long sec, unsigned long nsec)
- {
- sec_ = sec;
- nsec_ = nsec;
- }
-
- public:
- unsigned long
- sec () const
- {
- return sec_;
- }
-
- unsigned long
- nsec () const
- {
- return nsec_;
- }
-
- public:
- class overflow {};
- class underflow {};
-
- time
- operator+= (time const& b)
- {
- unsigned long long tmp = 0ULL + nsec_ + b.nsec_;
-
- sec_ += static_cast<unsigned long> (b.sec_ + tmp / 1000000000ULL);
- nsec_ = static_cast<unsigned long> (tmp % 1000000000ULL);
-
- return *this;
- }
-
- time
- operator-= (time const& b)
- {
- if (*this < b)
- throw underflow ();
-
- sec_ -= b.sec_;
-
- if (nsec_ < b.nsec_)
- {
- --sec_;
- nsec_ += 1000000000ULL - b.nsec_;
- }
- else
- nsec_ -= b.nsec_;
-
- return *this;
- }
-
- friend time
- operator+ (time const& a, time const& b)
- {
- time r (a);
- r += b;
- return r;
- }
-
- friend time
- operator- (time const& a, time const& b)
- {
- time r (a);
- r -= b;
- return r;
- }
-
- friend bool
- operator < (time const& a, time const& b)
- {
- return (a.sec_ < b.sec_) || (a.sec_ == b.sec_ && a.nsec_ < b.nsec_);
- }
-
- private:
- unsigned long sec_;
- unsigned long nsec_;
- };
-
- std::ostream&
- operator<< (std::ostream&, time const&);
-}
-
-#endif // TIME_HXX
diff --git a/examples/cxx/tree/polymorphism/driver.cxx b/examples/cxx/tree/polymorphism/driver.cxx
deleted file mode 100644
index 3f1598f..0000000
--- a/examples/cxx/tree/polymorphism/driver.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-// file : examples/cxx/tree/polymorphism/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <iostream>
-
-#include "supermen.hxx"
-
-using std::cerr;
-using std::endl;
-using std::auto_ptr;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " supermen.xml" << endl;
- return 1;
- }
-
- try
- {
- auto_ptr<supermen> sm (supermen_ (argv[1]));
-
- supermen copy (*sm); // Dynamic types are preserved in copies.
-
- // Print what we've got.
- //
- for (supermen::person_const_iterator i (copy.person ().begin ());
- i != copy.person ().end ();
- ++i)
- {
- cerr << i->name ();
-
- if (const superman* s = dynamic_cast<const superman*> (&*i))
- {
- if (s->can_fly ())
- cerr << ", flying superman";
- else
- cerr << ", superman";
- }
-
- cerr << endl;
- }
-
- // Serialize back to XML.
- //
- xml_schema::namespace_infomap map;
- map[""].schema = "supermen.xsd";
-
- supermen_ (std::cout, copy, map);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/examples/cxx/tree/polymorphism/makefile b/examples/cxx/tree/polymorphism/makefile
deleted file mode 100644
index 24a1644..0000000
--- a/examples/cxx/tree/polymorphism/makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# file : examples/cxx/tree/polymorphism/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := supermen.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic --generate-serialization \
---root-element-last
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/supermen.xsd,$(install_doc_dir)/xsd/$(path)/supermen.xsd)
- $(call install-data,$(src_base)/supermen.xml,$(install_doc_dir)/xsd/$(path)/supermen.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd)
- $(call install-data,$(src_base)/supermen.xml,$(dist_prefix)/$(path)/supermen.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/polymorphism/supermen.xml b/examples/cxx/tree/polymorphism/supermen.xml
deleted file mode 100644
index 1b5b1df..0000000
--- a/examples/cxx/tree/polymorphism/supermen.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/polymorphism/supermen.xml
-copyright : not copyrighted - public domain
-
--->
-
-<supermen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="supermen.xsd">
-
- <person>
- <name>John Doe</name>
- </person>
-
- <superman can-fly="false">
- <name>James "007" Bond</name>
- </superman>
-
- <superman can-fly="true" wing-span="10" xsi:type="batman">
- <name>Bruce Wayne</name>
- </superman>
-
-</supermen>
diff --git a/examples/cxx/tree/polymorphism/supermen.xsd b/examples/cxx/tree/polymorphism/supermen.xsd
deleted file mode 100644
index 0d37e3d..0000000
--- a/examples/cxx/tree/polymorphism/supermen.xsd
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/polymorphism/supermen.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- substitution group root -->
- <xsd:element name="person" type="person"/>
-
-
- <xsd:complexType name="superman">
- <xsd:complexContent>
- <xsd:extension base="person">
- <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:element name="superman" type="superman" substitutionGroup="person"/>
-
- <xsd:complexType name="batman">
- <xsd:complexContent>
- <xsd:extension base="superman">
- <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="supermen">
- <xsd:sequence>
- <xsd:element ref="person" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="supermen" type="supermen"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/secure/driver.cxx b/examples/cxx/tree/secure/driver.cxx
deleted file mode 100644
index 2dfb3bf..0000000
--- a/examples/cxx/tree/secure/driver.cxx
+++ /dev/null
@@ -1,141 +0,0 @@
-// file : examples/cxx/tree/secure/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/string.hxx>
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "library.hxx"
-#include "secure-dom-parser.hxx"
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " library.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we
- // are doing the XML-to-DOM parsing ourselves.
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace xercesc;
- namespace xml = xsd::cxx::xml;
- namespace tree = xsd::cxx::tree;
-
- xml::dom::auto_ptr<DOMLSParser> parser (new SecureDOMParser ());
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, true);
- conf->setParameter (XMLUni::fgXercesSchema, true);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // Disable loading schemas via other means (e.g., schemaLocation).
- //
- // Note: this might be a good idea though if you need validation,
- // you will need to pre-load the schema via other means. See the
- // 'caching' and 'embedded' examples for different approaches.
- // Both of them can be used with SecureDOMParser.
- //
- // conf->setParameter (XMLUni::fgXercesLoadSchema, false);
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Parse the XML document.
- //
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- // Wrap the standard input stream.
- //
- xml::sax::std_input_source isrc (ifs, argv[1]);
- Wrapper4InputSource wrap (&isrc, false);
-
- // Parse XML to DOM.
- //
- xml_schema::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<xml_schema::parsing> ();
-
- // Parse DOM to the object model.
- //
- auto_ptr<library::catalog> c (library::catalog_ (*doc));
-
- cerr << "catalog with " << c->book ().size () << " books" << endl;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/secure/library.xml b/examples/cxx/tree/secure/library.xml
deleted file mode 100644
index 33a2041..0000000
--- a/examples/cxx/tree/secure/library.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE lib:catalog>
-<!--
-<!DOCTYPE lib:catalog [<!ENTITY xxe SYSTEM "file:///dev/random" >]>
--->
-<!--
-<!DOCTYPE lib:catalog PUBLIC "public id" "http://example.org">
--->
-
-<!--
-
-file : examples/cxx/tree/secure/library.xml
-copyright : not copyrighted - public domain
-
--->
-
-<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
-
- <book id="MM" available="false">
- <isbn>0679760806</isbn>
- <title>The Master and Margarita</title>
- <genre>fiction</genre>
-
- <author recommends="WP">
- <name>Mikhail Bulgakov</name>
- <born>1891-05-15</born>
- <died>1940-03-10</died>
- </author>
- </book>
-
-
- <book id="WP">
- <isbn>0679600841</isbn>
- <title>War and Peace</title>
- <genre>history</genre>
-
- <author recommends="CP">
- <name>Leo Tolstoy</name>
- <born>1828-09-09</born>
- <died>1910-11-20</died>
- </author>
- </book>
-
-
- <book id="CP" available="false">
- <isbn>0679420290</isbn>
- <title>Crime and Punishment</title>
- <genre>philosophy</genre>
-
- <author>
- <name>Fyodor Dostoevsky</name>
- <born>1821-11-11</born>
- <died>1881-02-09</died>
- </author>
- </book>
-
-</lib:catalog>
diff --git a/examples/cxx/tree/secure/library.xsd b/examples/cxx/tree/secure/library.xsd
deleted file mode 100644
index afad24b..0000000
--- a/examples/cxx/tree/secure/library.xsd
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/secure/library.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
- xmlns:lib="http://www.codesynthesis.com/library"
- targetNamespace="http://www.codesynthesis.com/library">
-
- <xsd:simpleType name="isbn">
- <xsd:restriction base="xsd:unsignedInt"/>
- </xsd:simpleType>
-
- <xsd:complexType name="title">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="lang" type="xsd:language"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="genre">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="romance"/>
- <xsd:enumeration value="fiction"/>
- <xsd:enumeration value="horror"/>
- <xsd:enumeration value="history"/>
- <xsd:enumeration value="philosophy"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="born" type="xsd:date"/>
- <xsd:element name="died" type="xsd:date" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="author">
- <xsd:complexContent>
- <xsd:extension base="lib:person">
- <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="book">
- <xsd:sequence>
- <xsd:element name="isbn" type="lib:isbn"/>
- <xsd:element name="title" type="lib:title"/>
- <xsd:element name="genre" type="lib:genre"/>
- <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="available" type="xsd:boolean" default="true"/>
- <xsd:attribute name="id" type="xsd:ID" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="catalog">
- <xsd:sequence>
- <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="catalog" type="lib:catalog"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/secure/makefile b/examples/cxx/tree/secure/makefile
deleted file mode 100644
index fe01e9a..0000000
--- a/examples/cxx/tree/secure/makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# file : examples/cxx/tree/secure/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := library.xsd
-cxx := driver.cxx secure-dom-parser.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(install_doc_dir)/xsd/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(install_doc_dir)/xsd/$(path)/library.xml)
- $(call install-data,$(src_base)/secure-dom-parser.hxx,$(install_doc_dir)/xsd/$(path)/secure-dom-parser.hxx)
- $(call install-data,$(src_base)/secure-dom-parser.cxx,$(install_doc_dir)/xsd/$(path)/secure-dom-parser.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd)
- $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml)
- $(call install-data,$(src_base)/secure-dom-parser.hxx,$(dist_prefix)/$(path)/secure-dom-parser.hxx)
- $(call install-data,$(src_base)/secure-dom-parser.cxx,$(dist_prefix)/$(path)/secure-dom-parser.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/secure/secure-dom-parser.cxx b/examples/cxx/tree/secure/secure-dom-parser.cxx
deleted file mode 100644
index 9008e1e..0000000
--- a/examples/cxx/tree/secure/secure-dom-parser.cxx
+++ /dev/null
@@ -1,24 +0,0 @@
-// file : examples/cxx/tree/secure/secure-dom-parser.cxx
-// copyright : not copyrighted - public domain
-
-#include "secure-dom-parser.hxx"
-
-#include <xercesc/util/XMLException.hpp>
-#include <xercesc/util/XMLExceptMsgs.hpp>
-
-using namespace xercesc;
-
-void SecureDOMParser::
-doctypeDecl (const DTDElementDecl& e,
- const XMLCh* const pub_id,
- const XMLCh* const sys_id,
- const bool hasi,
- const bool hase)
-{
- if (hasi || hase)
- ThrowXMLwithMemMgr(RuntimeException,
- XMLExcepts::Gen_NoDTDValidator,
- fMemoryManager);
-
- DOMLSParserImpl::doctypeDecl (e, pub_id, sys_id, hasi, hase);
-}
diff --git a/examples/cxx/tree/secure/secure-dom-parser.hxx b/examples/cxx/tree/secure/secure-dom-parser.hxx
deleted file mode 100644
index 20783b8..0000000
--- a/examples/cxx/tree/secure/secure-dom-parser.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// file : examples/cxx/tree/secure/secure-dom-parser.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef SECURE_DOM_PARSER_HXX
-#define SECURE_DOM_PARSER_HXX
-
-#include <xercesc/parsers/DOMLSParserImpl.hpp>
-
-class SecureDOMParser: public xercesc::DOMLSParserImpl
-{
-public:
- SecureDOMParser (xercesc::MemoryManager* mm =
- xercesc::XMLPlatformUtils::fgMemoryManager,
- xercesc::XMLGrammarPool* gp = 0)
- : DOMLSParserImpl (0, mm, gp) {}
-
- virtual void
- doctypeDecl (const xercesc::DTDElementDecl& root,
- const XMLCh* const public_id,
- const XMLCh* const system_id,
- const bool has_internal,
- const bool has_external);
-};
-
-#endif // SECURE_DOM_PARSER_HXX
diff --git a/examples/cxx/tree/streaming/driver.cxx b/examples/cxx/tree/streaming/driver.cxx
deleted file mode 100644
index eb7026a..0000000
--- a/examples/cxx/tree/streaming/driver.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-// file : examples/cxx/tree/streaming/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <iostream>
-#include <fstream>
-
-#include <xercesc/dom/DOM.hpp>
-
-#include <xsd/cxx/xml/string.hxx> // xml::string
-
-#include "parser.hxx"
-#include "serializer.hxx"
-#include "position.hxx"
-
-using namespace std;
-using namespace xercesc;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " position.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // We need to initialize the Xerces-C++ runtime because we are doing
- // the XML-to-DOM parsing ourselves.
- //
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace op;
- namespace xml = xsd::cxx::xml;
-
- // Parse and serialize at the same time, in the streaming mode.
- //
-
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- ofstream ofs;
- ofs.exceptions (ios_base::badbit | ios_base::failbit);
- ofs.open ("out.xml");
-
- xml_schema::namespace_infomap ns_map;
- ns_map["op"].name = "http://www.codesynthesis.com/op";
- ns_map["op"].schema = "position.xsd";
-
- parser p;
- serializer s;
-
- p.start (ifs, argv[1], true);
- s.start (ofs);
-
- typedef xml_schema::dom::auto_ptr<DOMDocument> document_ptr;
-
- // Peek at the root element. This way we only get the "carcase"
- // of the document, that is, the root element with its name, all
- // the attributes, and namespace declarations but without any of
- // the nested elements.
- //
- document_ptr docr (p.peek ());
- bool parsed (false);
-
- // Parse first-level elements.
- //
- for (document_ptr doc1 (p.peek ()); doc1.get () != 0; doc1 = p.peek ())
- {
- // Check whether it is an element that we should stream (position) or
- // just add to the root (header).
- //
- string n1 (xml::transcode<char> (
- doc1->getDocumentElement ()->getLocalName ()));
-
- // If we see the first streaming element, then parse the root carcase.
- //
- if (!parsed && n1 == "position")
- {
- object o (*docr->getDocumentElement ());
-
- cerr << "id: " << o.id () << endl
- << "name: " << o.header ().name () << endl
- << "type: " << o.header ().type () << endl;
-
- // Start serializing the document by writing out the root carcase.
- // Note that we leave it open so that we can serialize more elements.
- //
- s.next_open (ns_map["op"].name, "op:object", ns_map, o);
- parsed = true;
- }
-
- // Handle elements that need streaming.
- //
- if (n1 == "position")
- {
- // Position has no nested elements that we need to stream so we
- // finish parsing it in one go.
- //
- doc1 = p.next (doc1);
- position pos (*doc1->getDocumentElement ());
-
- cerr << "lat: " << pos.lat () << " lon: " << pos.lon () << endl;
-
- // Serialize it (append) to the root element.
- //
- s.next ("position", pos);
- }
- else
- {
- // Element that doesn't require streaming (header in our case). Add
- // to the root element and finish parsing.
- //
- docr = p.next (doc1, docr);
- }
- }
-
- // Close the root element in serializer.
- //
- s.next_close ("op:object");
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const ios_base::failure&)
- {
- cerr << "io failure" << endl;
- r = 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/streaming/grammar-input-stream.cxx b/examples/cxx/tree/streaming/grammar-input-stream.cxx
deleted file mode 100644
index ffdb5b4..0000000
--- a/examples/cxx/tree/streaming/grammar-input-stream.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-// file : examples/cxx/tree/streaming/grammar-input-stream.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : not copyrighted - public domain
-
-#include <cassert>
-#include "grammar-input-stream.hxx"
-
-grammar_input_stream::
-grammar_input_stream (const XMLByte* data, std::size_t size)
- : data_ (data),
- size_ (size),
- pos_ (0),
- vpos_ (0),
- cseq_ (0),
- add_zero_ (false)
-{
-}
-
-XMLFilePos grammar_input_stream::
-curPos () const
-{
- return static_cast<XMLFilePos> (vpos_);
-}
-
-XMLSize_t grammar_input_stream::
-readBytes (XMLByte* const buf, const XMLSize_t size)
-{
- std::size_t i (0);
-
- // Add a zero from the alternating sequence if it didn't
- // fit on the previous read.
- //
- if (add_zero_)
- {
- buf[i++] = 0;
- add_zero_ = false;
- }
-
- // If have an unfinished sequential sequence, output it now.
- //
- if (cseq_ != 0 && !alt_)
- {
- for (; cseq_ != 0 && i < size; --cseq_)
- buf[i++] = 0;
- }
-
- for (; i < size && pos_ < size_;)
- {
- XMLByte b = buf[i++] = data_[pos_++];
-
- // See if we are in a compression sequence.
- //
- if (cseq_ != 0)
- {
- if (i < size)
- buf[i++] = 0;
- else
- add_zero_ = true; // Add it on the next read.
-
- cseq_--;
- continue;
- }
-
- // If we are not in a compression sequence and this byte is
- // not zero then we are done.
- //
- if (b != 0)
- continue;
-
- // We have a zero.
- //
- assert (pos_ < size_); // There has to be another byte.
- unsigned char v (static_cast<unsigned char> (data_[pos_++]));
- alt_ = (v & 128) != 0;
- cseq_ = v & 127;
-
- // If it is a sequential sequence, output as many zeros as
- // we can.
- //
- if (!alt_)
- {
- for (; cseq_ != 0 && i < size; --cseq_)
- buf[i++] = 0;
- }
- }
-
- vpos_ += i;
-
- return static_cast<XMLSize_t> (i);
-}
-
-const XMLCh* grammar_input_stream::
-getContentType () const
-{
- return 0;
-}
diff --git a/examples/cxx/tree/streaming/grammar-input-stream.hxx b/examples/cxx/tree/streaming/grammar-input-stream.hxx
deleted file mode 100644
index 36ef74c..0000000
--- a/examples/cxx/tree/streaming/grammar-input-stream.hxx
+++ /dev/null
@@ -1,41 +0,0 @@
-// file : examples/cxx/tree/streaming/grammar-input-stream.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : not copyrighted - public domain
-
-#ifndef GRAMMAR_INPUT_STREAM_HXX
-#define GRAMMAR_INPUT_STREAM_HXX
-
-#include <cstddef>
-#include <xercesc/util/BinInputStream.hpp>
-
-// Memory buffer input stream with the special-purpose schema
-// grammar decompression.
-//
-class grammar_input_stream: public xercesc::BinInputStream
-{
-public :
- grammar_input_stream (const XMLByte* data, std::size_t size);
-
- virtual XMLFilePos
- curPos () const;
-
- virtual XMLSize_t
- readBytes (XMLByte* const buf, const XMLSize_t size);
-
- virtual const XMLCh*
- getContentType () const;
-
-private :
- const XMLByte* data_;
- std::size_t size_;
- std::size_t pos_;
- std::size_t vpos_;
-
- // Compression data.
- //
- size_t cseq_; // Number of bytes left in a compression sequence.
- bool alt_; // Alternating or sequential sequence.
- bool add_zero_; // Add a zero on the next read.
-};
-
-#endif // GRAMMAR_INPUT_STREAM_HXX
diff --git a/examples/cxx/tree/streaming/makefile b/examples/cxx/tree/streaming/makefile
deleted file mode 100644
index e89e529..0000000
--- a/examples/cxx/tree/streaming/makefile
+++ /dev/null
@@ -1,114 +0,0 @@
-# file : examples/cxx/tree/streaming/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := position.xsd
-cxx := driver.cxx parser.cxx serializer.cxx grammar-input-stream.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/parser.cxx,$(install_doc_dir)/xsd/$(path)/parser.cxx)
- $(call install-data,$(src_base)/parser.hxx,$(install_doc_dir)/xsd/$(path)/parser.hxx)
- $(call install-data,$(src_base)/serializer.cxx,$(install_doc_dir)/xsd/$(path)/serializer.cxx)
- $(call install-data,$(src_base)/serializer.hxx,$(install_doc_dir)/xsd/$(path)/serializer.hxx)
- $(call install-data,$(src_base)/grammar-input-stream.cxx,$(install_doc_dir)/xsd/$(path)/grammar-input-stream.cxx)
- $(call install-data,$(src_base)/grammar-input-stream.hxx,$(install_doc_dir)/xsd/$(path)/grammar-input-stream.hxx)
- $(call install-data,$(src_base)/position.xsd,$(install_doc_dir)/xsd/$(path)/position.xsd)
- $(call install-data,$(src_base)/position.xml,$(install_doc_dir)/xsd/$(path)/position.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/parser.cxx,$(dist_prefix)/$(path)/parser.cxx)
- $(call install-data,$(src_base)/parser.hxx,$(dist_prefix)/$(path)/parser.hxx)
- $(call install-data,$(src_base)/serializer.cxx,$(dist_prefix)/$(path)/serializer.cxx)
- $(call install-data,$(src_base)/serializer.hxx,$(dist_prefix)/$(path)/serializer.hxx)
- $(call install-data,$(src_base)/grammar-input-stream.cxx,$(dist_prefix)/$(path)/grammar-input-stream.cxx)
- $(call install-data,$(src_base)/grammar-input-stream.hxx,$(dist_prefix)/$(path)/grammar-input-stream.hxx)
- $(call install-data,$(src_base)/position.xsd,$(dist_prefix)/$(path)/position.xsd)
- $(call install-data,$(src_base)/position.xml,$(dist_prefix)/$(path)/position.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
- $(call message,rm $$1,rm -f $$1,$(out_base)/out.xml)
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver out.xml $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/streaming/parser.cxx b/examples/cxx/tree/streaming/parser.cxx
deleted file mode 100644
index 41ad7af..0000000
--- a/examples/cxx/tree/streaming/parser.cxx
+++ /dev/null
@@ -1,372 +0,0 @@
-#include <cassert>
-
-#include <xercesc/util/XMLUni.hpp>
-#include <xercesc/util/XMLString.hpp>
-
-#include <xercesc/sax2/Attributes.hpp>
-#include <xercesc/sax2/DefaultHandler.hpp>
-#include <xercesc/sax2/SAX2XMLReader.hpp>
-#include <xercesc/sax2/XMLReaderFactory.hpp>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/dom/impl/DOMTextImpl.hpp>
-
-#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
-#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
-
-#include <xsd/cxx/auto-array.hxx>
-
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-#include <xsd/cxx/xml/sax/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "parser.hxx"
-#include "grammar-input-stream.hxx"
-
-using namespace std;
-using namespace xercesc;
-
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-typedef parser::document_ptr document_ptr;
-
-class parser_impl: public DefaultHandler
-{
-public:
- parser_impl (const XMLByte* grammar, size_t grammar_size);
-
- void
- start (istream& is, const string& id, bool validate);
-
- document_ptr
- peek ();
-
- document_ptr
- next (document_ptr doc = document_ptr (),
- document_ptr outer_doc = document_ptr ());
-
- // SAX event handlers.
- //
-private:
- virtual void
- startElement (const XMLCh* const uri,
- const XMLCh* const lname,
- const XMLCh* const qname,
- const Attributes& attributes);
-
- virtual void
- endElement (const XMLCh* const uri,
- const XMLCh* const lname,
- const XMLCh* const qname);
-
- virtual void
- characters (const XMLCh* const s,
- const XMLSize_t length);
-
-private:
- // SAX parser.
- //
- bool clean_;
- auto_ptr<XMLGrammarPool> grammar_pool_;
- auto_ptr<SAX2XMLReader> parser_;
- XMLPScanToken token_;
- tree::error_handler<char> error_handler_;
- xml::sax::bits::error_handler_proxy<char> error_proxy_;
- auto_ptr<xml::sax::std_input_source> isrc_;
-
- size_t depth_;
- size_t whitespace_depth_; // Depth at which to ignore whitespaces.
-
- bool peek_;
- size_t next_depth_; // Depth at which next() should work.
-
- // DOM document being built.
- //
- DOMImplementation& dom_impl_;
- document_ptr doc_;
- DOMElement* cur_;
-};
-
-const XMLCh ls[] = {chLatin_L, chLatin_S, chNull};
-
-parser_impl::
-parser_impl (const XMLByte* grammar, size_t grammar_size)
- : clean_ (true),
- error_proxy_ (error_handler_),
- dom_impl_ (*DOMImplementationRegistry::getDOMImplementation (ls))
-{
- MemoryManager* mm (XMLPlatformUtils::fgMemoryManager);
-
- if (grammar != 0)
- {
- assert (grammar_size != 0);
- grammar_pool_.reset (new XMLGrammarPoolImpl (mm));
-
- grammar_input_stream is (grammar, grammar_size);
- grammar_pool_->deserializeGrammars(&is);
- grammar_pool_->lockPool ();
- }
-
- parser_.reset (XMLReaderFactory::createXMLReader (mm, grammar_pool_.get ()));
-
- parser_->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
- parser_->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
- parser_->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
- parser_->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support. It also allows us to disable buffering in the parser
- // so that the data is parsed and returned as soon as it is
- // available.
- //
-#if _XERCES_VERSION >= 30100
- parser_->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
-
- XMLSize_t lwm = 0;
- parser_->setProperty (XMLUni::fgXercesLowWaterMark, &lwm);
-#endif
-
- parser_->setErrorHandler (&error_proxy_);
- parser_->setContentHandler (this);
-}
-
-void parser_impl::
-start (istream& is, const string& id, bool val)
-{
- // Reset our state.
- //
- depth_ = 0;
- peek_ = false;
- doc_.reset ();
- error_handler_.reset ();
-
- if (!clean_)
- parser_->parseReset (token_);
- else
- clean_ = false;
-
- isrc_.reset (new xml::sax::std_input_source (is, id));
-
- parser_->setFeature (XMLUni::fgSAX2CoreValidation, val);
- parser_->setFeature (XMLUni::fgXercesSchema, val);
-
- if (val && grammar_pool_.get () != 0)
- {
- // Use the loaded grammar during parsing.
- //
- parser_->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
-
- // Disable loading schemas via other means (e.g., schemaLocation).
- //
- parser_->setFeature (XMLUni::fgXercesLoadSchema, false);
- }
-
- parser_->parseFirst (*isrc_, token_);
- error_handler_.throw_if_failed<tree::parsing<char> > ();
-}
-
-document_ptr parser_impl::
-peek ()
-{
- bool r (true);
-
- size_t d (depth_);
- whitespace_depth_ = d;
-
- peek_ = true;
-
- // Parse (skip whitespace content) until the depth increases or we get
- // a document. The latter test covers <element/> cases where both start
- // and end events will trigger and therefore leave the depth unchanged.
- //
- while (r && depth_ == d && doc_.get () == 0)
- {
- r = parser_->parseNext (token_);
- error_handler_.throw_if_failed<tree::parsing<char> > ();
- }
-
- if (!r)
- return document_ptr (0);
-
- return doc_;
-}
-
-document_ptr parser_impl::
-next (document_ptr doc, document_ptr outer_doc)
-{
- assert (peek_ == (doc.get () != 0));
-
- // Install doc/outer_doc as the document we are parsing.
- //
- if (doc.get () != 0)
- {
- if (outer_doc.get () != 0)
- {
- // Copy doc to outer_doc.
- //
- doc_ = outer_doc;
- cur_ = static_cast<DOMElement*> (
- doc_->importNode (doc->getDocumentElement (), true));
- doc_->getDocumentElement ()->appendChild (cur_);
- }
- else
- {
- doc_ = doc;
- cur_ = doc_->getDocumentElement ();
- }
-
- // This handles the <element/> case where we get both start and
- // end events in peek(). In this case the element is fully parsed
- // and next() has nothing to do.
- //
- if (depth_ != next_depth_)
- {
- peek_ = false;
- return doc_;
- }
- }
-
- bool r (true);
-
- // If we peeked, then we have already seen the start tag and our
- // return depth is one above the current depth.
- //
- size_t d (peek_ ? depth_ - 1 : depth_);
- whitespace_depth_ = d;
-
- peek_ = false;
-
- // Keep calling parseNext() until we either move to a greater depth or
- // get a document. This way we skip the text (presumably whitespaces)
- // that may be preceding this chunk.
- //
- while (r && depth_ == d && doc_.get () == 0)
- {
- parser_->parseNext (token_);
- error_handler_.throw_if_failed<tree::parsing<char> > ();
- }
-
- if (!r)
- return document_ptr (0);
-
- // If we are not at our start depth, keep calling parseNext() until we
- // get there again.
- //
- while (r && depth_ != d)
- {
- r = parser_->parseNext (token_);
- error_handler_.throw_if_failed<tree::parsing<char> > ();
- }
-
- if (!r)
- return document_ptr (0);
-
- return doc_;
-}
-
-// DOM builder.
-//
-
-void parser_impl::
-startElement (const XMLCh* const uri,
- const XMLCh* const /*lname*/,
- const XMLCh* const qname,
- const Attributes& attr)
-{
- if (doc_.get () == 0)
- {
- doc_.reset (dom_impl_.createDocument (uri, qname, 0));
- cur_ = doc_->getDocumentElement ();
- }
- else
- {
- DOMElement* e = doc_->createElementNS (uri, qname);
- cur_->appendChild (e);
- cur_ = e;
- }
-
- // Set attributes.
- //
- for (XMLSize_t i (0), end (attr.getLength()); i < end; ++i)
- {
- const XMLCh* qn (attr.getQName (i));
- const XMLCh* ns (attr.getURI (i));
-
- // When SAX2 reports the xmlns attribute, it does not include
- // the proper attribute namespace. So we have to detect and
- // handle this case.
- //
- if (XMLString::equals (qn, XMLUni::fgXMLNSString))
- ns = XMLUni::fgXMLNSURIName;
-
- cur_->setAttributeNS (ns, qn, attr.getValue (i));
- }
-
- depth_++;
-
- if (peek_)
- next_depth_ = depth_;
-}
-
-void parser_impl::
-endElement (const XMLCh* const /*uri*/,
- const XMLCh* const /*lname*/,
- const XMLCh* const /*qname*/)
-{
- // We have an element parent only on depth 2 or greater.
- //
- if (--depth_ > 1)
- cur_ = static_cast<DOMElement*> (cur_->getParentNode ());
-}
-
-void parser_impl::
-characters (const XMLCh* const s, const XMLSize_t length)
-{
- const XMLCh empty[] = {chNull};
-
- // Ignore text content (presumably whitespaces) while looking for
- // the next element.
- //
- if (depth_ > whitespace_depth_)
- {
- DOMText* t = doc_->createTextNode (empty);
- static_cast<DOMTextImpl*> (t)->appendData (s, length);
- cur_->appendChild (t);
- }
-}
-
-//
-// parser
-//
-
-parser::
-~parser ()
-{
-}
-
-parser::
-parser (const XMLByte* grammar, size_t grammar_size)
- : impl_ (new parser_impl (grammar, grammar_size))
-{
-}
-
-void parser::
-start (istream& is, const string& id, bool val)
-{
- return impl_->start (is, id, val);
-}
-
-document_ptr parser::
-peek ()
-{
- return impl_->peek ();
-}
-
-document_ptr parser::
-next (document_ptr doc, document_ptr outer_doc)
-{
- return impl_->next (doc, outer_doc);
-}
diff --git a/examples/cxx/tree/streaming/parser.hxx b/examples/cxx/tree/streaming/parser.hxx
deleted file mode 100644
index cb34f92..0000000
--- a/examples/cxx/tree/streaming/parser.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef PARSER_HXX
-#define PARSER_HXX
-
-#include <string>
-#include <iosfwd>
-#include <cstddef> // std::size_t
-#include <memory> // std::auto_ptr
-
-#include <xercesc/dom/DOMDocument.hpp>
-
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-
-class parser_impl;
-
-class parser
-{
-public:
- // We can specify embedded XML Schema grammar to be used by the parser
- // that was created by the xsdbin utility from the 'embedded' example.
- //
- parser (const XMLByte* grammar = 0, std::size_t grammar_size = 0);
- ~parser ();
-
- // The start function prepares everything for parsing a new document.
- //
- void
- start (std::istream& is, const std::string& id, bool validate);
-
- typedef xsd::cxx::xml::dom::auto_ptr<xercesc::DOMDocument> document_ptr;
-
- // The peek function parses just the next element (ignoring any
- // preceding content assuming it is whitespace) without parsing
- // any of its nested content (but it includes the element's
- // attributes). It returns NULL if there are no more elements
- // at this level (there could still be on outer levels in case
- // of nested streaming).
- //
- document_ptr
- peek ();
-
- // The next function parses (or finishes parsing after peek) the
- // next element including its nested content. It returns NULL if
- // there are no more elements at this level (there could still
- // be on outer levels in case of nested streaming).
- //
- // If doc is not NULL, then it should be the document returned
- // by peek(). That is, a document with only the root element.
- // In this case next() finishes parsing this element.
- //
- // If outer_doc is not NULL, then next() will first add doc to
- // outer_doc as a child of the document root.
- //
- document_ptr
- next (document_ptr doc = document_ptr (),
- document_ptr outer_doc = document_ptr ());
-
-private:
- parser (const parser&);
-
- parser&
- operator= (const parser&);
-
-private:
- std::auto_ptr<parser_impl> impl_;
-};
-
-#endif // PARSER_HXX
diff --git a/examples/cxx/tree/streaming/position.xml b/examples/cxx/tree/streaming/position.xml
deleted file mode 100644
index a3428bf..0000000
--- a/examples/cxx/tree/streaming/position.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/streaming/position.xml
-copyright : not copyrighted - public domain
-
--->
-
-<op:object xmlns:op="http://www.codesynthesis.com/op"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/op position.xsd"
- id="123">
-
- <header>
- <name>Lion's Head</name>
- <type>rock</type>
- </header>
-
- <position lat="-33.8569" lon="18.5083"/>
- <position lat="-33.8568" lon="18.5083"/>
- <position lat="-33.8568" lon="18.5082"/>
- <position lat="-33.8570" lon="18.5083"/>
- <position lat="-33.8569" lon="18.5084"/>
- <position lat="-33.8570" lon="18.5084"/>
- <position lat="-33.8570" lon="18.5082"/>
- <position lat="-33.8569" lon="18.5082"/>
-
-</op:object>
diff --git a/examples/cxx/tree/streaming/position.xsd b/examples/cxx/tree/streaming/position.xsd
deleted file mode 100644
index 18dda94..0000000
--- a/examples/cxx/tree/streaming/position.xsd
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/streaming/position.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:op="http://www.codesynthesis.com/op"
- targetNamespace="http://www.codesynthesis.com/op">
-
-
- <xsd:complexType name="header">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="type" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="position">
- <xsd:attribute name="lat" type="xsd:float" use="required"/>
- <xsd:attribute name="lon" type="xsd:float" use="required"/>
- </xsd:complexType>
-
- <xsd:complexType name="object">
- <xsd:sequence>
- <xsd:element name="header" type="op:header"/>
- <xsd:element name="position" type="op:position" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:unsignedInt" use="required"/>
- </xsd:complexType>
-
- <xsd:element name="object" type="op:object"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/streaming/serializer.cxx b/examples/cxx/tree/streaming/serializer.cxx
deleted file mode 100644
index e6513bc..0000000
--- a/examples/cxx/tree/streaming/serializer.cxx
+++ /dev/null
@@ -1,636 +0,0 @@
-#include <vector>
-#include <cassert>
-#include <cstddef>
-
-#include <xercesc/util/XMLUni.hpp>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/dom/impl/DOMDocumentImpl.hpp>
-#include <xercesc/dom/impl/DOMLSSerializerImpl.hpp>
-
-#include <xsd/cxx/xml/string.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-#include <xsd/cxx/xml/dom/serialization-source.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-#include "serializer.hxx"
-
-using namespace std;
-using namespace xercesc;
-
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-static const XMLCh gEOLSeq[] =
-{
- chLF, chNull
-};
-
-static const XMLCh gUTF8[] =
-{
- chLatin_U, chLatin_T, chLatin_F, chDash, chDigit_8, chNull
-};
-
-static const XMLCh gEndElement[] =
-{
- chOpenAngle, chForwardSlash, chNull
-};
-
-static const int DISCARD_DEFAULT_CONTENT_ID = 0x1;
-static const int ENTITIES_ID = 0x2;
-static const int FORMAT_PRETTY_PRINT_1ST_LEVEL_ID = 0xA;
-
-class StreamingDOMSerializer: public DOMLSSerializerImpl
-{
-public:
- StreamingDOMSerializer (MemoryManager* manager)
- : DOMLSSerializerImpl (manager)
- {
- }
-
- bool
- startOpen (const DOMElement* e, DOMLSOutput* const destination)
- {
- const DOMDocument* docu (e->getOwnerDocument ());
- assert (docu != 0);
-
- // Code adapted from DOMLSSerializerImpl::write().
- //
- target_ = destination->getByteStream();
-
- fEncodingUsed = gUTF8;
-
- const XMLCh* lsEncoding=destination->getEncoding();
- if (lsEncoding && *lsEncoding)
- {
- fEncodingUsed = lsEncoding;
- }
- else if (docu)
- {
- const XMLCh* tmpEncoding = docu->getInputEncoding();
-
- if ( tmpEncoding && *tmpEncoding)
- {
- fEncodingUsed = tmpEncoding;
- }
- else
- {
- tmpEncoding = docu->getXmlEncoding();
-
- if ( tmpEncoding && *tmpEncoding)
- {
- fEncodingUsed = tmpEncoding;
- }
- }
- }
-
- fNewLineUsed = (fNewLine && *fNewLine)? fNewLine : gEOLSeq;
-
- fDocumentVersion = (docu->getXmlVersion() && *(docu->getXmlVersion()))
- ? docu->getXmlVersion()
- : XMLUni::fgVersion1_0;
-
- fErrorCount = 0;
-
- fLineFeedInTextNodePrinted = false;
- fLastWhiteSpaceInTextNode = 0;
-
- level_ = 0;
- namespace_map_.clear ();
-
- fFormatter = new (fMemoryManager) XMLFormatter( fEncodingUsed
- ,fDocumentVersion
- ,target_
- ,XMLFormatter::NoEscapes
- ,XMLFormatter::UnRep_CharRef
- ,fMemoryManager);
- formatter_.reset (fFormatter);
-
- // Write out the XML declaration, etc. Here we assume that the document
- // has no children (i.e., no root element).
- //
- processNode (docu, 0);
- fLineFeedInTextNodePrinted = true;
-
- return writeOpen (e);
- }
-
- bool
- writeOpen (const DOMElement* e)
- {
- // Code adapted from the first part of ELEMENT_NODE case in
- // DOMLSSerializerImpl::processNode().
- //
-
- if (!fLineFeedInTextNodePrinted)
- {
- if(level_ == 1 && getFeature(FORMAT_PRETTY_PRINT_1ST_LEVEL_ID))
- printNewLine();
-
- printNewLine();
- }
- else
- {
- fLineFeedInTextNodePrinted = false;
- }
-
- printIndent(level_);
-
- RefHashTableOf<XMLCh>* namespaceMap = NULL;
-
- *fFormatter << XMLFormatter::NoEscapes << chOpenAngle <<
- e->getNodeName ();
-
- setURCharRef();
- DOMNamedNodeMap *attributes = e->getAttributes();
- XMLSize_t attrCount = attributes->getLength();
-
- const XMLCh* prefix = e->getPrefix();
- const XMLCh* uri = e->getNamespaceURI();
- if((uri && uri[0]) ||
- ((prefix==0 || prefix[0]==0) && isDefaultNamespacePrefixDeclared()))
- {
- if(prefix==0 || prefix[0]==0)
- prefix=XMLUni::fgZeroLenString;
- if(!isNamespaceBindingActive(prefix, uri))
- {
- if(namespaceMap==NULL)
- {
- namespaceMap=new (fMemoryManager) RefHashTableOf<XMLCh>(12, false, fMemoryManager);
- fNamespaceStack->addElement(namespaceMap);
- }
- namespaceMap->put((void*)prefix,(XMLCh*)uri);
- *fFormatter << XMLFormatter::NoEscapes
- << chSpace << XMLUni::fgXMLNSString;
-
- if(!XMLString::equals(prefix,XMLUni::fgZeroLenString))
- *fFormatter << chColon << prefix;
-
- *fFormatter << chEqual << chDoubleQuote
- << XMLFormatter::AttrEscapes
- << uri
- << XMLFormatter::NoEscapes
- << chDoubleQuote;
- }
- }
-
- bool discard = getFeature(DISCARD_DEFAULT_CONTENT_ID);
- for (XMLSize_t i = 0; i < attrCount; i++)
- {
- DOMAttr* attribute = (DOMAttr*)attributes->item(i);
-
- if (discard && !((DOMAttr*)attribute )->getSpecified())
- continue;
-
- // if this attribute is a namespace declaration, add it to the namespace map for the current level
- const XMLCh* ns = attribute->getNamespaceURI();
- if (ns != 0 )
- {
- if(XMLString::equals(ns, XMLUni::fgXMLNSURIName))
- {
- if(namespaceMap==NULL)
- {
- namespaceMap=new (fMemoryManager) RefHashTableOf<XMLCh>(12, false, fMemoryManager);
- fNamespaceStack->addElement(namespaceMap);
- }
- const XMLCh* nsPrefix = attribute->getLocalName();
- if(XMLString::equals(attribute->getNodeName(),XMLUni::fgXMLNSString))
- nsPrefix = XMLUni::fgZeroLenString;
- if(namespaceMap->containsKey((void*)nsPrefix))
- continue;
- namespaceMap->put((void*)attribute->getLocalName(),(XMLCh*)attribute->getNodeValue());
- }
- else if(!XMLString::equals(ns, XMLUni::fgXMLURIName))
- {
- // check if the namespace for the current node is already defined
- const XMLCh* prefix = attribute->getPrefix();
- if(prefix && prefix[0])
- {
- const XMLCh* uri = attribute->getNamespaceURI();
- if(!isNamespaceBindingActive(prefix, uri))
- {
- if(namespaceMap==NULL)
- {
- namespaceMap=new (fMemoryManager) RefHashTableOf<XMLCh>(12, false, fMemoryManager);
- fNamespaceStack->addElement(namespaceMap);
- }
- namespaceMap->put((void*)prefix,(XMLCh*)uri);
-
- *fFormatter << XMLFormatter::NoEscapes
- << chSpace << XMLUni::fgXMLNSString << chColon << prefix
- << chEqual << chDoubleQuote
- << XMLFormatter::AttrEscapes
- << uri
- << XMLFormatter::NoEscapes
- << chDoubleQuote;
- }
- }
- }
- }
-
- if (XMLString::equals(ns, XMLUni::fgXMLNSURIName) || checkFilter(attribute) == DOMNodeFilter::FILTER_ACCEPT)
- {
- *fFormatter << XMLFormatter::NoEscapes
- << chSpace << attribute->getNodeName()
- << chEqual << chDoubleQuote
- << XMLFormatter::AttrEscapes;
-
- if (getFeature(ENTITIES_ID))
- {
- DOMNode* child = attribute->getFirstChild();
- while( child != 0)
- {
- if(child->getNodeType()==DOMNode::TEXT_NODE)
- *fFormatter << child->getNodeValue();
- else if(child->getNodeType()==DOMNode::ENTITY_REFERENCE_NODE)
- *fFormatter << XMLFormatter::NoEscapes
- << chAmpersand << child->getNodeName() << chSemiColon
- << XMLFormatter::AttrEscapes;
- child = child->getNextSibling();
- }
- }
- else
- *fFormatter << attribute->getNodeValue();
-
- *fFormatter << XMLFormatter::NoEscapes << chDoubleQuote;
- }
- }
-
- *fFormatter << XMLFormatter::NoEscapes << chCloseAngle;
-
- // Keep track of whether we have added a namespace map for this
- // element. Used to pop it in writeClose().
- //
- namespace_map_.push_back (namespaceMap != 0);
-
- level_++;
-
- DOMNode* child = e->getFirstChild();
- while (child != 0)
- {
- processNode (child, level_);
- child = child->getNextSibling();
- }
-
- return fErrorCount == 0;
- }
-
- bool
- writeClose (const XMLCh* name)
- {
- // Code adapted from the second part of ELEMENT_NODE case in
- // DOMLSSerializerImpl::processNode().
- //
- level_--;
-
- // Assume we are not on the same line (nodeLine != fCurrentLine).
- //
- {
- if (!fLineFeedInTextNodePrinted)
- {
- printNewLine();
- }
- else
- {
- fLineFeedInTextNodePrinted = false;
- }
-
- if(level_ == 0 && getFeature(FORMAT_PRETTY_PRINT_1ST_LEVEL_ID))
- printNewLine();
-
- printIndent(level_);
- }
-
- *fFormatter << XMLFormatter::NoEscapes << gEndElement <<
- name << chCloseAngle;
-
- if (namespace_map_.back ())
- fNamespaceStack->removeLastElement();
-
- namespace_map_.pop_back ();
-
- if (level_ == 0)
- {
- printNewLine();
- target_->flush ();
- }
-
- return fErrorCount == 0;
- }
-
- bool
- write (const DOMElement* e)
- {
- processNode (e, level_);
- return fErrorCount == 0;
- }
-
- using DOMLSSerializerImpl::write; // Whole document.
-
-public:
- // Update the namespace stack to point to the strings from the
- // new document's string pool.
- //
- void
- update_namespace_stack (DOMDocument& d)
- {
- DOMDocumentImpl& di (dynamic_cast<DOMDocumentImpl&> (d));
-
- for (XMLSize_t i (0); i != fNamespaceStack->size (); ++i)
- {
- RefHashTableOf<XMLCh>& t (*fNamespaceStack->elementAt (i));
- RefHashTableOfEnumerator<XMLCh> e (&t, false, fMemoryManager);
- while (e.hasMoreElements ())
- {
- XMLCh* k ((XMLCh*) (e.nextElementKey ()));
- XMLCh* v (t.get (k));
- t.put ((void*) (di.getPooledString (k)),
- (XMLCh*) (di.getPooledString (v)));
- }
- }
- }
-
-private:
- XMLFormatTarget* target_;
- std::auto_ptr<XMLFormatter> formatter_;
- int level_;
-
- std::vector<bool> namespace_map_;
-};
-
-class serializer_impl
-{
-public:
- typedef serializer::namespace_infomap namespace_infomap;
-
- serializer_impl ();
-
- void
- start (ostream& os, const string& encoding);
-
- DOMElement*
- create (const string& name, const namespace_infomap&);
-
- DOMElement*
- create (const string& ns, const string& qname, const namespace_infomap&);
-
- void
- serialize (xml::dom::auto_ptr<DOMElement>);
-
- void
- serialize_open (xml::dom::auto_ptr<DOMElement>);
-
- void
- serialize_close (const string&);
-
-private:
- void
- clear_document ();
-
-private:
- bool start_;
-
- // Serializer.
- //
- xml::dom::auto_ptr<DOMLSOutput> out_;
- xml::dom::auto_ptr<StreamingDOMSerializer> serializer_;
-
- auto_ptr<xml::dom::ostream_format_target> oft_;
-
- tree::error_handler<char> error_handler_;
- xml::dom::bits::error_handler_proxy<char> error_proxy_;
-
- // DOM document that we use to create the elements.
- //
- DOMImplementation& dom_impl_;
- xml::dom::auto_ptr<DOMDocument> doc_;
- vector<DOMElement*> element_stack_;
-
- size_t element_count_; // Number of elements serialized using current doc.
- static const size_t element_count_limit_ = 500;
-};
-
-const XMLCh ls[] = {chLatin_L, chLatin_S, chNull};
-
-serializer_impl::
-serializer_impl ()
- : error_proxy_ (error_handler_),
- dom_impl_ (*DOMImplementationRegistry::getDOMImplementation (ls))
-{
- serializer_.reset (
- new (XMLPlatformUtils::fgMemoryManager)
- StreamingDOMSerializer (XMLPlatformUtils::fgMemoryManager));
-
- DOMConfiguration* conf (serializer_->getDomConfig ());
- conf->setParameter (XMLUni::fgDOMErrorHandler, &error_proxy_);
- conf->setParameter (XMLUni::fgDOMXMLDeclaration, true);
- conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true);
- conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true);
- conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false);
-}
-
-void serializer_impl::
-start (ostream& os, const string& encoding)
-{
- element_stack_.clear ();
- doc_.reset (dom_impl_.createDocument ());
- element_count_ = 0;
-
- error_handler_.reset ();
- oft_.reset (new xml::dom::ostream_format_target (os));
-
- out_.reset (dom_impl_.createLSOutput ());
- out_->setEncoding (xml::string (encoding).c_str ());
- out_->setByteStream (oft_.get ());
-
- start_ = true;
-}
-
-DOMElement* serializer_impl::
-create (const string& name, const namespace_infomap& map)
-{
- DOMElement* r (doc_->createElement (xml::string (name).c_str ()));
-
- if (!map.empty ())
- xml::dom::add_namespaces<char> (*r, map);
-
- // Add the element as the child of the stack "tip" so that it
- // "sees" all the namespace declarations active from this point.
- //
- if (!element_stack_.empty ())
- element_stack_.back ()->appendChild (r);
-
- return r;
-}
-
-DOMElement* serializer_impl::
-create (const string& ns, const string& qname, const namespace_infomap& map)
-{
- DOMElement* r (
- doc_->createElementNS (
- xml::string (ns).c_str (), xml::string (qname).c_str ()));
-
- if (!map.empty ())
- xml::dom::add_namespaces<char> (*r, map);
-
- // Add the element as the child of the stack "tip" so that it
- // "sees" all the namespace declarations active from this point.
- //
- if (!element_stack_.empty ())
- element_stack_.back ()->appendChild (r);
-
- return r;
-}
-
-void serializer_impl::
-serialize (xml::dom::auto_ptr<DOMElement> p)
-{
- DOMElement* e (p.get ());
-
- if (start_)
- {
- serializer_->write (e, out_.get ());
- start_ = false;
- }
- else
- serializer_->write (e);
-
- error_handler_.throw_if_failed<tree::serialization<char> > ();
-
- // Remove this element from its parent before we release.
- //
- if (!element_stack_.empty ())
- element_stack_.back ()->removeChild (e);
-
- p.reset (); // Release it before we may clear the document below.
-
- if (element_count_++ > element_count_limit_)
- clear_document ();
-}
-
-void serializer_impl::
-serialize_open (xml::dom::auto_ptr<DOMElement> p)
-{
- DOMElement* e (p.get ());
-
- if (start_)
- {
- serializer_->startOpen (e, out_.get ());
- start_ = false;
- }
- else
- serializer_->writeOpen (e);
-
- error_handler_.throw_if_failed<tree::serialization<char> > ();
-
- // Add this element to the element stack. serialize_close() is
- // responsible for its removal and releasing.
- //
- element_stack_.push_back (e);
- p.release ();
-}
-
-void serializer_impl::
-serialize_close (const string& name)
-{
- serializer_->writeClose (xml::string (name).c_str ());
- error_handler_.throw_if_failed<tree::serialization<char> > ();
-
- // Release the element.
- //
- DOMElement* e (element_stack_.back ());
- element_stack_.pop_back ();
-
- if (!element_stack_.empty ())
- element_stack_.back ()->removeChild (e);
-
- e->release ();
-
- if (element_count_++ > element_count_limit_)
- clear_document ();
-}
-
-void serializer_impl::
-clear_document ()
-{
- // Re-create the document in order to force deallocation of its
- // internal heap. While Xerces-C++ DOM tries to re-use memory,
- // it still accumulates no longer used memory blocks.
- //
- xml::dom::auto_ptr<DOMDocument> doc (dom_impl_.createDocument ());
-
- if (!element_stack_.empty ())
- {
- DOMElement* e (
- static_cast<DOMElement*> (
- doc->importNode (element_stack_.front (), true)));
-
- for (vector<DOMElement*>::iterator i (element_stack_.begin ());
- i != element_stack_.end ();
- ++i)
- {
- *i = e;
- e = static_cast<DOMElement*> (e->getFirstChild ());
- }
- }
-
- // Update the namespace stack to use the new document.
- //
- serializer_->update_namespace_stack (*doc);
-
- doc_ = doc;
- element_count_ = 0;
-}
-
-//
-// serializer
-//
-
-serializer::
-~serializer ()
-{
-}
-
-serializer::
-serializer ()
- : impl_ (new serializer_impl)
-{
-}
-
-void serializer::
-start (ostream& os, const string& encoding)
-{
- impl_->start (os, encoding);
-}
-
-DOMElement* serializer::
-create (const string& name, const namespace_infomap& map)
-{
- return impl_->create (name, map);
-}
-
-DOMElement* serializer::
-create (const string& ns, const string& qname, const namespace_infomap& map)
-{
- return impl_->create (ns, qname, map);
-}
-
-void serializer::
-serialize (xml::dom::auto_ptr<DOMElement> e)
-{
- impl_->serialize (e);
-}
-
-void serializer::
-serialize_open (xml::dom::auto_ptr<DOMElement> e)
-{
- impl_->serialize_open (e);
-}
-
-void serializer::
-serialize_close (const string& name)
-{
- impl_->serialize_close (name);
-}
diff --git a/examples/cxx/tree/streaming/serializer.hxx b/examples/cxx/tree/streaming/serializer.hxx
deleted file mode 100644
index 43fab69..0000000
--- a/examples/cxx/tree/streaming/serializer.hxx
+++ /dev/null
@@ -1,205 +0,0 @@
-// file : examples/cxx/tree/streaming/serializer.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : not copyrighted - public domain
-
-#ifndef SERIALIZER_HXX
-#define SERIALIZER_HXX
-
-#include <string>
-#include <iosfwd>
-#include <memory> // std::auto_ptr
-
-#include <xercesc/dom/DOMElement.hpp>
-
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-#include <xsd/cxx/xml/dom/serialization-header.hxx> // namespace_infomap
-
-class serializer_impl;
-
-class serializer
-{
-public:
- typedef xsd::cxx::xml::dom::namespace_infomap<char> namespace_infomap;
-
- ~serializer ();
- serializer ();
-
- // Start the serialization process.
- //
- void
- start (std::ostream& is, const std::string& encoding = "UTF-8");
-
- // Serialize next object model fragment into an element with the specified
- // name.
- //
- template <typename T>
- void
- next (const std::string& name, const T& x);
-
- // Serialize next object model fragment into an element with the specified
- // name and namespace declarations.
- //
- template <typename T>
- void
- next (const std::string& name, const namespace_infomap&, const T& x);
-
- // Serialize next object model fragment into an element with the specified
- // namespace and qualified name.
- //
- template <typename T>
- void
- next (const std::string& ns, const std::string& name, const T& x);
-
- // Serialize next object model fragment into an element with the specified
- // namespace and qualified name as well as namespace declarations.
- //
- template <typename T>
- void
- next (const std::string& ns,
- const std::string& name,
- const namespace_infomap&,
- const T& x);
-
- // The next_open/close functions are like next() but split into two steps.
- // next_open() serializes the object model fragment into an element leaving
- // it open while next_close() closes the element.
- //
- template <typename T>
- void
- next_open (const std::string& name, const T& x);
-
- template <typename T>
- void
- next_open (const std::string& name, const namespace_infomap&, const T& x);
-
- template <typename T>
- void
- next_open (const std::string& ns, const std::string& name, const T& x);
-
- template <typename T>
- void
- next_open (const std::string& ns,
- const std::string& name,
- const namespace_infomap&,
- const T& x);
-
- void
- next_close (const std::string& name);
-
-private:
- serializer (const serializer&);
-
- serializer&
- operator= (const serializer&);
-
-private:
- xercesc::DOMElement*
- create (const std::string& name, const namespace_infomap&);
-
- xercesc::DOMElement*
- create (const std::string& ns,
- const std::string& name,
- const namespace_infomap&);
-
- void
- serialize (xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement>);
-
- void
- serialize_open (xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement>);
-
- void
- serialize_close (const std::string& name);
-
-private:
- std::auto_ptr<serializer_impl> impl_;
-};
-
-template <typename T>
-inline void serializer::
-next (const std::string& name, const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (
- create (name, namespace_infomap ()));
- *e << x;
- serialize (e);
-}
-
-template <typename T>
-inline void serializer::
-next (const std::string& name, const namespace_infomap& map, const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (create (name, map));
- *e << x;
- serialize (e);
-}
-
-template <typename T>
-inline void serializer::
-next (const std::string& ns, const std::string& name, const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (
- create (ns, name, namespace_infomap ()));
- *e << x;
- serialize (e);
-}
-
-template <typename T>
-inline void serializer::
-next (const std::string& ns,
- const std::string& name,
- const namespace_infomap& map,
- const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (create (ns, name, map));
- *e << x;
- serialize (e);
-}
-
-template <typename T>
-inline void serializer::
-next_open (const std::string& name, const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (
- create (name, namespace_infomap ()));
- *e << x;
- serialize_open (e);
-}
-
-template <typename T>
-inline void serializer::
-next_open (const std::string& name, const namespace_infomap& map, const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (create (name, map));
- *e << x;
- serialize_open (e);
-}
-
-template <typename T>
-inline void serializer::
-next_open (const std::string& ns, const std::string& name, const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (
- create (ns, name, namespace_infomap ()));
- *e << x;
- serialize_open (e);
-}
-
-template <typename T>
-inline void serializer::
-next_open (const std::string& ns,
- const std::string& name,
- const namespace_infomap& map,
- const T& x)
-{
- xsd::cxx::xml::dom::auto_ptr<xercesc::DOMElement> e (create (ns, name, map));
- *e << x;
- serialize_open (e);
-}
-
-inline void serializer::
-next_close (const std::string& name)
-{
- serialize_close (name);
-}
-
-#endif // SERIALIZER_HXX
diff --git a/examples/cxx/tree/wildcard/driver.cxx b/examples/cxx/tree/wildcard/driver.cxx
deleted file mode 100644
index 64acfce..0000000
--- a/examples/cxx/tree/wildcard/driver.cxx
+++ /dev/null
@@ -1,159 +0,0 @@
-// file : examples/cxx/tree/wildcard/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <string>
-#include <memory> // std::auto_ptr
-#include <cstring> // std::memcpy
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "email.hxx"
-
-// The following string class keeps us sane when working with Xerces.
-// Include it after the generated header in order to get only char or
-// wchar_t version depending on how you compiled your schemas.
-//
-#include <xsd/cxx/xml/string.hxx>
-
-using std::cerr;
-using std::endl;
-using std::string;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " email.xml" << endl;
- return 1;
- }
-
- using namespace xercesc;
-
- int r (0);
-
- // The Xerces-C++ DOM objects that will be used to store the
- // content matched by wildcards "out-live" the call to the
- // parsing function. Therefore we need to initialize the
- // Xerces-C++ runtime ourselves.
- //
- XMLPlatformUtils::Initialize ();
-
- try
- {
- using namespace email;
- namespace xml = xsd::cxx::xml;
-
- // Read in the message.
- //
- std::auto_ptr<envelope> msg (
- message (argv[1], xml_schema::flags::dont_initialize));
-
- // Print what we've got.
- //
- cerr << "To: " << msg->to () << endl
- << "From: " << msg->from () << endl
- << "Subject: " << msg->subject () << endl;
-
- envelope::any_sequence& body (msg->any ());
-
- for (envelope::any_iterator i (body.begin ()); i != body.end (); ++i)
- {
- DOMElement& e (*i);
- string name (xml::transcode<char> (e.getLocalName ()));
-
- if (name == "text")
- {
- // Create object representation for the text element.
- //
- xml_schema::string text (e);
-
- cerr << text << endl
- << endl;
- }
- else if (name == "binary")
- {
- // Create object representation for the binary element.
- //
- binary bin (e);
-
- cerr << "binary: " << bin.name () << " type: " << bin.mime () << endl
- << endl;
- }
- else
- {
- cerr << "unknown body type: " << name << endl;
- }
- }
-
- // Create a reply message.
- //
- envelope reply (msg->from (), msg->to (), "Re: " + msg->subject ());
-
- // Copy the thread-id attribute from the original message if any.
- //
- envelope::any_attribute_set& as (msg->any_attribute ());
- envelope::any_attribute_iterator ti (
- as.find ("http://www.codesynthesis.com/email", "thread-id"));
-
- if (ti != as.end ())
- reply.any_attribute ().insert (*ti);
-
- // Add a text body.
- //
- DOMDocument& doc (reply.dom_document ());
- envelope::any_sequence& rbody (reply.any ());
-
- xml_schema::string text ("Hi!\n\n"
- "Indeed nice pictures. Check out mine.\n\n"
- "Jane");
-
- DOMElement* e (
- doc.createElementNS (
- xml::string ("http://www.codesynthesis.com/email").c_str (),
- xml::string ("eml:text").c_str ()));
-
- *e << text;
- rbody.push_back (e);
-
- // Add a (fake) image.
- //
- binary pic ("pic.jpg", "image/jpeg");
- pic.size (3);
- std::memcpy (pic.data (), "123", 3);
-
- e = doc.createElementNS (
- xml::string ("http://www.codesynthesis.com/email").c_str (),
- xml::string ("eml:binary").c_str ());
-
- *e << pic;
- rbody.push_back (e);
-
-
- // Prepare namespace mapping and schema location information for
- // serialization.
- //
- xml_schema::namespace_infomap map;
-
- map["eml"].name = "http://www.codesynthesis.com/email";
- map["eml"].schema = "email.xsd";
-
- // Write it out.
- //
- message (std::cout,
- reply,
- map,
- "UTF-8",
- xml_schema::flags::dont_initialize);
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
-
- XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/examples/cxx/tree/wildcard/email.xml b/examples/cxx/tree/wildcard/email.xml
deleted file mode 100644
index 9272d5c..0000000
--- a/examples/cxx/tree/wildcard/email.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/wildcard/email.xml
-copyright : not copyrighted - public domain
-
--->
-
-<eml:message xmlns:eml="http://www.codesynthesis.com/email"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/email email.xsd"
- eml:thread-id="123456789">
-
- <to>Jane Doe &lt;jane@doe.com></to>
- <from>John Doe &lt;john@doe.com></from>
- <subject>Surfing pictures</subject>
-
- <eml:text>
-Hi Jane,
-
-Here are cool pictures of me surfing.
-
-Cheers,
-John
- </eml:text>
-
- <eml:binary name="pic1.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
- <eml:binary name="pic2.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
-
-</eml:message>
diff --git a/examples/cxx/tree/wildcard/email.xsd b/examples/cxx/tree/wildcard/email.xsd
deleted file mode 100644
index 239cb9d..0000000
--- a/examples/cxx/tree/wildcard/email.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/wildcard/email.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:eml="http://www.codesynthesis.com/email"
- targetNamespace="http://www.codesynthesis.com/email">
-
- <!-- Predefined envolop body types. -->
-
- <xsd:element name="text" type="xsd:string"/>
-
- <xsd:complexType name="binary">
- <xsd:simpleContent>
- <xsd:extension base="xsd:base64Binary">
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="mime" type="xsd:string" use="required"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:element name="binary" type="eml:binary"/>
-
- <!-- Predefined envelop attributes. -->
-
- <xsd:attribute name="thread-id" type="xsd:unsignedInt"/>
-
-
- <xsd:complexType name="envelope">
- <xsd:sequence>
- <xsd:element name="to" type="xsd:string"/>
- <xsd:element name="from" type="xsd:string"/>
- <xsd:element name="subject" type="xsd:string"/>
-
- <!-- Extensible envelope body. -->
-
- <xsd:any namespace="##targetNamespace" processContents="strict"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:anyAttribute namespace="##targetNamespace" processContents="strict"/>
- </xsd:complexType>
-
- <xsd:element name="message" type="eml:envelope"/>
-
-</xsd:schema>
diff --git a/examples/cxx/tree/wildcard/makefile b/examples/cxx/tree/wildcard/makefile
deleted file mode 100644
index 84064c1..0000000
--- a/examples/cxx/tree/wildcard/makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-# file : examples/cxx/tree/wildcard/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := email.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-inline --generate-wildcard \
---generate-serialization --root-element message
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/email.xsd,$(install_doc_dir)/xsd/$(path)/email.xsd)
- $(call install-data,$(src_base)/email.xml,$(install_doc_dir)/xsd/$(path)/email.xml)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/email.xsd,$(dist_prefix)/$(path)/email.xsd)
- $(call install-data,$(src_base)/email.xml,$(dist_prefix)/$(path)/email.xml)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/xpath/dom-parse.cxx b/examples/cxx/tree/xpath/dom-parse.cxx
deleted file mode 100644
index 0282780..0000000
--- a/examples/cxx/tree/xpath/dom-parse.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-// file : examples/cxx/tree/xpath/dom-parse.cxx
-// copyright : not copyrighted - public domain
-
-#include "dom-parse.hxx"
-
-#include <istream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-xml::dom::auto_ptr<DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate,
- DOMImplementation* impl)
-{
- xml::dom::auto_ptr<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable/Disable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, validate);
- conf->setParameter (XMLUni::fgXercesSchema, validate);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Prepare input stream.
- //
- xml::sax::std_input_source isrc (is, id);
- Wrapper4InputSource wrap (&isrc, false);
-
- xml::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<tree::parsing<char> > ();
-
- return doc;
-}
diff --git a/examples/cxx/tree/xpath/dom-parse.hxx b/examples/cxx/tree/xpath/dom-parse.hxx
deleted file mode 100644
index 9fa0eb9..0000000
--- a/examples/cxx/tree/xpath/dom-parse.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// file : examples/cxx/tree/xpath/dom-parse.hxx
-// copyright : not copyrighted - public domain
-
-#ifndef DOM_PARSE
-#define DOM_PARSE
-
-#include <string>
-#include <iosfwd>
-
-#include <xercesc/dom/DOMDocument.hpp>
-#include <xercesc/dom/DOMImplementation.hpp>
-
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-
-// Parse an XML document from the standard input stream with an
-// optional resource id. Resource id is used in diagnostics as
-// well as to locate schemas referenced from inside the document.
-//
-xsd::cxx::xml::dom::auto_ptr<xercesc::DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate,
- xercesc::DOMImplementation*);
-
-#endif // DOM_PARSE
diff --git a/examples/cxx/tree/xpath/driver.cxx b/examples/cxx/tree/xpath/driver.cxx
deleted file mode 100644
index f9bd040..0000000
--- a/examples/cxx/tree/xpath/driver.cxx
+++ /dev/null
@@ -1,136 +0,0 @@
-// file : examples/cxx/tree/xpath/driver.cxx
-// copyright : not copyrighted - public domain
-
-#include <memory> // std::auto_ptr
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-
-#include <xqilla/xqilla-dom3.hpp>
-
-#include <xsd/cxx/xml/string.hxx> // xml::string, xml::transcode
-
-#include "dom-parse.hxx"
-
-#include "people.hxx"
-
-using namespace std;
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " people.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- // Initialise Xerces-C++ and XQilla.
- //
- XQillaPlatformUtils::initialize();
-
- // Get the XQilla DOMImplementation object with support for XPath.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation(
- xml::string ("XPath2 3.0").c_str ()));
-
- try
- {
- using namespace people;
-
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- // Parse the XML file to DOM using the XQilla DOMImplementation.
- //
- xml_schema::dom::auto_ptr<xercesc::DOMDocument> dom (
- parse (ifs, argv[1], true, impl));
-
- // Parse the DOM document to the object model. We also request that
- // the DOM document to be associated with the object model.
- //
- std::auto_ptr<directory> d (
- directory_ (dom,
- xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
-
- // Obtain the root element and document corresponding to the
- // directory object.
- //
- DOMElement* root (static_cast<DOMElement*> (d->_node ()));
- DOMDocument* doc (root->getOwnerDocument ());
-
- // Obtain namespace resolver.
- //
- xml_schema::dom::auto_ptr<DOMXPathNSResolver> resolver (
- doc->createNSResolver (root));
-
- // Set the namespace prefix for the people namespace that we can
- // use reliably in XPath expressions regardless of what is used
- // in XML documents.
- //
- resolver->addNamespaceBinding (
- xml::string ("p").c_str (),
- xml::string ("http://www.codesynthesis.com/people").c_str ());
-
- // Create XPath expression.
- //
- xml_schema::dom::auto_ptr<DOMXPathExpression> expr (
- doc->createExpression (
- xml::string ("p:directory/person[age > 30]").c_str (),
- resolver.get ()));
-
- // Execute the query.
- //
- xml_schema::dom::auto_ptr<DOMXPathResult> r (
- expr->evaluate (doc, DOMXPathResult::ITERATOR_RESULT_TYPE, 0));
-
- // Iterate over the result.
- //
- cerr << "Records matching the query:" << endl;
-
- while (r->iterateNext ())
- {
- DOMNode* n (r->getNodeValue ());
-
- // Obtain the object model node corresponding to this DOM node.
- //
- person* p (
- static_cast<person*> (
- n->getUserData (xml_schema::dom::tree_node_key)));
-
- // Print the data using the object model.
- //
- cerr << endl
- << "First : " << p->first_name () << endl
- << "Last : " << p->last_name () << endl
- << "Gender : " << p->gender () << endl
- << "Age : " << p->age () << endl;
- }
- }
- catch(const DOMException& e)
- {
- cerr << xml::transcode<char> (e.getMessage ()) << std::endl;
- r = 1;
- }
- catch (const xml_schema::exception& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- XQillaPlatformUtils::terminate();
- return r;
-}
diff --git a/examples/cxx/tree/xpath/makefile b/examples/cxx/tree/xpath/makefile
deleted file mode 100644
index 3f5a3b0..0000000
--- a/examples/cxx/tree/xpath/makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-# file : examples/cxx/tree/xpath/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := people.xsd
-cxx := driver.cxx dom-parse.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-ifeq ($(filter $(MAKECMDGOALS),dist dist-win install),)
-$(call import,\
- $(scf_root)/import/libxqilla/stub.make,\
- l: xqilla.l,cpp-options: xqilla.l.cpp-options)
-endif
-
-
-# Build.
-#
-$(driver): $(obj) $(xqilla.l) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xqilla.l.cpp-options) $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Install & Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(install) $(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base))
-
-$(install):
- $(call install-data,$(src_base)/README,$(install_doc_dir)/xsd/$(path)/README)
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/xsd/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(install_doc_dir)/xsd/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(install_doc_dir)/xsd/$(path)/people.xml)
- $(call install-data,$(src_base)/dom-parse.hxx,$(install_doc_dir)/xsd/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(install_doc_dir)/xsd/$(path)/dom-parse.cxx)
-
-$(dist-common):
- $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx)
- $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd)
- $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml)
- $(call install-data,$(src_base)/dom-parse.hxx,$(dist_prefix)/$(path)/dom-parse.hxx)
- $(call install-data,$(src_base)/dom-parse.cxx,$(dist_prefix)/$(path)/dom-parse.cxx)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README)
-
-$(dist-win): |$(out_root)/.dist-pre
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt)
- $(call message,,todos $(dist_prefix)/$(path)/README.txt)
- $(call meta-vc8sln,$(src_root)/dist/template-vc8.sln,xpath-vc8.sln)
- $(call meta-vc9sln,$(src_root)/dist/template-vc9.sln,xpath-vc9.sln)
- $(call meta-vc10sln,$(src_root)/dist/template-vc10.sln,xpath-vc10.sln)
- $(call meta-vc11sln,$(src_root)/dist/template-vc11.sln,xpath-vc11.sln)
- $(call meta-vc12sln,$(src_root)/dist/template-vc12.sln,xpath-vc12.sln)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-
-$(call include,$(bld_root)/install.make)
-$(call include,$(bld_root)/meta/vc8sln.make)
-$(call include,$(bld_root)/meta/vc9sln.make)
-$(call include,$(bld_root)/meta/vc10sln.make)
-$(call include,$(bld_root)/meta/vc11sln.make)
-$(call include,$(bld_root)/meta/vc12sln.make)
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/examples/cxx/tree/xpath/people.xml b/examples/cxx/tree/xpath/people.xml
deleted file mode 100644
index 9ad9ab6..0000000
--- a/examples/cxx/tree/xpath/people.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/xpath/people.xml
-copyright : not copyrighted - public domain
-
--->
-
-<ppl:directory xmlns:ppl="http://www.codesynthesis.com/people"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
-
- <person>
- <first-name>John</first-name>
- <last-name>Doe</last-name>
- <gender>male</gender>
- <age>32</age>
- </person>
-
- <person>
- <first-name>Jane</first-name>
- <last-name>Doe</last-name>
- <gender>female</gender>
- <age>28</age>
- </person>
-
-</ppl:directory>
diff --git a/examples/cxx/tree/xpath/people.xsd b/examples/cxx/tree/xpath/people.xsd
deleted file mode 100644
index 5be94de..0000000
--- a/examples/cxx/tree/xpath/people.xsd
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-
-file : examples/cxx/tree/xpath/people.xsd
-copyright : not copyrighted - public domain
-
--->
-
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:ppl="http://www.codesynthesis.com/people"
- targetNamespace="http://www.codesynthesis.com/people">
-
- <xsd:simpleType name="gender">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="male"/>
- <xsd:enumeration value="female"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="person">
- <xsd:sequence>
- <xsd:element name="first-name" type="xsd:string"/>
- <xsd:element name="last-name" type="xsd:string"/>
- <xsd:element name="gender" type="ppl:gender"/>
- <xsd:element name="age" type="xsd:unsignedShort"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="directory">
- <xsd:sequence>
- <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:element name="directory" type="ppl:directory"/>
-
-</xsd:schema>
diff --git a/examples/makefile b/examples/makefile
deleted file mode 100644
index 32f6336..0000000
--- a/examples/makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# file : examples/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-
-default := $(out_base)/
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-$(default): $(out_base)/cxx/parser/ $(out_base)/cxx/tree/
-$(install): $(out_base)/cxx/parser/.install $(out_base)/cxx/tree/.install
-$(dist): $(out_base)/cxx/parser/.dist $(out_base)/cxx/tree/.dist
-$(dist-win): $(out_base)/cxx/parser/.dist-win $(out_base)/cxx/tree/.dist-win
-$(clean): $(out_base)/cxx/parser/.clean $(out_base)/cxx/tree/.clean
-
-$(call import,$(src_base)/cxx/parser/makefile)
-$(call import,$(src_base)/cxx/tree/makefile)
diff --git a/libxsd-tests/.gitignore b/libxsd-tests/.gitignore
new file mode 100644
index 0000000..1b1f9fb
--- /dev/null
+++ b/libxsd-tests/.gitignore
@@ -0,0 +1,28 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.ii
+*.o
+*.obj
+*.so
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
+
+# Test executables.
+#
+driver
+
+# Testscript output directories (can be symlinks).
+#
+test
+test-*
diff --git a/libxsd-tests/FLOSSE b/libxsd-tests/FLOSSE
new file mode 120000
index 0000000..be6df3d
--- /dev/null
+++ b/libxsd-tests/FLOSSE
@@ -0,0 +1 @@
+../FLOSSE \ No newline at end of file
diff --git a/libxsd-tests/GPLv2 b/libxsd-tests/GPLv2
new file mode 120000
index 0000000..08e5586
--- /dev/null
+++ b/libxsd-tests/GPLv2
@@ -0,0 +1 @@
+../GPLv2 \ No newline at end of file
diff --git a/libxsd-tests/LICENSE b/libxsd-tests/LICENSE
new file mode 120000
index 0000000..ea5b606
--- /dev/null
+++ b/libxsd-tests/LICENSE
@@ -0,0 +1 @@
+../LICENSE \ No newline at end of file
diff --git a/libxsd-tests/README b/libxsd-tests/README
new file mode 100644
index 0000000..1ab33da
--- /dev/null
+++ b/libxsd-tests/README
@@ -0,0 +1,8 @@
+This package contains tests for the XSD to C++ data binding runtime library.
+
+See the LICENSE file for distribution conditions.
+
+The project page is at https://www.codesynthesis.com/projects/xsd/.
+
+Send bug reports or any other feedback to the xsd-users@codesynthesis.com
+mailing list.
diff --git a/libxsd-tests/build/.gitignore b/libxsd-tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/libxsd-tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/libxsd-tests/build/bootstrap.build b/libxsd-tests/build/bootstrap.build
new file mode 100644
index 0000000..e10dbfc
--- /dev/null
+++ b/libxsd-tests/build/bootstrap.build
@@ -0,0 +1,9 @@
+# file : build/bootstrap.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+project = libxsd-tests
+
+using version
+using config
+using dist
+using test
diff --git a/libxsd-tests/build/root.build b/libxsd-tests/build/root.build
new file mode 100644
index 0000000..d511eb2
--- /dev/null
+++ b/libxsd-tests/build/root.build
@@ -0,0 +1,25 @@
+# file : build/root.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+
+# Every exe{} in this project is by default a test.
+#
+exe{*}: test = true
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/libxsd-tests/buildfile b/libxsd-tests/buildfile
new file mode 100644
index 0000000..e783791
--- /dev/null
+++ b/libxsd-tests/buildfile
@@ -0,0 +1,4 @@
+# file : buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+./: {*/ -build/} doc{README} legal{GPLv2 LICENSE FLOSSE} manifest
diff --git a/libxsd-tests/cxx/parser/expat/basic/buildfile b/libxsd-tests/cxx/parser/expat/basic/buildfile
new file mode 100644
index 0000000..86279d4
--- /dev/null
+++ b/libxsd-tests/cxx/parser/expat/basic/buildfile
@@ -0,0 +1,7 @@
+# file : cxx/parser/expat/basic/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libexpat%lib{expat}
+
+exe{driver}: cxx{driver} $libs testscript
diff --git a/libxsd-tests/cxx/parser/expat/basic/driver.cxx b/libxsd-tests/cxx/parser/expat/basic/driver.cxx
new file mode 100644
index 0000000..f601e7a
--- /dev/null
+++ b/libxsd-tests/cxx/parser/expat/basic/driver.cxx
@@ -0,0 +1,124 @@
+// file : cxx/parser/expat/basic/driver.cxx
+// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <cassert>
+#include <iostream>
+
+// Define XSD_CXX11 since we include libxsd headers directly.
+//
+#ifdef _MSC_VER
+# if _MSC_VER >= 1600 // VC++10 and later have C++11 always enabled.
+# define XSD_CXX11
+# endif
+#else
+# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+# define XSD_CXX11
+# endif
+#endif
+
+#include <xsd/cxx/config.hxx> // XSD_UNUSED
+#include <xsd/cxx/ro-string.hxx>
+
+#include <xsd/cxx/parser/expat/elements.hxx>
+
+#include <xsd/cxx/parser/non-validating/parser.hxx>
+#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>
+#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>
+
+using namespace std;
+using namespace xsd::cxx;
+
+typedef parser::non_validating::string_pskel<char> string_pskel;
+
+class hello_pimpl: public parser::non_validating::complex_content<char>
+{
+public:
+ hello_pimpl (string_pskel& greeting, string_pskel& name)
+ : greeting_parser_ (&greeting),
+ name_parser_ (&name) {}
+
+private:
+ virtual bool
+ _start_element_impl (const ro_string<char>&,
+ const ro_string<char>&,
+ const ro_string<char>*);
+
+ virtual bool
+ _end_element_impl (const ro_string<char>&, const ro_string<char>&);
+
+ string_pskel* greeting_parser_;
+ string_pskel* name_parser_;
+};
+
+bool hello_pimpl::
+_start_element_impl (const ro_string<char>& ns,
+ const ro_string<char>& n,
+ const ro_string<char>* t)
+{
+ XSD_UNUSED (t);
+
+ if (complex_content::_start_element_impl (ns, n, t))
+ return true;
+
+ if (n == "greeting" && ns.empty ())
+ {
+ context_.top ().parser_ = greeting_parser_;
+
+ if (greeting_parser_)
+ greeting_parser_->pre ();
+
+ return true;
+ }
+
+ if (n == "name" && ns.empty ())
+ {
+ context_.top ().parser_ = name_parser_;
+
+ if (name_parser_)
+ name_parser_->pre ();
+
+ return true;
+ }
+
+ return false;
+}
+
+bool hello_pimpl::
+_end_element_impl (const ro_string<char>& ns, const ro_string<char>& n)
+{
+ if (complex_content::_end_element_impl (ns, n))
+ return true;
+
+ if (n == "greeting" && ns.empty ())
+ {
+ cout << n << ' ' << greeting_parser_->post_string () << endl;
+ return true;
+ }
+
+ if (n == "name" && ns.empty ())
+ {
+ cout << n << ' ' << name_parser_->post_string () << endl;
+ return true;
+ }
+
+ return false;
+}
+
+
+// Usage: argv[0] <xml-file>
+//
+// Parse the specified XML file using the event-driven skeleton-based parser
+// and print the element names and values to stdout.
+//
+int
+main (int argc, char* argv[])
+{
+ assert (argc == 2);
+
+ parser::non_validating::string_pimpl<char> string_p;
+ hello_pimpl hello_p (string_p, string_p);
+
+ parser::expat::document<char> doc_p (hello_p, "hello");
+
+ doc_p.parse (argv[1]);
+}
diff --git a/libxsd-tests/cxx/parser/expat/basic/testscript b/libxsd-tests/cxx/parser/expat/basic/testscript
new file mode 100644
index 0000000..7e78e73
--- /dev/null
+++ b/libxsd-tests/cxx/parser/expat/basic/testscript
@@ -0,0 +1,41 @@
+# file : cxx/parser/expat/basic/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: basic
+:
+{
+ cat <<EOI >=hello.xsd;
+ <?xml version="1.0"?>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="hello">
+ <xsd:sequence>
+ <xsd:element name="greeting" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="hello" type="hello"/>
+ </xsd:schema>
+ EOI
+
+ cat <<EOI >=hello.xml;
+ <?xml version="1.0"?>
+ <hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ <greeting>Hello</greeting>
+
+ <name>sun</name>
+ <name>moon</name>
+ <name>world</name>
+ </hello>
+ EOI
+
+ $* hello.xml >>EOO
+ greeting Hello
+ name sun
+ name moon
+ name world
+ EOO
+}
diff --git a/libxsd-tests/cxx/parser/xerces/basic/buildfile b/libxsd-tests/cxx/parser/xerces/basic/buildfile
new file mode 100644
index 0000000..237629d
--- /dev/null
+++ b/libxsd-tests/cxx/parser/xerces/basic/buildfile
@@ -0,0 +1,7 @@
+# file : cxx/parser/xerces/basic/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: cxx{driver} $libs testscript
diff --git a/libxsd-tests/cxx/parser/xerces/basic/driver.cxx b/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
new file mode 100644
index 0000000..b7dfd1d
--- /dev/null
+++ b/libxsd-tests/cxx/parser/xerces/basic/driver.cxx
@@ -0,0 +1,124 @@
+// file : cxx/parser/xerces/basic/driver.cxx
+// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <cassert>
+#include <iostream>
+
+// Define XSD_CXX11 since we include libxsd headers directly.
+//
+#ifdef _MSC_VER
+# if _MSC_VER >= 1600 // VC++10 and later have C++11 always enabled.
+# define XSD_CXX11
+# endif
+#else
+# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+# define XSD_CXX11
+# endif
+#endif
+
+#include <xsd/cxx/config.hxx> // XSD_UNUSED
+#include <xsd/cxx/ro-string.hxx>
+
+#include <xsd/cxx/parser/xerces/elements.hxx>
+
+#include <xsd/cxx/parser/non-validating/parser.hxx>
+#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>
+#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>
+
+using namespace std;
+using namespace xsd::cxx;
+
+typedef parser::non_validating::string_pskel<char> string_pskel;
+
+class hello_pimpl: public parser::non_validating::complex_content<char>
+{
+public:
+ hello_pimpl (string_pskel& greeting, string_pskel& name)
+ : greeting_parser_ (&greeting),
+ name_parser_ (&name) {}
+
+private:
+ virtual bool
+ _start_element_impl (const ro_string<char>&,
+ const ro_string<char>&,
+ const ro_string<char>*);
+
+ virtual bool
+ _end_element_impl (const ro_string<char>&, const ro_string<char>&);
+
+ string_pskel* greeting_parser_;
+ string_pskel* name_parser_;
+};
+
+bool hello_pimpl::
+_start_element_impl (const ro_string<char>& ns,
+ const ro_string<char>& n,
+ const ro_string<char>* t)
+{
+ XSD_UNUSED (t);
+
+ if (complex_content::_start_element_impl (ns, n, t))
+ return true;
+
+ if (n == "greeting" && ns.empty ())
+ {
+ context_.top ().parser_ = greeting_parser_;
+
+ if (greeting_parser_)
+ greeting_parser_->pre ();
+
+ return true;
+ }
+
+ if (n == "name" && ns.empty ())
+ {
+ context_.top ().parser_ = name_parser_;
+
+ if (name_parser_)
+ name_parser_->pre ();
+
+ return true;
+ }
+
+ return false;
+}
+
+bool hello_pimpl::
+_end_element_impl (const ro_string<char>& ns, const ro_string<char>& n)
+{
+ if (complex_content::_end_element_impl (ns, n))
+ return true;
+
+ if (n == "greeting" && ns.empty ())
+ {
+ cout << n << ' ' << greeting_parser_->post_string () << endl;
+ return true;
+ }
+
+ if (n == "name" && ns.empty ())
+ {
+ cout << n << ' ' << name_parser_->post_string () << endl;
+ return true;
+ }
+
+ return false;
+}
+
+
+// Usage: argv[0] <xml-file>
+//
+// Parse the specified XML file using the event-driven skeleton-based parser
+// and print the element names and values to stdout.
+//
+int
+main (int argc, char* argv[])
+{
+ assert (argc == 2);
+
+ parser::non_validating::string_pimpl<char> string_p;
+ hello_pimpl hello_p (string_p, string_p);
+
+ parser::xerces::document<char> doc_p (hello_p, "hello");
+
+ doc_p.parse (argv[1]);
+}
diff --git a/libxsd-tests/cxx/parser/xerces/basic/testscript b/libxsd-tests/cxx/parser/xerces/basic/testscript
new file mode 100644
index 0000000..f11fb10
--- /dev/null
+++ b/libxsd-tests/cxx/parser/xerces/basic/testscript
@@ -0,0 +1,41 @@
+# file : cxx/parser/xerces/basic/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: basic
+:
+{
+ cat <<EOI >=hello.xsd;
+ <?xml version="1.0"?>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="hello">
+ <xsd:sequence>
+ <xsd:element name="greeting" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="hello" type="hello"/>
+ </xsd:schema>
+ EOI
+
+ cat <<EOI >=hello.xml;
+ <?xml version="1.0"?>
+ <hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ <greeting>Hello</greeting>
+
+ <name>sun</name>
+ <name>moon</name>
+ <name>world</name>
+ </hello>
+ EOI
+
+ $* hello.xml >>EOO
+ greeting Hello
+ name sun
+ name moon
+ name world
+ EOO
+}
diff --git a/libxsd-tests/cxx/tree/basic/buildfile b/libxsd-tests/cxx/tree/basic/buildfile
new file mode 100644
index 0000000..1bf94b0
--- /dev/null
+++ b/libxsd-tests/cxx/tree/basic/buildfile
@@ -0,0 +1,7 @@
+# file : cxx/tree/basic/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{*} $libs testscript
diff --git a/libxsd-tests/cxx/tree/basic/driver.cxx b/libxsd-tests/cxx/tree/basic/driver.cxx
new file mode 100644
index 0000000..d36d31e
--- /dev/null
+++ b/libxsd-tests/cxx/tree/basic/driver.cxx
@@ -0,0 +1,65 @@
+// file : cxx/tree/basic/driver.cxx
+// copyright : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <cassert>
+#include <iostream>
+
+#include <xercesc/dom/DOMText.hpp>
+#include <xercesc/dom/DOMElement.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+
+// Define XSD_CXX11 since we include libxsd headers directly.
+//
+#ifdef _MSC_VER
+# if _MSC_VER >= 1600 // VC++10 and later have C++11 always enabled.
+# define XSD_CXX11
+# endif
+#else
+# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+# define XSD_CXX11
+# endif
+#endif
+
+#include <xsd/cxx/xml/qualified-name.hxx>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx> // XSD_DOM_AUTO_PTR
+#include <xsd/cxx/xml/dom/elements.hxx> // name()
+#include <xsd/cxx/xml/dom/parsing-source.hxx> // parser, parse()
+
+#include <xsd/cxx/tree/text.hxx> // text_content()
+#include <xsd/cxx/tree/parsing.hxx>
+#include <xsd/cxx/tree/elements.hxx> // auto_initializer, properties
+#include <xsd/cxx/tree/exceptions.hxx> // parsing
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace std;
+using namespace xsd::cxx;
+
+// Usage: argv[0] <xml-file>
+//
+// Parse the specified XML file using the XML DOM parser and print the element
+// names and values to stdout.
+//
+int
+main (int argc, char* argv[])
+{
+ assert (argc == 2);
+
+ xml::auto_initializer ai;
+
+ tree::error_handler<char> h;
+ tree::properties<char> ps;
+
+ XSD_DOM_AUTO_PTR<xercesc::DOMDocument> d (
+ xml::dom::parse<char> (argv[1], h, ps, 0 /* flags */));
+
+ h.throw_if_failed<tree::parsing<char>> (); // Abort on error.
+
+ xml::dom::parser<char> p (*d->getDocumentElement (), true, false, false);
+ for (; p.more_content (); p.next_content (false /* text */))
+ {
+ const xercesc::DOMElement& i (p.cur_element ());
+ const xml::qualified_name<char> n (xml::dom::name<char> (i));
+ cout << n.name () << ' ' << tree::text_content<char> (i) << endl;
+ }
+}
diff --git a/libxsd-tests/cxx/tree/basic/testscript b/libxsd-tests/cxx/tree/basic/testscript
new file mode 100644
index 0000000..2606688
--- /dev/null
+++ b/libxsd-tests/cxx/tree/basic/testscript
@@ -0,0 +1,73 @@
+# file : cxx/tree/basic/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: basic
+:
+{
+ cat <<EOI >=hello.xsd;
+ <?xml version="1.0"?>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="hello_t">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ The hello_t type consists of a greeting phrase and a
+ collection of names to which this greeting applies.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+
+ <xsd:element name="greeting" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>
+ The greeting element contains the greeting phrase
+ for this hello object.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="name" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ The name elements contains names to be greeted.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="hello" type="hello_t">
+ <xsd:annotation>
+ <xsd:documentation>
+ The hello element is a root of the Hello XML vocabulary.
+ Every conforming document should start with this element.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:schema>
+ EOI
+
+ cat <<EOI >=hello.xml;
+ <?xml version="1.0"?>
+ <hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ <greeting>Hello</greeting>
+
+ <name>sun</name>
+ <name>moon</name>
+ <name>world</name>
+
+ </hello>
+ EOI
+
+ $* hello.xml >>EOO
+ greeting Hello
+ name sun
+ name moon
+ name world
+ EOO
+}
diff --git a/libxsd-tests/manifest b/libxsd-tests/manifest
new file mode 100644
index 0000000..8de8b24
--- /dev/null
+++ b/libxsd-tests/manifest
@@ -0,0 +1,15 @@
+: 1
+name: libxsd-tests
+version: 4.2.0-b.1.z
+project: xsd
+summary: XML Schema to C++ data binding compiler runtime library tests
+license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
+description-file: README
+url: https://www.codesynthesis.com/projects/xsd/
+doc-url: https://www.codesynthesis.com/projects/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/libxsd-tests/
+email: xsd-users@codesynthesis.com ; Mailing list
+depends: * build2 >= 0.13.0
+depends: * bpkg >= 0.13.0
+depends: libxerces-c ^3.0.0
+depends: libexpat ^2.1.0
diff --git a/libxsd/.gitignore b/libxsd/.gitignore
new file mode 100644
index 0000000..cece09c
--- /dev/null
+++ b/libxsd/.gitignore
@@ -0,0 +1,19 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.ii
+*.o
+*.obj
+*.so
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
diff --git a/libxsd/FLOSSE b/libxsd/FLOSSE
index cbf8b2c..be6df3d 100644..120000
--- a/libxsd/FLOSSE
+++ b/libxsd/FLOSSE
@@ -1,89 +1 @@
-1. Intent
-
-We want specified Free/Libre and Open Source Software ("FLOSS") to be
-able to use the specified GPL-licensed XSD runtime library (libxsd) and
-XSD generated code (collectively called the "Program") despite the fact
-that not all FLOSS licenses are compatible with version 2 of the GNU
-General Public License (the "GPL").
-
-It is our intent to allow distribution of the entire Derivative Work
-(including the Program) under one or more of the FLOSS licenses listed
-in section 3 (section 2.a). It is also our intent to disallow simple
-relicensing of the Program for the sole purpose of using it in
-proprietary applications (section 2.b and 2.c). As an example, consider
-two hypothetical scenarios:
-
- a) You created a program that uses the XSD generated code and the XSD
- runtime library to access information in XML instance documents.
- Your program performs useful computations based on this information
- (sections 2.b and 2.c are satisfied). You distribute your program,
- including the XSD generated code and the XSD runtime library under
- the BSD license and make it available at no charge to all third
- parties (section 2.a is satisfied). Later you (or someone else) may
- choose to base their proprietary application on your code since the
- BSD license does not prohibit it.
-
- This scenario falls under this FLOSS Exception.
-
-
- b) You created a library that uses the XSD generated code and the XSD
- runtime library to access information in XML instance documents. You
- did not add to the library any other useful code that uses the XSD
- generated code or the XSD runtime library (neither section 2.b nor
- 2.c is satisfied). You distribute your library, including the XSD
- generated code and the XSD runtime library under the BSD license and
- make it available at no charge to all third parties (section 2.a
- is satisfied). Later you base your proprietary application on this
- library since the BSD license does not prohibit it.
-
- This scenario does not fall under this FLOSS Exception (neither
- section 2.b nor 2.c is satisfied). You created the library for the
- sole purpose of making the XSD generated code and the XSD runtime
- library available to your proprietary application.
-
-
-2. Legal Terms and Conditions
-
-As a special exception to the terms and conditions of version 2 of
-the GPL you are free to distribute a verbatim copy of the Program
-as part of the Derivative Work that is formed from the Program or
-any part thereof and one or more works (each, a "FLOSS Work") as
-long as you also meet all of these conditions:
-
- a) You must cause the Derivative Work that in whole or in part
- contains or is derived from the Program or any part thereof,
- to be licensed as a whole at no charge to all third parties
- under the terms of one or more of the licenses listed in
- section 3.
-
- b) The Derivative Work should contain one or more FLOSS Work that
- can be reasonably considered as derived from the Program or some
- part thereof.
-
- c) The Derivative Work should not contain any part of the Program
- that cannot be reasonably considered as a base of one or more
- FLOSS Work.
-
-
-3. FLOSS License List
-
- a) Any license listed in the "GPL-Compatible Free Software Licenses"
- and the "GPL-Incompatible Free Software Licenses" sections of the
- License List as published by the Free Software Foundation (FSF):
-
- http://www.gnu.org/licenses/license-list.html
-
-
-4. Definitions
-
-Terms used, but not defined, herein shall have the meaning provided in
-the GPL.
-
-Derivative Work means a derivative work under copyright law.
-
-
-5. Applicability
-
-You may choose to redistribute a copy of the Program exclusively under
-the terms of the GPL by removing the FLOSS Exception notice from that
-copy of the Program.
+../FLOSSE \ No newline at end of file
diff --git a/libxsd/GPLv2 b/libxsd/GPLv2
index 3912109..08e5586 100644..120000
--- a/libxsd/GPLv2
+++ b/libxsd/GPLv2
@@ -1,340 +1 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+../GPLv2 \ No newline at end of file
diff --git a/libxsd/INSTALL b/libxsd/INSTALL
index c9b4625..181de1b 100644
--- a/libxsd/INSTALL
+++ b/libxsd/INSTALL
@@ -1,17 +1,6 @@
-Prerequisites
+The easiest way to build this package is with the bpkg package manager:
- run-time:
-
- - libxerces-c >= 3.0.0 http://xerces.apache.org/xerces-c/
-
-
-Building libxsd
-
- No building is necessary at the moment.
-
-
-Installing libxsd
-
- Not supported in this version. You may want to copy libxsd/xsd
- to $(prefix)/include so that you have $(prefix)/include/xsd/*.
+$ bpkg build libxsd
+But if you don't want to use the package manager, then you can also build it
+manually using the standard build2 build system.
diff --git a/libxsd/LICENSE b/libxsd/LICENSE
index 7bd52e7..ea5b606 100644..120000
--- a/libxsd/LICENSE
+++ b/libxsd/LICENSE
@@ -1,28 +1 @@
-Copyright (c) 2009-2020 Code Synthesis Tools CC.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-In addition, as a special exception, Code Synthesis Tools CC gives
-permission to link this program with the Xerces-C++ library (or with
-modified versions of Xerces-C++ that use the same license as Xerces-C++),
-and distribute linked combinations including the two. You must obey
-the GNU General Public License version 2 in all respects for all of
-the code used other than Xerces-C++. If you modify this copy of the
-program, you may extend this exception to your version of the program,
-but you are not obligated to do so. If you do not wish to do so, delete
-this exception statement from your version.
-
-In addition, Code Synthesis Tools CC makes a special exception for
-the Free/Libre and Open Source Software (FLOSS) which is described
-in the accompanying FLOSSE file.
+../LICENSE \ No newline at end of file
diff --git a/libxsd/NEWS b/libxsd/NEWS
new file mode 100644
index 0000000..c51e267
--- /dev/null
+++ b/libxsd/NEWS
@@ -0,0 +1 @@
+See the common NEWS file in the XSD compiler package.
diff --git a/libxsd/README b/libxsd/README
index 71f4f46..00f8e1d 100644
--- a/libxsd/README
+++ b/libxsd/README
@@ -1,12 +1,13 @@
-libxsd is a runtime library for language mappings generated by
-CodeSynthesis XSD, a W3C XML Schema to C++ data binding compiler.
+libxsd is a runtime library for language mappings generated by CodeSynthesis
+XSD, a W3C XML Schema to C++ data binding compiler.
See the LICENSE file for distribution conditions.
See the INSTALL file for prerequisites and installation instructions.
+See the doc/ directory for documentation.
+
The project page is at https://www.codesynthesis.com/projects/xsd/
Send bug reports or any other feedback to the xsd-users@codesynthesis.com
mailing list.
-
diff --git a/libxsd/README-GIT b/libxsd/README-GIT
new file mode 100644
index 0000000..bbc5b4c
--- /dev/null
+++ b/libxsd/README-GIT
@@ -0,0 +1,4 @@
+The checked out xsd/cxx/version.hxx will be overwritten during the build
+process but these changes should be ignored. To do this automatically, run:
+
+git update-index --assume-unchanged xsd/cxx/version.hxx
diff --git a/libxsd/build/.gitignore b/libxsd/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/libxsd/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/libxsd/build/bootstrap.build b/libxsd/build/bootstrap.build
new file mode 100644
index 0000000..d3dae6e
--- /dev/null
+++ b/libxsd/build/bootstrap.build
@@ -0,0 +1,10 @@
+# file : build/bootstrap.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+project = libxsd
+
+using version
+using config
+using dist
+using test
+using install
diff --git a/libxsd/build/export.build b/libxsd/build/export.build
new file mode 100644
index 0000000..14a17c0
--- /dev/null
+++ b/libxsd/build/export.build
@@ -0,0 +1,9 @@
+# file : build/export.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+$out_root/
+{
+ include xsd/
+}
+
+export $out_root/xsd/lib{xsd}
diff --git a/libxsd/build/root.build b/libxsd/build/root.build
new file mode 100644
index 0000000..82da455
--- /dev/null
+++ b/libxsd/build/root.build
@@ -0,0 +1,14 @@
+# file : build/root.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+using in
+
+cxx.std = latest
+
+using cxx
+
+# Note that this is a header-only library.
+#
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
diff --git a/libxsd/buildfile b/libxsd/buildfile
new file mode 100644
index 0000000..abb2c7c
--- /dev/null
+++ b/libxsd/buildfile
@@ -0,0 +1,8 @@
+# file : buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+./: {*/ -build/} doc{INSTALL NEWS README} legal{GPLv2 LICENSE FLOSSE} manifest
+
+# Don't the INSTALL file.
+#
+doc{INSTALL}@./: install = false
diff --git a/libxsd/doc/buildfile b/libxsd/doc/buildfile
new file mode 100644
index 0000000..c640a6c
--- /dev/null
+++ b/libxsd/doc/buildfile
@@ -0,0 +1,83 @@
+# file : doc/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+define html: file
+html{*}: extension = html
+
+define doxygen: file
+doxygen{*}: extension = doxygen
+
+define doxytag: file
+doxytag{*}: extension = doxytag
+
+# Import the doxygen program only if present on the system. This way a
+# distribution that includes pre-generated files can be built without
+# installing this programs.
+#
+import? doxygen = doxygen%exe{doxygen}
+
+# Note that we include the doxygen-generated files into the distribution and
+# don't remove them when cleaning in src (so that clean results in a state
+# identical to distributed).
+
+cxx/tree/reference/
+{
+ # @@ Currently, there are the following issues that can only be addressed
+ # on the build2 level:
+ #
+ # - The update recipe is not re-executed after html/ directory content
+ # has changed or it is removed.
+ #
+ # - The clean operation doesn't remove the html/ directory.
+ #
+ # - The html/ directory is not installed nor distributed regardless of
+ # the doxygen presence.
+ #
+ if ($doxygen != [null])
+ {
+ ../../../: doxytag{libxsd}
+
+ headers = buffer types date-time elements element-map exceptions
+
+ <doxytag{libxsd} fsdir{html}>: doxygen{libxsd} \
+ html{footer} \
+ $src_root/xsd/cxx/tree/hxx{$headers} \
+ $doxygen
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+ {{
+ diag doxygen $> : ($<[0]) # @@ TMP: revise
+
+ rm -r -f $directory($>[1])
+
+ $doxygen $path($<[0])
+ }}
+
+ doxygen{libxsd}: in{libxsd}
+ {
+ in.symbol = '%'
+
+ input = $regex.merge($headers, \
+ '^(.*)$', \
+ "$src_root/xsd/cxx/tree/\\1.hxx", \
+ ' ')
+ }
+
+ html{footer}: in{footer}
+ {
+ # Extract the copyright notice from the LICENSE file.
+ #
+ # Note that cat is a builtin which means this is both portable and fast.
+ #
+ copyright = $process.run_regex(cat $src_root/LICENSE, \
+ 'Copyright \(c\) (.+)\.', \
+ '\1')
+ }
+ }
+ else
+ ../../../: doxytag{+libxsd}
+}
+
+doc{*}: install.subdirs = true
diff --git a/libxsd/doc/cxx/tree/reference/.gitignore b/libxsd/doc/cxx/tree/reference/.gitignore
new file mode 100644
index 0000000..e440fb6
--- /dev/null
+++ b/libxsd/doc/cxx/tree/reference/.gitignore
@@ -0,0 +1,4 @@
+html/
+libxsd.doxygen
+libxsd.doxytag
+footer.html
diff --git a/libxsd/doc/cxx/tree/reference/footer.html.in b/libxsd/doc/cxx/tree/reference/footer.html.in
new file mode 100644
index 0000000..7388387
--- /dev/null
+++ b/libxsd/doc/cxx/tree/reference/footer.html.in
@@ -0,0 +1,6 @@
+<hr size="1">
+<div style="text-align: center; font-size: 80%;">
+ Copyright &#169; $copyright$.
+</div>
+</body>
+</html>
diff --git a/libxsd/doc/cxx/tree/reference/libxsd.doxygen.in b/libxsd/doc/cxx/tree/reference/libxsd.doxygen.in
new file mode 100644
index 0000000..c4625d8
--- /dev/null
+++ b/libxsd/doc/cxx/tree/reference/libxsd.doxygen.in
@@ -0,0 +1,1289 @@
+# Doxyfile 1.5.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that
+# follow. The default is UTF-8 which is also the encoding used for all text before
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
+# possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "C++/Tree Mapping Runtime Library"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
+# include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct (or union) is
+# documented as struct with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code where the coding convention is that all structs are
+# typedef'ed and only the typedef is referenced never the struct's name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be extracted
+# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
+# where file will be replaced with the base name of the file that contains the anonymous
+# namespace. By default anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from the
+# version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = %input%
+
+# This tag can be used to specify the character encoding of the source files that
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the output.
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
+# then you must also enable this option. If you don't then doxygen will produce
+# a warning and turn it on anyway
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = %out_base%/html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER = %out_base%/footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE =
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+# C++98 version.
+#
+PREDEFINED = XSD_AUTO_PTR=std::auto_ptr
+
+# C++11 version.
+#
+# PREDEFINED = XSD_AUTO_PTR=std::unique_ptr
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE = %out_base%/libxsd.doxytag
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+# Note: deprecated as of 1.8.
+#
+#PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
+# be found in the default search path.
+
+# Note: deprecated as of 1.8.
+#
+#MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
+# generate a caller dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the number
+# of direct children of the root node in a graph is already larger than
+# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, which results in a white background.
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+
+DOT_TRANSPARENT = YES
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/libxsd/makefile b/libxsd/makefile
deleted file mode 100644
index 819a459..0000000
--- a/libxsd/makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# file : libxsd/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-
-
-# Install.
-#
-$(install):
- $(call install-dir,$(src_base)/xsd,$(install_inc_dir)/xsd)
- $(call install-data,$(src_base)/FLOSSE,$(install_doc_dir)/libxsd/FLOSSE)
- $(call install-data,$(src_base)/GPLv2,$(install_doc_dir)/libxsd/GPLv2)
- $(call install-data,$(src_base)/LICENSE,$(install_doc_dir)/libxsd/LICENSE)
- $(call install-data,$(src_base)/README,$(install_doc_dir)/libxsd/README)
-
-# Dist.
-#
-dist-common := $(out_base)/.dist-common
-
-$(dist-common):
- $(call install-dir,$(src_base)/xsd,$(dist_prefix)/libxsd/xsd)
-
-$(dist): $(dist-common)
- $(call install-data,$(src_base)/GPLv2,$(dist_prefix)/libxsd/GPLv2)
- $(call install-data,$(src_base)/FLOSSE,$(dist_prefix)/libxsd/FLOSSE)
- $(call install-data,$(src_base)/LICENSE,$(dist_prefix)/libxsd/LICENSE)
- $(call install-data,$(src_base)/README,$(dist_prefix)/libxsd/README)
-
-$(dist-win): $(dist-common)
- $(call install-data,$(src_base)/GPLv2,$(dist_prefix)/libxsd/GPLv2.txt)
- $(call message,,todos $(dist_prefix)/libxsd/GPLv2.txt)
- $(call install-data,$(src_base)/FLOSSE,$(dist_prefix)/libxsd/FLOSSE.txt)
- $(call message,,todos $(dist_prefix)/libxsd/FLOSSE.txt)
- $(call install-data,$(src_base)/LICENSE,$(dist_prefix)/libxsd/LICENSE.txt)
- $(call message,,todos $(dist_prefix)/libxsd/LICENSE.txt)
- $(call install-data,$(src_base)/README,$(dist_prefix)/libxsd/README.txt)
- $(call message,,todos $(dist_prefix)/libxsd/README.txt)
-
-$(call include,$(bld_root)/install.make)
diff --git a/libxsd/manifest b/libxsd/manifest
new file mode 100644
index 0000000..6715e28
--- /dev/null
+++ b/libxsd/manifest
@@ -0,0 +1,17 @@
+: 1
+name: libxsd
+version: 4.2.0-b.1.z
+project: xsd
+summary: XML Schema to C++ data binding compiler runtime library
+license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
+topics: C++, XML, XML Schema, XML parser
+description-file: README
+changes-file: NEWS
+url: https://www.codesynthesis.com/projects/xsd/
+doc-url: https://www.codesynthesis.com/projects/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/libxsd/
+email: xsd-users@codesynthesis.com ; Mailing list
+build-warning-email: builds@codesynthesis.com
+depends: * build2 >= 0.13.0
+depends: * bpkg >= 0.13.0
+tests: libxsd-tests == $
diff --git a/libxsd/xsd/buildfile b/libxsd/xsd/buildfile
new file mode 100644
index 0000000..ef0d0c5
--- /dev/null
+++ b/libxsd/xsd/buildfile
@@ -0,0 +1,39 @@
+# file : xsd/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Note that libxsd includes headers of some third-party libraries (Xerces-C++,
+# Expat, ACE) and APIs (XDR) into some of its headers. We consider
+# functionality provided by these headers as optional and assume that libxsd
+# dependents that require such functionality will handle the respective
+# dependencies (in buildfiles, manifests, etc) themselves. An alternative would
+# be to split libxsd into the hierarchy of libraries, but it doesn't feel very
+# practical at the moment.
+#
+lib{xsd}: cxx/{hxx ixx txx}{** -version} cxx/hxx{version}
+
+# Include the generated version header into the distribution (so that we don't
+# pick up an installed one) and don't remove it when cleaning in src (so that
+# clean results in a state identical to distributed).
+#
+cxx/
+{
+ hxx{version}: in{version} $src_root/manifest
+ hxx{version}:
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+}
+
+# Export options.
+#
+lib{xsd}: cxx.export.poptions = "-I$out_root" "-I$src_root"
+
+# Install into the xsd/ subdirectory of, say, /usr/include/ recreating
+# subdirectories.
+#
+{hxx ixx txx}{*}:
+{
+ install = include/xsd/
+ install.subdirs = true
+}
diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx
index 808b35e..be8fbeb 100644
--- a/libxsd/xsd/cxx/tree/elements.hxx
+++ b/libxsd/xsd/cxx/tree/elements.hxx
@@ -235,6 +235,8 @@ namespace xsd
std::size_t index;
};
+ //@cond
+
bool
operator== (const content_order&, const content_order&);
@@ -244,8 +246,6 @@ namespace xsd
bool
operator< (const content_order&, const content_order&);
- //@cond
-
// DOM user data keys.
//
template <int dummy>
@@ -458,7 +458,9 @@ namespace xsd
// anyType content API.
//
public:
+ //@cond
typedef element_optional dom_content_optional;
+ //@endcond
/**
* @brief Return a read-only (constant) reference to the anyType
@@ -1198,10 +1200,10 @@ namespace xsd
dom_content_optional dom;
};
- //@endcond
-
mutable XSD_AUTO_PTR<content_type> content_;
+ //@endcond
+
private:
container* container_;
};
diff --git a/libxsd/xsd/cxx/tree/types.hxx b/libxsd/xsd/cxx/tree/types.hxx
index 3355eb0..34eabd9 100644
--- a/libxsd/xsd/cxx/tree/types.hxx
+++ b/libxsd/xsd/cxx/tree/types.hxx
@@ -3123,7 +3123,9 @@ namespace xsd
class base64_binary: public B, public buffer<C>
{
public:
+ //@cond
typedef typename buffer<C>::size_t size_t;
+ //@endcond
public:
/**
@@ -3342,7 +3344,9 @@ namespace xsd
class hex_binary: public B, public buffer<C>
{
public:
+ //@cond
typedef typename buffer<C>::size_t size_t;
+ //@endcond
public:
/**
diff --git a/libxsd/xsd/cxx/version.hxx b/libxsd/xsd/cxx/version.hxx
index c2948c3..e69de29 100644
--- a/libxsd/xsd/cxx/version.hxx
+++ b/libxsd/xsd/cxx/version.hxx
@@ -1,27 +0,0 @@
-// file : xsd/cxx/version.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef XSD_CXX_VERSION_HXX
-#define XSD_CXX_VERSION_HXX
-
-// Version format is AABBCCDD where
-//
-// AA - major version number
-// BB - minor version number
-// CC - bugfix version number
-// DD - alpha / beta (DD + 50) version number
-//
-// When DD is not 00, 1 is subtracted from AABBCC. For example:
-//
-// Version AABBCCDD
-// 2.0.0 02000000
-// 2.1.0 02010000
-// 2.1.1 02010100
-// 2.2.0.a1 02019901
-// 3.0.0.b2 02999952
-//
-
-#define XSD_STR_VERSION "4.1.0.a11"
-#define XSD_INT_VERSION 4009911L
-
-#endif // XSD_CXX_VERSION_HXX
diff --git a/libxsd/xsd/cxx/version.hxx.in b/libxsd/xsd/cxx/version.hxx.in
new file mode 100644
index 0000000..7f2e17a
--- /dev/null
+++ b/libxsd/xsd/cxx/version.hxx.in
@@ -0,0 +1,43 @@
+// file : xsd/cxx/version.hxx.in
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef LIBXSD_VERSION // Note: using the version macro itself.
+
+// The numeric version format is AAAAABBBBBCCCCCDDDE where:
+//
+// AAAAA - major version number
+// BBBBB - minor version number
+// CCCCC - bugfix version number
+// DDD - alpha / beta (DDD + 500) version number
+// E - final (0) / snapshot (1)
+//
+// When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example:
+//
+// Version AAAAABBBBBCCCCCDDDE
+//
+// 0.1.0 0000000001000000000
+// 0.1.2 0000000001000020000
+// 1.2.3 0000100002000030000
+// 2.2.0-a.1 0000200001999990010
+// 3.0.0-b.2 0000299999999995020
+// 2.2.0-a.1.z 0000200001999990011
+//
+#define LIBXSD_VERSION $libxsd.version.project_number$ULL
+#define LIBXSD_VERSION_STR "$libxsd.version.project$"
+#define LIBXSD_VERSION_ID "$libxsd.version.project_id$"
+#define LIBXSD_VERSION_FULL "$libxsd.version$"
+
+#define LIBXSD_VERSION_MAJOR $libxsd.version.major$
+#define LIBXSD_VERSION_MINOR $libxsd.version.minor$
+#define LIBXSD_VERSION_PATCH $libxsd.version.patch$
+
+#define LIBXSD_PRE_RELEASE $libxsd.version.pre_release$
+
+#define LIBXSD_SNAPSHOT $libxsd.version.snapshot_sn$ULL
+#define LIBXSD_SNAPSHOT_ID "$libxsd.version.snapshot_id$"
+
+// Note that Xerces and Expat compatibility is verified by the respective
+// parsers (see parser/xerces/elements.hxx and parser/expat/elements.hxx for
+// details).
+
+#endif // LIBXSD_VERSION
diff --git a/libxsd/xsd/cxx/xml/char-utf8.txx b/libxsd/xsd/cxx/xml/char-utf8.txx
index ba65397..a571ce9 100644
--- a/libxsd/xsd/cxx/xml/char-utf8.txx
+++ b/libxsd/xsd/cxx/xml/char-utf8.txx
@@ -115,20 +115,24 @@ namespace xsd
rs[i + 3] = C ((u | 0x80UL) & 0xBFUL);
u >>= 6;
}
+ // Fall through.
case 3:
{
rs[i + 2] = C ((u | 0x80UL) & 0xBFUL);
u >>= 6;
}
+ // Fall through.
case 2:
{
rs[i + 1] = C ((u | 0x80UL) & 0xBFUL);
u >>= 6;
}
+ // Fall through.
case 1:
{
rs[i] = C (u | first_byte_mask_[count]);
}
+ // Fall through.
}
i += count;
diff --git a/makefile b/makefile
deleted file mode 100644
index acfe511..0000000
--- a/makefile
+++ /dev/null
@@ -1,102 +0,0 @@
-# file : makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))build/bootstrap.make
-
-default := $(out_base)/
-test := $(out_base)/.test
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-dist-pre := $(out_base)/.dist-pre
-clean := $(out_base)/.clean
-
-.PHONY: $(dist-pre)
-
-$(default): $(out_base)/xsd/ \
- $(out_base)/tests/ \
- $(out_base)/examples/ \
- $(out_base)/doc/
-
-# Test.
-#
-$(test): $(out_base)/tests/.test
-
-
-# Install.
-#
-$(install): $(out_base)/xsd/.install \
- $(out_base)/libxsd/.install \
- $(out_base)/examples/.install \
- $(out_base)/doc/.install
- $(call install-dir,$(src_base)/dist/examples/build,$(install_doc_dir)/xsd/examples/build)
- $(call install-dir,$(src_base)/dist/examples/cxx,$(install_doc_dir)/xsd/examples/cxx,-name makefile)
- $(call install-data,$(src_base)/dist/examples/makefile,$(install_doc_dir)/xsd/examples/makefile)
- $(call install-data,$(src_base)/FLOSSE,$(install_doc_dir)/xsd/FLOSSE)
- $(call install-data,$(src_base)/GPLv2,$(install_doc_dir)/xsd/GPLv2)
- $(call install-data,$(src_base)/LICENSE,$(install_doc_dir)/xsd/LICENSE)
- $(call install-data,$(src_base)/NEWS,$(install_doc_dir)/xsd/NEWS)
- $(call install-data,$(src_base)/dist/README-UNIX,$(install_doc_dir)/xsd/README)
-
-
-# Dist.
-#
-$(dist): $(out_base)/xsd/.dist \
- $(out_base)/libxsd/.dist \
- $(out_base)/examples/.dist \
- $(out_base)/doc/.dist
- $(call install-dir,$(src_base)/dist/examples/build,$(dist_prefix)/examples/build)
- $(call install-dir,$(src_base)/dist/examples/cxx,$(dist_prefix)/examples/cxx,-name makefile)
- $(call install-data,$(src_base)/dist/examples/makefile,$(dist_prefix)/examples/makefile)
- $(call install-data,$(src_base)/dist/README-UNIX,$(dist_prefix)/README)
- $(call install-data,$(src_base)/GPLv2,$(dist_prefix)/GPLv2)
- $(call install-data,$(src_base)/FLOSSE,$(dist_prefix)/FLOSSE)
- $(call install-data,$(src_base)/LICENSE,$(dist_prefix)/LICENSE)
- $(call install-data,$(src_base)/NEWS,$(dist_prefix)/NEWS)
- $(call install-data,$(src_base)/version,$(dist_prefix)/version)
-
-$(dist-win): $(dist-pre) \
- $(out_base)/xsd/.dist-win \
- $(out_base)/libxsd/.dist-win \
- $(out_base)/examples/.dist-win \
- $(out_base)/doc/.dist-win
- $(call install-dir,$(src_base)/dist/etc,$(dist_prefix)/etc)
- $(call install-dir,$(src_base)/dist/examples/build,$(dist_prefix)/examples/build)
- $(call install-data,$(src_base)/dist/examples/tester.bat,$(dist_prefix)/examples/tester.bat)
- $(call install-data,$(src_base)/dist/examples/makefile,$(dist_prefix)/examples/makefile)
- $(call install-data,$(src_base)/dist/README-WINDOWS,$(dist_prefix)/README.txt)
- $(call message,,todos $(dist_prefix)/README.txt)
- $(call install-data,$(src_base)/dist/README-UNIX,$(dist_prefix)/README-CYGWIN.txt)
- $(call message,,todos $(dist_prefix)/README-CYGWIN.txt)
- $(call install-data,$(src_base)/GPLv2,$(dist_prefix)/GPLv2.txt)
- $(call message,,todos $(dist_prefix)/GPLv2.txt)
- $(call install-data,$(src_base)/FLOSSE,$(dist_prefix)/FLOSSE.txt)
- $(call message,,todos $(dist_prefix)/FLOSSE.txt)
- $(call install-data,$(src_base)/LICENSE,$(dist_prefix)/LICENSE.txt)
- $(call message,,todos $(dist_prefix)/LICENSE.txt)
- $(call install-data,$(src_base)/NEWS,$(dist_prefix)/NEWS.txt)
- $(call message,,todos $(dist_prefix)/NEWS.txt)
- $(call install-data,$(src_base)/version,$(dist_prefix)/version.txt)
- $(call message,,todos $(dist_prefix)/version.txt)
-
-# We need the project files for the examples copied before we try to
-# auto-generate the solution files. So each example target that generates
-# solutions should depend in order-only on this target.
-#
-$(dist-pre):
- $(call install-dir,$(src_base)/dist/examples/cxx,$(dist_prefix)/examples/cxx)
-
-# Clean.
-#
-$(clean): $(out_base)/xsd/.clean \
- $(out_base)/tests/.clean \
- $(out_base)/examples/.clean \
- $(out_base)/doc/.clean
-
-$(call include,$(bld_root)/install.make)
-
-$(call import,$(src_base)/xsd/makefile)
-$(call import,$(src_base)/libxsd/makefile)
-$(call import,$(src_base)/tests/makefile)
-$(call import,$(src_base)/examples/makefile)
-$(call import,$(src_base)/doc/makefile)
diff --git a/packages.manifest b/packages.manifest
new file mode 100644
index 0000000..4b6de4e
--- /dev/null
+++ b/packages.manifest
@@ -0,0 +1,10 @@
+: 1
+location: libxsd/
+:
+location: libxsd-tests/
+:
+location: xsd/
+:
+location: xsd-tests/
+:
+location: xsd-examples/
diff --git a/repositories.manifest b/repositories.manifest
new file mode 100644
index 0000000..71f161b
--- /dev/null
+++ b/repositories.manifest
@@ -0,0 +1,22 @@
+: 1
+summary: XML Schema to C++ data binding compiler repository
+
+:
+role: prerequisite
+location: https://git.build2.org/packaging/zlib/zlib.git##HEAD
+
+:
+role: prerequisite
+location: https://git.build2.org/packaging/xerces-c/xerces-c.git##HEAD
+
+:
+role: prerequisite
+location: https://git.build2.org/packaging/expat/expat.git#2.1
+
+:
+role: prerequisite
+location: https://git.codesynthesis.com/libcutl/libcutl.git##HEAD
+
+:
+role: prerequisite
+location: https://git.codesynthesis.com/libxsd-frontend/libxsd-frontend.git##HEAD
diff --git a/tests/cxx/makefile b/tests/cxx/makefile
deleted file mode 100644
index 769a1d0..0000000
--- a/tests/cxx/makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# file : tests/cxx/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(out_base)/parser/ $(out_base)/tree/
-$(test): $(out_base)/parser/.test $(out_base)/tree/.test
-$(clean): $(out_base)/parser/.clean $(out_base)/tree/.clean
-
-$(call import,$(src_base)/parser/makefile)
-$(call import,$(src_base)/tree/makefile)
diff --git a/tests/cxx/parser/built-in/driver.cxx b/tests/cxx/parser/built-in/driver.cxx
deleted file mode 100644
index 6cfd8fc..0000000
--- a/tests/cxx/parser/built-in/driver.cxx
+++ /dev/null
@@ -1,529 +0,0 @@
-// file : tests/cxx/parser/built-in/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test built-in type parsing.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-using xml_schema::ro_string;
-
-struct any_type_pimpl: xml_schema::any_type_pimpl
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- _start_any_element (ro_string const&,
- ro_string const& n,
- ro_string const*)
- {
- cout << " start any element '" << n << "'" << endl;
- }
-
- virtual void
- _end_any_element (ro_string const&, ro_string const& n)
- {
- cout << " end any element '" << n << "'" << endl;
- }
-
- virtual void
- _any_attribute (ro_string const&,
- ro_string const& n,
- ro_string const& v)
- {
- cout << " any attribute " << n << " = '" << v << "'" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& s)
- {
- cout << " any text: '" << s << "'" << endl;
- }
-
- virtual void
- post_any_type ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct any_simple_type_pimpl: xml_schema::any_simple_type_pimpl
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& s)
- {
- cout << " any text: '" << s << "'" << endl;
- }
-
- virtual void
- post_any_simple_type ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
- virtual void
- boolean (bool v)
- {
- cout << v << endl;
- }
-
- virtual void
- byte (signed char v)
- {
- cout << short (v) << endl;
- }
-
- virtual void
- unsigned_byte (unsigned char v)
- {
- cout << (unsigned short) (v) << endl;
- }
-
- virtual void
- short_ (short v)
- {
- cout << v << endl;
- }
-
- virtual void
- unsigned_short (unsigned short v)
- {
- cout << v << endl;
- }
-
- virtual void
- int_ (int v)
- {
- cout << v << endl;
- }
-
- virtual void
- unsigned_int (unsigned int v)
- {
- cout << v << endl;
- }
-
- virtual void
- long_ (long long v)
- {
- cout << v << endl;
- }
-
- virtual void
- unsigned_long (unsigned long long v)
- {
- cout << v << endl;
- }
-
- virtual void
- integer (long long v)
- {
- cout << v << endl;
- }
-
- virtual void
- negative_integer (long long v)
- {
- cout << v << endl;
- }
-
-
- virtual void
- non_positive_integer (long long v)
- {
- cout << v << endl;
- }
-
-
- virtual void
- positive_integer (unsigned long long v)
- {
- cout << v << endl;
- }
-
- virtual void
- non_negative_integer (unsigned long long v)
- {
- cout << v << endl;
- }
-
- virtual void
- float_ (float v)
- {
- cout << v << endl;
- }
-
- virtual void
- double_ (double v)
- {
- cout << v << endl;
- }
-
- virtual void
- decimal (double v)
- {
- cout << v << endl;
- }
-
- virtual void
- string (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- normalized_string (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- token (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- name (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- nmtoken (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- nmtokens (xml_schema::string_sequence const& s)
- {
- cout << "'";
-
- for (xml_schema::string_sequence::const_iterator i (s.begin ());
- i != s.end (); ++i)
- cout << *i << " ";
-
- cout << "'" << endl;
- }
-
- virtual void
- ncname (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- id (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- idref (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- idrefs (xml_schema::string_sequence const& s)
- {
- cout << "'";
-
- for (xml_schema::string_sequence::const_iterator i (s.begin ());
- i != s.end (); ++i)
- cout << *i << " ";
-
- cout << "'" << endl;
- }
-
- virtual void
- language (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- uri (std::string const& v)
- {
- cout << "'" << v << "'" << endl;
- }
-
- virtual void
- qname (xml_schema::qname const& v)
- {
- cout << "'" << v.prefix () << ":" << v.name () << "'" << endl;
- }
-
- virtual void
- base64_binary (XSD_AUTO_PTR<xml_schema::buffer> v)
- {
- std::string tmp (v->data (), v->size ());
- cout << "'" << tmp << "'" << endl;
- }
-
- virtual void
- hex_binary (XSD_AUTO_PTR<xml_schema::buffer> v)
- {
- std::string tmp (v->data (), v->size ());
- cout << "'" << tmp << "'" << endl;
- }
-
- virtual void
- gday (xml_schema::gday const& v)
- {
- cout << v.day ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- gmonth (xml_schema::gmonth const& v)
- {
- cout << v.month ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- gyear (xml_schema::gyear const& v)
- {
- cout << v.year ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- gmonth_day (xml_schema::gmonth_day const& v)
- {
- cout << v.month () << '-' << v.day ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- gyear_month (xml_schema::gyear_month const& v)
- {
- cout << v.year () << '-' << v.month ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- date (xml_schema::date const& v)
- {
- cout << v.year () << '-' << v.month () << '-' << v.day ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- time (xml_schema::time const& v)
- {
- cout << v.hours () << ':' << v.minutes () << ':' << v.seconds ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- date_time (xml_schema::date_time const& v)
- {
- cout << v.year () << '-' << v.month () << '-' << v.day () << 'T'
- << v.hours () << ':' << v.minutes () << ':' << v.seconds ();
-
- if (v.zone_present ())
- cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
- << ':' << v.zone_minutes ();
-
- cout << endl;
- }
-
- virtual void
- duration (xml_schema::duration const& v)
- {
- cout << (v.negative () ? "-" : "") << 'P'
- << v.years () << 'Y'
- << v.months () << 'M'
- << v.days () << 'D'
- << 'T'
- << v.hours () << 'H'
- << v.minutes () << 'M'
- << v.seconds () << 'S'
- << endl;
- }
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- any_type_pimpl any_type_p;
- any_simple_type_pimpl any_simple_type_p;
-
- xml_schema::boolean_pimpl boolean_p;
-
- xml_schema::byte_pimpl byte_p;
- xml_schema::unsigned_byte_pimpl unsigned_byte_p;
- xml_schema::short_pimpl short_p;
- xml_schema::unsigned_short_pimpl unsigned_short_p;
- xml_schema::int_pimpl int_p;
- xml_schema::unsigned_int_pimpl unsigned_int_p;
- xml_schema::long_pimpl long_p;
- xml_schema::unsigned_long_pimpl unsigned_long_p;
-
- xml_schema::integer_pimpl integer_p;
- xml_schema::negative_integer_pimpl negative_integer_p;
- xml_schema::non_positive_integer_pimpl non_positive_integer_p;
- xml_schema::positive_integer_pimpl positive_integer_p;
- xml_schema::non_negative_integer_pimpl non_negative_integer_p;
-
- xml_schema::float_pimpl float_p;
- xml_schema::double_pimpl double_p;
- xml_schema::decimal_pimpl decimal_p;
-
- xml_schema::string_pimpl string_p;
- xml_schema::normalized_string_pimpl normalized_string_p;
- xml_schema::token_pimpl token_p;
- xml_schema::name_pimpl name_p;
- xml_schema::nmtoken_pimpl nmtoken_p;
- xml_schema::nmtokens_pimpl nmtokens_p;
- xml_schema::ncname_pimpl ncname_p;
- xml_schema::id_pimpl id_p;
- xml_schema::idref_pimpl idref_p;
- xml_schema::idrefs_pimpl idrefs_p;
-
- xml_schema::language_pimpl language_p;
- xml_schema::uri_pimpl uri_p;
- xml_schema::qname_pimpl qname_p;
-
- xml_schema::base64_binary_pimpl base64_binary_p;
- xml_schema::hex_binary_pimpl hex_binary_p;
-
- xml_schema::gday_pimpl gday_p;
- xml_schema::gmonth_pimpl gmonth_p;
- xml_schema::gyear_pimpl gyear_p;
- xml_schema::gmonth_day_pimpl gmonth_day_p;
- xml_schema::gyear_month_pimpl gyear_month_p;
- xml_schema::date_pimpl date_p;
- xml_schema::time_pimpl time_p;
- xml_schema::date_time_pimpl date_time_p;
- xml_schema::duration_pimpl duration_p;
-
- type_pimpl type_p;
-
- type_p.parsers (any_type_p,
- any_simple_type_p,
- boolean_p,
- byte_p,
- unsigned_byte_p,
- short_p,
- unsigned_short_p,
- int_p,
- unsigned_int_p,
- long_p,
- unsigned_long_p,
- integer_p,
- negative_integer_p,
- non_positive_integer_p,
- positive_integer_p,
- non_negative_integer_p,
- float_p,
- double_p,
- decimal_p,
- string_p,
- normalized_string_p,
- token_p,
- name_p,
- nmtoken_p,
- nmtokens_p,
- ncname_p,
- id_p,
- idref_p,
- idrefs_p,
- language_p,
- uri_p,
- qname_p,
- base64_binary_p,
- hex_binary_p,
- gday_p,
- gmonth_p,
- gyear_p,
- gmonth_day_p,
- gyear_month_p,
- date_p,
- time_p,
- date_time_p,
- duration_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- type_p.pre ();
- doc_p.parse (argv[1]);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/built-in/makefile b/tests/cxx/parser/built-in/makefile
deleted file mode 100644
index 5602b6a..0000000
--- a/tests/cxx/parser/built-in/makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# file : tests/cxx/parser/built-in/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/enumeration/driver.cxx b/tests/cxx/parser/enumeration/driver.cxx
deleted file mode 100644
index e90f58b..0000000
--- a/tests/cxx/parser/enumeration/driver.cxx
+++ /dev/null
@@ -1,81 +0,0 @@
-// file : tests/cxx/parser/enumeration/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test xsd:enumeration parsing.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace xml_schema;
-
-struct digit_pimpl: test::digit_pskel, int_pimpl
-{
-};
-
-struct gender_pimpl: test::gender_pskel, string_pimpl
-{
- virtual ::gender
- post_gender ()
- {
- std::string str (post_string ());
-
- if (str == "male")
- return male;
- else
- return female;
- }
-};
-
-struct type_pimpl: test::type_pskel
-{
- virtual void
- digit (int i)
- {
- cout << i << endl;
- }
-
- virtual void
- gender (::gender g)
- {
- cout << g << endl;
- }
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- digit_pimpl digit_p;
- gender_pimpl gender_p;
- type_pimpl type_p;
-
- type_p.parsers (digit_p, gender_p);
-
- document doc_p (type_p, "test", "root");
-
- type_p.pre ();
- doc_p.parse (argv[1]);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/enumeration/makefile b/tests/cxx/parser/enumeration/makefile
deleted file mode 100644
index f2ae834..0000000
--- a/tests/cxx/parser/enumeration/makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-# file : tests/cxx/parser/enumeration/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --type-map $(src_base)/test.map
-$(gen): $(out_root)/xsd/xsd $(src_base)/test.map
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/generated-impl/makefile b/tests/cxx/parser/generated-impl/makefile
deleted file mode 100644
index ba26c37..0000000
--- a/tests/cxx/parser/generated-impl/makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# file : tests/cxx/parser/generated-impl/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-
-obj := $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.o) $(xsd:.xsd=-pimpl.o) $(xsd:.xsd=-driver.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/$(xsd:.xsd=-driver)
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) \
- $(xsd:.xsd=-pskel.ixx) \
- $(xsd:.xsd=-pskel.cxx) \
- $(xsd:.xsd=-pimpl.hxx) \
- $(xsd:.xsd=-pimpl.cxx) \
- $(xsd:.xsd=-driver.cxx)
-
-gen := $(addprefix $(out_base)/,$(genf))
-
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-print-impl --generate-test-driver \
---force-overwrite
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pimpl.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := $(xsd:.xsd=-driver) $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-xsd_parser_impl_suffix := -pimpl
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/list/driver.cxx b/tests/cxx/parser/list/driver.cxx
deleted file mode 100644
index dfc27bf..0000000
--- a/tests/cxx/parser/list/driver.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-// file : tests/cxx/parser/list/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test xsd:list parsing.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct string_list_pimpl: string_list_pskel
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- item (string const& v)
- {
- cout << " '" << v << "'" << endl;
- }
-
- virtual void
- post_string_list ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct string_list_lang_pimpl: string_list_lang_pskel
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- item (string const& v)
- {
- cout << " '" << v << "'" << endl;
- }
-
- virtual void
- lang (string const& v)
- {
- cout << " lang: '" << v << "'" << endl;
- }
-
- virtual void
- post_string_list_lang ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- string_list_pimpl string_list_p;
- string_list_lang_pimpl string_list_lang_p;
- type_pimpl type_p;
-
- string_list_p.parsers (string_p);
- string_list_lang_p.parsers (string_p, string_p);
- type_p.parsers (string_list_p, string_list_lang_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- type_p.pre ();
- doc_p.parse (argv[1]);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/list/makefile b/tests/cxx/parser/list/makefile
deleted file mode 100644
index c3b5a87..0000000
--- a/tests/cxx/parser/list/makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# file : tests/cxx/parser/list/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/makefile b/tests/cxx/parser/makefile
deleted file mode 100644
index 53de7c7..0000000
--- a/tests/cxx/parser/makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# file : tests/cxx/parser/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-tests := built-in enumeration generated-impl list recursive \
-name-clash/inheritance polymorphism test-template validation \
-union
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/parser/name-clash/inheritance/driver.cxx b/tests/cxx/parser/name-clash/inheritance/driver.cxx
deleted file mode 100644
index dc5f871..0000000
--- a/tests/cxx/parser/name-clash/inheritance/driver.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-// file : tests/cxx/parser/name-clash/inheritance/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test for name clashes across inheritance hierarchy.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct derived_pimpl: derived_pskel
-{
- virtual void
- e (string const& v)
- {
- cout << "e: " << v << endl;
- }
-
- virtual void
- e1 (string const& v)
- {
- cout << "e1: " << v << endl;
- }
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- derived_pimpl derived_p;
-
- derived_p.parsers (string_p, string_p);
-
- xml_schema::document doc_p (derived_p, "test", "root");
-
- derived_p.pre ();
- doc_p.parse (argv[1]);
- derived_p.post_derived ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/name-clash/inheritance/makefile b/tests/cxx/parser/name-clash/inheritance/makefile
deleted file mode 100644
index c540ebe..0000000
--- a/tests/cxx/parser/name-clash/inheritance/makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-# file : tests/cxx/parser/name-clash/inheritance/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/polymorphism/makefile b/tests/cxx/parser/polymorphism/makefile
deleted file mode 100644
index 252d857..0000000
--- a/tests/cxx/parser/polymorphism/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/parser/polymorphism/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := same-type recursive
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/parser/polymorphism/recursive/driver.cxx b/tests/cxx/parser/polymorphism/recursive/driver.cxx
deleted file mode 100644
index 4a401bd..0000000
--- a/tests/cxx/parser/polymorphism/recursive/driver.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-// file : tests/cxx/parser/polymorphism/recursive/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test polymorphic recursive parsing.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-#include "test-pimpl.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::int_pimpl int_p;
-
- root_pimpl root_p;
- expression_pimpl expression_p;
- recursive_pimpl recursive_p;
- value_a_pimpl value_a_p;
- value_b_pimpl value_b_p;
-
- xml_schema::parser_map_impl expression_map;
-
- // Connect the parsers together.
- //
- root_p.parsers (expression_p);
- expression_map.insert(value_a_p);
- expression_map.insert(value_b_p);
- expression_map.insert(recursive_p);
-
- root_p.expression_parser(expression_map);
-
- recursive_p.parsers(expression_p);
- recursive_p.expression_parser(expression_map);
-
- value_a_p.parsers(int_p);
- value_b_p.parsers(int_p);
-
- xml_schema::document doc_p (root_p, "test", "root", true);
-
- root_p.pre ();
- doc_p.parse (argv[1]);
- root_p.post_root ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/polymorphism/recursive/makefile b/tests/cxx/parser/polymorphism/recursive/makefile
deleted file mode 100644
index 855d471..0000000
--- a/tests/cxx/parser/polymorphism/recursive/makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-# file : tests/cxx/parser/polymorphism/recursive/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx test-pimpl.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx b/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
deleted file mode 100644
index 8c355ea..0000000
--- a/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-// file : tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <iostream>
-
-#include "test-pimpl.hxx"
-
-using namespace std;
-
-namespace test
-{
- // root_pimpl
- //
-
- void root_pimpl::
- pre ()
- {
- cout << "root start" << endl;
- }
-
- void root_pimpl::
- expression ()
- {
- cout << "root->expression" << endl;
- }
-
- void root_pimpl::
- post_root ()
- {
- cout << "root end" << endl;
- }
-
- // expression_pimpl
- //
-
- void expression_pimpl::
- pre ()
- {
- cout << "expression begin" << endl;
- }
-
- void expression_pimpl::
- post_expression ()
- {
- cout << "expression end" << endl;
- }
-
- // recursive_pimpl
- //
-
- void recursive_pimpl::
- pre ()
- {
- cout << "recursive start" << endl;
- }
-
- void recursive_pimpl::
- expression ()
- {
- cout << "recursive->expression event" << endl;
- }
-
- void recursive_pimpl::
- post_expression ()
- {
- cout << "recursive: post_expression override" << endl;
- post_recursive ();
- }
-
- void recursive_pimpl::
- post_recursive ()
- {
- cout << "recursive end" << endl;
- }
-
- // value_pimpl
- //
-
- void value_pimpl::
- pre ()
- {
- cout << "value begin" << endl;
- }
-
- void value_pimpl::
- constant (int)
- {
- cout << "value->constant" << endl;
- }
-
- void value_pimpl::
- post_expression ()
- {
- cout << "value: post_expression override" << endl;
- post_value ();
- }
-
- void value_pimpl::
- post_value ()
- {
- cout << "value end" << endl;
- }
-
- // value_a_pimpl
- //
-
- void value_a_pimpl::
- pre ()
- {
- cout << "value_a begin" << endl;
- }
-
- void value_a_pimpl::
- post_value ()
- {
- cout << "value_a: post_value override" << endl;
- post_value_a ();
- }
-
- void value_a_pimpl::
- post_value_a ()
- {
- cout << "value_a end" << endl;
- }
-
- // value_b_pimpl
- //
-
- void value_b_pimpl::
- pre ()
- {
- cout << "value_b begin" << endl;
- }
-
- void value_b_pimpl::
- post_value ()
- {
- cout << "value_b: post_value override" << endl;
- post_value_b ();
- }
-
- void value_b_pimpl::
- post_value_b ()
- {
- cout << "value_b end" << endl;
- }
-}
diff --git a/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx b/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx
deleted file mode 100644
index 932be9e..0000000
--- a/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-// file : tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef TEST_PIMPL_HXX
-#define TEST_PIMPL_HXX
-
-#include "test-pskel.hxx"
-
-namespace test
-{
- class root_pimpl: public virtual root_pskel
- {
- public:
- virtual void
- pre ();
-
- virtual void
- expression ();
-
- virtual void
- post_root ();
- };
-
- class expression_pimpl: public virtual expression_pskel
- {
- public:
- virtual void
- pre ();
-
- virtual void
- post_expression ();
- };
-
- class recursive_pimpl: public virtual recursive_pskel,
- public expression_pimpl
- {
- public:
- virtual void
- pre ();
-
- virtual void
- expression ();
-
- virtual void
- post_expression ();
-
- virtual void
- post_recursive ();
- };
-
- class value_pimpl: public virtual value_pskel, public expression_pimpl
- {
- public:
- virtual void
- pre ();
-
- virtual void
- constant (int);
-
- virtual void
- post_expression ();
-
- virtual void
- post_value ();
- };
-
- class value_a_pimpl: public virtual value_a_pskel, public value_pimpl
- {
- public:
- virtual void
- pre ();
-
- virtual void
- post_value ();
-
- virtual void
- post_value_a ();
- };
-
- class value_b_pimpl: public virtual value_b_pskel, public value_pimpl
- {
- public:
- virtual void
- pre ();
-
- virtual void
- post_value ();
-
- virtual void
- post_value_b ();
- };
-}
-
-#endif // TEST_PIMPL_HXX
diff --git a/tests/cxx/parser/polymorphism/same-type/driver.cxx b/tests/cxx/parser/polymorphism/same-type/driver.cxx
deleted file mode 100644
index 4ccaec5..0000000
--- a/tests/cxx/parser/polymorphism/same-type/driver.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-// file : tests/cxx/parser/polymorphism/same-type/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test substitution group and xsi:type that don't change the type.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct base_pimpl: base_pskel
-{
- virtual void
- a (string const& v)
- {
- cout << v << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- base_pimpl base_p;
- type_pimpl type_p;
-
- base_p.parsers (string_p);
- type_p.parsers (base_p);
-
- xml_schema::document doc_p (type_p, "test", "root", true);
-
- type_p.pre ();
- doc_p.parse (argv[1]);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/polymorphism/same-type/makefile b/tests/cxx/parser/polymorphism/same-type/makefile
deleted file mode 100644
index 588d8b6..0000000
--- a/tests/cxx/parser/polymorphism/same-type/makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-# file : tests/cxx/parser/polymorphism/same-type/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/recursive/driver.cxx b/tests/cxx/parser/recursive/driver.cxx
deleted file mode 100644
index 39c6621..0000000
--- a/tests/cxx/parser/recursive/driver.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-// file : tests/cxx/parser/recursive/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test recursive parser invocation.
-//
-
-#include <iostream>
-#include <string>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-
-struct sub_pimpl: sub_type_pskel
-{
- virtual void
- pre ()
- {
- cout << "sub::pre" << endl;
- }
-
- virtual void
- sub ()
- {
- cout << "sub::sub" << endl;
- }
-
- virtual void
- sub2 ()
- {
- cout << "sub::sub2" << endl;
- }
-
- virtual void
- name (string const& n)
- {
- cout << "sub::name: " << n << endl;
- }
-
- virtual void
- post_sub_type ()
- {
- cout << "sub::post" << endl;
- }
-};
-
-struct indir_pimpl: indir_type_pskel
-{
- virtual void
- pre ()
- {
- cout << "indir::pre" << endl;
- }
-
- virtual void
- sub ()
- {
- cout << "indir::sub" << endl;
- }
-
- virtual void
- name (string const& n)
- {
- cout << "indir::name: " << n << endl;
- }
-
- virtual void
- post_indir_type ()
- {
- cout << "indir::post" << endl;
- }
-};
-
-struct test_pimpl: test_type_pskel
-{
- virtual void
- pre ()
- {
- cout << "test::pre" << endl;
- }
-
- virtual void
- sub ()
- {
- cout << "test::sub" << endl;
- }
-
- virtual void
- name (string const& n)
- {
- cout << "test::name: " << n << endl;
- }
-
- virtual void
- post_test_type ()
- {
- cout << "test::post" << endl;
- }
-};
-
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
-
- sub_pimpl sub_p;
- indir_pimpl indir_p;
- test_pimpl test_p;
-
- sub_p.parsers (sub_p, indir_p, sub_p, string_p);
- indir_p.parsers (sub_p, string_p);
- test_p.parsers (sub_p, string_p);
-
- xml_schema::document doc_p (test_p, "test");
-
- test_p.pre ();
- doc_p.parse (argv[1]);
- test_p.post_test_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/recursive/makefile b/tests/cxx/parser/recursive/makefile
deleted file mode 100644
index a1bc9ab..0000000
--- a/tests/cxx/parser/recursive/makefile
+++ /dev/null
@@ -1,83 +0,0 @@
-# file : tests/cxx/parser/recursive/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/test-template/driver.cxx b/tests/cxx/parser/test-template/driver.cxx
deleted file mode 100644
index 9f56496..0000000
--- a/tests/cxx/parser/test-template/driver.cxx
+++ /dev/null
@@ -1,66 +0,0 @@
-// file : tests/cxx/parser/test-template/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Insert test description here.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct type_pimpl: type_pskel
-{
- virtual void
- pre ()
- {
- }
-
- virtual void
- a (string const& v)
- {
- cout << v << endl;
- }
-
- virtual void
- post_type ()
- {
- }
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- type_pimpl type_p;
-
- type_p.parsers (string_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- type_p.pre ();
- doc_p.parse (argv[1]);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/test-template/makefile b/tests/cxx/parser/test-template/makefile
deleted file mode 100644
index b680466..0000000
--- a/tests/cxx/parser/test-template/makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# file : tests/cxx/parser/test-template/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/union/driver.cxx b/tests/cxx/parser/union/driver.cxx
deleted file mode 100644
index 5577f78..0000000
--- a/tests/cxx/parser/union/driver.cxx
+++ /dev/null
@@ -1,60 +0,0 @@
-// file : tests/cxx/parser/union/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test xsd:union parsing.
-//
-
-#include <string>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct int_string_union_pimpl: int_string_union_pskel
-{
- virtual void
- _characters (const xml_schema::ro_string& s)
- {
- cout << "'" << s << "'" << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- int_string_union_pimpl int_string_union_p;
- type_pimpl type_p;
-
- type_p.parsers (int_string_union_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- type_p.pre ();
- doc_p.parse (argv[1]);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (std::ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/union/makefile b/tests/cxx/parser/union/makefile
deleted file mode 100644
index a8e70f6..0000000
--- a/tests/cxx/parser/union/makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# file : tests/cxx/parser/union/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/all/driver.cxx b/tests/cxx/parser/validation/all/driver.cxx
deleted file mode 100644
index 093d480..0000000
--- a/tests/cxx/parser/validation/all/driver.cxx
+++ /dev/null
@@ -1,98 +0,0 @@
-// file : tests/cxx/parser/validation/all/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the all compositor validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct all_pimpl: all_pskel
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- b (string const& v)
- {
- cout << " b = " << v << endl;
- }
-
- virtual void
- c (string const& v)
- {
- cout << " c = " << v << endl;
- }
-
- virtual void
- post_all ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- all_pimpl all_p;
- type_pimpl type_p;
-
- all_p.parsers (string_p, string_p, string_p);
- type_p.parsers (all_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- try
- {
- ifstream ifs (argv[1]);
- type_p.pre ();
- doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cout << " " << e << endl
- << "}" << endl
- << endl;
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/all/makefile b/tests/cxx/parser/validation/all/makefile
deleted file mode 100644
index b50e067..0000000
--- a/tests/cxx/parser/validation/all/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/all/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000 001 002 003
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/all/test-000.std b/tests/cxx/parser/validation/all/test-000.std
deleted file mode 100644
index b4445f2..0000000
--- a/tests/cxx/parser/validation/all/test-000.std
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- a = a
- b = b
- c = c
-}
-
-{
- a = a
- c = c
- b = b
-}
-
-{
- b = b
- a = a
- c = c
-}
-
-{
- b = b
- c = c
- a = a
-}
-
-{
- c = c
- a = a
- b = b
-}
-
-{
- c = c
- b = b
- a = a
-}
-
-{
- a = a
- b = b
-}
-
-{
- a = a
- b = b
-}
-
diff --git a/tests/cxx/parser/validation/all/test-000.xml b/tests/cxx/parser/validation/all/test-000.xml
deleted file mode 100644
index 6e46fae..0000000
--- a/tests/cxx/parser/validation/all/test-000.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- all combinations -->
- <all>
- <a>a</a>
- <b>b</b>
- <c>c</c>
- </all>
-
- <all>
- <a>a</a>
- <c>c</c>
- <b>b</b>
- </all>
-
- <all>
- <b>b</b>
- <a>a</a>
- <c>c</c>
- </all>
-
- <all>
- <b>b</b>
- <c>c</c>
- <a>a</a>
- </all>
-
- <all>
- <c>c</c>
- <a>a</a>
- <b>b</b>
- </all>
-
- <all>
- <c>c</c>
- <b>b</b>
- <a>a</a>
- </all>
-
- <!-- optional c is not present -->
- <all>
- <a>a</a>
- <b>b</b>
- </all>
-
- <all>
- <a>a</a>
- <b>b</b>
- </all>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/all/test-001.std b/tests/cxx/parser/validation/all/test-001.std
deleted file mode 100644
index 0472ad9..0000000
--- a/tests/cxx/parser/validation/all/test-001.std
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- a = a
- c = c
- :9:9 error: expected element 'b'
-}
-
diff --git a/tests/cxx/parser/validation/all/test-001.xml b/tests/cxx/parser/validation/all/test-001.xml
deleted file mode 100644
index 3df5600..0000000
--- a/tests/cxx/parser/validation/all/test-001.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- required b is not present (invalid) -->
- <all>
- <a>a</a>
- <c>c</c>
- </all>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/all/test-002.std b/tests/cxx/parser/validation/all/test-002.std
deleted file mode 100644
index c014230..0000000
--- a/tests/cxx/parser/validation/all/test-002.std
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- :7:9 error: expected element 'a'
-}
-
diff --git a/tests/cxx/parser/validation/all/test-002.xml b/tests/cxx/parser/validation/all/test-002.xml
deleted file mode 100644
index aed0c0c..0000000
--- a/tests/cxx/parser/validation/all/test-002.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- invalid -->
- <all>
- </all>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/all/test-003.std b/tests/cxx/parser/validation/all/test-003.std
deleted file mode 100644
index dd8c0d3..0000000
--- a/tests/cxx/parser/validation/all/test-003.std
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- a = a
- b = b
- :9:7 error: unexpected element 'a'
-}
-
diff --git a/tests/cxx/parser/validation/all/test-003.xml b/tests/cxx/parser/validation/all/test-003.xml
deleted file mode 100644
index b147cba..0000000
--- a/tests/cxx/parser/validation/all/test-003.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- invalid -->
- <all>
- <a>a</a>
- <b>b</b>
- <a>a</a>
- </all>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/any/driver.cxx b/tests/cxx/parser/validation/any/driver.cxx
deleted file mode 100644
index 3896598..0000000
--- a/tests/cxx/parser/validation/any/driver.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-// file : tests/cxx/parser/validation/any/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the any particle validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-using xml_schema::ro_string;
-
-struct any_a_pimpl: any_a_pskel
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- x (string const& v)
- {
- cout << " x = " << v << endl;
- }
-
- virtual void
- _start_any_element (ro_string const&,
- ro_string const& n,
- ro_string const*)
- {
- cout << " start any element '" << n << "'" << endl;
- }
-
- virtual void
- _end_any_element (ro_string const&, ro_string const& n)
- {
- cout << " end any element '" << n << "'" << endl;
- }
-
- virtual void
- _any_attribute (ro_string const&,
- ro_string const& n,
- ro_string const& v)
- {
- cout << " any attribute " << n << " = '" << v << "'" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& s)
- {
- cout << " any text: '" << s << "'" << endl;
- }
-
- virtual void
- post_any_a ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- any_a_pimpl any_a_p;
- type_pimpl type_p;
-
- any_a_p.parsers (string_p, string_p);
- type_p.parsers (any_a_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- try
- {
- ifstream ifs (argv[1]);
- type_p.pre ();
- doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cout << " " << e << endl
- << "}" << endl
- << endl;
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/any/makefile b/tests/cxx/parser/validation/any/makefile
deleted file mode 100644
index fe3cdab..0000000
--- a/tests/cxx/parser/validation/any/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/any/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/attribute/driver.cxx b/tests/cxx/parser/validation/attribute/driver.cxx
deleted file mode 100644
index 8eda713..0000000
--- a/tests/cxx/parser/validation/attribute/driver.cxx
+++ /dev/null
@@ -1,197 +0,0 @@
-// file : tests/cxx/parser/validation/attribute/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test attribute and attribute wildcard (anyAttribute) validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-using xml_schema::ro_string;
-
-struct pass_a_pimpl: pass_a_pskel
-{
- virtual void
- pre ()
- {
- cout << "pass-a" << endl
- << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- b (string const& v)
- {
- cout << " b = " << v << endl;
- }
-
- virtual void
- _any_attribute (ro_string const& ns,
- ro_string const& name,
- ro_string const& value)
- {
- cout << " any: " << ns << "#" << name << " = " << value << endl;
- }
-
- virtual void
- post_pass_a ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct pass_b_pimpl: pass_b_pskel
-{
- virtual void
- pre ()
- {
- cout << "pass-b" << endl
- << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- b (string const& v)
- {
- cout << " b = " << v << endl;
- }
-
- virtual void
- _any_attribute (ro_string const& ns,
- ro_string const& name,
- ro_string const& value)
- {
- cout << " any: " << ns << "#" << name << " = " << value << endl;
- }
-
- virtual void
- post_pass_b ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct pass_c_pimpl: pass_c_pskel
-{
- virtual void
- pre ()
- {
- cout << "pass-c" << endl
- << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- b (string const& v)
- {
- cout << " b = " << v << endl;
- }
-
- virtual void
- post_pass_c ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct fail_pimpl: fail_pskel
-{
- virtual void
- pre ()
- {
- cout << "fail" << endl
- << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- post_fail ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- pass_a_pimpl pass_a_p;
- pass_b_pimpl pass_b_p;
- pass_c_pimpl pass_c_p;
- fail_pimpl fail_p;
- type_pimpl type_p;
-
- pass_a_p.parsers (string_p, string_p);
- pass_b_p.parsers (string_p, string_p);
- pass_c_p.parsers (string_p, string_p);
- fail_p.parsers (string_p);
- type_p.parsers (pass_a_p, pass_b_p, pass_c_p, fail_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- try
- {
- ifstream ifs (argv[1]);
- type_p.pre ();
- doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cout << " " << e << endl
- << "}" << endl
- << endl;
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/attribute/makefile b/tests/cxx/parser/validation/attribute/makefile
deleted file mode 100644
index d92bf1d..0000000
--- a/tests/cxx/parser/validation/attribute/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/attribute/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/built-in/any-type/driver.cxx b/tests/cxx/parser/validation/built-in/any-type/driver.cxx
deleted file mode 100644
index fd91247..0000000
--- a/tests/cxx/parser/validation/built-in/any-type/driver.cxx
+++ /dev/null
@@ -1,154 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/any-type/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the anyType and anySimpleType validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-using xml_schema::ro_string;
-
-struct any_type_pimpl: xml_schema::any_type_pimpl
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- _start_any_element (ro_string const&,
- ro_string const& n,
- ro_string const*)
- {
- cout << " start any element '" << n << "'" << endl;
- }
-
- virtual void
- _end_any_element (ro_string const&, ro_string const& n)
- {
- cout << " end any element '" << n << "'" << endl;
- }
-
- virtual void
- _any_attribute (ro_string const&,
- ro_string const& n,
- ro_string const& v)
- {
- cout << " any attribute " << n << " = '" << v << "'" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& s)
- {
- cout << " any text: '" << s << "'" << endl;
- }
-
- virtual void
- post_any_type ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct any_simple_type_pimpl: xml_schema::any_simple_type_pimpl
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& s)
- {
- cout << " any text: '" << s << "'" << endl;
- }
-
- virtual void
- post_any_simple_type ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct any_extension_pimpl: virtual any_extension_pskel,
- any_type_pimpl
-
-{
- virtual void
- x (const string& v)
- {
- cout << " x = " << v << endl;
- }
-};
-
-struct any_simple_extension_pimpl: virtual any_simple_extension_pskel,
- any_simple_type_pimpl
-{
- virtual void
- x (const string& v)
- {
- cout << " x = " << v << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
-
- any_type_pimpl any_type_p;
- any_simple_type_pimpl any_simple_type_p;
-
- any_extension_pimpl any_extension_p;
- any_simple_extension_pimpl any_simple_extension_p;
-
- type_pimpl type_p;
-
- any_extension_p.parsers (string_p);
- any_simple_extension_p.parsers (string_p);
-
- type_p.parsers (any_type_p,
- any_extension_p,
- any_simple_extension_p,
- any_simple_type_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- ifstream ifs (argv[1]);
- type_p.pre ();
- doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/any-type/makefile b/tests/cxx/parser/validation/built-in/any-type/makefile
deleted file mode 100644
index dfbb183..0000000
--- a/tests/cxx/parser/validation/built-in/any-type/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/any-type/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/built-in/binary/driver.cxx b/tests/cxx/parser/validation/built-in/binary/driver.cxx
deleted file mode 100644
index 86575f4..0000000
--- a/tests/cxx/parser/validation/built-in/binary/driver.cxx
+++ /dev/null
@@ -1,153 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/binary/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in base64Binary and hexBinary types validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- typedef xsd::cxx::parser::buffer buffer;
-
- // Good.
- //
-
- // hexBinary
- //
- {
- hex_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters (" ");
- p._post ();
- assert (*p.post_hex_binary () == buffer ());
- }
-
- {
- hex_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n313");
- p._characters ("23334356162636a6b ");
- p._post ();
- assert (*p.post_hex_binary () == buffer ("12345abcjk", 10));
- }
-
- // base64Binary
- //
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("MTIzND ");
- p._characters ("VhYmNqaw = = ");
- p._post ();
- assert (*p.post_base64_binary () == buffer ("12345abcjk", 10));
- }
-
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("YQ==");
- p._post ();
- assert (*p.post_base64_binary () == buffer ("a", 1));
- }
-
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("YWI=");
- p._post ();
- assert (*p.post_base64_binary () == buffer ("ab", 2));
- }
-
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("YWJj");
- p._post ();
- assert (*p.post_base64_binary () == buffer ("abc", 3));
- }
-
- // Bad
- //
-
- // hexBinary
- //
- {
- hex_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("313");
- assert (test_post_fail (p));
- }
-
- {
- hex_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("313233343X6162636a6b");
- assert (test_post_fail (p));
- }
-
- // base64Binary
- //
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("YQ");
- assert (test_post_fail (p));
- }
-
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("==");
- assert (test_post_fail (p));
- }
-
- {
- base64_binary_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("MTIzNDVhYmNqaw=A");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/binary/makefile b/tests/cxx/parser/validation/built-in/binary/makefile
deleted file mode 100644
index f0c5ae6..0000000
--- a/tests/cxx/parser/validation/built-in/binary/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/binary/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/boolean/driver.cxx b/tests/cxx/parser/validation/built-in/boolean/driver.cxx
deleted file mode 100644
index 6a21cb7..0000000
--- a/tests/cxx/parser/validation/built-in/boolean/driver.cxx
+++ /dev/null
@@ -1,145 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/boolean/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in boolean type validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-bool
-test_post_fail (boolean_pimpl<char>& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("true");
- p._post ();
- assert (p.post_boolean ());
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1");
- p._post ();
- assert (p.post_boolean ());
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("false");
- p._post ();
- assert (!p.post_boolean ());
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (!p.post_boolean ());
- }
-
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" true ");
- p._post ();
- assert (p.post_boolean ());
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- p._characters (" \n ");
- p._characters (" fa");
- p._characters ("l");
- p._characters ("se ");
- p._characters (" \n ");
- p._characters (" ");
- p._post ();
- assert (!p.post_boolean ());
- }
-
- // Bad
- //
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- //p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- assert (test_post_fail (p));
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- assert (test_post_fail (p));
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("fal");
- p._characters ("s ");
- p._characters ("e");
- assert (test_post_fail (p));
- }
-
- {
- boolean_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("01");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/boolean/makefile b/tests/cxx/parser/validation/built-in/boolean/makefile
deleted file mode 100644
index 52f4e88..0000000
--- a/tests/cxx/parser/validation/built-in/boolean/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/boolean/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/byte/driver.cxx b/tests/cxx/parser/validation/built-in/byte/driver.cxx
deleted file mode 100644
index c0e2b99..0000000
--- a/tests/cxx/parser/validation/built-in/byte/driver.cxx
+++ /dev/null
@@ -1,256 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/byte/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in byte and unsigned byte types validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("123");
- p._post ();
- assert (p.post_byte () == 123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("\t +123 \n ");
- p._post ();
- assert (p.post_byte () == 123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-123");
- p._post ();
- assert (p.post_byte () == -123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+123");
- p._post ();
- assert (p.post_byte () == 123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0000000000000000123");
- p._post ();
- assert (p.post_byte () == 123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+0000000000000000123");
- p._post ();
- assert (p.post_byte () == 123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0000000000000000123");
- p._post ();
- assert (p.post_byte () == -123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("\t \n");
- p._characters (" -");
- p._characters ("00000");
- p._characters ("001");
- p._characters ("23 \n\t");
- p._post ();
- assert (p.post_byte () == -123);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-128");
- p._post ();
- assert (p.post_byte () == -128);
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("127");
- p._post ();
- assert (p.post_byte () == 127);
- }
-
- {
- unsigned_byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+123");
- p._post ();
- assert (p.post_unsigned_byte () == 123);
- }
-
- {
- unsigned_byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_unsigned_byte () == 0);
- }
-
- {
- unsigned_byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("255");
- p._post ();
- assert (p.post_unsigned_byte () == 255);
- }
-
- // Bad
- //
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n \t ");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("++01");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--01");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-01");
- p._characters (" ");
- p._characters ("23 ");
- assert (test_post_fail (p));
- }
-
- {
- unsigned_byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-123");
- assert (test_post_fail (p));
- }
-
- // Ranges
- //
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-129");
- assert (test_post_fail (p));
- }
-
- {
- byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("128");
- assert (test_post_fail (p));
- }
-
- {
- unsigned_byte_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("256");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/byte/makefile b/tests/cxx/parser/validation/built-in/byte/makefile
deleted file mode 100644
index afc8174..0000000
--- a/tests/cxx/parser/validation/built-in/byte/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/byte/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/date-time/driver.cxx b/tests/cxx/parser/validation/built-in/date-time/driver.cxx
deleted file mode 100644
index 8aa3943..0000000
--- a/tests/cxx/parser/validation/built-in/date-time/driver.cxx
+++ /dev/null
@@ -1,1533 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/date-time/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in date and time types validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- typedef xsd::cxx::parser::gday gday;
- typedef xsd::cxx::parser::gmonth gmonth;
- typedef xsd::cxx::parser::gyear gyear;
- typedef xsd::cxx::parser::gmonth_day gmonth_day;
- typedef xsd::cxx::parser::gyear_month gyear_month;
- typedef xsd::cxx::parser::date date;
- typedef xsd::cxx::parser::time time;
- typedef xsd::cxx::parser::date_time date_time;
- typedef xsd::cxx::parser::duration duration;
-
- // Good.
- //
-
- // gday & time zone parsing
- //
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("---1");
- p._characters ("2+12:00");
- p._post ();
- assert (p.post_gday () == gday (12, 12, 00));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---01");
- p._post ();
- assert (p.post_gday () == gday (1));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---31");
- p._post ();
- assert (p.post_gday () == gday (31));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---15Z");
- p._post ();
- assert (p.post_gday () == gday (15, 0, 0));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---15-14:00");
- p._post ();
- assert (p.post_gday () == gday (15, -14, 0));
- }
-
- // gmonth
- //
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("--1");
- p._characters ("0+12:00");
- p._post ();
- assert (p.post_gmonth () == gmonth (10, 12, 0));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--01");
- p._post ();
- assert (p.post_gmonth () == gmonth (1));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12Z");
- p._post ();
- assert (p.post_gmonth () == gmonth (12, 0, 0));
- }
-
- // gyear
- //
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("20");
- p._characters ("07+12:00");
- p._post ();
- assert (p.post_gyear () == gyear (2007, 12, 00));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0001");
- p._post ();
- assert (p.post_gyear () == gyear (1));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-20000Z");
- p._post ();
- assert (p.post_gyear () == gyear (-20000, 0, 0));
- }
-
- // gmonth_day
- //
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("--1");
- p._characters ("0-28+12:00 ");
- p._post ();
- assert (p.post_gmonth_day () == gmonth_day (10, 28, 12, 00));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12-31");
- p._post ();
- assert (p.post_gmonth_day () == gmonth_day (12, 31));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--01-01Z");
- p._post ();
- assert (p.post_gmonth_day () == gmonth_day (1, 1, 0, 0));
- }
-
- // gyear_month
- //
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("200");
- p._characters ("7-12+12:00 ");
- p._post ();
- assert (p.post_gyear_month () == gyear_month (2007, 12, 12, 00));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-2007-10");
- p._post ();
- assert (p.post_gyear_month () == gyear_month (-2007, 10));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20007-10Z");
- p._post ();
- assert (p.post_gyear_month () == gyear_month (20007, 10, 0, 0));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-20007-01");
- p._post ();
- assert (p.post_gyear_month () == gyear_month (-20007, 1));
- }
-
- // date
- //
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("200");
- p._characters ("7-12-26+12:00 ");
- p._post ();
- assert (p.post_date () == date (2007, 12, 26, 12, 0));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-2007-10-15");
- p._post ();
- assert (p.post_date () == date (-2007, 10, 15));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20007-12-31Z");
- p._post ();
- assert (p.post_date () == date (20007, 12, 31, 0, 0));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-20007-01-01");
- p._post ();
- assert (p.post_date () == date (-20007, 1, 1));
- }
-
- // time
- //
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("12:");
- p._characters ("46:23.456+12:00 ");
- p._post ();
- assert (p.post_time () == time (12, 46, 23.456, 12, 0));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("12:13:14");
- p._post ();
- assert (p.post_time () == time (12, 13, 14.0));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("12:13:14Z");
- p._post ();
- assert (p.post_time () == time (12, 13, 14.0, 0, 0));
- }
-
- // date_time
- //
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("200");
- p._characters ("7-12-26T12:13:14.123+12:00 ");
- p._post ();
- assert (p.post_date_time () ==
- date_time (2007, 12, 26, 12, 13, 14.123, 12, 0));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-2007-10-15T12:13:14");
- p._post ();
- assert (p.post_date_time () == date_time (-2007, 10, 15, 12, 13, 14.0));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20007-12-31T12:13:14Z");
- p._post ();
- assert (p.post_date_time () ==
- date_time (20007, 12, 31, 12, 13, 14.0, 0, 0));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-20007-01-01T12:13:14");
- p._post ();
- assert (p.post_date_time () == date_time (-20007, 1, 1, 12, 13, 14.0));
- }
-
- // duration
- //
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \t\n ");
- p._characters ("-P200");
- p._characters ("7Y13M32DT25H61M61.123S ");
- p._post ();
- assert (p.post_duration () ==
- duration (true, 2007, 13, 32, 25, 61, 61.123));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1Y");
- p._post ();
- assert (p.post_duration () == duration (false, 1, 0, 0, 0, 0, 0.0));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1M");
- p._post ();
- assert (p.post_duration () == duration (false, 0, 1, 0, 0, 0, 0.0));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1D");
- p._post ();
- assert (p.post_duration () == duration (false, 0, 0, 1, 0, 0, 0.0));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT1H");
- p._post ();
- assert (p.post_duration () == duration (false, 0, 0, 0, 1, 0, 0.0));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT1M");
- p._post ();
- assert (p.post_duration () == duration (false, 0, 0, 0, 0, 1, 0.0));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT1.1S");
- p._post ();
- assert (p.post_duration () == duration (false, 0, 0, 0, 0, 0, 1.1));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1YT1S");
- p._post ();
- assert (p.post_duration () == duration (false, 1, 0, 0, 0, 0, 1.0));
- }
-
- // Bad
- //
-
- // gday & time zone parsing
- //
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---1");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---00");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---32");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---2X");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12asd");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12X");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---1212:00");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12+2:00");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12+1200");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12+15:00");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12+12:60");
- assert (test_post_fail (p));
- }
-
- {
- gday_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("---12+14:01");
- assert (test_post_fail (p));
- }
-
- // gmonth
- //
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-12");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--00");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--13");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--1X");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--11+12:3o");
- assert (test_post_fail (p));
- }
-
- // gyear
- //
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("207");
- assert (test_post_fail (p));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-207");
- assert (test_post_fail (p));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0000");
- assert (test_post_fail (p));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20X7");
- assert (test_post_fail (p));
- }
-
- {
- gyear_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007+12:3o");
- assert (test_post_fail (p));
- }
-
- // gmonth_day
- //
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-12-12");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--1212");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12?12");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--00-12");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12-00");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--13-23");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12-32");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--1X-12");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--12-2X");
- assert (test_post_fail (p));
- }
-
- {
- gmonth_day_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("--11-11+12:3o");
- assert (test_post_fail (p));
- }
-
- // gyear_month
- //
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("207-01");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-207-01");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0000-01");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20X7-01");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007?12");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-0");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-00");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-13");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-1X");
- assert (test_post_fail (p));
- }
-
- {
- gyear_month_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01+12:3o");
- assert (test_post_fail (p));
- }
-
- // date
- //
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("207-01-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-207-01-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0000-01-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20X7-01-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007?01-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-0-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-00-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-13-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-1X-01");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10?12");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-0");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-00");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-32");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-2X");
- assert (test_post_fail (p));
- }
-
- {
- date_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01+12:3o");
- assert (test_post_fail (p));
- }
-
- // time
- //
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1:01:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2X:01:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23?01:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:0:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:60:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:4X:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10?12");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10:");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10:0");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10:01.");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10:60");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:10:2X");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("24:01:00");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("24:00:01");
- assert (test_post_fail (p));
- }
-
- {
- time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:01:01+12:3o");
- assert (test_post_fail (p));
- }
-
- // date_time
- //
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("207-01-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-207-01-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0000-01-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("20X7-01-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007?01-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-0-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-00-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-13-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-1X-01T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10?12T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-0T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-00T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-32T12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-10-2XT12:13:14");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T1:01:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T2X:01:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23?01:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:0:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:60:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:4X:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10?12");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10:");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10:0");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10:01.");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10:60");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T23:10:2X");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T24:01:00");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T24:00:01");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("23:01:01+12:3o");
- assert (test_post_fail (p));
- }
-
- {
- date_time_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007-01-01T12:13:14+12:3o");
- assert (test_post_fail (p));
- }
-
- // duration
- //
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- // p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2007Y");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-2007Y");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P-2007Y");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P-1M");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P-1D");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT-1H");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT-1M");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT-1.1S");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1H1M1S");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1M1Y");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT1S1H");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("PT1H1Y");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1Ygarbage");
- assert (test_post_fail (p));
- }
-
- {
- duration_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("P1YT");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/date-time/makefile b/tests/cxx/parser/validation/built-in/date-time/makefile
deleted file mode 100644
index 42d60e8..0000000
--- a/tests/cxx/parser/validation/built-in/date-time/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/date-time/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/float/driver.cxx b/tests/cxx/parser/validation/built-in/float/driver.cxx
deleted file mode 100644
index 7563aa7..0000000
--- a/tests/cxx/parser/validation/built-in/float/driver.cxx
+++ /dev/null
@@ -1,285 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/float/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in float, double, and decimal types validation.
-//
-#include <math.h>
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
-
- // float
- //
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" 0000123.456 ");
- p._post ();
- assert (p.post_float () == 123.456F);
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-12.345E2");
- p._post ();
- assert (p.post_float () == -12.345E2F);
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_float () == 0.0F);
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0");
- p._post ();
- assert (p.post_float () == -0.0F);
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("INF");
- p._post ();
- assert (isinf (p.post_float ()));
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-INF");
- p._post ();
- assert (isinf (p.post_float ()));
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("NaN");
- p._post ();
- assert (isnan (p.post_float ()));
- }
-
- // double
- //
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" 0000123.456789 ");
- p._post ();
- assert (p.post_double () == 123.456789);
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-12.3456789E2");
- p._post ();
- assert (p.post_double () == -12.3456789E2);
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_double () == 0.0);
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0");
- p._post ();
- assert (p.post_double () == -0.0);
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("INF");
- p._post ();
- assert (isinf (p.post_double ()));
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-INF");
- p._post ();
- assert (isinf (p.post_double ()));
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("NaN");
- p._post ();
- assert (isnan (p.post_double ()));
- }
-
- // decimal
- //
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" 0000123.456789 ");
- p._post ();
- assert (p.post_decimal () == 123.456789);
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-123.45678912345");
- p._post ();
- assert (p.post_decimal () == -123.45678912345);
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_decimal () == 0.0);
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0");
- p._post ();
- assert (p.post_decimal () == -0.0);
- }
-
-
- // Bad
- //
-
- // float
- //
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+INF");
- assert (test_post_fail (p));
- }
-
- {
- float_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1.45 E2");
- assert (test_post_fail (p));
- }
-
- // double
- //
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+INF");
- assert (test_post_fail (p));
- }
-
- {
- double_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1.45 E2");
- assert (test_post_fail (p));
- }
-
- // decimal
- //
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("INF");
- assert (test_post_fail (p));
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+INF");
- assert (test_post_fail (p));
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-INF");
- assert (test_post_fail (p));
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("NaN");
- assert (test_post_fail (p));
- }
-
- {
- decimal_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1.45 2");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/float/makefile b/tests/cxx/parser/validation/built-in/float/makefile
deleted file mode 100644
index 68fac22..0000000
--- a/tests/cxx/parser/validation/built-in/float/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/float/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/int/driver.cxx b/tests/cxx/parser/validation/built-in/int/driver.cxx
deleted file mode 100644
index 18e83ca..0000000
--- a/tests/cxx/parser/validation/built-in/int/driver.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/int/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in int and unsigned int types validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
- {
- int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-2147483648");
- p._post ();
- assert (p.post_int () == -2147483648);
- }
-
- {
- int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_int () == 0);
- }
-
- {
- int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2147483647");
- p._post ();
- assert (p.post_int () == 2147483647);
- }
-
- {
- unsigned_int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_unsigned_int () == 0);
- }
-
- {
- unsigned_int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("4294967295");
- p._post ();
- assert (p.post_unsigned_int () == 4294967295);
- }
-
- // Bad
- //
-
- {
- unsigned_int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-123");
- assert (test_post_fail (p));
- }
-
-
- // Ranges
- //
- {
- int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-2147483649");
- assert (test_post_fail (p));
- }
-
- {
- int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("2147483648");
- assert (test_post_fail (p));
- }
-
- {
- unsigned_int_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("4294967296");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/int/makefile b/tests/cxx/parser/validation/built-in/int/makefile
deleted file mode 100644
index 7a13105..0000000
--- a/tests/cxx/parser/validation/built-in/int/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/int/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/integer/driver.cxx b/tests/cxx/parser/validation/built-in/integer/driver.cxx
deleted file mode 100644
index 7eeb708..0000000
--- a/tests/cxx/parser/validation/built-in/integer/driver.cxx
+++ /dev/null
@@ -1,303 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/int/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in integer & friends types validation.
-//
-#include <limits.h>
-
-#include <string>
-#include <sstream>
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace std;
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
-
- std::string min;
- std::string max;
- std::string umax;
-
- {
- ostringstream ostr;
- ostr << LLONG_MIN;
- min = ostr.str ();
- }
-
- {
- ostringstream ostr;
- ostr << LLONG_MAX;
- max = ostr.str ();
- }
-
- {
- ostringstream ostr;
- ostr << ULLONG_MAX;
- umax = ostr.str ();
- }
-
- // integer
- //
- {
- integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (min.c_str ());
- p._post ();
- assert (p.post_integer () == LLONG_MIN);
- }
-
- {
- integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_integer () == 0);
- }
-
- {
- integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (max.c_str ());
- p._post ();
- assert (p.post_integer () == LLONG_MAX);
- }
-
- // negative_integer
- //
- {
- negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (min.c_str ());
- p._post ();
- assert (p.post_negative_integer () == LLONG_MIN);
- }
-
- {
- negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-1");
- p._post ();
- assert (p.post_negative_integer () == -1);
- }
-
- // non_positive_integer
- //
- {
- non_positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (min.c_str ());
- p._post ();
- assert (p.post_non_positive_integer () == LLONG_MIN);
- }
-
- {
- non_positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+0");
- p._post ();
- assert (p.post_non_positive_integer () == 0);
- }
-
- // positive_integer
- //
- {
- positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1");
- p._post ();
- assert (p.post_positive_integer () == 1);
- }
-
- {
- positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (umax.c_str ());
- p._post ();
- assert (p.post_positive_integer () == ULLONG_MAX);
- }
-
- // non_negative_integer
- //
- /*
- {
- non_negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0");
- p._post ();
- assert (p.post_non_negative_integer () == 0);
- }
- */
-
- {
- non_negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_non_negative_integer () == 0);
- }
-
- {
- non_negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (umax.c_str ());
- p._post ();
- assert (p.post_non_negative_integer () == ULLONG_MAX);
- }
-
-
- // Bad
- //
-
- std::string past_min (min);
- std::string past_max (max);
- std::string past_umax (umax);
-
- assert (*past_min.rbegin () != '9');
- assert (*past_max.rbegin () != '9');
- assert (*past_umax.rbegin () != '9');
-
- (*past_min.rbegin ())++;
- (*past_max.rbegin ())++;
- (*past_umax.rbegin ())++;
-
- // integer
- //
- {
- integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (past_min.c_str ());
- assert (test_post_fail (p));
- }
-
- {
- integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (past_max.c_str ());
- assert (test_post_fail (p));
- }
-
- // negative_integer
- //
- {
- negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (past_min.c_str ());
- assert (test_post_fail (p));
- }
-
- {
- negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-0");
- assert (test_post_fail (p));
- }
-
- {
- negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1");
- assert (test_post_fail (p));
- }
-
- // non_positive_integer
- //
- {
- non_positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (past_min.c_str ());
- assert (test_post_fail (p));
- }
-
- {
- non_positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1");
- assert (test_post_fail (p));
- }
-
- // positive_integer
- //
- {
- positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-1");
- assert (test_post_fail (p));
- }
-
- {
- positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("+0");
- assert (test_post_fail (p));
- }
-
- {
- positive_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (past_umax.c_str ());
- assert (test_post_fail (p));
- }
-
- // non_negative_integer
- //
- {
- non_negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-1");
- assert (test_post_fail (p));
- }
-
- {
- non_negative_integer_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (past_umax.c_str ());
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/integer/makefile b/tests/cxx/parser/validation/built-in/integer/makefile
deleted file mode 100644
index 66a7dd6..0000000
--- a/tests/cxx/parser/validation/built-in/integer/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/integer/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/long/driver.cxx b/tests/cxx/parser/validation/built-in/long/driver.cxx
deleted file mode 100644
index a44ae70..0000000
--- a/tests/cxx/parser/validation/built-in/long/driver.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/long/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in long and unsigned long types validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
- {
- long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-9223372036854775808");
- p._post ();
- assert (p.post_long () == (-9223372036854775807LL - 1));
- }
-
- {
- long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_long () == 0);
- }
-
- {
- long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("9223372036854775807");
- p._post ();
- assert (p.post_long () == 9223372036854775807LL);
- }
-
- {
- unsigned_long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_unsigned_long () == 0);
- }
-
- {
- unsigned_long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("18446744073709551615");
- p._post ();
- assert (p.post_unsigned_long () == 18446744073709551615ULL);
- }
-
- // Bad
- //
-
- {
- unsigned_long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-123");
- assert (test_post_fail (p));
- }
-
-
- // Ranges
- //
- {
- long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-9223372036854775809");
- assert (test_post_fail (p));
- }
-
- {
- long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("9223372036854775808");
- assert (test_post_fail (p));
- }
-
- {
- unsigned_long_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("18446744073709551616");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/long/makefile b/tests/cxx/parser/validation/built-in/long/makefile
deleted file mode 100644
index 5854363..0000000
--- a/tests/cxx/parser/validation/built-in/long/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/long/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/makefile b/tests/cxx/parser/validation/built-in/makefile
deleted file mode 100644
index 79eab4f..0000000
--- a/tests/cxx/parser/validation/built-in/makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-tests := any-type binary boolean byte date-time float int integer long \
-qname short string uri
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/parser/validation/built-in/qname/driver.cxx b/tests/cxx/parser/validation/built-in/qname/driver.cxx
deleted file mode 100644
index 6da6f2f..0000000
--- a/tests/cxx/parser/validation/built-in/qname/driver.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/qname/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in QName type validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-bool
-test_post_fail (qname_pimpl<char>& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- typedef xsd::cxx::parser::qname<char> qname;
-
- // Good.
- //
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" xsi");
- p._characters (":");
- p._characters ("schemaLocation");
- p._post ();
- assert (p.post_qname () == qname ("xsi", "schemaLocation"));
- }
-
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("schemaLocation");
- p._post ();
- assert (p.post_qname () == qname ("schemaLocation"));
- }
-
-
- // Bad
- //
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- //p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (":");
- assert (test_post_fail (p));
- }
-
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("xsi:");
- assert (test_post_fail (p));
- }
-
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (":schemaLocation");
- assert (test_post_fail (p));
- }
-
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("x?i:schemaLocation");
- assert (test_post_fail (p));
- }
-
- {
- qname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("xsi:schema Location");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/qname/makefile b/tests/cxx/parser/validation/built-in/qname/makefile
deleted file mode 100644
index c442812..0000000
--- a/tests/cxx/parser/validation/built-in/qname/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/qname/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/short/driver.cxx b/tests/cxx/parser/validation/built-in/short/driver.cxx
deleted file mode 100644
index 42009a1..0000000
--- a/tests/cxx/parser/validation/built-in/short/driver.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/short/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in short and unsigned short types validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post ();
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- // Good.
- //
- {
- short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-32768");
- p._post ();
- assert (p.post_short () == -32768);
- }
-
- {
- short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_short () == 0);
- }
-
- {
- short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("32767");
- p._post ();
- assert (p.post_short () == 32767);
- }
-
- {
- unsigned_short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("0");
- p._post ();
- assert (p.post_unsigned_short () == 0);
- }
-
- {
- unsigned_short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("65535");
- p._post ();
- assert (p.post_unsigned_short () == 65535);
- }
-
- // Bad
- //
-
- {
- unsigned_short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-1234");
- assert (test_post_fail (p));
- }
-
-
- // Ranges
- //
- {
- short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-32769");
- assert (test_post_fail (p));
- }
-
- {
- short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("32768");
- assert (test_post_fail (p));
- }
-
- {
- unsigned_short_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("65536");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/short/makefile b/tests/cxx/parser/validation/built-in/short/makefile
deleted file mode 100644
index 05f8e2c..0000000
--- a/tests/cxx/parser/validation/built-in/short/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/short/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/string/driver.cxx b/tests/cxx/parser/validation/built-in/string/driver.cxx
deleted file mode 100644
index b5da70d..0000000
--- a/tests/cxx/parser/validation/built-in/string/driver.cxx
+++ /dev/null
@@ -1,512 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/string/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in string & friends types validation.
-//
-#include <string>
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-template <typename T>
-bool
-test_post_fail (T& p)
-{
- try
- {
- p._post_impl (); // List implementation needs this to be post_impl.
- }
- catch (invalid_value<char> const&)
- {
- return true;
- }
-
- return false;
-}
-
-int
-main ()
-{
- typedef xsd::cxx::parser::string_sequence<char> strings;
-
- // Good.
- //
-
- // string
- //
- {
- string_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" aaa ");
- p._characters ("bbb");
- p._characters (" ");
- p._post ();
- assert (p.post_string () == " \n\t aaa bbb ");
- }
-
- // normalized_string
- //
- {
- normalized_string_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" aaa \n\t ");
- p._characters (" bbb");
- p._characters (" ");
- p._post ();
- assert (p.post_normalized_string () == " aaa bbb ");
- }
-
- // token
- //
- {
- token_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" aaa \n\t ");
- p._characters (" bbb \n\t");
- p._characters (" ");
- p._post ();
- assert (p.post_token () == "aaa bbb");
- }
-
- // name
- //
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" a:b-c_d123 ");
- p._characters (" ");
- p._post ();
- assert (p.post_name () == "a:b-c_d123");
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" _12 ");
- p._characters (" ");
- p._post ();
- assert (p.post_name () == "_12");
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" :12 ");
- p._characters (" ");
- p._post ();
- assert (p.post_name () == ":12");
- }
-
- // nmtoken
- //
- {
- nmtoken_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" 123a:b-c_d123 ");
- p._characters (" \n\t");
- p._characters (" ");
- p._post ();
- assert (p.post_nmtoken () == "123a:b-c_d123");
- }
-
- // nmtokens
- //
- {
- strings s;
- s.push_back ("123");
- s.push_back ("abc");
-
- nmtokens_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" 123 ");
- p._characters (" \n\t abc ");
- p._characters (" ");
- p._post ();
- assert (p.post_nmtokens () == s);
- }
-
- // ncname
- //
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" a.b-c_d123 ");
- p._characters (" ");
- p._post ();
- assert (p.post_ncname () == "a.b-c_d123");
- }
-
- // id
- //
- {
- id_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" a.b-c_d123 ");
- p._characters (" ");
- p._post ();
- assert (p.post_id () == "a.b-c_d123");
- }
-
- // idref
- //
- {
- idref_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" a.b-c_d123 ");
- p._characters (" ");
- p._post ();
- assert (p.post_idref () == "a.b-c_d123");
- }
-
- // idrefs
- //
- {
- strings s;
- s.push_back ("a123");
- s.push_back ("abc");
-
- idrefs_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" \n\t");
- p._characters (" a123 ");
- p._characters (" \n\t abc ");
- p._characters (" ");
- p._post ();
- assert (p.post_idrefs () == s);
- }
-
- // language
- //
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" x ");
- p._post ();
- assert (p.post_language () == "x");
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" en ");
- p._post ();
- assert (p.post_language () == "en");
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" en");
- p._characters ("-us ");
- p._post ();
- assert (p.post_language () == "en-us");
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("one-two-three-four44-seven77-eight888");
- p._post ();
- assert (p.post_language () == "one-two-three-four44-seven77-eight888");
- }
-
-
- // Bad
- //
-
- // name
- //
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (".a");
- assert (test_post_fail (p));
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-a");
- assert (test_post_fail (p));
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1a");
- assert (test_post_fail (p));
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a,b");
- assert (test_post_fail (p));
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a b");
- assert (test_post_fail (p));
- }
-
- {
- name_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a<b");
- assert (test_post_fail (p));
- }
-
- // nmtoken
- //
- {
- nmtoken_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- nmtoken_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a,b");
- assert (test_post_fail (p));
- }
-
- {
- nmtoken_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a b");
- assert (test_post_fail (p));
- }
-
- {
- nmtoken_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a<b");
- assert (test_post_fail (p));
- }
-
- // nmtokens
- //
- {
- nmtokens_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- p._characters (" \t\n ");
- assert (test_post_fail (p));
- }
-
- {
- nmtokens_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("ab a,b");
- assert (test_post_fail (p));
- }
-
- // ncname
- //
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (".a");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("-a");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (":a");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1a");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("1:a");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a,b");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a b");
- assert (test_post_fail (p));
- }
-
- {
- ncname_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a<b");
- assert (test_post_fail (p));
- }
-
- // id
- //
- {
- id_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a b");
- assert (test_post_fail (p));
- }
-
- // idref
- //
- {
- idref_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a b");
- assert (test_post_fail (p));
- }
-
- // idrefs
- //
- {
- idrefs_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- p._characters (" \t\n ");
- assert (test_post_fail (p));
- }
-
- {
- idrefs_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("ab a<b");
- assert (test_post_fail (p));
- }
-
- // language
- //
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- assert (test_post_fail (p));
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("en-");
- assert (test_post_fail (p));
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("a1");
- assert (test_post_fail (p));
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("en+us");
- assert (test_post_fail (p));
- }
-
- {
- language_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("en-nine99999");
- assert (test_post_fail (p));
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/string/makefile b/tests/cxx/parser/validation/built-in/string/makefile
deleted file mode 100644
index bcdae7e..0000000
--- a/tests/cxx/parser/validation/built-in/string/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/string/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/built-in/uri/driver.cxx b/tests/cxx/parser/validation/built-in/uri/driver.cxx
deleted file mode 100644
index 9e487e6..0000000
--- a/tests/cxx/parser/validation/built-in/uri/driver.cxx
+++ /dev/null
@@ -1,53 +0,0 @@
-// file : tests/cxx/parser/validation/built-in/uri/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the built-in anyURI type validation.
-//
-#include <cassert>
-
-#include <xsd/cxx/parser/validating/exceptions.hxx>
-#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
-
-using namespace xsd::cxx::parser::validating;
-
-int
-main ()
-{
- // Good.
- //
- {
- uri_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters (" ");
- p._post ();
- assert (p.post_uri () == "");
- }
-
- {
- uri_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("relative");
- p._post ();
- assert (p.post_uri () == "relative");
- }
-
- {
- uri_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("#id");
- p._post ();
- assert (p.post_uri () == "#id");
- }
-
- {
- uri_pimpl<char> p;
- p.pre ();
- p._pre ();
- p._characters ("http://www.example.com/foo#bar");
- p._post ();
- assert (p.post_uri () == "http://www.example.com/foo#bar");
- }
-}
diff --git a/tests/cxx/parser/validation/built-in/uri/makefile b/tests/cxx/parser/validation/built-in/uri/makefile
deleted file mode 100644
index ae7e8bd..0000000
--- a/tests/cxx/parser/validation/built-in/uri/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/cxx/parser/validation/built-in/uri/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
diff --git a/tests/cxx/parser/validation/choice/driver.cxx b/tests/cxx/parser/validation/choice/driver.cxx
deleted file mode 100644
index af30727..0000000
--- a/tests/cxx/parser/validation/choice/driver.cxx
+++ /dev/null
@@ -1,126 +0,0 @@
-// file : tests/cxx/parser/validation/choice/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the choice compositor validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-using xml_schema::ro_string;
-
-struct choice_pimpl: choice_pskel
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- b (string const& v)
- {
- cout << " b = " << v << endl;
- }
-
- virtual void
- c (string const& v)
- {
- cout << " c = " << v << endl;
- }
-
- virtual void
- d (string const& v)
- {
- cout << " d = " << v << endl;
- }
-
- virtual void
- _start_any_element (ro_string const& ns,
- ro_string const& name,
- ro_string const*)
- {
- cout << " any: " << ns << "#" << name << endl
- << " {" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& v)
- {
- cout << " chars = " << v << endl;
- }
-
- virtual void
- _end_any_element (ro_string const&, ro_string const&)
- {
- cout << " }" << endl;
- }
-
- virtual void
- post_choice ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- choice_pimpl choice_p;
- type_pimpl type_p;
-
- choice_p.parsers (string_p, string_p, string_p, string_p);
- type_p.parsers (choice_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- try
- {
- ifstream ifs (argv[1]);
- type_p.pre ();
- doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cout << " " << e << endl
- << "}" << endl
- << endl;
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/choice/makefile b/tests/cxx/parser/validation/choice/makefile
deleted file mode 100644
index 93b05c5..0000000
--- a/tests/cxx/parser/validation/choice/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/choice/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000 001 002 003 004
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/choice/test-000.std b/tests/cxx/parser/validation/choice/test-000.std
deleted file mode 100644
index 856b7f5..0000000
--- a/tests/cxx/parser/validation/choice/test-000.std
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- a = a
- b = b
-}
-
-{
- c = c
- d = d
- any: other#any
- {
- chars = any
- }
- a = a
-}
-
-{
- c = c
- d = d
- d = d
- a = a
-}
-
diff --git a/tests/cxx/parser/validation/choice/test-000.xml b/tests/cxx/parser/validation/choice/test-000.xml
deleted file mode 100644
index 39b9614..0000000
--- a/tests/cxx/parser/validation/choice/test-000.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <choice>
- <a>a</a>
-
- <b>b</b>
- </choice>
-
- <choice>
- <c>c</c>
- <d>d</d>
-
- <o:any>any</o:any>
-
- <a>a</a>
- </choice>
-
- <choice>
- <c>c</c>
- <d>d</d>
-
- <d>d</d>
-
- <a>a</a>
- </choice>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/choice/test-001.std b/tests/cxx/parser/validation/choice/test-001.std
deleted file mode 100644
index 8a78666..0000000
--- a/tests/cxx/parser/validation/choice/test-001.std
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- :8:12 error: expected element 'a'
-}
-
diff --git a/tests/cxx/parser/validation/choice/test-001.xml b/tests/cxx/parser/validation/choice/test-001.xml
deleted file mode 100644
index c509e0d..0000000
--- a/tests/cxx/parser/validation/choice/test-001.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- invalid -->
- <choice>
- </choice>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/choice/test-002.std b/tests/cxx/parser/validation/choice/test-002.std
deleted file mode 100644
index 1dc1a3a..0000000
--- a/tests/cxx/parser/validation/choice/test-002.std
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- c = c
- d = d
- any: other#any
- {
- chars = any
- }
- a = a
- :14:8 error: unexpected element 'b'
-}
-
diff --git a/tests/cxx/parser/validation/choice/test-002.xml b/tests/cxx/parser/validation/choice/test-002.xml
deleted file mode 100644
index 3b7e663..0000000
--- a/tests/cxx/parser/validation/choice/test-002.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- invalid -->
- <choice>
- <c>c</c>
- <d>d</d>
-
- <o:any>any</o:any>
-
- <a>a</a>
- <b>b</b>
- </choice>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/choice/test-003.std b/tests/cxx/parser/validation/choice/test-003.std
deleted file mode 100644
index 29d5e44..0000000
--- a/tests/cxx/parser/validation/choice/test-003.std
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- c = c
- :9:12 error: expected element 'd'
-}
-
diff --git a/tests/cxx/parser/validation/choice/test-003.xml b/tests/cxx/parser/validation/choice/test-003.xml
deleted file mode 100644
index ba15c7e..0000000
--- a/tests/cxx/parser/validation/choice/test-003.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- invalid -->
- <choice>
- <c>c</c>
- </choice>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/choice/test-004.std b/tests/cxx/parser/validation/choice/test-004.std
deleted file mode 100644
index 4a7530b..0000000
--- a/tests/cxx/parser/validation/choice/test-004.std
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- :8:8 error: expected element 'a' instead of 'x'
-}
-
diff --git a/tests/cxx/parser/validation/choice/test-004.xml b/tests/cxx/parser/validation/choice/test-004.xml
deleted file mode 100644
index f6960dd..0000000
--- a/tests/cxx/parser/validation/choice/test-004.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- invalid -->
- <choice>
- <x>x</x>
- </choice>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/makefile b/tests/cxx/parser/validation/makefile
deleted file mode 100644
index 600d9dd..0000000
--- a/tests/cxx/parser/validation/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/parser/validation/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := all any attribute built-in choice restriction sequence
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/parser/validation/restriction/driver.cxx b/tests/cxx/parser/validation/restriction/driver.cxx
deleted file mode 100644
index 6f9a871..0000000
--- a/tests/cxx/parser/validation/restriction/driver.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-// file : tests/cxx/parser/validation/restriction/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the restriction compositor validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-
-struct base_a_pimpl: base_a_pskel
-{
-};
-
-struct restriction_a_pimpl: restriction_a_pskel
-{
-};
-
-struct extension_b_pimpl: extension_b_pskel
-{
-};
-
-struct restriction_b_pimpl: restriction_b_pskel
-{
-};
-
-struct type_b_pimpl: type_b_pskel
-{
-};
-
-struct type_r_pimpl: type_r_pskel
-{
-};
-
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- base_a_pimpl base_a_p;
- restriction_a_pimpl restriction_a_p;
- extension_b_pimpl extension_b_p;
- restriction_b_pimpl restriction_b_p;
- type_b_pimpl type_b_p;
- type_r_pimpl type_r_p;
-
- base_a_p.parsers (string_p, string_p, string_p,
- string_p, string_p, string_p);
-
- restriction_a_p.parsers (string_p, string_p, string_p,
- string_p, string_p, string_p);
-
- extension_b_p.parsers (string_p, string_p, string_p,
- string_p, string_p);
-
- restriction_b_p.parsers (string_p, string_p, string_p,
- string_p, string_p);
-
- type_b_p.parsers (base_a_p, extension_b_p);
- type_r_p.parsers (restriction_a_p, restriction_b_p);
-
- xml_schema::document doc_b_p (type_b_p, "test", "root");
- xml_schema::document doc_r_p (type_r_p, "test", "root");
-
- {
- ifstream ifs (argv[1]);
- type_b_p.pre ();
- doc_b_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_b_p.post_type_b ();
- }
-
- try
- {
- ifstream ifs (argv[1]);
- type_r_p.pre ();
- doc_r_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_r_p.post_type_r ();
- }
- catch (xml_schema::exception const& e)
- {
- cout << e << endl;
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/restriction/makefile b/tests/cxx/parser/validation/restriction/makefile
deleted file mode 100644
index 61af2bf..0000000
--- a/tests/cxx/parser/validation/restriction/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/restriction/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000 001 002 003 004 005
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/restriction/test-000.std b/tests/cxx/parser/validation/restriction/test-000.std
deleted file mode 100644
index e69de29..0000000
--- a/tests/cxx/parser/validation/restriction/test-000.std
+++ /dev/null
diff --git a/tests/cxx/parser/validation/restriction/test-000.xml b/tests/cxx/parser/validation/restriction/test-000.xml
deleted file mode 100644
index 21402b4..0000000
--- a/tests/cxx/parser/validation/restriction/test-000.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <restriction-a z="z">
- <a>a</a>
- <b>b</b>
- <c>c</c>
- </restriction-a>
-
- <restriction-a x="x" y="y" z="z">
- <a>a</a>
- <b>b</b>
- <c>c</c>
- </restriction-a>
-
- <restriction-b y="y">
- <a>a</a>
- <b>b</b>
- </restriction-b>
-
- <restriction-b y="y">
- <a>a</a>
- <c>c</c>
- </restriction-b>
-
- <restriction-b x="x" y="y">
- <a>a</a>
- </restriction-b>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/restriction/test-001.std b/tests/cxx/parser/validation/restriction/test-001.std
deleted file mode 100644
index 5077837..0000000
--- a/tests/cxx/parser/validation/restriction/test-001.std
+++ /dev/null
@@ -1 +0,0 @@
-:7:8 error: expected element 'a' instead of 'b'
diff --git a/tests/cxx/parser/validation/restriction/test-001.xml b/tests/cxx/parser/validation/restriction/test-001.xml
deleted file mode 100644
index 4015302..0000000
--- a/tests/cxx/parser/validation/restriction/test-001.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- valid base but not restriction: a element -->
- <restriction-a z="z">
- <b>b</b>
- <c>c</c>
- </restriction-a>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/restriction/test-002.std b/tests/cxx/parser/validation/restriction/test-002.std
deleted file mode 100644
index f12c342..0000000
--- a/tests/cxx/parser/validation/restriction/test-002.std
+++ /dev/null
@@ -1 +0,0 @@
-:10:19 error: expected attribute 'z'
diff --git a/tests/cxx/parser/validation/restriction/test-002.xml b/tests/cxx/parser/validation/restriction/test-002.xml
deleted file mode 100644
index eb7684c..0000000
--- a/tests/cxx/parser/validation/restriction/test-002.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- valid base but not restriction: z attribute -->
- <restriction-a>
- <a>a</a>
- <b>b</b>
- <c>c</c>
- </restriction-a>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/restriction/test-003.std b/tests/cxx/parser/validation/restriction/test-003.std
deleted file mode 100644
index 0c65175..0000000
--- a/tests/cxx/parser/validation/restriction/test-003.std
+++ /dev/null
@@ -1 +0,0 @@
-:11:8 error: unexpected element 'a'
diff --git a/tests/cxx/parser/validation/restriction/test-003.xml b/tests/cxx/parser/validation/restriction/test-003.xml
deleted file mode 100644
index 49f18c7..0000000
--- a/tests/cxx/parser/validation/restriction/test-003.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- valid base but not restriction: sequence maxOccurs="1" -->
- <restriction-a z="z">
- <a>a</a>
- <b>b</b>
- <c>c</c>
-
- <a>a</a>
- <b>b</b>
- <c>c</c>
- </restriction-a>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/restriction/test-004.std b/tests/cxx/parser/validation/restriction/test-004.std
deleted file mode 100644
index 5077837..0000000
--- a/tests/cxx/parser/validation/restriction/test-004.std
+++ /dev/null
@@ -1 +0,0 @@
-:7:8 error: expected element 'a' instead of 'b'
diff --git a/tests/cxx/parser/validation/restriction/test-004.xml b/tests/cxx/parser/validation/restriction/test-004.xml
deleted file mode 100644
index 115cd38..0000000
--- a/tests/cxx/parser/validation/restriction/test-004.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- valid extension but not restriction: a element -->
- <restriction-b y="y">
- <b>b</b>
- </restriction-b>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/restriction/test-005.std b/tests/cxx/parser/validation/restriction/test-005.std
deleted file mode 100644
index e92de14..0000000
--- a/tests/cxx/parser/validation/restriction/test-005.std
+++ /dev/null
@@ -1 +0,0 @@
-:9:19 error: expected attribute 'y'
diff --git a/tests/cxx/parser/validation/restriction/test-005.xml b/tests/cxx/parser/validation/restriction/test-005.xml
deleted file mode 100644
index e9ab7d9..0000000
--- a/tests/cxx/parser/validation/restriction/test-005.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- valid extension but not restriction: y attribute -->
- <restriction-b>
- <a>a</a>
- <b>b</b>
- </restriction-b>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/driver.cxx b/tests/cxx/parser/validation/sequence/driver.cxx
deleted file mode 100644
index 61652b3..0000000
--- a/tests/cxx/parser/validation/sequence/driver.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-// file : tests/cxx/parser/validation/sequence/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the sequence compositor validation.
-//
-
-#include <string>
-#include <fstream>
-#include <iostream>
-
-#include "test-pskel.hxx"
-
-using namespace std;
-using namespace test;
-using xml_schema::ro_string;
-
-struct sequence_pimpl: sequence_pskel
-{
- virtual void
- pre ()
- {
- cout << "{" << endl;
- }
-
- virtual void
- a (string const& v)
- {
- cout << " a = " << v << endl;
- }
-
- virtual void
- b (string const& v)
- {
- cout << " b = " << v << endl;
- }
-
- virtual void
- c (string const& v)
- {
- cout << " c = " << v << endl;
- }
-
- virtual void
- d (string const& v)
- {
- cout << " d = " << v << endl;
- }
-
- virtual void
- e (string const& v)
- {
- cout << " e = " << v << endl;
- }
-
- virtual void
- f (string const& v)
- {
- cout << " f = " << v << endl;
- }
-
- virtual void
- _start_any_element (ro_string const& ns,
- ro_string const& name,
- ro_string const*)
- {
- cout << " any: " << ns << "#" << name << endl
- << " {" << endl;
- }
-
- virtual void
- _any_characters (ro_string const& v)
- {
- cout << " chars = " << v << endl;
- }
-
- virtual void
- _end_any_element (ro_string const&, ro_string const&)
- {
- cout << " }" << endl;
- }
-
- virtual void
- post_sequence ()
- {
- cout << "}" << endl
- << endl;
- }
-};
-
-struct type_pimpl: type_pskel
-{
-};
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- xml_schema::string_pimpl string_p;
- sequence_pimpl sequence_p;
- type_pimpl type_p;
-
- sequence_p.parsers (string_p, string_p, string_p,
- string_p, string_p, string_p);
- type_p.parsers (sequence_p);
-
- xml_schema::document doc_p (type_p, "test", "root");
-
- try
- {
- ifstream ifs (argv[1]);
- type_p.pre ();
- doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
- type_p.post_type ();
- }
- catch (xml_schema::exception const& e)
- {
- cout << " " << e << endl
- << "}" << endl
- << endl;
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
- catch (ios_base::failure const&)
- {
- cerr << "io failure" << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/parser/validation/sequence/makefile b/tests/cxx/parser/validation/sequence/makefile
deleted file mode 100644
index f0a7b14..0000000
--- a/tests/cxx/parser/validation/sequence/makefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# file : tests/cxx/parser/validation/sequence/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-tests := 000 001 002 003 004 005 006
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-validation
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-test_targets := $(addprefix $(out_base)/.test-,$(tests))
-
-$(test): $(test_targets)
-$(test_targets): driver := $(driver)
-
-.PHONY: $(out_base)/.test-%
-$(out_base)/.test-%: $(driver) $(src_base)/test.xsd $(src_base)/test-%.xml $(src_base)/test-%.std
- $(call message,test $(out_base)/$*,$(driver) $(src_base)/test-$*.xml | diff -u $(src_base)/test-$*.std -)
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/parser/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/parser/validation/sequence/test-000.std b/tests/cxx/parser/validation/sequence/test-000.std
deleted file mode 100644
index 8a44762..0000000
--- a/tests/cxx/parser/validation/sequence/test-000.std
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- c = c
- d = d
- any: test#any
- {
- chars = aaa
- any: #a
- {
- chars = bbb
- }
- chars = ccc
- }
- f = f
- e = e
-}
-
-{
- a = a
- b = b
- c = c
- d = d
- d = d
- d = d
- any: other#any
- {
- chars = any
- }
- f = f
- e = e
- e = e
-}
-
-{
- a = a
- b = b
- c = c
- d = d
- d = d
- d = d
- any: other#any
- {
- chars = any
- }
- f = f
- e = e
- e = e
- c = c
- d = d
- any: test#any
- {
- chars = any
- }
- f = f
- e = e
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-000.xml b/tests/cxx/parser/validation/sequence/test-000.xml
deleted file mode 100644
index 9bcbd7e..0000000
--- a/tests/cxx/parser/validation/sequence/test-000.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <sequence>
- <c>c</c>
- <d>d</d>
- <t:any>aaa<a>bbb</a>ccc</t:any>
- <f>f</f>
- <e>e</e>
- </sequence>
-
- <sequence>
- <a>a</a>
- <b>b</b>
- <c>c</c>
- <d>d</d>
- <d>d</d>
- <d>d</d>
- <o:any>any</o:any>
- <f>f</f>
- <e>e</e>
- <e>e</e>
- </sequence>
-
- <sequence>
- <a>a</a>
- <b>b</b>
- <c>c</c>
- <d>d</d>
- <d>d</d>
- <d>d</d>
- <o:any>any</o:any>
- <f>f</f>
- <e>e</e>
- <e>e</e>
-
- <c>c</c>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/test-001.std b/tests/cxx/parser/validation/sequence/test-001.std
deleted file mode 100644
index 20dea34..0000000
--- a/tests/cxx/parser/validation/sequence/test-001.std
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- :8:14 error: expected element 'a'
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-001.xml b/tests/cxx/parser/validation/sequence/test-001.xml
deleted file mode 100644
index 67d33ce..0000000
--- a/tests/cxx/parser/validation/sequence/test-001.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- fail minOccurs="1" -->
- <sequence>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/test-002.std b/tests/cxx/parser/validation/sequence/test-002.std
deleted file mode 100644
index 61343e7..0000000
--- a/tests/cxx/parser/validation/sequence/test-002.std
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- c = c
- d = d
- any: test#any
- {
- chars = any
- }
- f = f
- e = e
- c = c
- d = d
- any: test#any
- {
- chars = any
- }
- f = f
- e = e
- :20:8 error: unexpected element 'c'
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-002.xml b/tests/cxx/parser/validation/sequence/test-002.xml
deleted file mode 100644
index be25fcf..0000000
--- a/tests/cxx/parser/validation/sequence/test-002.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- fail maxOccurs="2" -->
- <sequence>
- <c>c</c>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
-
- <c>c</c>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
-
- <c>c</c>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/test-003.std b/tests/cxx/parser/validation/sequence/test-003.std
deleted file mode 100644
index c4e1e46..0000000
--- a/tests/cxx/parser/validation/sequence/test-003.std
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- a = a
- :9:8 error: expected element 'b' instead of 'a'
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-003.xml b/tests/cxx/parser/validation/sequence/test-003.xml
deleted file mode 100644
index af7d21d..0000000
--- a/tests/cxx/parser/validation/sequence/test-003.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- fail a maxOccurs="1" -->
- <sequence>
- <a>a</a>
- <a>a</a>
- <c>c</c>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/test-004.std b/tests/cxx/parser/validation/sequence/test-004.std
deleted file mode 100644
index f4c1d4d..0000000
--- a/tests/cxx/parser/validation/sequence/test-004.std
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- :8:8 error: expected element 'a' instead of 'd'
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-004.xml b/tests/cxx/parser/validation/sequence/test-004.xml
deleted file mode 100644
index a58b6d4..0000000
--- a/tests/cxx/parser/validation/sequence/test-004.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- fail c minOccurs="1" -->
- <sequence>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/test-005.std b/tests/cxx/parser/validation/sequence/test-005.std
deleted file mode 100644
index 9fa7904..0000000
--- a/tests/cxx/parser/validation/sequence/test-005.std
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- c = c
- d = d
- :10:13 error: expected element '##targetNamespace#*' instead of 'other1#any'
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-005.xml b/tests/cxx/parser/validation/sequence/test-005.xml
deleted file mode 100644
index e3dd03d..0000000
--- a/tests/cxx/parser/validation/sequence/test-005.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o1="other1"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- fail any namespace="##targetNamespace other" -->
- <sequence>
- <c>c</c>
- <d>d</d>
- <o1:any>any</o1:any>
- <f>f</f>
- <e>e</e>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/parser/validation/sequence/test-006.std b/tests/cxx/parser/validation/sequence/test-006.std
deleted file mode 100644
index eb79f47..0000000
--- a/tests/cxx/parser/validation/sequence/test-006.std
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- c = c
- d = d
- any: test#any
- {
- chars = any
- }
- f = f
- e = e
- e = e
- :14:8 error: unexpected element 'e'
-}
-
diff --git a/tests/cxx/parser/validation/sequence/test-006.xml b/tests/cxx/parser/validation/sequence/test-006.xml
deleted file mode 100644
index e1ecd69..0000000
--- a/tests/cxx/parser/validation/sequence/test-006.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<t:root xmlns:t="test"
- xmlns:o="other"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="test test.xsd">
-
- <!-- fail e maxOccurs="2" -->
- <sequence>
- <c>c</c>
- <d>d</d>
- <t:any>any</t:any>
- <f>f</f>
- <e>e</e>
- <e>e</e>
- <e>e</e>
- </sequence>
-
-</t:root>
diff --git a/tests/cxx/tree/any-type/driver.cxx b/tests/cxx/tree/any-type/driver.cxx
deleted file mode 100644
index ae81081..0000000
--- a/tests/cxx/tree/any-type/driver.cxx
+++ /dev/null
@@ -1,144 +0,0 @@
-// file : tests/cxx/tree/any-type/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test anyType and anySimpleType content extraction.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <utility> // std::move
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx" // Get XSD_CXX11 defined.
-
-#include <xsd/cxx/xml/string.hxx>
-
-using namespace std;
-using namespace test;
-using namespace xercesc;
-
-namespace xml = xsd::cxx::xml;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- XMLPlatformUtils::Initialize ();
-
- try
- {
- // Test parsing
- //
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- // Test API.
- //
- {
- assert (type::a_default_value ().text_content () == "default value");
- }
-
- {
- xml_schema::simple_type x ("fox");
- assert (x.text_content () == "fox");
- x.text_content ("foo");
- assert (x.text_content () == "foo");
- x.text_content ().clear ();
- assert (x.text_content () == "");
- x.text_content () = "baz";
- r->s ().push_back (x);
- }
-
- {
- xml_schema::type x;
-
- DOMDocument& doc (x.dom_content_document ());
-
- // Copy.
- //
- DOMElement* e (doc.createElement (xml::string ("dummy").c_str ()));
- e->setAttribute (xml::string ("x").c_str (),
- xml::string ("foo").c_str ());
- e->setTextContent (xml::string ("data").c_str ());
- x.dom_content ().set (*e);
- e->release ();
-
- r->t ().push_back (x);
- }
-
- {
- XSD_AUTO_PTR<xml_schema::type> x (new xml_schema::type);
-
- DOMDocument& doc (x->dom_content_document ());
-
- // Assume ownership.
- //
- DOMElement* e (doc.createElement (xml::string ("dummy").c_str ()));
- e->setAttribute (xml::string ("x").c_str (),
- xml::string ("foo").c_str ());
- e->setTextContent (xml::string ("data").c_str ());
- x->dom_content ().set (e);
-
-#ifdef XSD_CXX11
- r->t ().push_back (std::move (x));
-#else
- r->t ().push_back (x);
-#endif
- }
-
- // Test printing.
- //
- cout << *r << endl
- << endl;
-
- // Test serialization.
- //
- xml_schema::namespace_infomap map;
-
- map["t"].name = "test";
- map["t"].schema = "test.xsd";
- map["o"].name = "other";
-
- stringstream iostr;
- root (iostr, *r, map);
-
- cout << iostr.str () << endl
- << endl;
-
- {
- XSD_AUTO_PTR<type> r1 (root (iostr, argv[1]));
-
- // Xerces-C++ mis-indentation of mixed content messes this up.
- // assert (*r == *r);
-
- stringstream iostr;
- root (iostr, *r1, map);
-
- cout << iostr.str () << endl
- << endl;
- }
-
- // Test comparison.
- //
- assert (*r == *r);
-
- // Test copy c-tor.
- //
- type copy (*r);
- assert (copy == *r);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/any-type/makefile b/tests/cxx/tree/any-type/makefile
deleted file mode 100644
index 1267cd4..0000000
--- a/tests/cxx/tree/any-type/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/any-type/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-any-type --generate-serialization \
---generate-ostream --generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/binary/cdr/makefile b/tests/cxx/tree/binary/cdr/makefile
deleted file mode 100644
index 2d452ee..0000000
--- a/tests/cxx/tree/binary/cdr/makefile
+++ /dev/null
@@ -1,89 +0,0 @@
-# file : tests/cxx/tree/binary/cdr/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-$(call import,\
- $(scf_root)/import/libace/stub.make,\
- l: ace.l,cpp-options: ace.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) $(ace.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(ace.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-insertion ACE_OutputCDR \
---generate-extraction ACE_InputCDR --generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml
- $(call message,test $$1,$$1 $(src_base)/test.xml,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/binary/makefile b/tests/cxx/tree/binary/makefile
deleted file mode 100644
index 9ccc93f..0000000
--- a/tests/cxx/tree/binary/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/binary/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := cdr polymorphic xdr xdr-ordered
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/binary/polymorphic/makefile b/tests/cxx/tree/binary/polymorphic/makefile
deleted file mode 100644
index c88b79c..0000000
--- a/tests/cxx/tree/binary/polymorphic/makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-# file : tests/cxx/tree/binary/polymorphic/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-$(call import,\
- $(scf_root)/import/libace/stub.make,\
- l: ace.l,cpp-options: ace.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l) $(ace.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options) $(ace.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic --root-element-last \
---generate-insertion ACE_OutputCDR --generate-extraction ACE_InputCDR \
- --generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml
- $(call message,test $$1,$$1 $(src_base)/test.xml,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/binary/xdr-ordered/driver.cxx b/tests/cxx/tree/binary/xdr-ordered/driver.cxx
deleted file mode 100644
index 8e2d845..0000000
--- a/tests/cxx/tree/binary/xdr-ordered/driver.cxx
+++ /dev/null
@@ -1,189 +0,0 @@
-// file : tests/cxx/tree/binary/xdr-ordered/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test non-polymorphic ordered binary serialization to XDR.
-//
-// Note: just a copy of xdr test with --ordered-type-all option.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cstring> // std::memcpy
-#include <cassert>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-extern "C" int
-overflow (char* p, char* buf, int in)
-{
- xml_schema::buffer* dst (reinterpret_cast<xml_schema::buffer*> (p));
-
- size_t n (static_cast<size_t> (in)), size (dst->size ());
- dst->size (size + n);
- memcpy (dst->data () + size, buf, n);
-
- return static_cast<int> (n);
-}
-
-struct underflow_info
-{
- xml_schema::buffer* buf;
- std::size_t pos;
-};
-
-extern "C" int
-underflow (char* p, char* buf, int in)
-{
- underflow_info* ui (reinterpret_cast<underflow_info*> (p));
-
- size_t n (static_cast<size_t> (in)), size (ui->buf->size () - ui->pos);
- n = size > n ? n : size;
-
- memcpy (buf, ui->buf->data () + ui->pos, n);
- ui->pos += n;
-
- return static_cast<int> (n);
-}
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- // Save to an XDR stream.
- //
- XDR xdr;
- xml_schema::buffer buf;
- xdrrec_create (&xdr, 0, 0, reinterpret_cast<char*> (&buf), 0, &overflow);
- xdr.x_op = XDR_ENCODE;
- xsd::cxx::tree::ostream<XDR> oxdr (xdr);
- oxdr << *r;
- xdrrec_endofrecord (&xdr, true); // flush the data
- xdr_destroy (&xdr);
-
- // Load from an XDR stream.
- //
- underflow_info ui;
- ui.buf = &buf;
- ui.pos = 0;
- xdrrec_create (&xdr, 0, 0, reinterpret_cast<char*> (&ui), &underflow, 0);
- xdr.x_op = XDR_DECODE;
- xdrrec_skiprecord (&xdr);
- xsd::cxx::tree::istream<XDR> ixdr (xdr);
- XSD_AUTO_PTR<type> c (new type (ixdr));
- xdr_destroy (&xdr);
-
- // Compare the two.
- //
- assert (r->list () == c->list ());
- assert (r->union_ () == c->union_ ());
- assert (r->enumeration () == c->enumeration ());
-
- type::complex_sequence rs (r->complex ()), cs (c->complex ());
-
- for (type::complex_iterator ri (rs.begin ()), ci (cs.begin ());
- ri != rs.end () && ci != rs.end (); ++ri, ++ci)
- {
- assert (ri->a () == ci->a ());
- if (ri->b ())
- assert (ri->b () == ci->b ());
- assert (ri->c () == ci->c ());
-
- assert (ri->x () == ci->x ());
- if (ri->y ())
- assert (ri->y () == ci->y ());
- }
-
- // integers
- //
- assert (r->byte () == c->byte ());
- assert (r->unsigned_byte () == c->unsigned_byte ());
- assert (r->short_ () == c->short_ ());
- assert (r->unsigned_short () == c->unsigned_short ());
- assert (r->int_ () == c->int_ ());
- assert (r->unsigned_int () == c->unsigned_int ());
- assert (r->long_ () == c->long_ ());
- assert (r->unsigned_long () == c->unsigned_long ());
- assert (r->integer () == c->integer ());
- assert (r->non_positive_integer () == c->non_positive_integer ());
- assert (r->non_negative_integer () == c->non_negative_integer ());
- assert (r->positive_integer () == c->positive_integer ());
- assert (r->negative_integer () == c->negative_integer ());
-
- // boolean
- //
- assert (r->boolean () == c->boolean ());
-
- // floats
- //
- assert (r->float_ () == c->float_ ());
- assert (r->double_ () == c->double_ ());
- assert (r->decimal () == c->decimal ());
-
- // strings
- //
- assert (r->string () == c->string ());
- assert (r->normalized_string () == c->normalized_string ());
- assert (r->token () == c->token ());
- assert (r->name () == c->name ());
- assert (r->name_token () == c->name_token ());
- assert (r->name_tokens () == c->name_tokens ());
- assert (r->ncname () == c->ncname ());
- assert (r->language () == c->language ());
-
- // qualified name
- //
- assert (r->qname () == c->qname ());
-
- // ID/IDREF
- //
- assert (r->id () == c->id ());
- assert (r->id_ref () == c->id_ref ());
- assert (r->id_refs () == c->id_refs ());
-
- // URI
- //
- assert (r->any_uri () == c->any_uri ());
-
- // binary
- //
- assert (r->base64_binary () == c->base64_binary ());
- assert (r->hex_binary () == c->hex_binary ());
-
- // date/time
- //
- assert (r->date () == c->date ());
- assert (r->date_time () == c->date_time ());
- assert (r->duration () == c->duration ());
- assert (r->day () == c->day ());
- assert (r->month () == c->month ());
- assert (r->month_day () == c->month_day ());
- assert (r->year () == c->year ());
- assert (r->year_month () == c->year_month ());
- assert (r->time () == c->time ());
-
- // anySimpleType
- //
- assert (!r->any_simple_type_attr ().text_content ().empty ());
- assert (r->any_simple_type_attr () == c->any_simple_type_attr ());
-
- assert (!r->any_simple_type ().text_content ().empty ());
- assert (r->any_simple_type () == c->any_simple_type ());
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/binary/xdr-ordered/makefile b/tests/cxx/tree/binary/xdr-ordered/makefile
deleted file mode 100644
index df3a945..0000000
--- a/tests/cxx/tree/binary/xdr-ordered/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/binary/xdr-ordered/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-insertion XDR --generate-extraction XDR \
---generate-comparison --ordered-type-all
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml
- $(call message,test $$1,$$1 $(src_base)/test.xml,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/binary/xdr/driver.cxx b/tests/cxx/tree/binary/xdr/driver.cxx
deleted file mode 100644
index f5912c5..0000000
--- a/tests/cxx/tree/binary/xdr/driver.cxx
+++ /dev/null
@@ -1,187 +0,0 @@
-// file : tests/cxx/tree/binary/xdr/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test non-polymorphic binary serialization to XDR.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cstring> // std::memcpy
-#include <cassert>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-extern "C" int
-overflow (char* p, char* buf, int in)
-{
- xml_schema::buffer* dst (reinterpret_cast<xml_schema::buffer*> (p));
-
- size_t n (static_cast<size_t> (in)), size (dst->size ());
- dst->size (size + n);
- memcpy (dst->data () + size, buf, n);
-
- return static_cast<int> (n);
-}
-
-struct underflow_info
-{
- xml_schema::buffer* buf;
- std::size_t pos;
-};
-
-extern "C" int
-underflow (char* p, char* buf, int in)
-{
- underflow_info* ui (reinterpret_cast<underflow_info*> (p));
-
- size_t n (static_cast<size_t> (in)), size (ui->buf->size () - ui->pos);
- n = size > n ? n : size;
-
- memcpy (buf, ui->buf->data () + ui->pos, n);
- ui->pos += n;
-
- return static_cast<int> (n);
-}
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- // Save to an XDR stream.
- //
- XDR xdr;
- xml_schema::buffer buf;
- xdrrec_create (&xdr, 0, 0, reinterpret_cast<char*> (&buf), 0, &overflow);
- xdr.x_op = XDR_ENCODE;
- xsd::cxx::tree::ostream<XDR> oxdr (xdr);
- oxdr << *r;
- xdrrec_endofrecord (&xdr, true); // flush the data
- xdr_destroy (&xdr);
-
- // Load from an XDR stream.
- //
- underflow_info ui;
- ui.buf = &buf;
- ui.pos = 0;
- xdrrec_create (&xdr, 0, 0, reinterpret_cast<char*> (&ui), &underflow, 0);
- xdr.x_op = XDR_DECODE;
- xdrrec_skiprecord (&xdr);
- xsd::cxx::tree::istream<XDR> ixdr (xdr);
- XSD_AUTO_PTR<type> c (new type (ixdr));
- xdr_destroy (&xdr);
-
- // Compare the two.
- //
- assert (r->list () == c->list ());
- assert (r->union_ () == c->union_ ());
- assert (r->enumeration () == c->enumeration ());
-
- type::complex_sequence rs (r->complex ()), cs (c->complex ());
-
- for (type::complex_iterator ri (rs.begin ()), ci (cs.begin ());
- ri != rs.end () && ci != rs.end (); ++ri, ++ci)
- {
- assert (ri->a () == ci->a ());
- if (ri->b ())
- assert (ri->b () == ci->b ());
- assert (ri->c () == ci->c ());
-
- assert (ri->x () == ci->x ());
- if (ri->y ())
- assert (ri->y () == ci->y ());
- }
-
- // integers
- //
- assert (r->byte () == c->byte ());
- assert (r->unsigned_byte () == c->unsigned_byte ());
- assert (r->short_ () == c->short_ ());
- assert (r->unsigned_short () == c->unsigned_short ());
- assert (r->int_ () == c->int_ ());
- assert (r->unsigned_int () == c->unsigned_int ());
- assert (r->long_ () == c->long_ ());
- assert (r->unsigned_long () == c->unsigned_long ());
- assert (r->integer () == c->integer ());
- assert (r->non_positive_integer () == c->non_positive_integer ());
- assert (r->non_negative_integer () == c->non_negative_integer ());
- assert (r->positive_integer () == c->positive_integer ());
- assert (r->negative_integer () == c->negative_integer ());
-
- // boolean
- //
- assert (r->boolean () == c->boolean ());
-
- // floats
- //
- assert (r->float_ () == c->float_ ());
- assert (r->double_ () == c->double_ ());
- assert (r->decimal () == c->decimal ());
-
- // strings
- //
- assert (r->string () == c->string ());
- assert (r->normalized_string () == c->normalized_string ());
- assert (r->token () == c->token ());
- assert (r->name () == c->name ());
- assert (r->name_token () == c->name_token ());
- assert (r->name_tokens () == c->name_tokens ());
- assert (r->ncname () == c->ncname ());
- assert (r->language () == c->language ());
-
- // qualified name
- //
- assert (r->qname () == c->qname ());
-
- // ID/IDREF
- //
- assert (r->id () == c->id ());
- assert (r->id_ref () == c->id_ref ());
- assert (r->id_refs () == c->id_refs ());
-
- // URI
- //
- assert (r->any_uri () == c->any_uri ());
-
- // binary
- //
- assert (r->base64_binary () == c->base64_binary ());
- assert (r->hex_binary () == c->hex_binary ());
-
- // date/time
- //
- assert (r->date () == c->date ());
- assert (r->date_time () == c->date_time ());
- assert (r->duration () == c->duration ());
- assert (r->day () == c->day ());
- assert (r->month () == c->month ());
- assert (r->month_day () == c->month_day ());
- assert (r->year () == c->year ());
- assert (r->year_month () == c->year_month ());
- assert (r->time () == c->time ());
-
- // anySimpleType
- //
- assert (!r->any_simple_type_attr ().text_content ().empty ());
- assert (r->any_simple_type_attr () == c->any_simple_type_attr ());
-
- assert (!r->any_simple_type ().text_content ().empty ());
- assert (r->any_simple_type () == c->any_simple_type ());
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/binary/xdr/makefile b/tests/cxx/tree/binary/xdr/makefile
deleted file mode 100644
index dca3230..0000000
--- a/tests/cxx/tree/binary/xdr/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/binary/xdr/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-insertion XDR --generate-extraction XDR \
---generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml
- $(call message,test $$1,$$1 $(src_base)/test.xml,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/built-in/attributes.xml b/tests/cxx/tree/built-in/attributes.xml
deleted file mode 100644
index 609a757..0000000
--- a/tests/cxx/tree/built-in/attributes.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<test:attributes
- xmlns:test="http://www.codesynthesis.com/xmlns/test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd"
-
-
- byte="65"
- unsigned_byte="66"
- short="-222"
- unsigned_short="57005"
- int="-57005"
- unsigned_int="3735928559"
- long="-3735928559"
- unsigned_long="16045690984833335023"
- integer="-3735928559"
- non_positive_integer="-3735928559"
- non_negative_integer="3735928559"
- positive_integer="3735928559"
- negative_integer="-3735928559"
-
-
-
- boolean="false"
-
-
-
- float="1234.1234"
- double="12345678.12345678"
- decimal="12345678.12345678"
-
-
-
- string="string"
- normalized_string="normalized string"
- token=" one two three "
- name="name"
- name_token="name-token"
- name_tokens="name tokens"
- ncname="ncname"
- language="en-us"
-
-
- qname="xsi:schemaLocation"
-
-
-
- id="attributes"
- id_ref="attributes"
- id_refs="attributes"
-
-
-
- any_uri="http://www.codesynthesis.com"
-
-
-
- base64_binary="YmFzZTY0IGJpbmFyeQ=="
- hex_binary="6865782052696E617279"
-
-
-
- date="2001-10-26+02:00"
- date_time="2001-10-26T21:32:52+02:00"
- duration="P1Y2M3DT5H20M30S"
- day="---01+02:00"
- month="--11+02:00"
- month_day="--11-02+02:00"
- year="2001+02:00"
- year_month="2001-11+02:00"
- time="21:32:52+02:00"
-
-/>
diff --git a/tests/cxx/tree/built-in/driver.cxx b/tests/cxx/tree/built-in/driver.cxx
deleted file mode 100644
index f000f5a..0000000
--- a/tests/cxx/tree/built-in/driver.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-// file : tests/cxx/tree/built-in/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test built-in type mapping.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <sstream>
-#include <iostream>
-
-
-#include "types.hxx"
-
-using std::cerr;
-using std::endl;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 4)
- {
- cerr << "usage: " << argv[0] << " elements.xml attributes.xml inherited.xml" << endl;
- return 1;
- }
-
- XSD_AUTO_PTR<xmlns::test::Elements> elements (
- xmlns::test::elements (argv[1]));
-
- XSD_AUTO_PTR<xmlns::test::Attributes> attributes (
- xmlns::test::attributes (argv[2]));
-
- XSD_AUTO_PTR<xmlns::test::Inherited> inherited (
- xmlns::test::inherited (argv[3]));
-
- cerr << "elements: " << *elements << endl
- << endl
- << "attributes: " << *attributes << endl
- << endl
- << "inherited: " << *inherited << endl;
-
- // Test parsing/serialization.
- //
-
- xml_schema::namespace_infomap map;
-
- map["test"].name = "http://www.codesynthesis.com/xmlns/test";
- map["test"].schema = "types.xsd";
-
- {
- std::ostringstream ostr;
- xmlns::test::elements (ostr, *elements, map);
-
- std::istringstream istr (ostr.str ());
- XSD_AUTO_PTR<xmlns::test::Elements> elements1 (
- xmlns::test::elements (istr));
-
- std::ostringstream ostr1;
- xmlns::test::elements (ostr1, *elements1, map);
-
- if (ostr.str () != ostr1.str ())
- return 1;
- }
-
- {
- std::ostringstream ostr;
- xmlns::test::attributes (ostr, *attributes, map);
-
- std::istringstream istr (ostr.str ());
- XSD_AUTO_PTR<xmlns::test::Attributes> attributes1 (
- xmlns::test::attributes (istr));
-
- std::ostringstream ostr1;
- xmlns::test::attributes (ostr1, *attributes1, map);
-
- if (ostr.str () != ostr1.str ())
- return 1;
- }
-
- {
- std::ostringstream ostr;
- xmlns::test::inherited (ostr, *inherited, map);
-
- std::istringstream istr (ostr.str ());
- XSD_AUTO_PTR<xmlns::test::Inherited> inherited1 (
- xmlns::test::inherited (istr));
-
- std::ostringstream ostr1;
- xmlns::test::inherited (ostr1, *inherited1, map);
-
- if (ostr.str () != ostr1.str ())
- return 1;
- }
-}
diff --git a/tests/cxx/tree/built-in/elements.xml b/tests/cxx/tree/built-in/elements.xml
deleted file mode 100644
index f76f019..0000000
--- a/tests/cxx/tree/built-in/elements.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<test:elements
- xmlns:test="http://www.codesynthesis.com/xmlns/test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd">
-
- <!-- integers -->
- <byte>65</byte>
- <unsigned_byte>66</unsigned_byte>
- <short>-222</short>
- <unsigned_short>57005</unsigned_short>
- <int>-57005</int>
- <unsigned_int>3735928559</unsigned_int>
- <long>-3735928559</long>
- <unsigned_long>16045690984833335023</unsigned_long>
- <integer>-3735928559</integer>
- <non_positive_integer>-3735928559</non_positive_integer>
- <non_negative_integer>3735928559</non_negative_integer>
- <positive_integer>3735928559</positive_integer>
- <negative_integer>-3735928559</negative_integer>
-
-
- <!-- boolean -->
- <boolean>true</boolean>
-
-
- <!-- floats -->
- <float>1234.1234</float>
- <double>12345678.12345678</double>
- <decimal>12345678.12345678</decimal>
-
-
- <!-- strings -->
- <string>string</string>
- <normalized_string>normalized
-string</normalized_string>
- <token>
- one
- two three </token>
- <name>name</name>
- <name_token>name-token</name_token>
- <name_tokens>name tokens</name_tokens>
- <ncname>ncname</ncname>
- <language>en-us</language>
-
- <!-- qualified name -->
- <qname>xsi:schemaLocation</qname>
-
-
- <!-- ID/IDREF -->
- <id>elements1</id>
- <id>elements2</id>
- <id_ref>elements1</id_ref>
- <id_refs>elements1 elements2</id_refs>
-
-
- <!-- URI -->
- <any_uri>http://www.codesynthesis.com</any_uri>
-
-
- <!-- binary -->
- <base64_binary>YmFzZTY0IGJpbmFyeQ==</base64_binary>
- <hex_binary>6865782052696E617279</hex_binary>
-
-
- <!-- date/time -->
- <date>2001-10-26+02:00</date>
- <date_time>2001-10-26T21:32:52+02:00</date_time>
- <duration>P1Y2M3DT5H20M30S</duration>
- <day>---01+02:00</day>
- <month>--11+02:00</month>
- <month_day>--11-02+02:00</month_day>
- <year>2001+02:00</year>
- <year_month>2001-11+02:00</year_month>
- <time>21:32:52+02:00</time>
-
-
- <!-- entity -->
- <!--
- <entity>foo</entity>
- <entities>foo bar</entities>
- -->
-
-</test:elements>
diff --git a/tests/cxx/tree/built-in/inherited.xml b/tests/cxx/tree/built-in/inherited.xml
deleted file mode 100644
index 1781a69..0000000
--- a/tests/cxx/tree/built-in/inherited.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<test:inherited
- xmlns:test="http://www.codesynthesis.com/xmlns/test"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd">
-
- <!-- integers -->
- <byte>65</byte>
- <unsigned_byte>66</unsigned_byte>
- <short>-222</short>
- <unsigned_short>57005</unsigned_short>
- <int>-57005</int>
- <unsigned_int>3735928559</unsigned_int>
- <long>-3735928559</long>
- <unsigned_long>16045690984833335023</unsigned_long>
- <integer>-3735928559</integer>
- <non_positive_integer>-3735928559</non_positive_integer>
- <non_negative_integer>3735928559</non_negative_integer>
- <positive_integer>3735928559</positive_integer>
- <negative_integer>-3735928559</negative_integer>
-
-
- <!-- boolean -->
- <boolean>true</boolean>
-
-
- <!-- floats -->
- <float>1234.1234</float>
- <double>12345678.12345678</double>
- <decimal>12345678.12345678</decimal>
-
-
- <!-- strings -->
- <string>string</string>
- <normalized_string>normalized
-string</normalized_string>
- <token>
- one
- two three </token>
- <name>name</name>
- <name_token>name-token</name_token>
- <name_tokens>name tokens</name_tokens>
- <ncname>ncname</ncname>
- <language>en-us</language>
-
- <!-- qualified name -->
- <qname>xsi:schemaLocation</qname>
-
-
- <!-- ID/IDREF -->
- <id>elements1</id>
- <id>elements2</id>
- <id_ref>elements1</id_ref>
- <id_refs>elements1 elements2</id_refs>
-
-
- <!-- URI -->
- <any_uri>http://www.codesynthesis.com</any_uri>
-
-
- <!-- binary -->
- <base64_binary>YmFzZTY0IGJpbmFyeQ==</base64_binary>
- <hex_binary>6865782052696E617279</hex_binary>
-
-
- <!-- date/time -->
- <date>2001-10-26+02:00</date>
- <date_time>2001-10-26T21:32:52+02:00</date_time>
- <duration>P1Y2M3DT5H20M30S</duration>
- <day>---01+02:00</day>
- <month>--11+02:00</month>
- <month_day>--11-02+02:00</month_day>
- <year>2001+02:00</year>
- <year_month>2001-11+02:00</year_month>
- <time>21:32:52+02:00</time>
-
-
- <!-- entity -->
- <!--
- <entity>foo</entity>
- <entities>foo bar</entities>
- -->
-
-</test:inherited>
diff --git a/tests/cxx/tree/built-in/makefile b/tests/cxx/tree/built-in/makefile
deleted file mode 100644
index b989fd1..0000000
--- a/tests/cxx/tree/built-in/makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-# file : tests/cxx/tree/built-in/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := types.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options += \
---char-type char \
---generate-inline \
---generate-ostream \
---generate-serialization \
---generate-default-ctor \
---generate-from-base-ctor \
---root-element-all
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-# We need to cd to src_base in order to have the schema in the working
-# directory.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/elements.xml $(src_base)/attributes.xml \
-$(src_base)/inherited.xml
- cd $(src_base) && $(driver) $(src_base)/elements.xml \
-$(src_base)/attributes.xml $(src_base)/inherited.xml
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/chameleon/driver.cxx b/tests/cxx/tree/chameleon/driver.cxx
deleted file mode 100644
index f196128..0000000
--- a/tests/cxx/tree/chameleon/driver.cxx
+++ /dev/null
@@ -1,35 +0,0 @@
-// file : tests/cxx/tree/chameleon/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test chameleon inclusion.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "includer.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<root_t> r (root (argv[1]));
-
- cout << *r << endl;
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/chameleon/makefile b/tests/cxx/tree/chameleon/makefile
deleted file mode 100644
index b647ae3..0000000
--- a/tests/cxx/tree/chameleon/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/chameleon/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := includer.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --root-element root --generate-ostream
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/comparison/driver.cxx b/tests/cxx/tree/comparison/driver.cxx
deleted file mode 100644
index c44598c..0000000
--- a/tests/cxx/tree/comparison/driver.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-// file : tests/cxx/tree/comparison/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test generated comparison operators.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- type::complex_sequence s (r->complex ());
-
- assert (s[0] == s[0]);
- assert (s[0] != s[1]);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/comparison/makefile b/tests/cxx/tree/comparison/makefile
deleted file mode 100644
index 373391b..0000000
--- a/tests/cxx/tree/comparison/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/comparison/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml
- $(call message,test $$1,$$1 $(src_base)/test.xml,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/compilation/driver.cxx b/tests/cxx/tree/compilation/driver.cxx
deleted file mode 100644
index 4318d97..0000000
--- a/tests/cxx/tree/compilation/driver.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-// file : tests/cxx/tree/compilation/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Make sure the runtime library compiles by explicitly instantiating
-// all the types.
-//
-
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-template class xsd::cxx::tree::simple_type<char, xml_schema::type>;
-
-// String types.
-//
-template class xsd::cxx::tree::string< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::normalized_string< char, xml_schema::string >;
-template class xsd::cxx::tree::token< char, xml_schema::normalized_string >;
-template class xsd::cxx::tree::name< char, xml_schema::token >;
-template class xsd::cxx::tree::nmtoken< char, xml_schema::token >;
-template class xsd::cxx::tree::nmtokens< char, xml_schema::simple_type, xml_schema::nmtoken >;
-template class xsd::cxx::tree::ncname< char, xml_schema::name >;
-template class xsd::cxx::tree::language< char, xml_schema::token >;
-
-// ID/IDREF.
-//
-template class xsd::cxx::tree::id< char, xml_schema::ncname >;
-template class xsd::cxx::tree::idref< char, xml_schema::ncname, xml_schema::type >;
-template class xsd::cxx::tree::idrefs< char, xml_schema::simple_type, xml_schema::idref >;
-
-// URI.
-//
-template class xsd::cxx::tree::uri< char, xml_schema::simple_type >;
-
-// Qualified name.
-//
-template class xsd::cxx::tree::qname< char, xml_schema::simple_type, xml_schema::uri, xml_schema::ncname >;
-
-// Binary.
-//
-template class xsd::cxx::tree::buffer< char >;
-template class xsd::cxx::tree::base64_binary< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::hex_binary< char, xml_schema::simple_type >;
-
-// Date/time.
-//
-template class xsd::cxx::tree::date< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::date_time< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::duration< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::gday< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::gmonth< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::gmonth_day< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::gyear< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::gyear_month< char, xml_schema::simple_type >;
-template class xsd::cxx::tree::time< char, xml_schema::simple_type >;
-
-// Entity.
-//
-template class xsd::cxx::tree::entity< char, xml_schema::ncname >;
-template class xsd::cxx::tree::entities< char, xml_schema::simple_type, xml_schema::entity >;
-
-// Namespace information and list stream. Used in
-// serialization functions.
-//
-template class xsd::cxx::xml::dom::namespace_info < char >;
-template class xsd::cxx::xml::dom::namespace_infomap < char >;
-template class xsd::cxx::tree::list_stream < char >;
-
-// Flags and properties.
-//
-template class xsd::cxx::tree::properties< char >;
-
-// Exceptions.
-//
-template class xsd::cxx::tree::exception< char >;
-template class xsd::cxx::tree::parsing< char >;
-template class xsd::cxx::tree::expected_element< char >;
-template class xsd::cxx::tree::unexpected_element< char >;
-template class xsd::cxx::tree::expected_attribute< char >;
-template class xsd::cxx::tree::unexpected_enumerator< char >;
-template class xsd::cxx::tree::expected_text_content< char >;
-template class xsd::cxx::tree::no_type_info< char >;
-template class xsd::cxx::tree::not_derived< char >;
-template class xsd::cxx::tree::duplicate_id< char >;
-template class xsd::cxx::tree::serialization< char >;
-template class xsd::cxx::tree::no_prefix_mapping< char >;
-template class xsd::cxx::tree::bounds< char >;
-
-// Parsing/serialization diagnostics.
-//
-template class xsd::cxx::tree::error< char >;
-template class xsd::cxx::tree::diagnostics< char >;
-
-// Error handler interface.
-//
-template class xsd::cxx::xml::error_handler< char >;
-
-
-//
-//
-template class xsd::cxx::tree::fundamental_base<int, char, xml_schema::type>;
-template class xsd::cxx::tree::one<int>;
-template class xsd::cxx::tree::one<xml_schema::string>;
-template class xsd::cxx::tree::optional<int>;
-template class xsd::cxx::tree::optional<xml_schema::string>;
-template class xsd::cxx::tree::sequence<int>;
-template class xsd::cxx::tree::sequence<xml_schema::string>;
-
-
-int
-main ()
-{
-}
diff --git a/tests/cxx/tree/compilation/makefile b/tests/cxx/tree/compilation/makefile
deleted file mode 100644
index 3856416..0000000
--- a/tests/cxx/tree/compilation/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/compilation/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/complex/ctor/driver.cxx b/tests/cxx/tree/complex/ctor/driver.cxx
deleted file mode 100644
index 0d691ac..0000000
--- a/tests/cxx/tree/complex/ctor/driver.cxx
+++ /dev/null
@@ -1,122 +0,0 @@
-// file : tests/cxx/tree/complex/ctor/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test generation of varous complex type constructors.
-//
-
-#include <cassert>
-#include <memory>
-
-#include "test.hxx"
-
-#ifdef XSD_CXX11
-# include <utility> // std::move
-# define XSD_MOVE(x) std::move(x)
-#else
-# define XSD_MOVE(x) x
-#endif
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- // Test case A.
- //
- {
- a_base b1;
- a_base b2 ("abc"); // empty ultimate base + required
- a_base b3 ("abc", "foo"); // ultimate base + required
-
- a_derived a1;
- a_derived a2 ("foo", "bar"); // empty ultimate base + required
- a_derived a3 (b3, "bar"); // base + required
- a_derived a4 ("abc", "foo", "bar"); // ultimate base + required
- }
-
- // Test case B.
- //
- {
- b_simple s ("base");
- b_base b ("base", "foo");
- b_derived d ("base", "foo", "bar");
- b_type t ("base");
- }
-
- // Test case C.
- //
- {
- c_simple s (c_enum::a);
- c_base b (c_enum::a, "foo");
- c_derived d (c_enum::a, "foo", "bar");
- c_type t (c_enum::a);
- }
-
- // Test case D.
- //
- {
- d_simple s (1);
- d_base b (1, "foo");
- d_derived d (1, "foo", "bar");
- d_type t (1);
- }
-
- // Test case E.
- //
- {
- // e_base
- //
- e_base b1 (1, "foo", e_complex_type ("bar"));
-
- XSD_AUTO_PTR<e_complex_type> c2 (new e_complex_type ("bar"));
- e_base b2 (1, "foo", XSD_MOVE (c2));
-
- XSD_AUTO_PTR<e_simple_type> s3 (new e_simple_type ("foo"));
- XSD_AUTO_PTR<e_complex_type> c3 (new e_complex_type ("bar"));
- e_base b3 (1, XSD_MOVE (s3), XSD_MOVE (c3));
-
- assert (b1 == b2);
- assert (b1 == b3);
-
- // e_derived
- //
- e_derived d1 (1, "foo", e_complex_type ("bar"),
- true, "baz", e_complex_type ("biz"));
-
- XSD_AUTO_PTR<e_complex_type> c2a (new e_complex_type ("bar"));
- XSD_AUTO_PTR<e_complex_type> c2b (new e_complex_type ("biz"));
- e_derived d2 (1, "foo", XSD_MOVE (c2a), true, "baz", XSD_MOVE (c2b));
-
- XSD_AUTO_PTR<e_simple_type> s3a (new e_simple_type ("foo"));
- XSD_AUTO_PTR<xml_schema::string> s3b (new xml_schema::string ("baz"));
- XSD_AUTO_PTR<e_complex_type> c3a (new e_complex_type ("bar"));
- XSD_AUTO_PTR<e_complex_type> c3b (new e_complex_type ("biz"));
- e_derived d3 (1,
- XSD_MOVE (s3a),
- XSD_MOVE (c3a),
- true,
- XSD_MOVE (s3b),
- XSD_MOVE (c3b));
-
- assert (d1 == d2);
- assert (d1 == d3);
-
- }
-
- // Test case F.
- //
- {
- f_type f1 (xml_schema::type (), 1, "foo", f_complex_type ("bar"));
-
- XSD_AUTO_PTR<f_complex_type> c2 (new f_complex_type ("bar"));
- f_type f2 (1, "foo", XSD_MOVE (c2));
-
- XSD_AUTO_PTR<f_simple_type> s3 (new f_simple_type ("foo"));
- XSD_AUTO_PTR<f_complex_type> c3 (new f_complex_type ("bar"));
- f_type f3 (1, XSD_MOVE (s3), XSD_MOVE (c3));
-
- assert (f1 == f2);
- assert (f1 == f3);
- }
-}
diff --git a/tests/cxx/tree/complex/ctor/makefile b/tests/cxx/tree/complex/ctor/makefile
deleted file mode 100644
index db592ff..0000000
--- a/tests/cxx/tree/complex/ctor/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/complex/ctor/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-default-ctor --generate-from-base-ctor \
---generate-doxygen --generate-polymorphic --polymorphic-type-all \
---generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/complex/makefile b/tests/cxx/tree/complex/makefile
deleted file mode 100644
index 95ff3f6..0000000
--- a/tests/cxx/tree/complex/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/complex/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := ctor
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/containment/driver.cxx b/tests/cxx/tree/containment/driver.cxx
deleted file mode 100644
index 954b76b..0000000
--- a/tests/cxx/tree/containment/driver.cxx
+++ /dev/null
@@ -1,118 +0,0 @@
-// file : tests/cxx/tree/containment/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test tree node containment.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
-
-#include "test.hxx"
-
-#ifdef XSD_CXX11
-# include <utility> // std::move
-# define XSD_MOVE(x) std::move(x)
-#else
-# define XSD_MOVE(x) x
-#endif
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- // Change of a container in a sub-tree without ID.
- //
- {
- XSD_AUTO_PTR<inner> i (new inner ());
- i->ref ("foo");
-
- outer o;
- o.i (XSD_MOVE (i));
- o.ref ("foo");
-
- assert (o.i ()->ref ()->get () == 0);
- assert (o.ref ()->get () == 0);
- }
-
- // Change of container in a sub-tree with ID inside.
- //
- {
- XSD_AUTO_PTR<inner> i (new inner ());
- inner* p (i.get ());
- i->id ("foo");
- i->ref ("foo");
- assert (i->ref ()->get () == p);
-
- outer o;
- o.i (XSD_MOVE (i));
- o.ref ("foo");
-
- assert (o.i ()->ref ()->get () == p);
- assert (o.ref ()->get () == p);
- }
-
- // Change of a container in ID.
- //
- {
- XSD_AUTO_PTR<xml_schema::id> id (new xml_schema::id ("foo"));
-
- inner i;
- i.id (XSD_MOVE (id));
- i.ref ("foo");
- assert (i.ref ()->get () == &i);
- }
-
- // Change of a container in a type derived from ID with ID inside.
- //
- {
- XSD_AUTO_PTR<id_ex> id (new id_ex ("foo"));
- id_ex* p (id.get ());
- id->id ("bar");
-
- inner i;
- i.id_ex (XSD_MOVE (id));
-
- i.ref ("foo");
- assert (i.ref ()->get () == &i);
-
- i.ref ("bar");
- assert (i.ref ()->get () == p);
- }
-
- // IDREF lists
- //
- {
- id i1 ("a"), i2 ("b");
-
- XSD_AUTO_PTR<ids> ic (new ids);
- ic->id ().push_back (i1);
- ic->id ().push_back (i2);
-
- XSD_AUTO_PTR<xml_schema::idrefs> r1 (new xml_schema::idrefs);
- r1->push_back (xml_schema::idref ("a"));
- r1->push_back (xml_schema::idref ("b"));
-
- XSD_AUTO_PTR<idref_list> r2 (new idref_list);
- r2->push_back (xml_schema::idref ("a"));
- r2->push_back (xml_schema::idref ("b"));
-
- XSD_AUTO_PTR<idrefs1> rc1 (new idrefs1);
- XSD_AUTO_PTR<idrefs2> rc2 (new idrefs2);
-
- rc1->idrefs (XSD_MOVE (r1));
- rc2->idrefs (XSD_MOVE (r2));
-
- model m;
- m.ids (XSD_MOVE (ic));
- m.idrefs1 (XSD_MOVE (rc1));
- m.idrefs2 (XSD_MOVE (rc2));
-
- assert (m.idrefs1 ().idrefs ()[0].get () != 0);
- assert (m.idrefs1 ().idrefs ()[1].get () != 0);
-
- assert (m.idrefs2 ().idrefs ()[0].get () != 0);
- assert (m.idrefs2 ().idrefs ()[1].get () != 0);
- }
-}
diff --git a/tests/cxx/tree/containment/makefile b/tests/cxx/tree/containment/makefile
deleted file mode 100644
index dc7ca7b..0000000
--- a/tests/cxx/tree/containment/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/containment/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-default-ctor
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/default/general/driver.cxx b/tests/cxx/tree/default/general/driver.cxx
deleted file mode 100644
index 97d0a7d..0000000
--- a/tests/cxx/tree/default/general/driver.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-// file : tests/cxx/tree/default/general/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test default attribute/element values.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1], xml_schema::flags::dont_validate));
-
- xml_schema::namespace_infomap map;
- map["t"].name = "test";
- root (cout, *r, map);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/default/general/makefile b/tests/cxx/tree/default/general/makefile
deleted file mode 100644
index fc1bca1..0000000
--- a/tests/cxx/tree/default/general/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/default/general/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream --generate-serialization \
---generate-default-ctor --generate-from-base-ctor
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/default/makefile b/tests/cxx/tree/default/makefile
deleted file mode 100644
index 304640e..0000000
--- a/tests/cxx/tree/default/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/default/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := general omit
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/default/omit/driver.cxx b/tests/cxx/tree/default/omit/driver.cxx
deleted file mode 100644
index e588a34..0000000
--- a/tests/cxx/tree/default/omit/driver.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : tests/cxx/tree/default/omit/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test default attribute omission from the output.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1], xml_schema::flags::dont_validate));
-
- cout << *r << endl
- << "default x: " << derived::x_default_value () << endl
- << "default y: " << derived::y_default_value () << endl
- << "fixed p: " << derived::p_default_value () << endl
- << "fixed q1: " << derived::q1_default_value () << endl
- << "fixed q2: " << derived::q2_default_value () << endl;
-
- // Serialize.
- //
- xml_schema::namespace_infomap map;
- map["t"].name = "test";
- root (cout, *r, map);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/default/omit/makefile b/tests/cxx/tree/default/omit/makefile
deleted file mode 100644
index 93a9cd2..0000000
--- a/tests/cxx/tree/default/omit/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/default/omit/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream --generate-serialization \
---generate-default-ctor --generate-from-base-ctor --omit-default-attributes
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/detach/driver.cxx b/tests/cxx/tree/detach/driver.cxx
deleted file mode 100644
index d1a8f6f..0000000
--- a/tests/cxx/tree/detach/driver.cxx
+++ /dev/null
@@ -1,108 +0,0 @@
-// file : tests/cxx/tree/detach/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the detach functionality.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
-
-#include "test.hxx"
-
-#ifdef XSD_CXX11
-# include <utility> // std::move
-# define XSD_MOVE(x) std::move(x)
-#else
-# define XSD_MOVE(x) x
-#endif
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- using test::ref;
-
- // Construct the model.
- //
- object o1 ("o1");
- o1.data ().push_back ("1-1");
- o1.data ().push_back ("1-2");
- o1.data ().push_back ("1-3");
-
- object o2 ("o2");
- o1.data ().push_back ("2-1");
- o1.data ().push_back ("2-2");
- o1.data ().push_back ("2-3");
-
- object o3 ("o3");
- o1.data ().push_back ("3-1");
- o1.data ().push_back ("3-2");
- o1.data ().push_back ("3-3");
-
- object o4 ("o4");
- o1.data ().push_back ("4-1");
- o1.data ().push_back ("4-2");
- o1.data ().push_back ("4-3");
-
- subtree s1;
- s1.o ().push_back (o1);
- s1.o ().push_back (o2);
- s1.r ().push_back (ref ("o2"));
- s1.r ().push_back (ref ("o3"));
-
- subtree s2;
- s2.o ().push_back (o3);
- s2.o ().push_back (o4);
- s2.r ().push_back (ref ("o4"));
- s2.r ().push_back (ref ("o1"));
-
- model m;
- m.one (s1);
- m.opt (s2);
-
- // Detach one.
- //
- XSD_AUTO_PTR<subtree> p (m.detach_one ());
- assert (p->_container () == 0);
- assert (p->r ()[0].get () == &p->o ()[1]);
- assert (m.opt ()->r ()[1].get () == 0);
-
- m.one (XSD_MOVE (p));
- assert (m.opt ()->r ()[1].get () == &m.one ().o ()[0]);
- p = m.detach_one ();
-
- model m1;
- m1.one (XSD_MOVE (p));
- m1.opt (s2);
- assert (m1.opt ()->r ()[1].get () == &m1.one ().o ()[0]);
-
- p = m1.detach_one ();
- m.seq ().push_back (XSD_MOVE (p));
-
- // Detach opt.
- //
- p = m.opt ().detach ();
- assert (!m.opt ());
- assert (p->_container () == 0);
- assert (p->r ()[0].get () == &p->o ()[1]);
- assert (m.seq ()[0].r ()[1].get () == 0);
-
- m.seq ().push_back (XSD_MOVE (p));
-
- // Detach seq.
- //
- p = m.seq ().detach_back ();
- assert (p->_container () == 0);
- assert (p->r ()[0].get () == &p->o ()[1]);
- assert (m.seq ()[0].r ()[1].get () == 0);
-
- m.seq ().push_back (XSD_MOVE (p));
- assert (m.seq ()[0].r ()[1].get () == &m.seq ()[1].o ()[0]);
-
- m.seq ().detach (m.seq ().begin (), p);
- assert (p->_container () == 0);
- assert (p->r ()[0].get () == &p->o ()[1]);
- assert (m.seq ()[0].r ()[1].get () == 0);
-}
diff --git a/tests/cxx/tree/detach/makefile b/tests/cxx/tree/detach/makefile
deleted file mode 100644
index 56c59fa..0000000
--- a/tests/cxx/tree/detach/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/detach/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-detach --generate-default-ctor
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/dom-association/dom-parse.cxx b/tests/cxx/tree/dom-association/dom-parse.cxx
deleted file mode 100644
index 0d26d02..0000000
--- a/tests/cxx/tree/dom-association/dom-parse.cxx
+++ /dev/null
@@ -1,95 +0,0 @@
-// file : tests/cxx/tree/dom-association/dom-parse.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include "dom-parse.hxx"
-
-#include <istream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
-#include <xercesc/framework/Wrapper4InputSource.hpp>
-
-#include <xsd/cxx/xml/sax/std-input-source.hxx>
-#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
-
-#include <xsd/cxx/tree/exceptions.hxx>
-#include <xsd/cxx/tree/error-handler.hxx>
-
-using namespace xercesc;
-namespace xml = xsd::cxx::xml;
-namespace tree = xsd::cxx::tree;
-
-XSD_DOM_AUTO_PTR<DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate)
-{
- const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
-
- // Get an implementation of the Load-Store (LS) interface.
- //
- DOMImplementation* impl (
- DOMImplementationRegistry::getDOMImplementation (ls_id));
-
- XSD_DOM_AUTO_PTR<DOMLSParser> parser (
- impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
-
- DOMConfiguration* conf (parser->getDomConfig ());
-
- // Discard comment nodes in the document.
- //
- conf->setParameter (XMLUni::fgDOMComments, false);
-
- // Enable datatype normalization.
- //
- conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
-
- // Do not create EntityReference nodes in the DOM tree. No
- // EntityReference nodes will be created, only the nodes
- // corresponding to their fully expanded substitution text
- // will be created.
- //
- conf->setParameter (XMLUni::fgDOMEntities, false);
-
- // Perform namespace processing.
- //
- conf->setParameter (XMLUni::fgDOMNamespaces, true);
-
- // Do not include ignorable whitespace in the DOM tree.
- //
- conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
-
- // Enable/Disable validation.
- //
- conf->setParameter (XMLUni::fgDOMValidate, validate);
- conf->setParameter (XMLUni::fgXercesSchema, validate);
- conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
-
- // Xerces-C++ 3.1.0 is the first version with working multi import
- // support.
- //
-#if _XERCES_VERSION >= 30100
- conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
-#endif
-
- // We will release the DOM document ourselves.
- //
- conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
-
- // Set error handler.
- //
- tree::error_handler<char> eh;
- xml::dom::bits::error_handler_proxy<char> ehp (eh);
- conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
-
- // Prepare input stream.
- //
- xml::sax::std_input_source isrc (is, id);
- Wrapper4InputSource wrap (&isrc, false);
-
- XSD_DOM_AUTO_PTR<DOMDocument> doc (parser->parse (&wrap));
-
- eh.throw_if_failed<tree::parsing<char> > ();
-
- return doc;
-}
diff --git a/tests/cxx/tree/dom-association/dom-parse.hxx b/tests/cxx/tree/dom-association/dom-parse.hxx
deleted file mode 100644
index c1c9326..0000000
--- a/tests/cxx/tree/dom-association/dom-parse.hxx
+++ /dev/null
@@ -1,23 +0,0 @@
-// file : tests/cxx/tree/dom-association/dom-parse.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef DOM_PARSE
-#define DOM_PARSE
-
-#include <string>
-#include <iosfwd>
-
-#include <xercesc/dom/DOMDocument.hpp>
-
-#include <xsd/cxx/xml/dom/auto-ptr.hxx>
-
-// Parse an XML document from the standard input stream with an
-// optional resource id. Resource id is used in diagnostics as
-// well as to locate schemas referenced from inside the document.
-//
-XSD_DOM_AUTO_PTR<xercesc::DOMDocument>
-parse (std::istream& is,
- const std::string& id,
- bool validate);
-
-#endif // DOM_PARSE
diff --git a/tests/cxx/tree/dom-association/driver.cxx b/tests/cxx/tree/dom-association/driver.cxx
deleted file mode 100644
index 44343a3..0000000
--- a/tests/cxx/tree/dom-association/driver.cxx
+++ /dev/null
@@ -1,71 +0,0 @@
-// file : tests/cxx/tree/dom-association/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test DOM association/ownership.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-
-#include "dom-parse.hxx"
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-using namespace xercesc;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- int r (0);
-
- XMLPlatformUtils::Initialize ();
-
- try
- {
- ifstream ifs;
- ifs.exceptions (ifstream::badbit | ifstream::failbit);
- ifs.open (argv[1]);
-
- DOMDocument* ptr;
-
-#ifdef XSD_CXX11
- xml_schema::dom::unique_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
- ptr = doc.get ();
- unique_ptr<type> r (
- root (std::move (doc),
- xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
-#else
- xml_schema::dom::auto_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
- ptr = doc.get ();
- auto_ptr<type> r (
- root (doc,
- xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
-#endif
-
- assert (doc.get () == 0);
- assert (r->_node ()->getOwnerDocument () == ptr);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- r = 1;
- }
- catch (const std::ios_base::failure&)
- {
- cerr << argv[1] << ": unable to open or read failure" << endl;
- r = 1;
- }
-
- XMLPlatformUtils::Terminate ();
- return r;
-}
diff --git a/tests/cxx/tree/dom-association/makefile b/tests/cxx/tree/dom-association/makefile
deleted file mode 100644
index 6c1f44c..0000000
--- a/tests/cxx/tree/dom-association/makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-# file : tests/cxx/tree/dom-association/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx dom-parse.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-# Define XSD_CXX11 since we include libxsd headers directly.
-#
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifeq ($(cxx_standard),c++11)
-$(obj) $(dep): cpp_options += -DXSD_CXX11
-endif
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx b/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
deleted file mode 100644
index 2840e0a..0000000
--- a/tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-// file : tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test ISO-8859-1 encoding.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <fstream>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- try
- {
- root (argv[1]);
- return 1;
- }
- catch (xsd::cxx::xml::iso8859_1_unrepresentable const&)
- {
- }
-
- xsd::cxx::xml::char_transcoder::unrep_char ('?');
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- {
- type::a_sequence const& s (r->a ());
-
- if (s[0] != "abc" ||
- s[1] != "\xE6" ||
- s[2] != "\xA2\xA3\xA4\xA5" ||
- s[3] != "??")
- {
- cerr << "invalid encoding" << endl;
- return 1;
- }
- }
-
- {
- type::b_sequence const& s (r->b ());
-
- if (s[0] != strenum::abc ||
- s[1] != strenum::a_c ||
- s[2] != strenum::cxx__bc)
- {
- cerr << "invalid encoding" << endl;
- return 1;
- }
- }
-
- xml_schema::namespace_infomap map;
- map["t"].name = "test";
-
- root (std::cout, *r, map, "ISO-8859-1");
- }
- catch (xml_schema::exception const& e)
- {
- cerr << "xml_schema::exception: " << e.what () << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/makefile b/tests/cxx/tree/encoding/char/iso-8859-1/makefile
deleted file mode 100644
index 8b28e4e..0000000
--- a/tests/cxx/tree/encoding/char/iso-8859-1/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/encoding/char/iso-8859-1/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --char-encoding iso8859-1 --generate-serialization \
---generate-doxygen
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/test.std
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/test.std -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/encoding/char/lcp/driver.cxx b/tests/cxx/tree/encoding/char/lcp/driver.cxx
deleted file mode 100644
index 4e2933d..0000000
--- a/tests/cxx/tree/encoding/char/lcp/driver.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-// file : tests/cxx/tree/encoding/char/lcp/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test local code page encoding (--char-encoding lcp).
-// The test just makes sure it still compiles and works.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <fstream>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- xml_schema::namespace_infomap map;
- map["t"].name = "test";
-
- root (std::cout, *r, map);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << "xml_schema::exception: " << e.what () << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/encoding/char/lcp/makefile b/tests/cxx/tree/encoding/char/lcp/makefile
deleted file mode 100644
index bb99e33..0000000
--- a/tests/cxx/tree/encoding/char/lcp/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/encoding/char/lcp/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --char-encoding lcp
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/test.std
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/test.std -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/encoding/char/makefile b/tests/cxx/tree/encoding/char/makefile
deleted file mode 100644
index cd7a325..0000000
--- a/tests/cxx/tree/encoding/char/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/encoding/char/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-tests := lcp utf-8 iso-8859-1
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/encoding/char/utf-8/driver.cxx b/tests/cxx/tree/encoding/char/utf-8/driver.cxx
deleted file mode 100644
index 38fae4d..0000000
--- a/tests/cxx/tree/encoding/char/utf-8/driver.cxx
+++ /dev/null
@@ -1,63 +0,0 @@
-// file : tests/cxx/tree/encoding/char/utf-8/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test UTF-8 encoding.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <fstream>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- {
- type::a_sequence const& s (r->a ());
-
- if (s[0] != "abc" ||
- s[1] != "\xD5\x95" ||
- s[2] != "\xEA\xAA\xAA")
- {
- cerr << "invalid encoding" << endl;
- return 1;
- }
- }
-
- {
- type::b_sequence const& s (r->b ());
-
- if (s[0] != strenum::abc ||
- s[1] != strenum::a_c ||
- s[2] != strenum::cxx_bc)
- {
- cerr << "invalid encoding" << endl;
- return 1;
- }
- }
-
- xml_schema::namespace_infomap map;
- map["t"].name = "test";
-
- root (std::cout, *r, map, "ASCII");
- }
- catch (xml_schema::exception const& e)
- {
- cerr << "xml_schema::exception: " << e.what () << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/encoding/char/utf-8/makefile b/tests/cxx/tree/encoding/char/utf-8/makefile
deleted file mode 100644
index fd465f3..0000000
--- a/tests/cxx/tree/encoding/char/utf-8/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/encoding/char/utf-8/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --generate-doxygen
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/test.std
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/test.std -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/encoding/makefile b/tests/cxx/tree/encoding/makefile
deleted file mode 100644
index b6f2ea6..0000000
--- a/tests/cxx/tree/encoding/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/encoding/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := char wchar
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/encoding/wchar/driver.cxx b/tests/cxx/tree/encoding/wchar/driver.cxx
deleted file mode 100644
index 0756d4e..0000000
--- a/tests/cxx/tree/encoding/wchar/driver.cxx
+++ /dev/null
@@ -1,55 +0,0 @@
-// file : tests/cxx/tree/encoding/wchar/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test the wide character mapping.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <fstream>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- // Use dont_validate because we do not have instance's system id (path).
- //
- std::ifstream ifs (argv[1]);
- XSD_AUTO_PTR<type> r (root (ifs, xml_schema::flags::dont_validate));
-
- {
- type::b_sequence const& s (r->b ());
-
- if (s[0] != strenum::abc ||
- s[1] != strenum::a__c ||
- s[2] != strenum::cxx__bc ||
- s[3] != strenum::ab__)
- {
- cerr << "invalid encoding" << endl;
- return 1;
- }
- }
-
- xml_schema::namespace_infomap map;
- map[L"t"].name = L"test";
-
- root (std::cout, *r, map, L"ASCII");
- }
- catch (xml_schema::exception const& e)
- {
- cerr << "xml_schema::exception: " << e.what () << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/encoding/wchar/makefile b/tests/cxx/tree/encoding/wchar/makefile
deleted file mode 100644
index 1e351fa..0000000
--- a/tests/cxx/tree/encoding/wchar/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/encoding/wchar/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --generate-doxygen \
---char-type wchar_t
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/test.std
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/test.std -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/enumeration/ctor/driver.cxx b/tests/cxx/tree/enumeration/ctor/driver.cxx
deleted file mode 100644
index beda424..0000000
--- a/tests/cxx/tree/enumeration/ctor/driver.cxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// file : tests/cxx/tree/enumeration/ctor/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test enumeration constructors.
-//
-#include <string>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- // Test ctor(const char*).
- //
- {
- string_enum se ("a");
- type t ("a", 1);
- }
-
- // Test ctor(const std::string&)
- //
- {
- string const s ("c");
- string_enum se (s);
- type t (s, 3);
- }
-}
diff --git a/tests/cxx/tree/enumeration/ctor/makefile b/tests/cxx/tree/enumeration/ctor/makefile
deleted file mode 100644
index 463997b..0000000
--- a/tests/cxx/tree/enumeration/ctor/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/enumeration/ctor/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-default-ctor --generate-from-base-ctor \
---generate-doxygen
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/enumeration/inheritance/driver.cxx b/tests/cxx/tree/enumeration/inheritance/driver.cxx
deleted file mode 100644
index 4592099..0000000
--- a/tests/cxx/tree/enumeration/inheritance/driver.cxx
+++ /dev/null
@@ -1,53 +0,0 @@
-// file : tests/cxx/tree/enumeration/inheritance/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Insert test description here.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<top_bottom> r (root (argv[1]));
-
- switch (*r)
- {
- case top_bottom::top:
- {
- cout << "top" << endl;
- break;
- }
- case top_bottom::bottom:
- {
- cout << "bottom" << endl;
- break;
- }
- default: // Suppress warning.
- {
- assert (false);
- break;
- }
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/enumeration/inheritance/makefile b/tests/cxx/tree/enumeration/inheritance/makefile
deleted file mode 100644
index 716df9b..0000000
--- a/tests/cxx/tree/enumeration/inheritance/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/enumeration/inheritance/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/enumeration/makefile b/tests/cxx/tree/enumeration/makefile
deleted file mode 100644
index 03f31f4..0000000
--- a/tests/cxx/tree/enumeration/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/enumeration/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := ctor inheritance
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/float/driver.cxx b/tests/cxx/tree/float/driver.cxx
deleted file mode 100644
index fbbad95..0000000
--- a/tests/cxx/tree/float/driver.cxx
+++ /dev/null
@@ -1,53 +0,0 @@
-// file : tests/cxx/tree/float/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test floating point (xsd:{float, double, decimal}) type parsing
-// and serialization.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- r->simple ().push_back (12.129456);
- r->simple ().push_back (123.129456);
- r->simple ().push_back (1234.129456);
-
- r->s (12.129456);
-
- r->complex ().push_back (12.129456);
- r->complex ().push_back (123.129456);
- r->complex ().push_back (1234.129456);
- r->complex ().push_back (-12.12);
- r->complex ().push_back (-123.12);
-
- r->s (12.129456);
-
- xml_schema::namespace_infomap map;
-
- map["t"].name = "test";
- root (cout, *r, map);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/float/makefile b/tests/cxx/tree/float/makefile
deleted file mode 100644
index 1bd8069..0000000
--- a/tests/cxx/tree/float/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/float/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --root-element-all
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/test.std
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/test.std -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/list/ctor/driver.cxx b/tests/cxx/tree/list/ctor/driver.cxx
deleted file mode 100644
index 7dfe301..0000000
--- a/tests/cxx/tree/list/ctor/driver.cxx
+++ /dev/null
@@ -1,50 +0,0 @@
-// file : tests/cxx/tree/list/ctor/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test list constructors.
-//
-#include <string>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- // Test ctor()
- //
- {
- string_list sl;
-
- xml_schema::nmtokens nt;
- xml_schema::idrefs id;
- }
-
- // Test ctor(size_type, const X&)
- //
- {
- string_list sl (10, "abc");
- size_type st (10, 123);
-
- xml_schema::nmtokens nt (10, "abc");
- xml_schema::idrefs id (10, "abc");
- }
-
- // Test ctor(const I& begin, const I& end)
- //
- {
- string_list sl1 (10, "abc");
- string_list sl2 (sl1.begin (), sl1.end ());
-
- I i1 (10, 123);
- I i2 (i1.begin (), i1.end ());
-
- xml_schema::nmtokens nt1 (10, "abc");
- xml_schema::nmtokens nt2 (nt1.begin (), nt1.end ());
-
- xml_schema::idrefs id1 (10, "abc");
- xml_schema::idrefs id2 (id1.begin (), id1.end ());
- }
-}
diff --git a/tests/cxx/tree/list/ctor/makefile b/tests/cxx/tree/list/ctor/makefile
deleted file mode 100644
index c379934..0000000
--- a/tests/cxx/tree/list/ctor/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/list/ctor/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-default-ctor --generate-from-base-ctor \
---generate-doxygen
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/list/makefile b/tests/cxx/tree/list/makefile
deleted file mode 100644
index 55bc85a..0000000
--- a/tests/cxx/tree/list/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/list/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := ctor
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/makefile b/tests/cxx/tree/makefile
deleted file mode 100644
index 21c79f3..0000000
--- a/tests/cxx/tree/makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# file : tests/cxx/tree/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-tests := \
-any-type \
-built-in \
-chameleon \
-comparison \
-compilation \
-complex \
-containment \
-default \
-detach \
-dom-association \
-encoding \
-enumeration \
-float \
-list \
-name-clash \
-naming \
-order \
-polymorphism \
-prefix \
-test-template \
-types-only \
-union \
-wildcard
-
-ifeq ($(xsd_with_ace),y)
-tests += binary
-endif
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/name-clash/inheritance/driver.cxx b/tests/cxx/tree/name-clash/inheritance/driver.cxx
deleted file mode 100644
index b27d18c..0000000
--- a/tests/cxx/tree/name-clash/inheritance/driver.cxx
+++ /dev/null
@@ -1,35 +0,0 @@
-// file : tests/cxx/tree/name-clash/inheritance/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test for name clashes across inheritance hierarchy.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<derived> r (root (argv[1]));
-
- cout << *r << endl;
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/name-clash/inheritance/makefile b/tests/cxx/tree/name-clash/inheritance/makefile
deleted file mode 100644
index 23e3cf7..0000000
--- a/tests/cxx/tree/name-clash/inheritance/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/name-clash/inheritance/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/name-clash/makefile b/tests/cxx/tree/name-clash/makefile
deleted file mode 100644
index 5d2b24c..0000000
--- a/tests/cxx/tree/name-clash/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/name-clash/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := inheritance
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/naming/camel/driver.cxx b/tests/cxx/tree/naming/camel/driver.cxx
deleted file mode 100644
index e9d7180..0000000
--- a/tests/cxx/tree/naming/camel/driver.cxx
+++ /dev/null
@@ -1,154 +0,0 @@
-// file : tests/cxx/tree/naming/camel/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test camel case (upper for types, lower for functions) naming style.
-//
-
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- // Enum 'value' type.
- //
- {
- Gender::Value v;
- v = Gender::female;
- XSD_UNUSED (v);
- }
-
- // Anonymous type.
- //
- {
- Foo f ("a", "b");
-
- if (f.a () != "a" || f.b () != "b")
- return 1;
- }
-
- // Type name and accessors/modifiers.
- //
- {
- Type t ("bar");
-
- // foo
- //
- {
- Type::FooType* p = 0;
- XSD_UNUSED (p);
-
- Type::FooOptional o;
-
- if (t.foo ().present ())
- return 1;
-
- t.foo (o);
- }
-
- // bar
- //
- {
- Type::BarType* p = 0;
- XSD_UNUSED (p);
-
- if (t.bar () != "bar")
- return 1;
-
- t.bar ("barbar");
- }
-
- // baz
- //
- {
- Type::BazType* p = 0;
- XSD_UNUSED (p);
-
- Type::BazSequence s;
- Type::BazIterator i (s.begin ());
- Type::BazConstIterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.baz () != s)
- return 1;
-
- t.baz (s);
- }
-
- // any
- //
- {
- Type::AnySequence s (t.domDocument ());
- Type::AnyIterator i (s.begin ());
- Type::AnyConstIterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.any () != s)
- return 1;
-
- t.any (s);
- }
-
- // foo
- //
- {
- Type::FoxType x = Type::foxDefaultValue ();
-
- if (t.fox () != x)
- return 1;
-
- t.fox ("fox");
- }
-
- // any_attribute
- //
- {
- Type::AnyAttributeSet s (t.domDocument ());
- Type::AnyAttributeIterator i (s.begin ());
- Type::AnyAttributeConstIterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.anyAttribute () != s)
- return 1;
-
- t.anyAttribute (s);
- }
- }
-
- // Parsing/serialization functions.
- //
- {
- istringstream is ("<t:Root xmlns:t='test'>foo</t:Root>");
- root (is, xml_schema::Flags::dont_validate);
- }
-
- {
- ostringstream os;
- xml_schema::NamespaceInfomap m;
- m["t"].name = "test";
-
- root (os, "foo", m);
- }
- }
- catch (xml_schema::Exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/naming/camel/makefile b/tests/cxx/tree/naming/camel/makefile
deleted file mode 100644
index 3fc0dcc..0000000
--- a/tests/cxx/tree/naming/camel/makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# file : tests/cxx/tree/naming/camel/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options += \
---type-naming ucc \
---function-naming lcc \
---generate-ostream \
---generate-serialization \
---generate-comparison \
---generate-wildcard
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/naming/java/driver.cxx b/tests/cxx/tree/naming/java/driver.cxx
deleted file mode 100644
index b96917b..0000000
--- a/tests/cxx/tree/naming/java/driver.cxx
+++ /dev/null
@@ -1,153 +0,0 @@
-// file : tests/cxx/tree/naming/java/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test Java naming style.
-//
-
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- // Enum 'value' type.
- //
- {
- Gender::Value v;
- v = Gender::female;
- XSD_UNUSED (v);
- }
-
- // Anonymous type.
- //
- {
- Foo f ("a", "b");
-
- if (f.getA () != "a" || f.getB () != "b")
- return 1;
- }
-
- // Type name and accessors/modifiers.
- //
- {
- Type t ("bar");
-
- // foo
- //
- {
- Type::FooType* p = 0;
- XSD_UNUSED (p);
- Type::FooOptional o;
-
- if (t.getFoo ().present ())
- return 1;
-
- t.setFoo (o);
- }
-
- // bar
- //
- {
- Type::BarType* p = 0;
- XSD_UNUSED (p);
-
- if (t.getBar () != "bar")
- return 1;
-
- t.setBar ("barbar");
- }
-
- // baz
- //
- {
- Type::BazType* p = 0;
- XSD_UNUSED (p);
-
- Type::BazSequence s;
- Type::BazIterator i (s.begin ());
- Type::BazConstIterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.getBaz () != s)
- return 1;
-
- t.setBaz (s);
- }
-
- // any
- //
- {
- Type::AnySequence s (t.getDomDocument ());
- Type::AnyIterator i (s.begin ());
- Type::AnyConstIterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.getAny () != s)
- return 1;
-
- t.setAny (s);
- }
-
- // foo
- //
- {
- Type::FoxType x = Type::getFoxDefaultValue ();
-
- if (t.getFox () != x)
- return 1;
-
- t.setFox ("fox");
- }
-
- // any_attribute
- //
- {
- Type::AnyAttributeSet s (t.getDomDocument ());
- Type::AnyAttributeIterator i (s.begin ());
- Type::AnyAttributeConstIterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.getAnyAttribute () != s)
- return 1;
-
- t.setAnyAttribute (s);
- }
- }
-
- // Parsing/serialization functions.
- //
- {
- istringstream is ("<t:root xmlns:t='test'>foo</t:root>");
- parseRoot (is, xml_schema::Flags::dont_validate);
- }
-
- {
- ostringstream os;
- xml_schema::NamespaceInfomap m;
- m["t"].name = "test";
-
- serializeRoot (os, "foo", m);
- }
- }
- catch (xml_schema::Exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/naming/java/makefile b/tests/cxx/tree/naming/java/makefile
deleted file mode 100644
index 713126d..0000000
--- a/tests/cxx/tree/naming/java/makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# file : tests/cxx/tree/naming/java/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options += \
---type-naming java \
---function-naming java \
---generate-ostream \
---generate-serialization \
---generate-comparison \
---generate-wildcard
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/naming/knr/driver.cxx b/tests/cxx/tree/naming/knr/driver.cxx
deleted file mode 100644
index 28e6562..0000000
--- a/tests/cxx/tree/naming/knr/driver.cxx
+++ /dev/null
@@ -1,154 +0,0 @@
-// file : tests/cxx/tree/naming/knr/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test K&R naming style.
-//
-
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- xercesc::XMLPlatformUtils::Initialize ();
-
- try
- {
- // Enum 'value' type.
- //
- {
- gender::value v;
- v = gender::female;
- XSD_UNUSED (v);
- }
-
- // Anonymous type.
- //
- {
- foo f ("a", "b");
-
- if (f.a () != "a" || f.b () != "b")
- return 1;
- }
-
- // Type name and accessors/modifiers.
- //
- {
- type t ("bar");
-
- // foo
- //
- {
- type::foo_type* p = 0;
- XSD_UNUSED (p);
-
- type::foo_optional o;
-
- if (t.foo ().present ())
- return 1;
-
- t.foo (o);
- }
-
- // bar
- //
- {
- type::bar_type* p = 0;
- XSD_UNUSED (p);
-
- if (t.bar () != "bar")
- return 1;
-
- t.bar ("barbar");
- }
-
- // baz
- //
- {
- type::baz_type* p = 0;
- XSD_UNUSED (p);
-
- type::baz_sequence s;
- type::baz_iterator i (s.begin ());
- type::baz_const_iterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.baz () != s)
- return 1;
-
- t.baz (s);
- }
-
- // any
- //
- {
- type::any_sequence s (t.dom_document ());
- type::any_iterator i (s.begin ());
- type::any_const_iterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.any () != s)
- return 1;
-
- t.any (s);
- }
-
- // foo
- //
- {
- type::fox_type x = type::fox_default_value ();
-
- if (t.fox () != x)
- return 1;
-
- t.fox ("fox");
- }
-
- // any_attribute
- //
- {
- type::any_attribute_set s (t.dom_document ());
- type::any_attribute_iterator i (s.begin ());
- type::any_attribute_const_iterator ci (s.begin ());
- XSD_UNUSED (i);
- XSD_UNUSED (ci);
-
- if (t.any_attribute () != s)
- return 1;
-
- t.any_attribute (s);
- }
- }
-
- // Parsing/serialization functions.
- //
- {
- istringstream is ("<t:root xmlns:t='test'>foo</t:root>");
- root (is, xml_schema::flags::dont_validate);
- }
-
- {
- ostringstream os;
- xml_schema::namespace_infomap m;
- m["t"].name = "test";
-
- root (os, "foo", m);
- }
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- xercesc::XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/naming/knr/makefile b/tests/cxx/tree/naming/knr/makefile
deleted file mode 100644
index 364a491..0000000
--- a/tests/cxx/tree/naming/knr/makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# file : tests/cxx/tree/naming/knr/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options += \
---type-naming knr \
---function-naming knr \
---generate-ostream \
---generate-serialization \
---generate-comparison \
---generate-wildcard
-
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/naming/makefile b/tests/cxx/tree/naming/makefile
deleted file mode 100644
index 3c974ef..0000000
--- a/tests/cxx/tree/naming/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/naming/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := camel java knr
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/order/driver.cxx b/tests/cxx/tree/order/driver.cxx
deleted file mode 100644
index 839191a..0000000
--- a/tests/cxx/tree/order/driver.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-// file : tests/cxx/tree/order/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test ordered type support.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <cassert>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-using namespace xercesc;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- XMLPlatformUtils::Initialize ();
-
- try
- {
- XSD_AUTO_PTR<root> r (root_ (argv[1], xml_schema::flags::dont_initialize));
-
- root c (*r);
- assert (c == *r);
-
- for (root::t1_const_iterator j (r->t1 ().begin ());
- j != r->t1 ().end (); ++j)
- {
- const t1_derived& d (*j);
-
- for (t1_derived::content_order_const_iterator i (
- d.content_order ().begin ()); i != d.content_order ().end (); ++i)
- {
- cout << i->id << ' ' << i->index << endl;
- }
- }
-
- xml_schema::namespace_infomap map;
-
- map["t"].name = "test";
- map["t1"].name = "test1";
-
- root_ (cout, *r, map, "UTF-8", xml_schema::flags::dont_initialize);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/order/makefile b/tests/cxx/tree/order/makefile
deleted file mode 100644
index 251b1f3..0000000
--- a/tests/cxx/tree/order/makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# file : tests/cxx/tree/order/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --generate-wildcard \
---generate-comparison \
---ordered-type t1_base --ordered-type t1_derived \
---ordered-type t2_base --ordered-type t2_derived \
---ordered-type t3_type \
---ordered-type t4_base --ordered-type t4_derived \
---ordered-type t5_base --ordered-type t5_derived \
---ordered-type t6_base --ordered-type t6_derived \
---ordered-type t7_type
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/polymorphism/comparison/driver.cxx b/tests/cxx/tree/polymorphism/comparison/driver.cxx
deleted file mode 100644
index 8685a2e..0000000
--- a/tests/cxx/tree/polymorphism/comparison/driver.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-// file : tests/cxx/tree/polymorphism/comparison/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test comparison of polymorphic object models.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <sstream>
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- // Equals.
- //
- {
- derived1 d ("a", 1);
- d.b ("b");
- type r1 (d);
-
- assert (*r == r1);
- }
-
- // Values are not equal.
- //
- {
- derived1 d ("a", 1);
- d.b ("c");
- type r1 (d);
-
- assert (*r != r1);
- }
-
- // Values are not equal.
- //
- {
- derived1 d ("a", 2);
- d.b ("b");
- type r1 (d);
-
- assert (*r != r1);
- }
-
- // Different types.
- //
- {
- derived2 d ("a", 1);
- d.c ().push_back ("c");
- type r1 (d);
-
- assert (*r != r1);
- }
-
- xml_schema::namespace_infomap map;
-
- map["t"].name = "test";
-
- stringstream s;
- root (s, *r, map);
-
- XSD_AUTO_PTR<type> c (root (s, xml_schema::flags::dont_validate));
-
- assert (*r == *c);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/polymorphism/comparison/makefile b/tests/cxx/tree/polymorphism/comparison/makefile
deleted file mode 100644
index 15e6d02..0000000
--- a/tests/cxx/tree/polymorphism/comparison/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/polymorphism/comparison/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic --polymorphic-type base \
---generate-comparison --generate-serialization
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml
- $(call message,test $$1,$$1 $(src_base)/test.xml,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/polymorphism/makefile b/tests/cxx/tree/polymorphism/makefile
deleted file mode 100644
index 93a3ad2..0000000
--- a/tests/cxx/tree/polymorphism/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/polymorphism/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := comparison ostream same-type
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/polymorphism/ostream/driver.cxx b/tests/cxx/tree/polymorphism/ostream/driver.cxx
deleted file mode 100644
index 7da2030..0000000
--- a/tests/cxx/tree/polymorphism/ostream/driver.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-// file : tests/cxx/tree/polymorphism/ostream/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test printing of polymorphic object models.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
- cout << *r << endl;
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/polymorphism/ostream/makefile b/tests/cxx/tree/polymorphism/ostream/makefile
deleted file mode 100644
index 65c37b1..0000000
--- a/tests/cxx/tree/polymorphism/ostream/makefile
+++ /dev/null
@@ -1,87 +0,0 @@
-# file : tests/cxx/tree/polymorphism/ostream/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-polymorphic --polymorphic-type-all \
---root-element root --generate-ostream
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/polymorphism/same-type/driver.cxx b/tests/cxx/tree/polymorphism/same-type/driver.cxx
deleted file mode 100644
index 883ba64..0000000
--- a/tests/cxx/tree/polymorphism/same-type/driver.cxx
+++ /dev/null
@@ -1,35 +0,0 @@
-// file : tests/cxx/tree/polymorphism/same-type/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test substitution group and xsi:type that don't change the type.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- cout << *r << endl;
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/polymorphism/same-type/makefile b/tests/cxx/tree/polymorphism/same-type/makefile
deleted file mode 100644
index 3185804..0000000
--- a/tests/cxx/tree/polymorphism/same-type/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/polymorphism/same-type/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream --generate-polymorphic \
---root-element root
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/prefix/driver.cxx b/tests/cxx/tree/prefix/driver.cxx
deleted file mode 100644
index 4c99fd9..0000000
--- a/tests/cxx/tree/prefix/driver.cxx
+++ /dev/null
@@ -1,34 +0,0 @@
-// file : tests/cxx/tree/prefix/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test automatic prefix assignment.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
- root (std::cout, *r);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/prefix/makefile b/tests/cxx/tree/prefix/makefile
deleted file mode 100644
index 0e5e3f3..0000000
--- a/tests/cxx/tree/prefix/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/prefix/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd foo.xsd bar.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-serialization --generate-polymorphic \
---polymorphic-type foo\#base --root-element root
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/test-template/driver.cxx b/tests/cxx/tree/test-template/driver.cxx
deleted file mode 100644
index be345f6..0000000
--- a/tests/cxx/tree/test-template/driver.cxx
+++ /dev/null
@@ -1,35 +0,0 @@
-// file : tests/cxx/tree/test-template/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Insert test description here.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- try
- {
- XSD_AUTO_PTR<type> r (root (argv[1]));
-
- cout << *r << endl;
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-}
diff --git a/tests/cxx/tree/test-template/makefile b/tests/cxx/tree/test-template/makefile
deleted file mode 100644
index 1b1e531..0000000
--- a/tests/cxx/tree/test-template/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/test-template/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-ostream
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/types-only/driver.cxx b/tests/cxx/tree/types-only/driver.cxx
deleted file mode 100644
index fd1b8f6..0000000
--- a/tests/cxx/tree/types-only/driver.cxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// file : tests/cxx/tree/types-only/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test that code generated without parsing and serialization functions
-// still compiles.
-//
-
-#include <iostream>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- color_enum red (color_enum::red);
- red_blue_enum blue (red_blue_enum::blue);
-
- long_string_union num ("123");
-
- string_list list;
- list.push_back ("Hello");
- list.push_back ("World");
-
- complex_type t ("Hello, World!", "foo", color_enum::red);
-
- anon a ("Hello, World!");
-}
diff --git a/tests/cxx/tree/types-only/makefile b/tests/cxx/tree/types-only/makefile
deleted file mode 100644
index 3c156ac..0000000
--- a/tests/cxx/tree/types-only/makefile
+++ /dev/null
@@ -1,85 +0,0 @@
-# file : tests/cxx/tree/types-only/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --suppress-parsing
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/union/ctor/driver.cxx b/tests/cxx/tree/union/ctor/driver.cxx
deleted file mode 100644
index df60a93..0000000
--- a/tests/cxx/tree/union/ctor/driver.cxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// file : tests/cxx/tree/union/ctor/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test union constructors.
-//
-#include <string>
-
-#include "test.hxx"
-
-using namespace std;
-using namespace test;
-
-int
-main ()
-{
- // Test ctor(const std::string&)
- //
- {
- string const s ("123");
- int_string_union u (s);
- type t (s);
- }
-
- // Test ctor(const char*).
- //
- {
- int_string_union u ("123");
- type t ("123");
- }
-}
diff --git a/tests/cxx/tree/union/ctor/makefile b/tests/cxx/tree/union/ctor/makefile
deleted file mode 100644
index 45dc1c5..0000000
--- a/tests/cxx/tree/union/ctor/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/union/ctor/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-default-ctor --generate-from-base-ctor \
---generate-doxygen
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver)
- $(call message,test $$1,$$1,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/cxx/tree/union/makefile b/tests/cxx/tree/union/makefile
deleted file mode 100644
index 59fa39c..0000000
--- a/tests/cxx/tree/union/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : tests/cxx/tree/union/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-tests := ctor
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/cxx/tree/wildcard/driver.cxx b/tests/cxx/tree/wildcard/driver.cxx
deleted file mode 100644
index 51a17a3..0000000
--- a/tests/cxx/tree/wildcard/driver.cxx
+++ /dev/null
@@ -1,203 +0,0 @@
-// file : tests/cxx/tree/wildcard/driver.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-// Test wildcard (any & anyAttribute) mapping.
-//
-
-#include <memory> // std::auto_ptr/unique_ptr
-#include <sstream>
-#include <iostream>
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include "test.hxx" // Get XSD_CXX11 defined.
-
-#include <xsd/cxx/xml/string.hxx>
-
-using namespace std;
-using namespace test;
-using namespace xercesc;
-
-namespace xml = xsd::cxx::xml;
-
-void
-print (type& t)
-{
- if (t.att ())
- cout << *t.att () << endl;
-
- type::any_attribute_set& as (t.any_attribute ());
-
- for (type::any_attribute_iterator i (as.begin ()); i != as.end (); ++i)
- {
- cout << xml::transcode<char> (i->getTextContent ()) << endl;
- }
-
- cout << xml::transcode<char> (t.any ().getTextContent ()) << endl
- << t.foo () << endl;
-
- if (t.any1 ())
- cout << xml::transcode<char> (t.any1 ()->getTextContent ()) << endl;
-
- cout << t.bar () << endl;
-
- type::any2_sequence& es (t.any2 ());
-
- for (type::any2_iterator i (es.begin ()); i != es.end (); ++i)
- {
- cout << xml::transcode<char> (i->getTextContent ()) << endl;
- }
-
- cout << endl;
-}
-
-int
-main (int argc, char* argv[])
-{
- if (argc != 2)
- {
- cerr << "usage: " << argv[0] << " test.xml" << endl;
- return 1;
- }
-
- XMLPlatformUtils::Initialize ();
-
- try
- {
- // Test accessors/modifiers for various cardinalities.
- //
- type t;
-
- DOMDocument& doc (t.dom_document ());
-
- // one
- //
- {
- DOMElement* e (doc.createElement (xml::string ("a").c_str ()));
- t.any (*e);
- e->release ();
- assert (xml::transcode<char> (t.any ().getTagName ()) == "a");
-
- t.any (doc.createElement (xml::string ("b").c_str ()));
- assert (xml::transcode<char> (t.any ().getTagName ()) == "b");
- }
-
- // optional
- //
- {
- assert (!t.any1 ().present ());
-
- DOMElement* e (doc.createElement (xml::string ("a").c_str ()));
- t.any1 (*e);
- e->release ();
- assert (t.any1 ().present ());
- assert (xml::transcode<char> (t.any1 ().get ().getTagName ()) == "a");
-
- t.any1 (doc.createElement (xml::string ("b").c_str ()));
- assert (xml::transcode<char> (t.any1 ()->getTagName ()) == "b");
-
- type::any1_optional c (
- doc.createElement (xml::string ("c").c_str ()), doc);
- t.any1 (c);
- assert (xml::transcode<char> (t.any1 ()->getTagName ()) == "c");
- }
-
-
- // sequence
- //
- {
- type::any2_sequence& s (t.any2 ());
-
- DOMElement* e (doc.createElement (xml::string ("a").c_str ()));
- s.push_back (*e);
- e->release ();
- s.push_back (doc.createElement (xml::string ("b").c_str ()));
- assert (s.size () == 2);
-
- for (type::any2_iterator i (s.begin ()); i != s.end (); ++i)
- {
- if (i == s.begin ())
- assert (xml::transcode<char> (i->getTagName ()) == "a");
- else
- assert (xml::transcode<char> ((*i).getTagName ()) == "b");
- }
-
- // copy c-tor
- type::any2_sequence cs (s, doc);
- assert (cs.size () == 2);
- assert (xml::transcode<char> (cs[0].getTagName ()) == "a");
- assert (xml::transcode<char> (cs[1].getTagName ()) == "b");
-
- // assignment
- t.any2 (cs);
- assert (s.size () == 2);
- assert (xml::transcode<char> (s[0].getTagName ()) == "a");
- assert (xml::transcode<char> (s[1].getTagName ()) == "b");
- }
-
- // anyAttribute
- //
- {
- type::any_attribute_set& s (t.any_attribute ());
-
- DOMAttr* a (doc.createAttribute (xml::string ("a").c_str ()));
- s.insert (*a);
- a->release ();
- s.insert (doc.createAttribute (xml::string ("b").c_str ()));
- assert (s.size () == 2);
-
- assert (s.find ("a") != s.end ());
- assert (s.find ("b") != s.end ());
-
- for (type::any_attribute_iterator i (s.begin ()); i != s.end (); ++i)
- {
- assert (xml::transcode<char> (i->getName ()) == "a" ||
- xml::transcode<char> ((*i).getName ()) == "b");
- }
-
- // copy c-tor
- type::any_attribute_set cs (s, doc);
- assert (cs.size () == 2);
- assert (cs.count ("a"));
- assert (cs.count ("b"));
-
- // assignment
- t.any_attribute (cs);
- assert (s.size () == 2);
- assert (s.count ("a"));
- assert (s.count ("b"));
- }
-
- // Test parsing
- //
- XSD_AUTO_PTR<type> r (root (argv[1]));
- print (*r);
-
- // Test serialization.
- //
- xml_schema::namespace_infomap map;
-
- map["t"].name = "test";
- map["t"].schema = "test.xsd";
- map["o"].name = "other";
-
- stringstream iostr;
- root (iostr, *r, map);
-
- // cout << iostr.str () << endl
- // << endl;
-
- XSD_AUTO_PTR<type> copy (root (iostr, argv[1]));
- assert (*copy == *r);
-
- print (*copy);
- }
- catch (xml_schema::exception const& e)
- {
- cerr << e << endl;
- return 1;
- }
-
- XMLPlatformUtils::Terminate ();
-}
diff --git a/tests/cxx/tree/wildcard/makefile b/tests/cxx/tree/wildcard/makefile
deleted file mode 100644
index 39f4846..0000000
--- a/tests/cxx/tree/wildcard/makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# file : tests/cxx/tree/wildcard/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
-
-xsd := test.xsd
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-
-# Build.
-#
-$(driver): $(obj) $(xerces_c.l)
-
-$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd
-$(obj) $(dep): $(xerces_c.l.cpp-options)
-
-genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): xsd := $(out_root)/xsd/xsd
-$(gen): xsd_options += --generate-wildcard --generate-default-ctor \
---generate-from-base-ctor --generate-serialization --generate-comparison
-$(gen): $(out_root)/xsd/xsd
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.xml $(src_base)/output
- $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver))
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(xsd:.xsd=.cxx.xsd.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-$(call include,$(bld_root)/cxx/standard.make) # cxx_standard
-ifdef cxx_standard
-$(gen): xsd_options += --std $(cxx_standard)
-$(call include,$(scf_root)/xsd/tree/xsd-cxx.make)
-endif
-
-
-# Dependencies.
-#
-$(call import,$(src_root)/xsd/makefile)
diff --git a/tests/makefile b/tests/makefile
deleted file mode 100644
index 7c3a64f..0000000
--- a/tests/makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# file : tests/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(out_base)/cxx/
-$(test): $(out_base)/cxx/.test
-$(clean): $(out_base)/cxx/.clean
-
-$(call import,$(src_base)/cxx/makefile)
diff --git a/tests/morphing/anonymous/unstable/includee-2.xsd b/tests/morphing/anonymous/unstable/includee-2.xsd
deleted file mode 100644
index eb8222c..0000000
--- a/tests/morphing/anonymous/unstable/includee-2.xsd
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" ?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
- xmlns:test="http://www.codesynthesis.com/xmlns/test"
- targetNamespace="http://www.codesynthesis.com/xmlns/test">
-
- <xsd:element name="base">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string"/>
- </xsd:simpleType>
- </xsd:element>
-
-</xsd:schema>
diff --git a/tests/schema/attribute/ref.xsd b/tests/schema/attribute/ref.xsd
deleted file mode 100644
index f6c3c10..0000000
--- a/tests/schema/attribute/ref.xsd
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
- xmlns="http://www.codesynthesis.com/xmlns/test"
- targetNamespace="http://www.codesynthesis.com/xmlns/test">
-
-
- <!-- Easy case. -->
-
- <xsd:attribute name="foo" type="xsd:string"/>
-
- <xsd:complexType name="Foo">
- <xsd:attribute ref="foo"/>
- </xsd:complexType>
-
-
-
- <!-- Forward reference to a yet undeclared attribute. -->
-
- <xsd:complexType name="Bar">
- <xsd:attribute ref="bar"/>
- </xsd:complexType>
-
- <xsd:attribute name="bar" type="xsd:string"/>
-
-
-
- <!-- Reference to an attribute with a forward reference to a yet
- undeclared type. -->
-
- <xsd:attribute name="baz" type="Baz2"/>
-
- <xsd:complexType name="Baz">
- <xsd:attribute ref="baz"/>
- </xsd:complexType>
-
- <xsd:simpleType name="Baz2">
- <xsd:restriction base="xsd:string"/>
- </xsd:simpleType>
-
-</xsd:schema>
diff --git a/tests/schema/list/driver.cxx b/tests/schema/list/driver.cxx
deleted file mode 100644
index 7bd46e9..0000000
--- a/tests/schema/list/driver.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "test.hxx"
-
-typedef xmlns::test::IntList<void, int> IntListImpl;
-typedef xmlns::test::IntList<void, void> IntListVoidImpl;
-typedef xmlns::test::IntComplex<void, int, char*> IntComplexImpl;
-
-int
-main ()
-{
- IntListImpl int_list_impl;
- IntListVoidImpl int_list_void_impl;
- IntComplexImpl int_complex_impl;
-}
diff --git a/version b/version
deleted file mode 100644
index 672ac56..0000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-4.1.0.a11
diff --git a/xsd-examples/.gitignore b/xsd-examples/.gitignore
new file mode 100644
index 0000000..d87c74c
--- /dev/null
+++ b/xsd-examples/.gitignore
@@ -0,0 +1,32 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.ii
+*.o
+*.obj
+*.so
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
+
+# Test executables.
+#
+driver
+
+# XSD-generated files.
+#
+test.?xx
+
+# Testscript output directories (can be symlinks).
+#
+test
+test-driver
diff --git a/xsd-examples/README b/xsd-examples/README
new file mode 100644
index 0000000..023334d
--- /dev/null
+++ b/xsd-examples/README
@@ -0,0 +1,21 @@
+This package contains a number of examples that show how to use XSD, the
+XML Schema to C++ data binding compiler and the generated C++ Tree and
+Parser classes. See the README files in example directories for more
+information on each example.
+
+The package source code is in the public domain.
+
+The project page is at https://www.codesynthesis.com/projects/xsd/.
+
+The easiest way to build this package is with the bpkg package manager:
+
+$ mkdir xsd-examples/
+$ cd xsd-examples/
+$ bpkg create cc
+$ bpkg build xsd-examples@https://pkg.cppget.org/1/stable
+
+But if you don't want to use the package manager, then you can also build it
+manually using the standard build2 build system.
+
+Send bug reports or any other feedback to the xsd-users@codesynthesis.com
+mailing list.
diff --git a/xsd-examples/UNLICENSE b/xsd-examples/UNLICENSE
new file mode 100644
index 0000000..68a49da
--- /dev/null
+++ b/xsd-examples/UNLICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --git a/xsd-examples/build/.gitignore b/xsd-examples/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/xsd-examples/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/xsd-examples/build/bootstrap.build b/xsd-examples/build/bootstrap.build
new file mode 100644
index 0000000..d98c460
--- /dev/null
+++ b/xsd-examples/build/bootstrap.build
@@ -0,0 +1,9 @@
+# file : build/bootstrap.build
+# license : not copyrighted - public domain
+
+project = xsd-examples
+
+using version
+using config
+using dist
+using test
diff --git a/xsd-examples/build/root.build b/xsd-examples/build/root.build
new file mode 100644
index 0000000..5d7a5b4
--- /dev/null
+++ b/xsd-examples/build/root.build
@@ -0,0 +1,38 @@
+# file : build/root.build
+# license : not copyrighted - public domain
+
+define xsd: file
+xsd{*}: extension = xsd
+
+define xml: file
+xml{*}: extension = xml
+
+define map: file
+map{*}: extension = map
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+
+# Setup the xsd that we are using.
+#
+import xsd = xsd%exe{xsd}
+
+# Every exe{} in this project is by default a test.
+#
+exe{*}: test = true
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/xsd-examples/buildfile b/xsd-examples/buildfile
new file mode 100644
index 0000000..3f8fb1b
--- /dev/null
+++ b/xsd-examples/buildfile
@@ -0,0 +1,4 @@
+# file : buildfile
+# license : not copyrighted - public domain
+
+./: {*/ -build/} doc{README} legal{UNLICENSE} manifest
diff --git a/xsd-examples/cxx/parser/.gitignore b/xsd-examples/cxx/parser/.gitignore
new file mode 100644
index 0000000..5a7b950
--- /dev/null
+++ b/xsd-examples/cxx/parser/.gitignore
@@ -0,0 +1 @@
+*-pskel.?xx
diff --git a/examples/cxx/parser/README b/xsd-examples/cxx/parser/README
index 01906c7..01906c7 100644
--- a/examples/cxx/parser/README
+++ b/xsd-examples/cxx/parser/README
diff --git a/xsd-examples/cxx/parser/buildfile b/xsd-examples/cxx/parser/buildfile
new file mode 100644
index 0000000..fbbd35c
--- /dev/null
+++ b/xsd-examples/cxx/parser/buildfile
@@ -0,0 +1,4 @@
+# file : cxx/parser/buildfile
+# license : not copyrighted - public domain
+
+./: */ doc{README}
diff --git a/xsd-examples/cxx/parser/generated/.gitignore b/xsd-examples/cxx/parser/generated/.gitignore
new file mode 100644
index 0000000..a67418e
--- /dev/null
+++ b/xsd-examples/cxx/parser/generated/.gitignore
@@ -0,0 +1,2 @@
+library-pimpl.?xx
+library-driver.?xx
diff --git a/examples/cxx/parser/generated/README b/xsd-examples/cxx/parser/generated/README
index ca56974..ca56974 100644
--- a/examples/cxx/parser/generated/README
+++ b/xsd-examples/cxx/parser/generated/README
diff --git a/xsd-examples/cxx/parser/generated/buildfile b/xsd-examples/cxx/parser/generated/buildfile
new file mode 100644
index 0000000..5e4adac
--- /dev/null
+++ b/xsd-examples/cxx/parser/generated/buildfile
@@ -0,0 +1,32 @@
+# file : cxx/parser/generated/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx ixx cxx}{library-pskel} \
+ {hxx cxx}{library-pimpl} \
+ { cxx}{library-driver} \
+ $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library-pskel} \
+ {hxx cxx}{library-pimpl} \
+ { cxx}{library-driver}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --generate-print-impl \
+ --generate-test-driver \
+ --force-overwrite \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/parser/generated/library.xml b/xsd-examples/cxx/parser/generated/library.xml
new file mode 100644
index 0000000..1c84b9b
--- /dev/null
+++ b/xsd-examples/cxx/parser/generated/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/library/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP" available="true" >
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/parser/generated/library.xsd b/xsd-examples/cxx/parser/generated/library.xsd
new file mode 100644
index 0000000..4d64a48
--- /dev/null
+++ b/xsd-examples/cxx/parser/generated/library.xsd
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/library/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:string"/>
+ <xsd:element name="died" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF"/> <!-- Book -->
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" use="required"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/examples/cxx/parser/hello/README b/xsd-examples/cxx/parser/hello/README
index 97449de..97449de 100644
--- a/examples/cxx/parser/hello/README
+++ b/xsd-examples/cxx/parser/hello/README
diff --git a/xsd-examples/cxx/parser/hello/buildfile b/xsd-examples/cxx/parser/hello/buildfile
new file mode 100644
index 0000000..2df4a7f
--- /dev/null
+++ b/xsd-examples/cxx/parser/hello/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/hello/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -hello-pskel} {hxx ixx cxx}{hello-pskel} $libs
+
+exe{driver}: xml{hello}: test.input = true
+
+<{hxx ixx cxx}{hello-pskel}>: xsd{hello} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/parser/hello/driver.cxx b/xsd-examples/cxx/parser/hello/driver.cxx
new file mode 100644
index 0000000..024d2fc
--- /dev/null
+++ b/xsd-examples/cxx/parser/hello/driver.cxx
@@ -0,0 +1,67 @@
+// file : cxx/parser/hello/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <iostream>
+
+#include "hello-pskel.hxx"
+
+using namespace std;
+
+struct hello_pimpl: hello_pskel
+{
+ virtual void
+ greeting (const string& greeting)
+ {
+ greeting_ = greeting;
+ }
+
+ virtual void
+ name (const string& name)
+ {
+ cout << greeting_ << ", " << name << "!" << endl;
+ }
+
+private:
+ string greeting_;
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " hello.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::string_pimpl string_p;
+ hello_pimpl hello_p;
+
+ hello_p.greeting_parser (string_p);
+ hello_p.name_parser (string_p);
+
+ // Parse the XML instance document. The second argument to the
+ // document's constructor is the document's root element name.
+ //
+ xml_schema::document doc_p (hello_p, "hello");
+
+ hello_p.pre ();
+ doc_p.parse (argv[1]);
+ hello_p.post_hello ();
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/hello/hello.xml b/xsd-examples/cxx/parser/hello/hello.xml
new file mode 100644
index 0000000..1f5adad
--- /dev/null
+++ b/xsd-examples/cxx/parser/hello/hello.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/hello/hello.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ <greeting>Hello</greeting>
+
+ <name>sun</name>
+ <name>moon</name>
+ <name>world</name>
+
+</hello>
diff --git a/xsd-examples/cxx/parser/hello/hello.xsd b/xsd-examples/cxx/parser/hello/hello.xsd
new file mode 100644
index 0000000..81907d6
--- /dev/null
+++ b/xsd-examples/cxx/parser/hello/hello.xsd
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/hello/hello.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="hello">
+ <xsd:sequence>
+ <xsd:element name="greeting" type="xsd:string"/>
+ <xsd:element name="name" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="hello" type="hello"/>
+
+</xsd:schema>
diff --git a/examples/cxx/parser/library/README b/xsd-examples/cxx/parser/library/README
index 3f515f6..3f515f6 100644
--- a/examples/cxx/parser/library/README
+++ b/xsd-examples/cxx/parser/library/README
diff --git a/xsd-examples/cxx/parser/library/buildfile b/xsd-examples/cxx/parser/library/buildfile
new file mode 100644
index 0000000..40810b3
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/parser/library/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library-pskel} {hxx ixx cxx}{library-pskel} $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library-pskel}>: xsd{library} map{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --type-map $path($<[1]) \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/parser/library/driver.cxx b/xsd-examples/cxx/parser/library/driver.cxx
new file mode 100644
index 0000000..d718e53
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/driver.cxx
@@ -0,0 +1,109 @@
+// file : cxx/parser/library/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <iostream>
+
+#include "library.hxx"
+#include "library-pimpl.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace library;
+
+
+ // Construct the parser.
+ //
+ xml_schema::id_pimpl id_p;
+ xml_schema::idref_pimpl idref_p;
+ xml_schema::string_pimpl string_p;
+ xml_schema::boolean_pimpl boolean_p;
+
+ isbn_pimpl isbn_p;
+
+ title_pimpl title_p;
+ title_p.lang_parser (string_p);
+
+ genre_pimpl genre_p;
+
+ author_pimpl author_p;
+ author_p.parsers (string_p, // name
+ string_p, // born
+ string_p, // died
+ idref_p); // recommends
+
+ book_pimpl book_p;
+ book_p.parsers (isbn_p, // isbn
+ title_p, // title
+ genre_p, // genre
+ author_p, // author
+ boolean_p, // available
+ id_p); // id
+
+ catalog_pimpl catalog_p;
+ catalog_p.book_parser (book_p);
+
+
+ // Parse the XML instance document.
+ //
+ xml_schema::document doc_p (
+ catalog_p,
+ "http://www.codesynthesis.com/library", // root element namespace
+ "catalog"); // root element name
+
+ catalog_p.pre ();
+ doc_p.parse (argv[1]);
+ catalog c (catalog_p.post_catalog ());
+
+
+ // Let's print what we've got.
+ //
+ for (catalog::const_iterator bi (c.begin ()); bi != c.end (); ++bi)
+ {
+ cerr << endl
+ << "ID : " << bi->id () << endl
+ << "ISBN : " << bi->isbn () << endl
+ << "Title : " << bi->title () << endl
+ << "Genre : " << bi->genre () << endl;
+
+ for (book::authors::const_iterator ai (bi->author ().begin ());
+ ai != bi->author ().end ();
+ ++ai)
+ {
+ cerr << "Author : " << ai->name () << endl;
+ cerr << " Born : " << ai->born () << endl;
+
+ if (!ai->died ().empty ())
+ cerr << " Died : " << ai->died () << endl;
+
+ if (!ai->recommends ().empty ())
+ {
+ cerr << " Recommends : " << ai->recommends () << endl;
+ }
+ }
+
+ cerr << "Available : " << std::boolalpha << bi->available () << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/library/library-pimpl.cxx b/xsd-examples/cxx/parser/library/library-pimpl.cxx
new file mode 100644
index 0000000..852b90d
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/library-pimpl.cxx
@@ -0,0 +1,183 @@
+// file : cxx/parser/library/library-pimpl.cxx
+// copyright : not copyrighted - public domain
+
+#include "library-pimpl.hxx"
+
+namespace library
+{
+ // isbn_impl
+ //
+ isbn isbn_pimpl::
+ post_isbn ()
+ {
+ return post_unsigned_int ();
+ }
+
+ // title_pimpl
+ //
+ void title_pimpl::
+ _pre ()
+ {
+ title_.lang ("");
+ }
+
+ void title_pimpl::
+ lang (const std::string& lang)
+ {
+ title_.lang (lang);
+ }
+
+ title title_pimpl::
+ post_title ()
+ {
+ title_.assign (post_string ());
+ return title_;
+ }
+
+ // genre_pimpl
+ //
+ genre genre_pimpl::
+ post_genre ()
+ {
+ genre r (romance);
+ std::string v (post_string ());
+
+ if (v == "romance") r = romance; else
+ if (v == "fiction") r = fiction; else
+ if (v == "horror") r = horror; else
+ if (v == "history") r = history; else
+ if (v == "philosophy") r = philosophy;
+
+ return r;
+ }
+
+ // person_pimpl
+ //
+ void person_pimpl::
+ _pre ()
+ {
+ person_.died ("");
+ }
+
+ void person_pimpl::
+ name (const std::string& name)
+ {
+ person_.name (name);
+ }
+
+ void person_pimpl::
+ born (const std::string& born)
+ {
+ person_.born (born);
+ }
+
+ void person_pimpl::
+ died (const std::string& died)
+ {
+ person_.died (died);
+ }
+
+ person person_pimpl::
+ post_person ()
+ {
+ return person_;
+ }
+
+ // author_pimpl
+ //
+ void author_pimpl::
+ _pre ()
+ {
+ person_pimpl::_pre ();
+ author_.recommends ("");
+ }
+
+ void author_pimpl::
+ recommends (const std::string& recommends)
+ {
+ author_.recommends (recommends);
+ }
+
+ author author_pimpl::
+ post_author ()
+ {
+ person p (post_person ());
+
+ author_.name (p.name ());
+ author_.born (p.born ());
+ author_.died (p.died ());
+
+ return author_;
+ }
+
+ // book_pimpl
+ //
+ void book_pimpl::
+ _pre ()
+ {
+ book_.author ().clear ();
+ }
+
+ void book_pimpl::
+ isbn (library::isbn isbn)
+ {
+ book_.isbn (isbn);
+ }
+
+ void book_pimpl::
+ title (const library::title& title)
+ {
+ book_.title (title);
+ }
+
+ void book_pimpl::
+ genre (library::genre genre)
+ {
+ book_.genre (genre);
+ }
+
+ void book_pimpl::
+ author (const library::author& author)
+ {
+ book_.author ().push_back (author);
+ }
+
+ void book_pimpl::
+ available (bool available)
+ {
+ book_.available (available);
+ }
+
+ void book_pimpl::
+ id (const std::string& id)
+ {
+ book_.id (id);
+ }
+
+ book book_pimpl::
+ post_book ()
+ {
+ return book_;
+ }
+
+ // catalog_pimpl
+ //
+ void catalog_pimpl::
+ _pre ()
+ {
+ catalog_.clear ();
+ }
+
+ void catalog_pimpl::
+ book (const library::book& book)
+ {
+ catalog_.push_back (book);
+ }
+
+ catalog catalog_pimpl::
+ post_catalog ()
+ {
+ return catalog_;
+ }
+}
+
diff --git a/xsd-examples/cxx/parser/library/library-pimpl.hxx b/xsd-examples/cxx/parser/library/library-pimpl.hxx
new file mode 100644
index 0000000..fb8ba24
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/library-pimpl.hxx
@@ -0,0 +1,135 @@
+// file : cxx/parser/library/library-pimpl.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef LIBRARY_PIMPL_HXX
+#define LIBRARY_PIMPL_HXX
+
+#include "library.hxx"
+#include "library-pskel.hxx"
+
+namespace library
+{
+ //
+ //
+ struct isbn_pimpl: isbn_pskel, xml_schema::unsigned_int_pimpl
+ {
+ virtual isbn
+ post_isbn ();
+ };
+
+ //
+ //
+ struct title_pimpl: title_pskel, xml_schema::string_pimpl
+ {
+ virtual void
+ _pre ();
+
+ virtual void
+ lang (const std::string&);
+
+ virtual title
+ post_title ();
+
+ private:
+ title title_;
+ };
+
+ //
+ //
+ struct genre_pimpl: genre_pskel, xml_schema::string_pimpl
+ {
+ virtual genre
+ post_genre ();
+ };
+
+ //
+ //
+ struct person_pimpl: virtual person_pskel
+ {
+ virtual void
+ _pre ();
+
+ virtual void
+ name (const std::string&);
+
+ virtual void
+ born (const std::string&);
+
+ virtual void
+ died (const std::string&);
+
+ virtual person
+ post_person ();
+
+ private:
+ person person_;
+ };
+
+ //
+ //
+ struct author_pimpl: author_pskel, person_pimpl
+ {
+ virtual void
+ _pre ();
+
+ virtual void
+ recommends (const std::string&);
+
+ virtual author
+ post_author ();
+
+ private:
+ author author_;
+ };
+
+ //
+ //
+ struct book_pimpl: book_pskel
+ {
+ virtual void
+ _pre ();
+
+ virtual void
+ isbn (library::isbn);
+
+ virtual void
+ title (const library::title&);
+
+ virtual void
+ genre (library::genre);
+
+ virtual void
+ author (const library::author&);
+
+ virtual void
+ available (bool);
+
+ virtual void
+ id (const std::string&);
+
+ virtual book
+ post_book ();
+
+ private:
+ book book_;
+ };
+
+ //
+ //
+ struct catalog_pimpl: catalog_pskel
+ {
+ virtual void
+ _pre ();
+
+ virtual void
+ book (const library::book&);
+
+ virtual catalog
+ post_catalog ();
+
+ private:
+ catalog catalog_;
+ };
+}
+
+#endif // LIBRARY_PIMPL_HXX
diff --git a/xsd-examples/cxx/parser/library/library.hxx b/xsd-examples/cxx/parser/library/library.hxx
new file mode 100644
index 0000000..844e474
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/library.hxx
@@ -0,0 +1,241 @@
+// file : cxx/parser/library/library.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef LIBRARY_HXX
+#define LIBRARY_HXX
+
+#include <string>
+#include <vector>
+
+namespace library
+{
+ //
+ //
+ typedef unsigned int isbn;
+
+
+ //
+ //
+ struct title: std::string
+ {
+ // lang
+ //
+ const std::string&
+ lang () const
+ {
+ return lang_;
+ }
+
+ void
+ lang (const std::string& lang)
+ {
+ lang_ = lang;
+ }
+
+ private:
+ std::string lang_;
+ };
+
+
+ //
+ //
+ enum genre
+ {
+ romance,
+ fiction,
+ horror,
+ history,
+ philosophy
+ };
+
+
+ //
+ //
+ struct person
+ {
+ // name
+ //
+ const std::string&
+ name () const
+ {
+ return name_;
+ }
+
+ void
+ name (const std::string& name)
+ {
+ name_ = name;
+ }
+
+ // born
+ //
+ const std::string&
+ born () const
+ {
+ return born_;
+ }
+
+ void
+ born (const std::string& born)
+ {
+ born_ = born;
+ }
+
+
+ // died
+ //
+ const std::string&
+ died () const
+ {
+ return died_;
+ }
+
+ void
+ died (const std::string& died)
+ {
+ died_ = died;
+ }
+
+ private:
+ std::string name_;
+ std::string born_;
+ std::string died_;
+ };
+
+
+ //
+ //
+ struct author: person
+ {
+ // recommends
+ //
+ const std::string&
+ recommends () const
+ {
+ return recommends_;
+ }
+
+ void
+ recommends (const std::string& recommends)
+ {
+ recommends_ = recommends;
+ }
+
+ private:
+ std::string recommends_;
+ };
+
+
+ //
+ //
+ struct book
+ {
+ // isbn
+ //
+ library::isbn
+ isbn () const
+ {
+ return isbn_;
+ }
+
+ void
+ isbn (const library::isbn& isbn)
+ {
+ isbn_ = isbn;
+ }
+
+
+ // title
+ //
+ library::title
+ title () const
+ {
+ return title_;
+ }
+
+ void
+ title (const library::title& title)
+ {
+ title_ = title;
+ }
+
+
+ // genre
+ //
+ library::genre
+ genre () const
+ {
+ return genre_;
+ }
+
+ void
+ genre (const library::genre& genre)
+ {
+ genre_ = genre;
+ }
+
+
+ // author
+ //
+ typedef std::vector<library::author> authors;
+
+ const authors&
+ author () const
+ {
+ return author_;
+ }
+
+ authors&
+ author ()
+ {
+ return author_;
+ }
+
+
+ // available
+ //
+ bool
+ available () const
+ {
+ return available_;
+ }
+
+ void
+ available (bool available)
+ {
+ available_ = available;
+ }
+
+
+ // id
+ //
+ const std::string&
+ id () const
+ {
+ return id_;
+ }
+
+ void
+ id (const std::string& id)
+ {
+ id_ = id;
+ }
+
+ private:
+ library::isbn isbn_;
+ library::title title_;
+ library::genre genre_;
+
+ authors author_;
+
+ bool available_;
+ std::string id_;
+ };
+
+
+ //
+ //
+ typedef std::vector<book> catalog;
+}
+
+#endif // LIBRARY_HXX
diff --git a/xsd-examples/cxx/parser/library/library.map b/xsd-examples/cxx/parser/library/library.map
new file mode 100644
index 0000000..4bca410
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/library.map
@@ -0,0 +1,15 @@
+# file : cxx/parser/library/library.map
+# copyright : not copyrighted - public domain
+
+namespace http://www.codesynthesis.com/library ::library
+{
+ include "library.hxx";
+
+ isbn isbn isbn;
+ title title;
+ genre genre genre;
+ person person;
+ author author;
+ book book;
+ catalog catalog;
+}
diff --git a/xsd-examples/cxx/parser/library/library.xml b/xsd-examples/cxx/parser/library/library.xml
new file mode 100644
index 0000000..1c84b9b
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/library/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP" available="true" >
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/parser/library/library.xsd b/xsd-examples/cxx/parser/library/library.xsd
new file mode 100644
index 0000000..4d64a48
--- /dev/null
+++ b/xsd-examples/cxx/parser/library/library.xsd
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/library/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:string"/>
+ <xsd:element name="died" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF"/> <!-- Book -->
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" use="required"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/examples/cxx/parser/mixed/README b/xsd-examples/cxx/parser/mixed/README
index 23ace6f..23ace6f 100644
--- a/examples/cxx/parser/mixed/README
+++ b/xsd-examples/cxx/parser/mixed/README
diff --git a/xsd-examples/cxx/parser/mixed/anchor.hxx b/xsd-examples/cxx/parser/mixed/anchor.hxx
new file mode 100644
index 0000000..6cc6cd4
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixed/anchor.hxx
@@ -0,0 +1,33 @@
+// file : cxx/parser/mixed/anchor.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef ANCHOR_HXX
+#define ANCHOR_HXX
+
+#include <string>
+
+struct anchor
+{
+ anchor (const std::string& text, const std::string& uri)
+ : uri_ (uri), text_ (text)
+ {
+ }
+
+ const std::string&
+ text () const
+ {
+ return text_;
+ }
+
+ const std::string&
+ uri () const
+ {
+ return uri_;
+ }
+
+private:
+ std::string uri_;
+ std::string text_;
+};
+
+#endif // ANCHOR_HXX
diff --git a/xsd-examples/cxx/parser/mixed/buildfile b/xsd-examples/cxx/parser/mixed/buildfile
new file mode 100644
index 0000000..0079444
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixed/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/parser/mixed/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -text-pskel} {hxx ixx cxx}{text-pskel} $libs
+
+exe{driver}: xml{text}: test.input = true
+
+<{hxx ixx cxx}{text-pskel}>: xsd{text} map{text} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --type-map $path($<[1]) \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/parser/mixed/driver.cxx b/xsd-examples/cxx/parser/mixed/driver.cxx
new file mode 100644
index 0000000..c00bfd7
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixed/driver.cxx
@@ -0,0 +1,100 @@
+// file : cxx/parser/mixed/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <vector>
+#include <iostream>
+
+#include "anchor.hxx"
+#include "text-pskel.hxx"
+
+using namespace std;
+
+struct anchor_pimpl: anchor_pskel, xml_schema::string_pimpl
+{
+ virtual void
+ href (const std::string& uri)
+ {
+ uri_ = uri;
+ }
+
+ virtual anchor
+ post_anchor ()
+ {
+ return anchor (post_string (), uri_);
+ }
+
+private:
+ std::string uri_;
+};
+
+
+struct text_pimpl: text_pskel
+{
+ virtual void
+ a (const anchor& a)
+ {
+ cout << a.text () << "[" << anchors_.size () << "]";
+ anchors_.push_back (a);
+ }
+
+ virtual void
+ _any_characters (const xml_schema::ro_string& s)
+ {
+ cout << s;
+ }
+
+ virtual void
+ post_text ()
+ {
+ for (anchors::const_iterator i (anchors_.begin ());
+ i != anchors_.end ();
+ ++i)
+ {
+ cout << "[" << i - anchors_.begin () << "] " << i->uri () << endl;
+ }
+ }
+
+private:
+ typedef vector<anchor> anchors;
+ anchors anchors_;
+};
+
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " text.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::string_pimpl string_p;
+ anchor_pimpl anchor_p;
+ text_pimpl text_p;
+
+ anchor_p.href_parser (string_p);
+ text_p.a_parser (anchor_p);
+
+ xml_schema::document doc_p (text_p, "text");
+
+ text_p.pre ();
+ doc_p.parse (argv[1]);
+ text_p.post_text ();
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/mixed/text.map b/xsd-examples/cxx/parser/mixed/text.map
new file mode 100644
index 0000000..0daa79b
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixed/text.map
@@ -0,0 +1,6 @@
+# file : cxx/parser/mixed/text.map
+# copyright : not copyrighted - public domain
+
+include "anchor.hxx";
+
+anchor ::anchor;
diff --git a/xsd-examples/cxx/parser/mixed/text.xml b/xsd-examples/cxx/parser/mixed/text.xml
new file mode 100644
index 0000000..1ce4eec
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixed/text.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/text/text.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="text.xsd">
+
+The first paragraph of this text talks about <a href="http://en.wikipedia.org/wiki/time">time</a>.
+
+And this paragraph talks about <a href="http://en.wikipedia.org/wiki/space">space</a>.
+
+</text>
diff --git a/xsd-examples/cxx/parser/mixed/text.xsd b/xsd-examples/cxx/parser/mixed/text.xsd
new file mode 100644
index 0000000..e9d6e39
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixed/text.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/mixed/text.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="anchor">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="href" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="text" mixed="true">
+ <xsd:sequence>
+ <xsd:element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="text" type="text"/>
+
+</xsd:schema>
diff --git a/examples/cxx/parser/mixin/README b/xsd-examples/cxx/parser/mixin/README
index 343e379..343e379 100644
--- a/examples/cxx/parser/mixin/README
+++ b/xsd-examples/cxx/parser/mixin/README
diff --git a/xsd-examples/cxx/parser/mixin/buildfile b/xsd-examples/cxx/parser/mixin/buildfile
new file mode 100644
index 0000000..4d4d751
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixin/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/parser/mixin/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -schema-pskel} {hxx ixx cxx}{schema-pskel} $libs
+
+exe{driver}: xml{instance}: test.input = true
+
+<{hxx ixx cxx}{schema-pskel}>: xsd{schema} map{schema} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --type-map $path($<[1]) \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/parser/mixin/driver.cxx b/xsd-examples/cxx/parser/mixin/driver.cxx
new file mode 100644
index 0000000..7a5ac94
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixin/driver.cxx
@@ -0,0 +1,103 @@
+// file : cxx/parser/mixin/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory>
+#include <iostream>
+
+#include "types.hxx"
+#include "schema-pskel.hxx"
+
+using namespace std;
+
+struct base_pimpl: virtual base_pskel
+{
+ virtual void
+ pre ()
+ {
+ base_.reset (new ::base);
+ }
+
+ virtual void
+ a (bool v)
+ {
+ base_->a (v);
+ }
+
+ virtual base*
+ post_base ()
+ {
+ return base_.release ();
+ }
+
+protected:
+ unique_ptr<base> base_;
+};
+
+// Implement derived parser by mixing-in base's implementation.
+//
+struct derived_pimpl: derived_pskel, base_pimpl
+{
+ virtual void
+ pre ()
+ {
+ // Override base's pre() with the new implementation that
+ // instantiates derived instead of base.
+ //
+ base_.reset (new ::derived);
+ }
+
+ virtual void
+ b (int v)
+ {
+ // We could also store a pointer to derived in derived_impl to
+ // avoid casting.
+ //
+ static_cast< ::derived* > (base_.get ())->b (v);
+ }
+
+ virtual derived*
+ post_derived ()
+ {
+ return static_cast<derived*> (base_.release ());
+ }
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " instance.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::boolean_pimpl bool_p;
+ xml_schema::int_pimpl int_p;
+ derived_pimpl derived_p;
+
+ derived_p.parsers (bool_p, int_p);
+
+ xml_schema::document doc_p (derived_p, "root");
+
+ derived_p.pre ();
+ doc_p.parse (argv[1]);
+ unique_ptr<derived> d (derived_p.post_derived ());
+
+ cerr << "a: " << boolalpha << d->a () << endl;
+ cerr << "b: " << d->b () << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/mixin/instance.xml b/xsd-examples/cxx/parser/mixin/instance.xml
new file mode 100644
index 0000000..90e2757
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixin/instance.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/mixin/instance.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="schema.xsd">
+
+ <a>true</a>
+ <b>1</b>
+
+</root>
diff --git a/xsd-examples/cxx/parser/mixin/schema.map b/xsd-examples/cxx/parser/mixin/schema.map
new file mode 100644
index 0000000..a6ffa76
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixin/schema.map
@@ -0,0 +1,7 @@
+# file : cxx/parser/mixin/schema.map
+# copyright : not copyrighted - public domain
+
+include "types.hxx";
+
+base ::base*;
+derived ::derived*;
diff --git a/xsd-examples/cxx/parser/mixin/schema.xsd b/xsd-examples/cxx/parser/mixin/schema.xsd
new file mode 100644
index 0000000..891241e
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixin/schema.xsd
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/mixin/schema.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="base">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:boolean"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="derived">
+ <xsd:complexContent>
+ <xsd:extension base="base">
+ <xsd:sequence>
+ <xsd:element name="b" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="root" type="derived"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/parser/mixin/types.hxx b/xsd-examples/cxx/parser/mixin/types.hxx
new file mode 100644
index 0000000..887b29e
--- /dev/null
+++ b/xsd-examples/cxx/parser/mixin/types.hxx
@@ -0,0 +1,43 @@
+// file : cxx/parser/mixin/types.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef TYPES_HXX
+#define TYPES_HXX
+
+struct base
+{
+ bool
+ a () const
+ {
+ return a_;
+ }
+
+ void
+ a (bool v)
+ {
+ a_ = v;
+ }
+
+private:
+ bool a_;
+};
+
+struct derived: base
+{
+ int
+ b () const
+ {
+ return b_;
+ }
+
+ void
+ b (int v)
+ {
+ b_ = v;
+ }
+
+private:
+ int b_;
+};
+
+#endif // TYPES_HXX
diff --git a/examples/cxx/parser/multiroot/README b/xsd-examples/cxx/parser/multiroot/README
index 041dfec..041dfec 100644
--- a/examples/cxx/parser/multiroot/README
+++ b/xsd-examples/cxx/parser/multiroot/README
diff --git a/xsd-examples/cxx/parser/multiroot/balance.xml b/xsd-examples/cxx/parser/multiroot/balance.xml
new file mode 100644
index 0000000..60a6882
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/balance.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/multiroot/balance.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:balance xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+
+</p:balance>
diff --git a/xsd-examples/cxx/parser/multiroot/buildfile b/xsd-examples/cxx/parser/multiroot/buildfile
new file mode 100644
index 0000000..6b0f604
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/multiroot/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README} xml{balance deposit withdraw}
+
+exe{driver}: {hxx cxx}{* -protocol-pskel} {hxx ixx cxx}{protocol-pskel} $libs \
+ testscript
+
+<{hxx ixx cxx}{protocol-pskel}>: xsd{protocol} map{protocol} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --type-map $path($<[1]) \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/parser/multiroot/deposit.xml b/xsd-examples/cxx/parser/multiroot/deposit.xml
new file mode 100644
index 0000000..3d32c59
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/deposit.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/multiroot/deposit.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:deposit xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+ <amount>1000000</amount>
+
+</p:deposit>
diff --git a/xsd-examples/cxx/parser/multiroot/driver.cxx b/xsd-examples/cxx/parser/multiroot/driver.cxx
new file mode 100644
index 0000000..ea854b9
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/driver.cxx
@@ -0,0 +1,161 @@
+// file : cxx/parser/multiroot/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "protocol.hxx"
+#include "protocol-pimpl.hxx"
+
+using std::cerr;
+using std::endl;
+using xml_schema::ro_string;
+
+namespace protocol
+{
+ // Customize the xml_schema::document object to handle our protocol
+ // vocabulary with multiple root elements.
+ //
+ class document: public xml_schema::document
+ {
+ public:
+ document (balance_pskel& balance_p, withdraw_pskel& withdraw_p)
+ : balance_p_ (balance_p), withdraw_p_ (withdraw_p)
+ {
+ }
+
+ request*
+ result ()
+ {
+ return result_.release ();
+ }
+
+ protected:
+ // This function is called to obtain the root element type parser.
+ // If the returned pointed is 0 then the whole document content
+ // is ignored. The type argument is used to handle polymorphic
+ // XML documents and is not used in this example (see the polyroot
+ // example for more information on this argument).
+ //
+ virtual xml_schema::parser_base*
+ start_root_element (const ro_string& ns,
+ const ro_string& name,
+ const ro_string* /* type */)
+ {
+ if (ns == "http://www.codesynthesis.com/protocol")
+ {
+ if (name == "balance")
+ {
+ balance_p_.pre ();
+
+ return &balance_p_;
+ }
+ else if (name == "withdraw")
+ {
+ balance_p_.pre ();
+
+ return &withdraw_p_;
+ }
+ }
+
+ cerr << "ignoring unknown request: " << ns << "#" << name << endl;
+
+ return 0;
+ }
+
+ // This function is called to indicate the completion of document
+ // parsing. The parser argument contains the pointer returned by
+ // start_root_element.
+ //
+ virtual void
+ end_root_element (const ro_string& /* ns */,
+ const ro_string& /* name */,
+ xml_schema::parser_base* parser)
+ {
+ // We could have handled the result directly in this function
+ // instead of storing it in the result_ variable.
+ //
+ if (parser == &balance_p_)
+ {
+ result_.reset (balance_p_.post_balance ());
+ }
+ else if (parser == &withdraw_p_)
+ {
+ result_.reset (withdraw_p_.post_withdraw ());
+ }
+ else
+ result_.reset (0);
+ }
+
+
+ private:
+ std::unique_ptr<request> result_;
+
+ balance_pskel& balance_p_;
+ withdraw_pskel& withdraw_p_;
+ };
+}
+
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " request.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace protocol;
+
+ // Construct the parser.
+ //
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+
+ balance_pimpl balance_p;
+ withdraw_pimpl withdraw_p;
+
+ balance_p.parsers (unsigned_int_p); // account
+
+ withdraw_p.parsers (unsigned_int_p, // account
+ unsigned_int_p); // amount
+
+ // Parse the XML instance document.
+ //
+ document doc_p (balance_p, withdraw_p);
+
+ // pre() and post() will be called as part of the start_root_element()
+ // and end_root_element() calls.
+ //
+ doc_p.parse (argv[1]);
+ std::unique_ptr<request> r (doc_p.result ());
+
+ // Let's print what we've got.
+ //
+ if (balance* b = dynamic_cast<balance*> (r.get ()))
+ {
+ cerr << "balance request for acc# " << b->account () << endl;
+ }
+ else if (withdraw* w = dynamic_cast<withdraw*> (r.get ()))
+ {
+ cerr << "withdrawal request for acc# " << w->account () << ", "
+ << "amount: " << w->amount () << endl;
+ }
+ else
+ {
+ cerr << "unknown request" << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/multiroot/protocol-pimpl.cxx b/xsd-examples/cxx/parser/multiroot/protocol-pimpl.cxx
new file mode 100644
index 0000000..05fbd31
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/protocol-pimpl.cxx
@@ -0,0 +1,46 @@
+// file : cxx/parser/multiroot/protocol-pimpl.cxx
+// copyright : not copyrighted - public domain
+
+#include "protocol-pimpl.hxx"
+
+namespace protocol
+{
+ // request_pimpl
+ //
+ void request_pimpl::
+ account (unsigned int account)
+ {
+ account_ = account;
+ }
+
+ request* request_pimpl::
+ post_request ()
+ {
+ // This parser is never used directly.
+ //
+ return 0;
+ }
+
+ // balance_pimpl
+ //
+ balance* balance_pimpl::
+ post_balance ()
+ {
+ return new balance (account_);
+ }
+
+ // withdraw_pimpl
+ //
+ void withdraw_pimpl::
+ amount (unsigned int amount)
+ {
+ amount_ = amount;
+ }
+
+ withdraw* withdraw_pimpl::
+ post_withdraw ()
+ {
+ return new withdraw (account_, amount_);
+ }
+}
+
diff --git a/xsd-examples/cxx/parser/multiroot/protocol-pimpl.hxx b/xsd-examples/cxx/parser/multiroot/protocol-pimpl.hxx
new file mode 100644
index 0000000..1b53604
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/protocol-pimpl.hxx
@@ -0,0 +1,48 @@
+// file : cxx/parser/multiroot/protocol-pimpl.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef PROTOCOL_PIMPL_HXX
+#define PROTOCOL_PIMPL_HXX
+
+#include "protocol.hxx"
+#include "protocol-pskel.hxx"
+
+namespace protocol
+{
+ class request_pimpl: public virtual request_pskel
+ {
+ public:
+ virtual void
+ account (unsigned int);
+
+ virtual request*
+ post_request ();
+
+ protected:
+ unsigned int account_;
+ };
+
+ class balance_pimpl: public virtual balance_pskel,
+ public request_pimpl
+ {
+ public:
+ virtual balance*
+ post_balance ();
+ };
+
+ class withdraw_pimpl: public virtual withdraw_pskel,
+ public request_pimpl
+ {
+ public:
+ virtual void
+ amount (unsigned int);
+
+ virtual withdraw*
+ post_withdraw ();
+
+ private:
+ unsigned int amount_;
+ };
+}
+
+#endif // PROTOCOL_PIMPL_HXX
diff --git a/xsd-examples/cxx/parser/multiroot/protocol.hxx b/xsd-examples/cxx/parser/multiroot/protocol.hxx
new file mode 100644
index 0000000..3c1a10a
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/protocol.hxx
@@ -0,0 +1,61 @@
+// file : cxx/parser/multiroot/protocol.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef PROTOCOL_HXX
+#define PROTOCOL_HXX
+
+namespace protocol
+{
+ class request
+ {
+ public:
+ virtual
+ ~request ()
+ {
+ }
+
+ unsigned int
+ account () const
+ {
+ return account_;
+ }
+
+ protected:
+ request (unsigned int account)
+ : account_ (account)
+ {
+ }
+
+ private:
+ unsigned int account_;
+ };
+
+ class balance: public request
+ {
+ public:
+ balance (unsigned int account)
+ : request (account)
+ {
+ }
+ };
+
+ class withdraw: public request
+ {
+ public:
+ withdraw (unsigned int account, unsigned int amount)
+ : request (account), amount_ (amount)
+ {
+ }
+
+ unsigned int
+ amount () const
+ {
+ return amount_;
+ }
+
+ private:
+ unsigned int amount_;
+ };
+}
+
+#endif // PROTOCOL_HXX
diff --git a/xsd-examples/cxx/parser/multiroot/protocol.map b/xsd-examples/cxx/parser/multiroot/protocol.map
new file mode 100644
index 0000000..90536ea
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/protocol.map
@@ -0,0 +1,11 @@
+# file : cxx/parser/multiroot/protocol.map
+# copyright : not copyrighted - public domain
+
+namespace http://www.codesynthesis.com/protocol ::protocol
+{
+ include "protocol.hxx";
+
+ request request*;
+ balance balance*;
+ withdraw withdraw*;
+}
diff --git a/xsd-examples/cxx/parser/multiroot/protocol.xsd b/xsd-examples/cxx/parser/multiroot/protocol.xsd
new file mode 100644
index 0000000..a33fed2
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/protocol.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/multiroot/protocol.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:p="http://www.codesynthesis.com/protocol"
+ targetNamespace="http://www.codesynthesis.com/protocol">
+
+ <xsd:complexType name="request">
+ <xsd:sequence>
+ <xsd:element name="account" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="balance">
+ <xsd:complexContent>
+ <xsd:extension base="p:request"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="withdraw">
+ <xsd:complexContent>
+ <xsd:extension base="p:request">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="deposit">
+ <xsd:complexContent>
+ <xsd:extension base="p:request">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="balance" type="p:balance"/>
+ <xsd:element name="withdraw" type="p:withdraw"/>
+ <xsd:element name="deposit" type="p:deposit"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/parser/multiroot/testscript b/xsd-examples/cxx/parser/multiroot/testscript
new file mode 100644
index 0000000..76329f7
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/testscript
@@ -0,0 +1,6 @@
+# file : cxx/parser/multiroot/testscript
+# license : not copyrighted - public domain
+
+$* $src_base/balance.xml 2>| : balance
+$* $src_base/deposit.xml 2>| : deposit
+$* $src_base/withdraw.xml 2>| : withdraw
diff --git a/xsd-examples/cxx/parser/multiroot/withdraw.xml b/xsd-examples/cxx/parser/multiroot/withdraw.xml
new file mode 100644
index 0000000..8b2efe0
--- /dev/null
+++ b/xsd-examples/cxx/parser/multiroot/withdraw.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/multiroot/withdraw.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:withdraw xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+ <amount>1000000</amount>
+
+</p:withdraw>
diff --git a/xsd-examples/cxx/parser/performance/.gitignore b/xsd-examples/cxx/parser/performance/.gitignore
new file mode 100644
index 0000000..19c9761
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/.gitignore
@@ -0,0 +1,7 @@
+driver-expat
+driver-xerces
+gen
+
+# Testscript output directory (can be symlink).
+#
+test-gen
diff --git a/xsd-examples/cxx/parser/performance/README b/xsd-examples/cxx/parser/performance/README
new file mode 100644
index 0000000..46137d0
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/README
@@ -0,0 +1,46 @@
+This example measures the performance of XML parsing in the C++/Parser
+mapping. It also shows how to structure your code to achieve the maximum
+performance for this operation.
+
+The example consists of the following files:
+
+test.xsd
+ XML Schema which describes the test vocabulary.
+
+test-50k.xml
+ Test XML document.
+
+gen.cxx
+ Program to generate a test document of desired size.
+
+time.hxx
+time.cxx
+ Class definition that represents time.
+
+test-pskel.hxx
+test-pskel.ixx
+test-pskel.cxx
+ Parser skeletons generated by the XSD compiler from test.xsd.
+
+driver.cxx
+ Driver for the example. It first parses the command line arguments
+ and reads the entire document into a memory buffer. It then creates
+ a SAX parser and pre-parses and caches the schema if validation is
+ enabled (Xerces-C++ only). Finally, it runs the performance
+ measurement loop which on each iteration parses the XML document
+ from the in-memory buffer.
+
+To run the example on a test XML document simply execute:
+
+$ ./driver test-50k.xml
+
+The -v option can be used to turn on validation in the underlying XML
+parser (only makes sense for Xerces-C++, off by default). The -i option
+can be used to specify the number of parsing iterations (1000 by default).
+For example:
+
+$ ./driver -v -i 100 test-50k.xml
+
+To generate the test document execute, for example:
+
+$ ./gen 633 test-100k.xml
diff --git a/xsd-examples/cxx/parser/performance/buildfile b/xsd-examples/cxx/parser/performance/buildfile
new file mode 100644
index 0000000..10111d6
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/buildfile
@@ -0,0 +1,57 @@
+# file : cxx/parser/performance/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+
+import libxerces = libxerces-c%lib{xerces-c}
+import libexpat = libexpat%lib{expat}
+
+./: doc{README}
+
+# exe{driver-{xerces,expat}}
+#
+for p: 'xerces' 'expat'
+{
+ # Make sure that obje{time} doesn't depend on the parser library that varies
+ # for different exe{driver-*} targets. Think of -I... options passed to the
+ # compiler while compiling time.cxx, which would vary depending on exe
+ # target time.cxx is a prerequisite of.
+ #
+ ./: exe{driver-$p}: obje{driver-$p time} \
+ {hxx ixx cxx}{test-$p-pskel} \
+ $libs $(lib$p)
+
+ exe{driver-$p}: xml{test-50k}: test.input = true
+
+ obje{driver-$p}: cxx{driver} $libs $(lib$p)
+
+ <{hxx ixx cxx}{test-$p-pskel}>: xsd{test} $xsd
+ {
+ # Note: we can't use $p in the buildscript since it will be substituted by
+ # the latest $p value.
+ #
+ parser = $p
+ }
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -$parser-pskel \
+ --xml-parser $parser \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+obje{time}: {hxx cxx}{time}
+
+# exe{gen}
+#
+./: exe{gen}: cxx{gen} testscript{gen}
+
+# Build options.
+#
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+obje{driver-xerces}: cxx.poptions += -DXERCES_PARSER
diff --git a/xsd-examples/cxx/parser/performance/driver.cxx b/xsd-examples/cxx/parser/performance/driver.cxx
new file mode 100644
index 0000000..4ac0265
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/driver.cxx
@@ -0,0 +1,346 @@
+// file : cxx/parser/performance/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <fstream>
+#include <sstream>
+#include <iostream>
+
+#include "time.hxx"
+
+#ifdef XERCES_PARSER
+# include "test-xerces-pskel.hxx"
+
+# include <xercesc/sax2/SAX2XMLReader.hpp>
+# include <xercesc/sax2/XMLReaderFactory.hpp>
+# include <xercesc/framework/MemBufInputSource.hpp>
+# include <xercesc/validators/common/Grammar.hpp>
+# include <xercesc/util/PlatformUtils.hpp>
+# include <xercesc/util/XMLUni.hpp>
+
+# include <xsd/cxx/xml/sax/bits/error-handler-proxy.hxx>
+# include <xsd/cxx/parser/error-handler.hxx>
+#else
+# include "test-expat-pskel.hxx"
+#endif
+
+// No-op parser implementation.
+//
+namespace test
+{
+ struct enum_pimpl: enum_pskel, xml_schema::string_pimpl
+ {
+ virtual void
+ post_enum ()
+ {
+ }
+ };
+
+ struct record_pimpl: record_pskel
+ {
+ virtual void
+ int_ (unsigned int)
+ {
+ }
+
+ virtual void
+ double_ (double)
+ {
+ }
+
+ virtual void
+ name (const std::string&)
+ {
+ }
+
+ virtual void
+ string (const std::string&)
+ {
+ }
+
+ virtual void
+ choice1 (const std::string&)
+ {
+ }
+
+ virtual void
+ choice2 (const std::string&)
+ {
+ }
+
+ virtual void
+ choice3 (const std::string&)
+ {
+ }
+
+ virtual void
+ choice4 (const std::string&)
+ {
+ }
+
+ virtual void
+ apple (bool)
+ {
+ }
+
+ virtual void
+ orange (unsigned long long)
+ {
+ }
+ };
+
+ struct root_pimpl: root_pskel
+ {
+ };
+}
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ cerr << "usage: " << argv[0] << " [-v] [-i <count>] test.xml" << endl
+ << "\t -v turn on validation (default is off)" << endl
+ << "\t -i number of iterations to perform (default is 1000)" << endl;
+ return 1;
+ }
+
+ bool validate (false);
+ unsigned long iter (1000);
+ const char* file (0);
+
+ // Parse command line arguments.
+ //
+ for (int i (1); i < argc; ++i)
+ {
+ string arg (argv[i]);
+
+ if (arg == "-v")
+ {
+ validate = true;
+ }
+ else if (arg == "-i")
+ {
+ if (++i == argc)
+ {
+ cerr << "argument expected for the -i option" << endl;
+ return 1;
+ }
+
+ iter = 0;
+ istringstream is (argv[i]);
+ is >> iter;
+
+ if (iter == 0)
+ {
+ cerr << "invalid argument for the -i option" << endl;
+ return 1;
+ }
+ }
+ else
+ {
+ file = argv[i];
+ break;
+ }
+ }
+
+ if (file == 0)
+ {
+ cerr << "no input file specified" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Instantiate and connect parsers.
+ //
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+ xml_schema::double_pimpl double_p;
+ xml_schema::ncname_pimpl ncname_p;
+ xml_schema::string_pimpl string_p;
+ xml_schema::boolean_pimpl boolean_p;
+ xml_schema::unsigned_long_pimpl unsigned_long_p;
+
+ test::enum_pimpl enum_p;
+ test::record_pimpl record_p;
+ test::root_pimpl root_p;
+
+ record_p.parsers (unsigned_int_p,
+ double_p,
+ ncname_p,
+ string_p,
+ string_p,
+ string_p,
+ string_p,
+ string_p,
+ enum_p,
+ boolean_p,
+ unsigned_long_p);
+
+ root_p.parsers (record_p);
+
+ // Read the fine into in-memory buffer.
+ //
+ ifstream ifs;
+ ifs.exceptions (ios_base::failbit);
+ ifs.open (file, ios::in | ios::ate);
+
+ size_t size (ifs.tellg ());
+ ifs.seekg (0, ios::beg);
+
+ char* buf = new char[size];
+ ifs.read (buf, size);
+ ifs.close ();
+
+ cerr << "document size: " << size << " bytes" << endl
+ << "iterations: " << iter << endl;
+
+ os::time time (0);
+ xml_schema::document doc (root_p, "test", "root");
+
+#ifdef _XERCES_VERSION
+
+ // Xerces-C++ as the underlying XML parser.
+ //
+ using namespace xercesc;
+
+ namespace xml = xsd::cxx::xml;
+ namespace parser = xsd::cxx::parser;
+
+ XMLPlatformUtils::Initialize ();
+
+ {
+ MemBufInputSource is (
+ reinterpret_cast<XMLByte*> (buf), size, file, false);
+ is.setCopyBufToStream (false);
+
+ unique_ptr<SAX2XMLReader> parser (XMLReaderFactory::createXMLReader ());
+
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
+ parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
+
+ if (validate)
+ {
+ parser->setFeature (XMLUni::fgSAX2CoreValidation, true);
+ parser->setFeature (XMLUni::fgXercesSchema, true);
+ parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ parser->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // Initialize the schema cache. To detect schema errors we will
+ // need an error handler.
+ //
+ parser::error_handler<char> eh;
+ xml::sax::bits::error_handler_proxy<char> ehp (eh);
+ parser->setErrorHandler (&ehp);
+
+ if (!parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true))
+ {
+ // In Xerces-C++ grammar loading failure results in just a warning.
+ // Make it a fatal error.
+ //
+ eh.handle ("test.xsd", 0, 0,
+ parser::error_handler<char>::severity::fatal,
+ "unable to load schema");
+ }
+
+ eh.throw_if_failed ();
+ parser->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
+
+#if _XERCES_VERSION >= 30100
+ parser->setFeature (XMLUni::fgXercesLoadSchema, false);
+#endif
+ }
+ else
+ {
+ parser->setFeature (XMLUni::fgSAX2CoreValidation, false);
+ parser->setFeature (XMLUni::fgXercesSchema, false);
+ parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+ }
+
+ os::time start;
+
+ for (unsigned long i (0); i < iter; ++i)
+ {
+ root_p.pre ();
+ doc.parse (is, *parser);
+ root_p.post_root ();
+ }
+
+ os::time end;
+ time = end - start;
+ }
+
+ XMLPlatformUtils::Terminate ();
+
+#else
+
+ XSD_UNUSED (validate);
+
+ // Expat as the underlying XML parser.
+ //
+ XML_Parser xml_parser (XML_ParserCreateNS (0, ' '));
+ string public_id (file);
+
+ os::time start;
+
+ for (unsigned long i (0); i < iter; ++i)
+ {
+ // Using the low-level Expat-specific API to parse the memory
+ // buffer.
+ //
+ root_p.pre ();
+ doc.parse_begin (xml_parser, public_id);
+
+ XML_Parse (xml_parser, buf, size, 1);
+
+ doc.parse_end ();
+ root_p.post_root ();
+
+ XML_ParserReset (xml_parser, 0);
+ }
+
+ os::time end;
+ time = end - start;
+
+ XML_ParserFree (xml_parser);
+
+#endif
+
+ delete[] buf;
+
+ cerr << "time: " << time << " sec" << endl;
+
+ double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
+
+ // Calculate throughput in documents/sec.
+ //
+ double tpd ((iter / ms) * 1000000);
+ cerr << "throughput: " << tpd << " documents/sec" << endl;
+
+ // Calculate throughput in MBytes/sec.
+ //
+ double tpb (((size * iter) / ms) * 1000000/(1024*1024));
+ cerr << "throughput: " << tpb << " MBytes/sec" << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/performance/gen.cxx b/xsd-examples/cxx/parser/performance/gen.cxx
new file mode 100644
index 0000000..5c11343
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/gen.cxx
@@ -0,0 +1,79 @@
+// file : cxx/parser/performance/gen.cxx
+// copyright : not copyrighted - public domain
+
+#include <fstream>
+#include <sstream>
+#include <iostream>
+
+using namespace std;
+
+static const char* enums[] =
+{
+ "romance",
+ "fiction",
+ "horror",
+ "history",
+ "philosophy"
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 3)
+ {
+ cerr << "usage: " << argv[0] << " <count> <output-file>" << endl;
+ return 1;
+ }
+
+ unsigned long n (0);
+ istringstream is (argv[1]);
+ is >> n;
+
+ if (n == 0)
+ {
+ cerr << "record count argument should be a positive number" << endl;
+ return 1;
+ }
+
+ ofstream ofs (argv[2]);
+
+ if (!ofs.is_open ())
+ {
+ cerr << "unable to open '" << argv[2] << "' in write mode" << endl;
+ return 1;
+ }
+
+ ofs << "<t:root xmlns:t='test' " <<
+ "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " <<
+ "xsi:schemaLocation='test test.xsd'>";
+
+ unsigned short ch (1), en (0);
+
+ for (unsigned long i (0); i < n; ++i)
+ {
+ ofs << "<record orange=\"" << i << "\"";
+
+ if (i % 2 == 0)
+ ofs << " apple=\"true\"";
+
+ ofs << ">"
+ << "<int>42</int>"
+ << "<double>42345.4232</double>"
+ << "<name>name123_45</name>";
+
+ if (i % 2 == 1)
+ ofs << "<string>one two three</string>";
+
+ ofs << "<choice" << ch << ">" << ch << " choice</choice" << ch << ">"
+ << "<enum>" << enums[en] << "</enum>"
+ << "</record>";
+
+ if (++ch > 4)
+ ch = 1;
+
+ if (++en > 4)
+ en = 0;
+ }
+
+ ofs << "</t:root>";
+}
diff --git a/xsd-examples/cxx/parser/performance/gen.testscript b/xsd-examples/cxx/parser/performance/gen.testscript
new file mode 100644
index 0000000..1dc6d66
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/gen.testscript
@@ -0,0 +1,9 @@
+# file : cxx/parser/performance/gen.testscript
+# license : not copyrighted - public domain
+
+: 50k
+:
+{
+ $* 317 test-50k.xml &test-50k.xml;
+ cat test-50k.xml >>>$src_base/test-50k.xml
+}
diff --git a/examples/cxx/parser/performance/test-50k.xml b/xsd-examples/cxx/parser/performance/test-50k.xml
index 42e22f3..42e22f3 100644
--- a/examples/cxx/parser/performance/test-50k.xml
+++ b/xsd-examples/cxx/parser/performance/test-50k.xml
diff --git a/xsd-examples/cxx/parser/performance/test.xsd b/xsd-examples/cxx/parser/performance/test.xsd
new file mode 100644
index 0000000..450a800
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/test.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/performance/test.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<schema targetNamespace="test" xmlns:t="test"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <simpleType name="enum">
+ <restriction base="string">
+ <enumeration value="romance"/>
+ <enumeration value="fiction"/>
+ <enumeration value="horror"/>
+ <enumeration value="history"/>
+ <enumeration value="philosophy"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="record">
+ <sequence>
+ <element name="int" type="unsignedInt"/>
+ <element name="double" type="double"/>
+ <element name="name" type="NCName"/>
+ <element name="string" type="string" minOccurs="0" maxOccurs="1"/>
+ <choice>
+ <element name="choice1" type="string"/>
+ <element name="choice2" type="string"/>
+ <element name="choice3" type="string"/>
+ <element name="choice4" type="string"/>
+ </choice>
+ <element name="enum" type="t:enum"/>
+ </sequence>
+ <attribute name="apple" type="boolean"/>
+ <attribute name="orange" type="unsignedLong" use="required"/>
+ </complexType>
+
+ <complexType name="root">
+ <sequence>
+ <element name="record" type="t:record" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="root" type="t:root"/>
+
+</schema>
diff --git a/xsd-examples/cxx/parser/performance/time.cxx b/xsd-examples/cxx/parser/performance/time.cxx
new file mode 100644
index 0000000..c8c1002
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/time.cxx
@@ -0,0 +1,46 @@
+// file : cxx/parser/performance/time.cxx
+// copyright : not copyrighted - public domain
+
+#include "time.hxx"
+
+#if defined (WIN32) || defined (__WIN32__)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h> // GetSystemTimeAsFileTime
+#else
+# include <time.h> // gettimeofday
+# include <sys/time.h> // timeval
+#endif
+
+#include <ostream> // std::ostream
+#include <iomanip> // std::setfill, std::setw
+
+namespace os
+{
+ time::
+ time ()
+ {
+#if defined (WIN32) || defined (__WIN32__)
+ FILETIME ft;
+ GetSystemTimeAsFileTime (&ft);
+ unsigned long long v (
+ ((unsigned long long) (ft.dwHighDateTime) << 32) + ft.dwLowDateTime);
+
+ sec_ = static_cast<unsigned long> (v / 10000000ULL);
+ nsec_ = static_cast<unsigned long> ((v % 10000000ULL) * 100);
+#else
+ timeval tv;
+ if (gettimeofday(&tv, 0) != 0)
+ throw failed ();
+
+ sec_ = static_cast<unsigned long> (tv.tv_sec);
+ nsec_ = static_cast<unsigned long> (tv.tv_usec * 1000);
+#endif
+ }
+
+ std::ostream&
+ operator<< (std::ostream& o, time const& t)
+ {
+ return o << t.sec () << '.'
+ << std::setfill ('0') << std::setw (9) << t.nsec ();
+ }
+}
diff --git a/xsd-examples/cxx/parser/performance/time.hxx b/xsd-examples/cxx/parser/performance/time.hxx
new file mode 100644
index 0000000..a22f671
--- /dev/null
+++ b/xsd-examples/cxx/parser/performance/time.hxx
@@ -0,0 +1,110 @@
+// file : cxx/parser/performance/time.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef TIME_HXX
+#define TIME_HXX
+
+#include <iosfwd> // std::ostream&
+
+namespace os
+{
+ class time
+ {
+ public:
+ class failed {};
+
+ // Create a time object representing the current time.
+ //
+ time ();
+
+ time (unsigned long long nsec)
+ {
+ sec_ = static_cast<unsigned long> (nsec / 1000000000ULL);
+ nsec_ = static_cast<unsigned long> (nsec % 1000000000ULL);
+ }
+
+ time (unsigned long sec, unsigned long nsec)
+ {
+ sec_ = sec;
+ nsec_ = nsec;
+ }
+
+ public:
+ unsigned long
+ sec () const
+ {
+ return sec_;
+ }
+
+ unsigned long
+ nsec () const
+ {
+ return nsec_;
+ }
+
+ public:
+ class overflow {};
+ class underflow {};
+
+ time
+ operator+= (time const& b)
+ {
+ unsigned long long tmp = 0ULL + nsec_ + b.nsec_;
+
+ sec_ += static_cast<unsigned long> (b.sec_ + tmp / 1000000000ULL);
+ nsec_ = static_cast<unsigned long> (tmp % 1000000000ULL);
+
+ return *this;
+ }
+
+ time
+ operator-= (time const& b)
+ {
+ if (*this < b)
+ throw underflow ();
+
+ sec_ -= b.sec_;
+
+ if (nsec_ < b.nsec_)
+ {
+ --sec_;
+ nsec_ += 1000000000ULL - b.nsec_;
+ }
+ else
+ nsec_ -= b.nsec_;
+
+ return *this;
+ }
+
+ friend time
+ operator+ (time const& a, time const& b)
+ {
+ time r (a);
+ r += b;
+ return r;
+ }
+
+ friend time
+ operator- (time const& a, time const& b)
+ {
+ time r (a);
+ r -= b;
+ return r;
+ }
+
+ friend bool
+ operator < (time const& a, time const& b)
+ {
+ return (a.sec_ < b.sec_) || (a.sec_ == b.sec_ && a.nsec_ < b.nsec_);
+ }
+
+ private:
+ unsigned long sec_;
+ unsigned long nsec_;
+ };
+
+ std::ostream&
+ operator<< (std::ostream&, time const&);
+}
+
+#endif // TIME_HXX
diff --git a/examples/cxx/parser/polymorphism/README b/xsd-examples/cxx/parser/polymorphism/README
index 60a97e9..60a97e9 100644
--- a/examples/cxx/parser/polymorphism/README
+++ b/xsd-examples/cxx/parser/polymorphism/README
diff --git a/xsd-examples/cxx/parser/polymorphism/buildfile b/xsd-examples/cxx/parser/polymorphism/buildfile
new file mode 100644
index 0000000..de088cf
--- /dev/null
+++ b/xsd-examples/cxx/parser/polymorphism/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/parser/polymorphism/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -supermen-pskel} {hxx ixx cxx}{supermen-pskel} $libs
+
+exe{driver}: xml{supermen}: test.input = true
+
+<{hxx ixx cxx}{supermen-pskel}>: xsd{supermen} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --generate-polymorphic \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/parser/polymorphism/driver.cxx b/xsd-examples/cxx/parser/polymorphism/driver.cxx
new file mode 100644
index 0000000..879aa5c
--- /dev/null
+++ b/xsd-examples/cxx/parser/polymorphism/driver.cxx
@@ -0,0 +1,70 @@
+// file : cxx/parser/polymorphism/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <iostream>
+
+#include "supermen-pimpl.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " supermen.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::string_pimpl string_p;
+ xml_schema::boolean_pimpl boolean_p;
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+
+ person_pimpl person_p;
+ superman_pimpl superman_p;
+ batman_pimpl batman_p;
+
+ xml_schema::parser_map_impl person_map;
+
+ supermen_pimpl supermen_p;
+
+
+ person_p.parsers (string_p);
+ superman_p.parsers (string_p, boolean_p);
+ batman_p.parsers (string_p, boolean_p, unsigned_int_p);
+
+ // Here we are specifying a parser map which containes several parsers
+ // that can be used to parse the person element.
+ //
+ person_map.insert (person_p);
+ person_map.insert (superman_p);
+ person_map.insert (batman_p);
+
+ supermen_p.person_parser (person_map);
+
+ // Parse the XML document. The last argument to the document's
+ // constructor indicates that we are parsing polymorphic XML
+ // documents.
+ //
+ xml_schema::document doc_p (supermen_p, "supermen", true);
+
+ supermen_p.pre ();
+ doc_p.parse (argv[1]);
+ supermen_p.post_supermen ();
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx
new file mode 100644
index 0000000..efed827
--- /dev/null
+++ b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.cxx
@@ -0,0 +1,85 @@
+// file : cxx/parser/polymorphism/supermen-pimpl.cxx
+// copyright : not copyrighted - public domain
+//
+
+#include <iostream>
+
+#include "supermen-pimpl.hxx"
+
+using std::cout;
+using std::endl;
+
+// person_pimpl
+//
+void person_pimpl::
+pre ()
+{
+ cout << "starting to parse person" << endl;
+}
+
+void person_pimpl::
+name (const std::string& v)
+{
+ cout << "name: " << v << endl;
+}
+
+void person_pimpl::
+post_person ()
+{
+ cout << "finished parsing person" << endl
+ << endl;
+}
+
+// superman_pimpl
+//
+void superman_pimpl::
+pre ()
+{
+ cout << "starting to parse superman" << endl;
+}
+
+void superman_pimpl::
+can_fly (bool v)
+{
+ cout << "can-fly: " << v << endl;
+}
+
+void superman_pimpl::
+post_person ()
+{
+ post_superman ();
+}
+
+void superman_pimpl::
+post_superman ()
+{
+ cout << "finished parsing superman" << endl
+ << endl;
+}
+
+// batman_pimpl
+//
+void batman_pimpl::
+pre ()
+{
+ cout << "starting to parse batman" << endl;
+}
+
+void batman_pimpl::
+wing_span (unsigned int v)
+{
+ cout << "wing-span: " << v << endl;
+}
+
+void batman_pimpl::
+post_superman ()
+{
+ post_batman ();
+}
+
+void batman_pimpl::
+post_batman ()
+{
+ cout << "finished parsing batman" << endl
+ << endl;
+}
diff --git a/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx
new file mode 100644
index 0000000..0d103b5
--- /dev/null
+++ b/xsd-examples/cxx/parser/polymorphism/supermen-pimpl.hxx
@@ -0,0 +1,68 @@
+// file : cxx/parser/polymorphism/supermen-pimpl.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef SUPERMEN_PIMPL_HXX
+#define SUPERMEN_PIMPL_HXX
+
+#include "supermen-pskel.hxx"
+
+class person_pimpl: public virtual person_pskel
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ name (const std::string&);
+
+ virtual void
+ post_person ();
+};
+
+class superman_pimpl: public virtual superman_pskel,
+ public person_pimpl
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ can_fly (bool);
+
+ // By default, post_superman() calls post_person(). In case of
+ // polymorphic parsing we want the opposite: post_person() calls
+ // post_superman().
+ //
+ virtual void
+ post_person ();
+
+ virtual void
+ post_superman ();
+};
+
+class batman_pimpl: public virtual batman_pskel,
+ public superman_pimpl
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ wing_span (unsigned int);
+
+ // By default, post_batman() calls post_superman(). In case of
+ // polymorphic parsing we want the opposite: post_superman()
+ // calls post_batman().
+ //
+ virtual void
+ post_superman ();
+
+ virtual void
+ post_batman ();
+};
+
+class supermen_pimpl: public supermen_pskel
+{
+};
+
+#endif // SUPERMEN_PIMPL_HXX
diff --git a/xsd-examples/cxx/parser/polymorphism/supermen.xml b/xsd-examples/cxx/parser/polymorphism/supermen.xml
new file mode 100644
index 0000000..f569161
--- /dev/null
+++ b/xsd-examples/cxx/parser/polymorphism/supermen.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/polymorphism/supermen.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<supermen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="supermen.xsd">
+
+ <person>
+ <name>John Doe</name>
+ </person>
+
+ <superman can-fly="false">
+ <name>James "007" Bond</name>
+ </superman>
+
+ <superman can-fly="true" wing-span="10" xsi:type="batman">
+ <name>Bruce Wayne</name>
+ </superman>
+
+</supermen>
diff --git a/xsd-examples/cxx/parser/polymorphism/supermen.xsd b/xsd-examples/cxx/parser/polymorphism/supermen.xsd
new file mode 100644
index 0000000..d63762b
--- /dev/null
+++ b/xsd-examples/cxx/parser/polymorphism/supermen.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/polymorphism/supermen.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- substitution group root -->
+ <xsd:element name="person" type="person"/>
+
+
+ <xsd:complexType name="superman">
+ <xsd:complexContent>
+ <xsd:extension base="person">
+ <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="superman" type="superman" substitutionGroup="person"/>
+
+ <xsd:complexType name="batman">
+ <xsd:complexContent>
+ <xsd:extension base="superman">
+ <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="supermen">
+ <xsd:sequence>
+ <xsd:element ref="person" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="supermen" type="supermen"/>
+
+</xsd:schema>
diff --git a/examples/cxx/parser/polyroot/README b/xsd-examples/cxx/parser/polyroot/README
index f41b91c..f41b91c 100644
--- a/examples/cxx/parser/polyroot/README
+++ b/xsd-examples/cxx/parser/polyroot/README
diff --git a/xsd-examples/cxx/parser/polyroot/batman.xml b/xsd-examples/cxx/parser/polyroot/batman.xml
new file mode 100644
index 0000000..600ad6f
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/batman.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/polyroot/batman.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="supermen.xsd"
+ xsi:type="batman" can-fly="true" wing-span="10">
+
+ <name>Bruce Wayne</name>
+
+</person>
diff --git a/xsd-examples/cxx/parser/polyroot/buildfile b/xsd-examples/cxx/parser/polyroot/buildfile
new file mode 100644
index 0000000..6ae0fdc
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/polyroot/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README} xml{batman person superman}
+
+exe{driver}: {hxx cxx}{* -supermen-pskel} {hxx ixx cxx}{supermen-pskel} $libs \
+ testscript
+
+<{hxx ixx cxx}{supermen-pskel}>: xsd{supermen} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --generate-polymorphic \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/parser/polyroot/driver.cxx b/xsd-examples/cxx/parser/polyroot/driver.cxx
new file mode 100644
index 0000000..986c8c0
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/driver.cxx
@@ -0,0 +1,138 @@
+// file : cxx/parser/polyroot/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <map>
+#include <string>
+#include <iostream>
+
+#include "supermen-pimpl.hxx"
+
+using std::cerr;
+using std::endl;
+using xml_schema::ro_string;
+
+// Customize the xml_schema::document object to handle polymorphic
+// root element. For more information see the multiroot example.
+//
+class document: public xml_schema::document
+{
+public:
+ document (const xml_schema::parser_map& parser_map)
+ : xml_schema::document (true), // Indicate polymorphic parsing.
+ parser_map_ (parser_map)
+ {
+ }
+
+protected:
+ // This function is called to obtain the root element type parser.
+ // If the returned pointer is 0 then the whole document content
+ // is ignored. The type argument contains the XML Schema type
+ // if xsi:type attribute was specified for this element and 0
+ // otherwise.
+ //
+ virtual xml_schema::parser_base*
+ start_root_element (const ro_string& ns,
+ const ro_string& name,
+ const ro_string* type)
+ {
+ if (name != "person" || !ns.empty ())
+ return 0;
+
+ xml_schema::parser_base* base;
+
+ // Search the parser map.
+ //
+ if (type == 0)
+ {
+ // No xsi:type. Static type should be used.
+ //
+ ro_string st (person_pskel::_static_type ());
+ base = parser_map_.find (st);
+ }
+ else
+ {
+ base = parser_map_.find (*type);
+ }
+
+ if (base != 0)
+ {
+ parser_used_ = dynamic_cast<person_pskel*> (base);
+ parser_used_->pre ();
+ }
+ else
+ parser_used_ = 0; // No parser for this type.
+
+ return parser_used_;
+ }
+
+ // This function is called to indicate the completion of document
+ // parsing. The parser argument contains the pointer returned by
+ // start_root_element.
+ //
+ virtual void
+ end_root_element (const ro_string& /* ns */,
+ const ro_string& /* name */,
+ xml_schema::parser_base* /* parser */)
+ {
+ // Instead of caching the current parser in parser_used_, we
+ // could also dynamic_cast the parser argument to the person_pskel
+ // type.
+ //
+ if (parser_used_)
+ parser_used_->post_person ();
+ }
+
+
+private:
+ const xml_schema::parser_map& parser_map_;
+ person_pskel* parser_used_;
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " instance.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::string_pimpl string_p;
+ xml_schema::boolean_pimpl boolean_p;
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+
+ person_pimpl person_p;
+ superman_pimpl superman_p;
+ batman_pimpl batman_p;
+
+ person_p.parsers (string_p);
+ superman_p.parsers (string_p, boolean_p);
+ batman_p.parsers (string_p, boolean_p, unsigned_int_p);
+
+ // Parse the XML document.
+ //
+ xml_schema::parser_map_impl person_map;
+
+ person_map.insert (person_p);
+ person_map.insert (superman_p);
+ person_map.insert (batman_p);
+
+ document doc_p (person_map);
+
+ doc_p.parse (argv[1]);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/polyroot/person.xml b/xsd-examples/cxx/parser/polyroot/person.xml
new file mode 100644
index 0000000..2182457
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/person.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/polyroot/person.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="supermen.xsd">
+
+ <name>John Doe</name>
+
+</person>
diff --git a/xsd-examples/cxx/parser/polyroot/superman.xml b/xsd-examples/cxx/parser/polyroot/superman.xml
new file mode 100644
index 0000000..97dbf1b
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/superman.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/polyroot/superman.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="supermen.xsd"
+ xsi:type="superman" can-fly="false">
+
+ <name>James "007" Bond</name>
+
+</person>
diff --git a/xsd-examples/cxx/parser/polyroot/supermen-pimpl.cxx b/xsd-examples/cxx/parser/polyroot/supermen-pimpl.cxx
new file mode 100644
index 0000000..d35e1fd
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/supermen-pimpl.cxx
@@ -0,0 +1,85 @@
+// file : cxx/parser/polyroot/supermen-pimpl.cxx
+// copyright : not copyrighted - public domain
+//
+
+#include <iostream>
+
+#include "supermen-pimpl.hxx"
+
+using std::cout;
+using std::endl;
+
+// person_pimpl
+//
+void person_pimpl::
+pre ()
+{
+ cout << "starting to parse person" << endl;
+}
+
+void person_pimpl::
+name (const std::string& v)
+{
+ cout << "name: " << v << endl;
+}
+
+void person_pimpl::
+post_person ()
+{
+ cout << "finished parsing person" << endl
+ << endl;
+}
+
+// superman_pimpl
+//
+void superman_pimpl::
+pre ()
+{
+ cout << "starting to parse superman" << endl;
+}
+
+void superman_pimpl::
+can_fly (bool v)
+{
+ cout << "can-fly: " << v << endl;
+}
+
+void superman_pimpl::
+post_person ()
+{
+ post_superman ();
+}
+
+void superman_pimpl::
+post_superman ()
+{
+ cout << "finished parsing superman" << endl
+ << endl;
+}
+
+// batman_pimpl
+//
+void batman_pimpl::
+pre ()
+{
+ cout << "starting to parse batman" << endl;
+}
+
+void batman_pimpl::
+wing_span (unsigned int v)
+{
+ cout << "wing-span: " << v << endl;
+}
+
+void batman_pimpl::
+post_superman ()
+{
+ post_batman ();
+}
+
+void batman_pimpl::
+post_batman ()
+{
+ cout << "finished parsing batman" << endl
+ << endl;
+}
diff --git a/xsd-examples/cxx/parser/polyroot/supermen-pimpl.hxx b/xsd-examples/cxx/parser/polyroot/supermen-pimpl.hxx
new file mode 100644
index 0000000..17ce7ff
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/supermen-pimpl.hxx
@@ -0,0 +1,64 @@
+// file : cxx/parser/polyroot/supermen-pimpl.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef SUPERMEN_PIMPL_HXX
+#define SUPERMEN_PIMPL_HXX
+
+#include "supermen-pskel.hxx"
+
+class person_pimpl: public virtual person_pskel
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ name (const std::string&);
+
+ virtual void
+ post_person ();
+};
+
+class superman_pimpl: public virtual superman_pskel,
+ public person_pimpl
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ can_fly (bool);
+
+ // By default, post_superman() calls post_person(). In case of
+ // polymorphic parsing we want the opposite: post_person() calls
+ // post_superman().
+ //
+ virtual void
+ post_person ();
+
+ virtual void
+ post_superman ();
+};
+
+class batman_pimpl: public virtual batman_pskel,
+ public superman_pimpl
+{
+public:
+ virtual void
+ pre ();
+
+ virtual void
+ wing_span (unsigned int);
+
+ // By default, post_batman() calls post_superman(). In case of
+ // polymorphic parsing we want the opposite: post_superman()
+ // calls post_batman().
+ //
+ virtual void
+ post_superman ();
+
+ virtual void
+ post_batman ();
+};
+
+#endif // SUPERMEN_PIMPL_HXX
diff --git a/xsd-examples/cxx/parser/polyroot/supermen.xsd b/xsd-examples/cxx/parser/polyroot/supermen.xsd
new file mode 100644
index 0000000..e397b50
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/supermen.xsd
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/polyroot/supermen.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="person" type="person"/>
+
+ <xsd:complexType name="superman">
+ <xsd:complexContent>
+ <xsd:extension base="person">
+ <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="batman">
+ <xsd:complexContent>
+ <xsd:extension base="superman">
+ <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/parser/polyroot/testscript b/xsd-examples/cxx/parser/polyroot/testscript
new file mode 100644
index 0000000..c5ad682
--- /dev/null
+++ b/xsd-examples/cxx/parser/polyroot/testscript
@@ -0,0 +1,6 @@
+# file : cxx/parser/polyroot/testscript
+# license : not copyrighted - public domain
+
+$* $src_base/batman.xml >| : batman
+$* $src_base/person.xml >| : person
+$* $src_base/superman.xml >| : superman
diff --git a/examples/cxx/parser/wildcard/README b/xsd-examples/cxx/parser/wildcard/README
index 89f9aa9..89f9aa9 100644
--- a/examples/cxx/parser/wildcard/README
+++ b/xsd-examples/cxx/parser/wildcard/README
diff --git a/xsd-examples/cxx/parser/wildcard/buildfile b/xsd-examples/cxx/parser/wildcard/buildfile
new file mode 100644
index 0000000..93e2dc8
--- /dev/null
+++ b/xsd-examples/cxx/parser/wildcard/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/wildcard/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -email-pskel} {hxx ixx cxx}{email-pskel} $libs
+
+exe{driver}: xml{email}: test.input = true
+
+<{hxx ixx cxx}{email-pskel}>: xsd{email} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/parser/wildcard/driver.cxx b/xsd-examples/cxx/parser/wildcard/driver.cxx
new file mode 100644
index 0000000..cb7a754
--- /dev/null
+++ b/xsd-examples/cxx/parser/wildcard/driver.cxx
@@ -0,0 +1,239 @@
+// file : cxx/parser/wildcard/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <memory>
+#include <iostream>
+
+#include "email-pskel.hxx"
+
+using namespace std;
+using xml_schema::ro_string;
+
+class binary_pimpl: public email::binary_pskel,
+ public xml_schema::base64_binary_pimpl
+{
+public:
+ virtual void
+ name (const string& n)
+ {
+ cerr << "binary: " << n << endl;
+ }
+
+ virtual void
+ mime (const string& t)
+ {
+ cerr << "type: " << t << endl
+ << endl;
+ }
+
+ virtual void
+ post_binary ()
+ {
+ unique_ptr<xml_schema::buffer> buf (post_base64_binary ());
+
+ cerr << "size: " << buf->size () << endl
+ << endl;
+ }
+};
+
+class envelope_pimpl: public email::envelope_pskel
+{
+public:
+ envelope_pimpl (xml_schema::unsigned_int_pskel& uint_p,
+ xml_schema::string_pskel& string_p,
+ email::binary_pskel& binary_p)
+ : depth_ (0), cur_ (0),
+ uint_p_ (uint_p), string_p_ (string_p), binary_p_ (binary_p)
+ {
+ }
+
+ virtual void
+ to (const string& addr)
+ {
+ cerr << "To: " << addr << endl;
+ }
+
+ virtual void
+ from (const string& addr)
+ {
+ cerr << "From: " << addr << endl;
+ }
+
+ virtual void
+ subject (const string& s)
+ {
+ cerr << "Subject: " << s << endl;
+ }
+
+ // Wildcard handling. All wildcard events are routed to these
+ // four functions. It is our job to dispatch them to the right
+ // parsers.
+ //
+ virtual void
+ _start_any_element (const ro_string& ns,
+ const ro_string& name,
+ const ro_string* type)
+ {
+ if (depth_++ > 0)
+ {
+ // Nested wildcard element.
+ //
+ if (cur_)
+ cur_->_start_element (ns, name, type);
+ }
+ else
+ {
+ // Top-level element matched by the any wildcard.
+ //
+ if (ns == "http://www.codesynthesis.com/email")
+ {
+ if (name == "text")
+ {
+ cur_ = &string_p_;
+ string_p_.pre ();
+ string_p_._pre_impl ();
+ }
+ else if (name == "binary")
+ {
+ cur_ = &binary_p_;
+ binary_p_.pre ();
+ binary_p_._pre_impl ();
+ }
+ }
+
+ if (cur_ == 0)
+ {
+ cerr << "Unknown wildcard content: " << ns << "#" << name << endl;
+ }
+ }
+ }
+
+ virtual void
+ _end_any_element (const ro_string& ns, const ro_string& name)
+ {
+ if (--depth_ > 0)
+ {
+ if (cur_)
+ cur_->_end_element (ns, name);
+ }
+ else
+ {
+ if (ns == "http://www.codesynthesis.com/email")
+ {
+ if (name == "text")
+ {
+ string_p_._post_impl ();
+ string text (string_p_.post_string ());
+
+ cerr << text << endl
+ << endl;
+ }
+ else if (name == "binary")
+ {
+ binary_p_._post_impl ();
+ binary_p_.post_binary ();
+ }
+ }
+
+ cur_ = 0;
+ }
+ }
+
+ virtual void
+ _any_attribute (const ro_string& ns,
+ const ro_string& name,
+ const ro_string& value)
+ {
+ if (depth_ > 0)
+ {
+ // Nested wildcard attribute.
+ //
+ if (cur_)
+ cur_->_attribute (ns, name, value);
+ }
+ else
+ {
+ // Top-level attribute matched by the anyAttribute wildcard.
+ //
+ if (ns == "http://www.codesynthesis.com/email" && name == "thread-id")
+ {
+ uint_p_.pre ();
+ uint_p_._pre_impl ();
+ uint_p_._characters (value);
+ uint_p_._post_impl ();
+ unsigned int tid (uint_p_.post_unsigned_int ());
+
+ cerr << "Thread-id: " << tid << endl;
+ }
+ }
+ }
+
+ virtual void
+ _any_characters (const ro_string& s)
+ {
+ if (depth_ > 0)
+ {
+ if (cur_)
+ cur_->_characters (s);
+ }
+ }
+
+private:
+ size_t depth_;
+ xml_schema::parser_base* cur_;
+
+ // Parsers for the unsigned int, string and binary types.
+ //
+private:
+ xml_schema::unsigned_int_pskel& uint_p_;
+ xml_schema::string_pskel& string_p_;
+ email::binary_pskel& binary_p_;
+};
+
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " email.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+ xml_schema::string_pimpl string_p;
+ binary_pimpl binary_p;
+ envelope_pimpl envelope_p (unsigned_int_p, string_p, binary_p);
+
+ binary_p.parsers (string_p, // name
+ string_p); // mime
+
+ envelope_p.parsers (string_p, // to
+ string_p, // from
+ string_p); // subject
+
+ // Parse the XML instance document.
+ //
+ xml_schema::document doc_p (envelope_p,
+ "http://www.codesynthesis.com/email",
+ "message");
+ envelope_p.pre ();
+ doc_p.parse (argv[1]);
+ envelope_p.post_envelope ();
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/parser/wildcard/email.xml b/xsd-examples/cxx/parser/wildcard/email.xml
new file mode 100644
index 0000000..482103b
--- /dev/null
+++ b/xsd-examples/cxx/parser/wildcard/email.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/wildcard/email.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<eml:message xmlns:eml="http://www.codesynthesis.com/email"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/email email.xsd"
+ eml:thread-id="123456789">
+
+ <to>Jane Doe &lt;jane@doe.com></to>
+ <from>John Doe &lt;john@doe.com></from>
+ <subject>Surfing pictures</subject>
+
+ <eml:text>
+Hi Jane,
+
+Here are cool pictures of me surfing.
+
+Cheers,
+John
+ </eml:text>
+
+ <eml:binary name="pic1.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
+ <eml:binary name="pic2.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
+
+</eml:message>
diff --git a/xsd-examples/cxx/parser/wildcard/email.xsd b/xsd-examples/cxx/parser/wildcard/email.xsd
new file mode 100644
index 0000000..6aec20c
--- /dev/null
+++ b/xsd-examples/cxx/parser/wildcard/email.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/parser/wildcard/email.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:eml="http://www.codesynthesis.com/email"
+ targetNamespace="http://www.codesynthesis.com/email">
+
+ <!-- Predefined envolop body types. -->
+
+ <xsd:element name="text" type="xsd:string"/>
+
+ <xsd:complexType name="binary">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="mime" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:element name="binary" type="eml:binary"/>
+
+ <!-- Predefined envelop attributes. -->
+
+ <xsd:attribute name="thread-id" type="xsd:unsignedInt"/>
+
+
+ <xsd:complexType name="envelope">
+ <xsd:sequence>
+ <xsd:element name="to" type="xsd:string"/>
+ <xsd:element name="from" type="xsd:string"/>
+ <xsd:element name="subject" type="xsd:string"/>
+
+ <!-- Extensible envelope body. -->
+
+ <xsd:any namespace="##targetNamespace" processContents="strict"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:anyAttribute namespace="##targetNamespace" processContents="strict"/>
+ </xsd:complexType>
+
+ <xsd:element name="message" type="eml:envelope"/>
+
+</xsd:schema>
diff --git a/examples/cxx/tree/README b/xsd-examples/cxx/tree/README
index 83ffcab..83ffcab 100644
--- a/examples/cxx/tree/README
+++ b/xsd-examples/cxx/tree/README
diff --git a/examples/cxx/tree/binary/README b/xsd-examples/cxx/tree/binary/README
index 365551e..365551e 100644
--- a/examples/cxx/tree/binary/README
+++ b/xsd-examples/cxx/tree/binary/README
diff --git a/xsd-examples/cxx/tree/binary/boost/.gitignore b/xsd-examples/cxx/tree/binary/boost/.gitignore
new file mode 100644
index 0000000..c116ec1
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/.gitignore
@@ -0,0 +1 @@
+library.?xx
diff --git a/examples/cxx/tree/binary/boost/README b/xsd-examples/cxx/tree/binary/boost/README
index 6cdd2dd..6cdd2dd 100644
--- a/examples/cxx/tree/binary/boost/README
+++ b/xsd-examples/cxx/tree/binary/boost/README
diff --git a/xsd-examples/cxx/tree/binary/boost/boost-archive-extraction.hxx b/xsd-examples/cxx/tree/binary/boost/boost-archive-extraction.hxx
new file mode 100644
index 0000000..93241da
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/boost-archive-extraction.hxx
@@ -0,0 +1,188 @@
+// file : cxx/tree/binary/boost/boost-archive-insertion.cxx
+// copyright : not copyrighted - public domain
+
+#ifndef BOOST_ARCHIVE_EXTRACTION_HXX
+#define BOOST_ARCHIVE_EXTRACTION_HXX
+
+#include <cstddef> // std::size_t
+#include <string>
+
+#include <xsd/cxx/tree/buffer.hxx>
+#include <xsd/cxx/tree/istream.hxx>
+
+#include <boost/cstdint.hpp>
+
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ // as_size
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_size<T>& x)
+ {
+ std::size_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ // 8-bit
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_int8<T>& x)
+ {
+ boost::int8_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_uint8<T>& x)
+ {
+ boost::uint8_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+
+ // 16-bit
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_int16<T>& x)
+ {
+ boost::int16_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_uint16<T>& x)
+ {
+ boost::uint16_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+
+ // 32-bit
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_int32<T>& x)
+ {
+ boost::int32_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_uint32<T>& x)
+ {
+ boost::uint32_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+
+ // 64-bit
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_int64<T>& x)
+ {
+ boost::int64_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_uint64<T>& x)
+ {
+ boost::uint64_t r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+
+ // Boolean
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_bool<T>& x)
+ {
+ bool r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+
+ // Floating-point
+ //
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_float32<T>& x)
+ {
+ float r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, istream_common::as_float64<T>& x)
+ {
+ double r;
+ s.impl () >> r;
+ x.x_ = static_cast<T> (r);
+ return s;
+ }
+
+ // Extraction of std::basic_string.
+ //
+
+ template <typename Archive, typename C>
+ inline istream<Archive>&
+ operator>> (istream<Archive>& s, std::basic_string<C>& x)
+ {
+ s.impl () >> x;
+ return s;
+ }
+
+
+ // Extraction of a binary buffer.
+ //
+ template <typename Archive, typename C>
+ istream<Archive>&
+ operator>> (istream<Archive>& s, buffer<C>& x)
+ {
+ std::size_t size;
+ s.impl () >> size;
+ x.size (size);
+ s.impl ().load_binary (x.data (), size);
+ return s;
+ }
+ }
+ }
+}
+
+#endif // BOOST_ARCHIVE_EXTRACTION_HXX
diff --git a/xsd-examples/cxx/tree/binary/boost/boost-archive-insertion.hxx b/xsd-examples/cxx/tree/binary/boost/boost-archive-insertion.hxx
new file mode 100644
index 0000000..b2f7936
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/boost-archive-insertion.hxx
@@ -0,0 +1,177 @@
+// file : cxx/tree/binary/boost/boost-archive-insertion.cxx
+// copyright : not copyrighted - public domain
+
+#ifndef BOOST_ARCHIVE_INSERTION_HXX
+#define BOOST_ARCHIVE_INSERTION_HXX
+
+#include <cstddef> // std::size_t
+#include <string>
+
+#include <xsd/cxx/tree/buffer.hxx>
+#include <xsd/cxx/tree/ostream.hxx>
+
+#include <boost/cstdint.hpp>
+
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ // as_size
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_size<T> x)
+ {
+ std::size_t v (static_cast<std::size_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+ // 8-bit
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_int8<T> x)
+ {
+ boost::int8_t v (static_cast<boost::int8_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_uint8<T> x)
+ {
+ boost::uint8_t v (static_cast<boost::uint8_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+
+ // 16-bit
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_int16<T> x)
+ {
+ boost::int16_t v (static_cast<boost::int16_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_uint16<T> x)
+ {
+ boost::uint16_t v (static_cast<boost::uint16_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+
+ // 32-bit
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_int32<T> x)
+ {
+ boost::int32_t v (static_cast<boost::int32_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_uint32<T> x)
+ {
+ boost::uint32_t v (static_cast<boost::uint32_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+
+ // 64-bit
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_int64<T> x)
+ {
+ boost::int64_t v (static_cast<boost::int64_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_uint64<T> x)
+ {
+ boost::uint64_t v (static_cast<boost::uint64_t> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+
+ // Boolean
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_bool<T> x)
+ {
+ bool v (static_cast<bool> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+
+ // Floating-point
+ //
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_float32<T> x)
+ {
+ float v (static_cast<float> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+ template <typename Archive, typename T>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, ostream_common::as_float64<T> x)
+ {
+ double v (static_cast<double> (x.x_));
+ s.impl () << v;
+ return s;
+ }
+
+
+ // Insertion of std::basic_string.
+ //
+ template <typename Archive, typename C>
+ inline ostream<Archive>&
+ operator<< (ostream<Archive>& s, const std::basic_string<C>& x)
+ {
+ s.impl () << x;
+ return s;
+ }
+
+
+ // Insertion of a binary buffer.
+ //
+ template <typename Archive, typename C>
+ ostream<Archive>&
+ operator<< (ostream<Archive>& s, const buffer<C>& x)
+ {
+ // Boost.Serialization needs an lvalue.
+ //
+ std::size_t size (x.size());
+ s.impl () << size;
+ s.impl ().save_binary (x.data (), x.size ());
+ return s;
+ }
+ }
+ }
+}
+
+#endif // BOOST_ARCHIVE_INSERTION_HXX
diff --git a/xsd-examples/cxx/tree/binary/boost/buildfile b/xsd-examples/cxx/tree/binary/boost/buildfile
new file mode 100644
index 0000000..4306273
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/buildfile
@@ -0,0 +1,32 @@
+# file : cxx/tree/binary/boost/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libboost-serialization%lib{boost_serialization}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} hxx{library-prologue} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --hxx-prologue-file $path($<[1]) \
+ --generate-insertion 'boost::archive::text_oarchive' \
+ --generate-extraction 'boost::archive::text_iarchive' \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/binary/boost/driver.cxx b/xsd-examples/cxx/tree/binary/boost/driver.cxx
new file mode 100644
index 0000000..d1d08d9
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/driver.cxx
@@ -0,0 +1,72 @@
+// file : cxx/tree/binary/boost/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cstring> // std::memcpy
+#include <sstream>
+#include <iostream>
+
+// You can generate insertion/extraction code for other archive
+// types (for example, binary, XML, etc).
+//
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+#include "library.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace library;
+ using boost::archive::text_oarchive;
+ using boost::archive::text_iarchive;
+
+ // Read in the file.
+ //
+ std::unique_ptr<catalog> c (catalog_ (argv[1]));
+
+ cerr << *c << endl;
+
+ // Save into a text archive.
+ //
+ std::ostringstream ostr;
+ text_oarchive oa (ostr);
+ xml_schema::ostream<text_oarchive> os (oa);
+
+ os << *c;
+
+ // Print the text representation.
+ //
+ std::string str (ostr.str ());
+
+ cerr << endl
+ << "text representation: " << endl
+ << str << endl;
+
+ // Load from a text archive.
+ //
+ std::istringstream istr (str);
+ text_iarchive ia (istr);
+ xml_schema::istream<text_iarchive> is (ia);
+
+ std::unique_ptr<catalog> copy (new catalog (is));
+
+ cerr << *copy << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/examples/cxx/tree/binary/boost/library-prologue.hxx b/xsd-examples/cxx/tree/binary/boost/library-prologue.hxx
index ba0d35f..ba0d35f 100644
--- a/examples/cxx/tree/binary/boost/library-prologue.hxx
+++ b/xsd-examples/cxx/tree/binary/boost/library-prologue.hxx
diff --git a/xsd-examples/cxx/tree/binary/boost/library.xml b/xsd-examples/cxx/tree/binary/boost/library.xml
new file mode 100644
index 0000000..6368f44
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/binary/boost/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/binary/boost/library.xsd b/xsd-examples/cxx/tree/binary/boost/library.xsd
new file mode 100644
index 0000000..3959788
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/boost/library.xsd
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/binary/boost/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/binary/cdr/.gitignore b/xsd-examples/cxx/tree/binary/cdr/.gitignore
new file mode 100644
index 0000000..c116ec1
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/cdr/.gitignore
@@ -0,0 +1 @@
+library.?xx
diff --git a/examples/cxx/tree/binary/cdr/README b/xsd-examples/cxx/tree/binary/cdr/README
index 914d27c..914d27c 100644
--- a/examples/cxx/tree/binary/cdr/README
+++ b/xsd-examples/cxx/tree/binary/cdr/README
diff --git a/xsd-examples/cxx/tree/binary/cdr/buildfile b/xsd-examples/cxx/tree/binary/cdr/buildfile
new file mode 100644
index 0000000..d78a56a
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/cdr/buildfile
@@ -0,0 +1,28 @@
+# file : cxx/tree/binary/cdr/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libace%lib{ACE}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --generate-insertion 'ACE_OutputCDR' \
+ --generate-extraction 'ACE_InputCDR' \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/tree/binary/cdr/driver.cxx b/xsd-examples/cxx/tree/binary/cdr/driver.cxx
new file mode 100644
index 0000000..2ab0674
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/cdr/driver.cxx
@@ -0,0 +1,87 @@
+// file : cxx/tree/binary/cdr/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cstring> // std::memcpy
+#include <iostream>
+
+#include <ace/Log_Msg.h> // ACE_HEX_DUMP
+#include <ace/CDR_Stream.h>
+
+// The following two headers define XSD-specific insertion/extraction
+// operations for ACE CDR streams. You can use the content of these
+// headers as a guide to implementing insertion/extraction to/from
+// your own data representation streams:
+//
+// xsd/cxx/tree/ace-cdr-stream-insertion.hxx
+// xsd/cxx/tree/ace-cdr-stream-extraction.hxx
+
+#include "library.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace library;
+
+ // Read in the file.
+ //
+ std::unique_ptr<catalog> c (catalog_ (argv[1]));
+
+ cerr << *c << endl;
+
+ // Save to a CDR stream.
+ //
+ ACE_OutputCDR ace_ocdr;
+ xml_schema::ostream<ACE_OutputCDR> ocdr (ace_ocdr);
+
+ ocdr << *c;
+
+ // Print the binary representation and at the same time save
+ // it into a continuous buffer.
+ //
+ cerr << endl
+ << "binary representation size: " << ace_ocdr.total_length () << endl;
+
+ xml_schema::buffer buf (ace_ocdr.total_length ());
+ char* data (buf.data ());
+
+ for (const ACE_Message_Block* mb = ace_ocdr.begin ();
+ mb != 0;
+ mb = mb->cont ())
+ {
+ std::memcpy (data, mb->rd_ptr (), mb->length ());
+ data += mb->length ();
+
+ ACE_HEX_DUMP ((LM_DEBUG, mb->rd_ptr (), mb->length ()));
+ }
+
+ // Load from a CDR stream. Note that ACE_InputCDR expects the
+ // buffer to be properly aligned. Since our buffer is dynamically
+ // allocated, its alignment should be good enough.
+ //
+ ACE_InputCDR ace_icdr (buf.data (), buf.size ());
+ xml_schema::istream<ACE_InputCDR> icdr (ace_icdr);
+
+ std::unique_ptr<catalog> copy (new catalog (icdr));
+
+ cerr << *copy << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ return 0; // ACE makes our main() an ordinary function.
+}
diff --git a/xsd-examples/cxx/tree/binary/cdr/library.xml b/xsd-examples/cxx/tree/binary/cdr/library.xml
new file mode 100644
index 0000000..5700131
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/cdr/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/binary/cdr/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/binary/cdr/library.xsd b/xsd-examples/cxx/tree/binary/cdr/library.xsd
new file mode 100644
index 0000000..c7f056e
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/cdr/library.xsd
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/binary/cdr/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/binary/xdr/.gitignore b/xsd-examples/cxx/tree/binary/xdr/.gitignore
new file mode 100644
index 0000000..c116ec1
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/xdr/.gitignore
@@ -0,0 +1 @@
+library.?xx
diff --git a/xsd-examples/cxx/tree/binary/xdr/README b/xsd-examples/cxx/tree/binary/xdr/README
new file mode 100644
index 0000000..e02b2b9
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/xdr/README
@@ -0,0 +1,36 @@
+This example shows how to save/load the object model to/from XDR
+(eXternal Data Representation) binary format using XDR streams.
+The XDR API is available on most UNIX and GNU/Linux systems as part
+of Sun RPC (libtirpc-dev package on Debian/Ubuntu, libtirpc-devel
+package on Fedora/RHEL, and as a part of the Standard C Library on
+FreeBSD and MacOS). On Windows you may need to install a third-party
+library which provides the XDR API.
+
+The example consists of the following files:
+
+library.xsd
+ XML Schema which describes a library of books.
+
+library.xml
+ Sample XML instance document.
+
+library.hxx
+library.cxx
+ C++ types that represent the given vocabulary as well as data
+ representation stream insertion and extraction operations. These
+ are generated by XSD from library.xsd. Note that the
+ --generate-insertion and --generate-extraction options are used
+ to generate the insertion and extraction operations for XDR
+ stream.
+
+driver.cxx
+ Driver for the example. It first calls one of the parsing functions
+ that constructs the object model from the input XML file. It then
+ saves the object model to the XDR representation and loads it back.
+ Additionally, it prints the content of the object model before saving
+ it to the XDR representation and after loading it from the XDR
+ representation.
+
+To run the example on the sample XML instance document simply execute:
+
+$ ./driver library.xml
diff --git a/xsd-examples/cxx/tree/binary/xdr/buildfile b/xsd-examples/cxx/tree/binary/xdr/buildfile
new file mode 100644
index 0000000..92f0c48
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/xdr/buildfile
@@ -0,0 +1,30 @@
+# file : cxx/tree/binary/xdr/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+if ($cxx.target.class == 'linux')
+ import libs += libtirpc%lib{tirpc}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --generate-insertion 'XDR' \
+ --generate-extraction 'XDR' \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/tree/binary/xdr/driver.cxx b/xsd-examples/cxx/tree/binary/xdr/driver.cxx
new file mode 100644
index 0000000..f706ebf
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/xdr/driver.cxx
@@ -0,0 +1,148 @@
+// file : cxx/tree/binary/xdr/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cstring> // std::memcpy
+#include <cstddef> // std::size_t
+#include <iostream>
+
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+
+#include "library.hxx"
+
+using std::cerr;
+using std::endl;
+using std::size_t;
+
+// XDR output functions. Their implementations are provided after main().
+//
+struct underflow_info
+{
+ xml_schema::buffer* buf;
+ size_t pos;
+};
+
+extern "C" int
+overflow (void* user_data, char* buf, int n);
+
+extern "C" int
+underflow (void* user_data, char* buf, int n);
+
+// The xdrrec_create function (used below) has slightly different
+// prototypes on different platforms. To make this example portable
+// we will need to cast the actual function to the following common
+// prototype.
+//
+extern "C"
+typedef void (*xdrrec_create_p) (
+ XDR*,
+ unsigned int write_size,
+ unsigned int read_size,
+ void* user_data,
+ int (*read) (void* user_data, char* buf, int n),
+ int (*write) (void* user_data, char* buf, int n));
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace library;
+
+ xdrrec_create_p xdrrec_create_ =
+ reinterpret_cast<xdrrec_create_p> (::xdrrec_create);
+
+ // Read in the file.
+ //
+ std::unique_ptr<catalog> c (catalog_ (argv[1]));
+
+ cerr << *c << endl;
+
+ // Save to an XDR stream.
+ //
+ XDR xdr;
+ xml_schema::buffer buf;
+
+ xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&buf), 0, &overflow);
+ xdr.x_op = XDR_ENCODE;
+
+ xml_schema::ostream<XDR> oxdr (xdr);
+
+ oxdr << *c;
+
+ xdrrec_endofrecord (&xdr, true); // Flush the data.
+ xdr_destroy (&xdr);
+
+ // The binary representation is now in the memory buffer 'buf'.
+ // To get to the raw data use buf.data() and buf.size().
+ //
+ cerr << endl
+ << "binary representation size: " << buf.size () << endl;
+
+ // Load from an XDR stream.
+ //
+ underflow_info ui;
+ ui.buf = &buf;
+ ui.pos = 0;
+
+ xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&ui), &underflow, 0);
+ xdr.x_op = XDR_DECODE;
+
+ xdrrec_skiprecord (&xdr);
+
+ xml_schema::istream<XDR> ixdr (xdr);
+
+ std::unique_ptr<catalog> copy (new catalog (ixdr));
+
+ xdr_destroy (&xdr);
+
+ cerr << *copy << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
+
+extern "C" int
+overflow (void* p, char* buf, int n_)
+{
+ xml_schema::buffer* dst (reinterpret_cast<xml_schema::buffer*> (p));
+ size_t n (static_cast<size_t> (n_));
+
+ size_t size (dst->size ());
+ size_t capacity (dst->capacity ());
+
+ // Implement exponential growth.
+ //
+ if (size + n > capacity && size + n < capacity * 2)
+ dst->capacity (capacity * 2);
+
+ dst->size (size + n);
+ std::memcpy (dst->data () + size, buf, n);
+
+ return n;
+}
+
+extern "C" int
+underflow (void* p, char* buf, int n_)
+{
+ underflow_info* ui (reinterpret_cast<underflow_info*> (p));
+ size_t n (static_cast<size_t> (n_));
+
+ size_t size (ui->buf->size () - ui->pos);
+ n = size > n ? n : size;
+
+ std::memcpy (buf, ui->buf->data () + ui->pos, n);
+ ui->pos += n;
+
+ return n;
+}
diff --git a/xsd-examples/cxx/tree/binary/xdr/library.xml b/xsd-examples/cxx/tree/binary/xdr/library.xml
new file mode 100644
index 0000000..05ed593
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/xdr/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/binary/xdr/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/binary/xdr/library.xsd b/xsd-examples/cxx/tree/binary/xdr/library.xsd
new file mode 100644
index 0000000..8e1b316
--- /dev/null
+++ b/xsd-examples/cxx/tree/binary/xdr/library.xsd
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/binary/xdr/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/buildfile b/xsd-examples/cxx/tree/buildfile
new file mode 100644
index 0000000..3345cfb
--- /dev/null
+++ b/xsd-examples/cxx/tree/buildfile
@@ -0,0 +1,6 @@
+# file : cxx/tree/buildfile
+# license : not copyrighted - public domain
+
+# Exclude examples which depend on not yet packaged libraries.
+#
+./: {*/ -binary/ -xpath/} doc{README}
diff --git a/xsd-examples/cxx/tree/caching/.gitignore b/xsd-examples/cxx/tree/caching/.gitignore
new file mode 100644
index 0000000..c116ec1
--- /dev/null
+++ b/xsd-examples/cxx/tree/caching/.gitignore
@@ -0,0 +1 @@
+library.?xx
diff --git a/xsd-examples/cxx/tree/caching/README b/xsd-examples/cxx/tree/caching/README
new file mode 100644
index 0000000..64dffb3
--- /dev/null
+++ b/xsd-examples/cxx/tree/caching/README
@@ -0,0 +1,29 @@
+This example shows how to use the C++/Tree mapping to parse several
+XML documents while reusing the underlying XML parser and caching the
+schemas used for validation.
+
+The example consists of the following files:
+
+library.xsd
+ XML Schema which describes a library of books.
+
+library.xml
+ Sample XML instance document.
+
+library.hxx
+library.cxx
+ C++ types that represent the given vocabulary and a set of parsing
+ functions that convert XML instance documents to a tree-like in-memory
+ object model. These are generated by XSD from library.xsd.
+
+driver.cxx
+ Driver for the example. It first sets up the Xerces-C++ DOM parser
+ and caches the library.xsd schema for validation. It then performs
+ ten iterations that parse the input file to a DOM document using
+ the DOM parser and call one of the parsing functions that constructs
+ the object model from this DOM document. On each iteration the driver
+ prints a number of books in the object model to STDERR.
+
+To run the example on the sample XML instance document simply execute:
+
+$ ./driver library.xml library.xsd
diff --git a/xsd-examples/cxx/tree/caching/buildfile b/xsd-examples/cxx/tree/caching/buildfile
new file mode 100644
index 0000000..cb369b7
--- /dev/null
+++ b/xsd-examples/cxx/tree/caching/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/caching/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs
+
+exe{driver}: {xml xsd}{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/caching/driver.cxx b/xsd-examples/cxx/tree/caching/driver.cxx
new file mode 100644
index 0000000..9cabbd4
--- /dev/null
+++ b/xsd-examples/cxx/tree/caching/driver.cxx
@@ -0,0 +1,165 @@
+// file : cxx/tree/caching/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "library.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 3)
+ {
+ cerr << "usage: " << argv[0] << " library.xml library.xsd" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we
+ // are doing the XML-to-DOM parsing ourselves.
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace xercesc;
+ namespace xml = xsd::cxx::xml;
+ namespace tree = xsd::cxx::tree;
+
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ xml::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, true);
+ conf->setParameter (XMLUni::fgXercesSchema, true);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Initialize the schema cache.
+ //
+ if (!parser->loadGrammar (argv[2], Grammar::SchemaGrammarType, true))
+ {
+ // In Xerces-C++ grammar loading failure results in just a warning.
+ // Make it a fatal error.
+ //
+ eh.handle (argv[2], 0, 0,
+ tree::error_handler<char>::severity::fatal,
+ "unable to load schema");
+ }
+
+ eh.throw_if_failed<xml_schema::parsing> ();
+
+ // Use the loaded grammar during parsing.
+ //
+ conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
+
+ // Disable loading schemas via other means (e.g., schemaLocation).
+ //
+ conf->setParameter (XMLUni::fgXercesLoadSchema, false);
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Parse XML documents.
+ //
+ for (unsigned long i (0); i < 10; ++i)
+ {
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ // Wrap the standard input stream.
+ //
+ xml::sax::std_input_source isrc (ifs, argv[1]);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ // Parse XML to DOM.
+ //
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<xml_schema::parsing> ();
+
+ // Parse DOM to the object model.
+ //
+ unique_ptr<library::catalog> c (library::catalog_ (*doc));
+
+ cerr << "catalog with " << c->book ().size () << " books" << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/caching/library.xml b/xsd-examples/cxx/tree/caching/library.xml
new file mode 100644
index 0000000..b36786f
--- /dev/null
+++ b/xsd-examples/cxx/tree/caching/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/caching/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/caching/library.xsd b/xsd-examples/cxx/tree/caching/library.xsd
new file mode 100644
index 0000000..2dd5037
--- /dev/null
+++ b/xsd-examples/cxx/tree/caching/library.xsd
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/caching/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/compression/.gitignore b/xsd-examples/cxx/tree/compression/.gitignore
new file mode 100644
index 0000000..f7293f9
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/.gitignore
@@ -0,0 +1,2 @@
+library.?xx
+out.xml.gz
diff --git a/examples/cxx/tree/compression/README b/xsd-examples/cxx/tree/compression/README
index f163970..f163970 100644
--- a/examples/cxx/tree/compression/README
+++ b/xsd-examples/cxx/tree/compression/README
diff --git a/xsd-examples/cxx/tree/compression/buildfile b/xsd-examples/cxx/tree/compression/buildfile
new file mode 100644
index 0000000..6997339
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/buildfile
@@ -0,0 +1,28 @@
+# file : cxx/tree/compression/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libz%lib{z}
+
+./: exe{driver} file{library.xml.gz} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs testscript
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/compression/compressed-format-target.cxx b/xsd-examples/cxx/tree/compression/compressed-format-target.cxx
new file mode 100644
index 0000000..2d150a0
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/compressed-format-target.cxx
@@ -0,0 +1,152 @@
+// file : cxx/tree/compression/compressed-format-target.cxx
+// copyright : not copyrighted - public domain
+
+#include <ostream>
+#include <cstring> // std::memcpy
+
+#include "compressed-format-target.hxx"
+
+using namespace std;
+
+//
+// compression_failure
+//
+
+const char* compression_failure::
+what () const throw ()
+{
+ return "compression failure";
+}
+
+//
+// compressed_format_target
+//
+
+compressed_format_target::
+compressed_format_target (ostream& os, compression_type t)
+ : os_ (os), closed_ (false), n_ (0)
+ {
+ zs_.zalloc = Z_NULL;
+ zs_.zfree = Z_NULL;
+ zs_.opaque = Z_NULL;
+
+ int window = 0;
+
+ switch (t)
+ {
+ case raw:
+ {
+ window = -15;
+ break;
+ }
+ case zlib:
+ {
+ window = 15;
+ break;
+ }
+ case gzip:
+ {
+ window = 16 + 15;
+ break;
+ }
+ }
+
+ int r (deflateInit2 (&zs_,
+ Z_DEFAULT_COMPRESSION,
+ Z_DEFLATED,
+ window,
+ 8,
+ Z_DEFAULT_STRATEGY));
+ if (r != Z_OK)
+ throw compression_failure (r);
+ }
+
+compressed_format_target::
+~compressed_format_target ()
+{
+ try
+ {
+ // Close the free the compression stream.
+ //
+ if (!closed_)
+ close ();
+ }
+ catch (...)
+ {
+ }
+
+ deflateEnd (&zs_);
+}
+
+void compressed_format_target::
+writeChars (const XMLByte* const buf,
+ const XMLSize_t size,
+ xercesc::XMLFormatter* const)
+{
+ // Flush the buffer if the block is too large or if we don't have
+ // any space left.
+ //
+ if ((size >= buf_size_ / 8 || n_ + size > buf_size_) && n_ != 0)
+ {
+ write (in_, n_);
+ n_ = 0;
+ }
+
+ if (size < buf_size_ / 8)
+ {
+ memcpy (in_ + n_, reinterpret_cast<const char*> (buf), size);
+ n_ += size;
+ }
+ else
+ write (reinterpret_cast<const char*> (buf), size);
+}
+
+
+void compressed_format_target::
+flush ()
+{
+ if (n_ != 0)
+ {
+ write (in_, n_);
+ n_ = 0;
+ }
+
+ if (!os_.fail ())
+ os_.flush ();
+}
+
+void compressed_format_target::
+close ()
+{
+ write (in_, n_, true);
+ n_ = 0;
+
+ if (!os_.fail ())
+ os_.flush ();
+
+ closed_ = true;
+}
+
+void compressed_format_target::
+write (const char* buf, size_t size, bool flush)
+{
+ zs_.next_in = reinterpret_cast<Bytef*> (const_cast<char*> (buf));
+ zs_.avail_in = static_cast<uInt> (size);
+
+ do
+ {
+ zs_.next_out = reinterpret_cast<Bytef*> (out_);
+ zs_.avail_out = buf_size_;
+
+ int r (deflate (&zs_, flush ? Z_FINISH : Z_NO_FLUSH));
+
+ if (r != Z_OK && r != Z_BUF_ERROR && r != Z_STREAM_END)
+ throw compression_failure (r);
+
+ size_t n (buf_size_ - zs_.avail_out);
+
+ if (!os_.fail () && n > 0)
+ os_.write (out_, static_cast<streamsize> (n));
+
+ } while (zs_.avail_out == 0);
+}
diff --git a/xsd-examples/cxx/tree/compression/compressed-format-target.hxx b/xsd-examples/cxx/tree/compression/compressed-format-target.hxx
new file mode 100644
index 0000000..0061cfa
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/compressed-format-target.hxx
@@ -0,0 +1,91 @@
+// file : cxx/tree/compression/compressed-format-target.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef COMPRESSED_FORMAT_TARGET_HXX
+#define COMPRESSED_FORMAT_TARGET_HXX
+
+#include <zlib.h>
+
+#include <iosfwd>
+#include <cstddef> // std::size_t
+#include <exception>
+
+#include <xercesc/framework/XMLFormatter.hpp>
+
+struct compression_failure: std::exception
+{
+ explicit
+ compression_failure (int code)
+ : code_ (code)
+ {
+ }
+
+ int
+ code () const
+ {
+ return code_;
+ }
+
+ const char*
+ message () const
+ {
+ return zError (code_);
+ }
+
+ virtual const char*
+ what () const throw ();
+
+private:
+ int code_;
+};
+
+// Xerces-C++ XMLFormatTarget interface implementation with on-the-fly,
+// zlib-based compression.
+//
+class compressed_format_target: public xercesc::XMLFormatTarget
+{
+public:
+ enum compression_type
+ {
+ raw,
+ zlib,
+ gzip
+ };
+
+ compressed_format_target (std::ostream&, compression_type);
+
+ virtual
+ ~compressed_format_target ();
+
+ virtual void
+ writeChars (const XMLByte* const buf,
+ const XMLSize_t size,
+ xercesc::XMLFormatter* const);
+
+ virtual void
+ flush ();
+
+ // Close the compressed stream by writing out the zlib or gzip trailer.
+ // This function is automatically called from the destructor but you
+ // may want to call it explicitly to be able to catch any exceptions
+ // that it might throw.
+ //
+ void
+ close ();
+
+private:
+ void
+ write (const char* buf, std::size_t size, bool flush = false);
+
+private:
+ std::ostream& os_;
+ z_stream zs_;
+ bool closed_;
+
+ static const std::size_t buf_size_ = 65536;
+ char in_[buf_size_];
+ char out_[buf_size_];
+ size_t n_;
+};
+
+#endif // COMPRESSED_FORMAT_TARGET_HXX
diff --git a/xsd-examples/cxx/tree/compression/compressed-input-source.cxx b/xsd-examples/cxx/tree/compression/compressed-input-source.cxx
new file mode 100644
index 0000000..03be960
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/compressed-input-source.cxx
@@ -0,0 +1,195 @@
+// file : cxx/tree/compression/compressed-input-source.cxx
+// copyright : not copyrighted - public domain
+
+#include <istream>
+
+#include <xsd/cxx/xml/string.hxx>
+
+#include "compressed-input-source.hxx"
+
+using namespace std;
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+
+//
+// decompression_failure
+//
+
+const char* decompression_failure::
+what () const throw ()
+{
+ return "decompression failure";
+}
+
+//
+// compressed_input_source
+//
+
+compressed_input_source::
+compressed_input_source (istream& is, compression_type t)
+ : is_ (&is), type_ (t)
+{
+}
+
+compressed_input_source::
+compressed_input_source (istream& is,
+ compression_type t,
+ const string& sysid)
+ : InputSource (xml::string (sysid).c_str ()), is_ (&is), type_ (t)
+{
+}
+
+compressed_input_source::
+compressed_input_source (istream& is,
+ compression_type t,
+ const string& sysid,
+ const string& pubid)
+ : xercesc::InputSource (xml::string (sysid).c_str (),
+ xml::string (pubid).c_str ()),
+ is_ (&is),
+ type_ (t)
+{
+}
+
+BinInputStream* compressed_input_source::
+makeStream () const
+{
+ if (is_ == 0)
+ throw copy ();
+
+ istream& is (*is_);
+ is_ = 0;
+ return new compressed_input_stream (
+ is, static_cast<compressed_input_stream::compression_type> (type_));
+}
+
+//
+// compressed_input_stream
+//
+
+compressed_input_stream::
+compressed_input_stream (istream& is, compression_type t)
+ : is_ (is), end_ (false), pos_ (0)
+{
+ zs_.zalloc = Z_NULL;
+ zs_.zfree = Z_NULL;
+ zs_.opaque = Z_NULL;
+ zs_.next_in = Z_NULL;
+ zs_.avail_in = 0;
+
+ int window = 0;
+
+ switch (t)
+ {
+ case raw:
+ {
+ window = -15;
+ break;
+ }
+ case zlib:
+ {
+ window = 15;
+ break;
+ }
+ case gzip:
+ {
+ window = 16 + 15;
+ break;
+ }
+ }
+
+ int r (inflateInit2 (&zs_, window));
+
+ if (r != Z_OK)
+ throw decompression_failure (r);
+}
+
+compressed_input_stream::
+~compressed_input_stream ()
+{
+ inflateEnd (&zs_);
+}
+
+XMLFilePos compressed_input_stream::
+curPos () const
+{
+ return static_cast<XMLFilePos> (pos_);
+}
+
+XMLSize_t compressed_input_stream::
+readBytes (XMLByte* const buf, const XMLSize_t size)
+{
+ if (end_)
+ return 0;
+
+ // Keep calling inflate() until we fill up the buffer or reach the
+ // end of stream. If we run out of input data, call the underlying
+ // stream for more.
+ //
+ zs_.next_out = reinterpret_cast<Bytef*> (buf);
+ zs_.avail_out = static_cast<uInt> (size);
+
+ int r;
+
+ do
+ {
+ if (zs_.avail_in == 0)
+ {
+ zs_.avail_in = static_cast<uInt> (read ());
+ zs_.next_in = reinterpret_cast<Bytef*> (const_cast<char*> (in_));
+
+ if (zs_.avail_in == 0)
+ throw decompression_failure (Z_DATA_ERROR);
+ }
+
+ r = inflate (&zs_, Z_NO_FLUSH);
+
+ if (r != Z_OK && r != Z_STREAM_END)
+ throw decompression_failure (r);
+
+ } while (r != Z_STREAM_END && zs_.avail_out != 0);
+
+ if (r == Z_STREAM_END)
+ end_ = true;
+
+ size_t n (size - zs_.avail_out);
+ pos_ += n;
+
+ return static_cast<XMLSize_t> (n);
+}
+
+const XMLCh* compressed_input_stream::
+getContentType () const
+{
+ return 0;
+}
+
+size_t compressed_input_stream::
+read ()
+{
+ // Some implementations don't clear gcount if you call read() on a
+ // stream that is in the eof state.
+ //
+ if (is_.eof ())
+ return 0;
+
+ // Unset the exception failbit while we are working with the stream.
+ //
+ ios_base::iostate old (is_.exceptions ());
+ is_.exceptions (old & ~ios_base::failbit);
+
+ is_.read (in_, static_cast<streamsize> (buf_size_));
+
+ // Clear the fail bit if it was caused by eof and restore the original
+ // exception state. If there are any pending errors then the exception
+ // will be thrown now.
+ //
+ if (is_.fail () && is_.eof ())
+ is_.clear (is_.rdstate () & ~ios_base::failbit);
+
+ is_.exceptions (old);
+
+ // Make sure that if we failed, we won't be called again.
+ //
+ return !is_.fail () ? static_cast<size_t> (is_.gcount ()) : 0;
+}
diff --git a/xsd-examples/cxx/tree/compression/compressed-input-source.hxx b/xsd-examples/cxx/tree/compression/compressed-input-source.hxx
new file mode 100644
index 0000000..706433b
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/compressed-input-source.hxx
@@ -0,0 +1,121 @@
+// file : cxx/tree/compression/compressed-input-source.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef COMPRESSED_INPUT_SOURCE_HXX
+#define COMPRESSED_INPUT_SOURCE_HXX
+
+#include <zlib.h>
+
+#include <iosfwd>
+#include <string>
+#include <cstddef> // std::size_t
+#include <exception>
+
+#include <xercesc/sax/InputSource.hpp>
+#include <xercesc/util/BinInputStream.hpp>
+
+struct decompression_failure: std::exception
+{
+ explicit
+ decompression_failure (int code)
+ : code_ (code)
+ {
+ }
+
+ int
+ code () const
+ {
+ return code_;
+ }
+
+ const char*
+ message () const
+ {
+ return zError (code_);
+ }
+
+ virtual const char*
+ what () const throw ();
+
+private:
+ int code_;
+};
+
+// Xerces-C++ InputSource interface implementation with on-the-fly, zlib-
+// based decompression.
+//
+class compressed_input_source: public xercesc::InputSource
+{
+public:
+ enum compression_type
+ {
+ raw,
+ zlib,
+ gzip
+ };
+
+ compressed_input_source (std::istream&, compression_type);
+
+ compressed_input_source (std::istream&,
+ compression_type,
+ const std::string& system_id);
+
+ compressed_input_source (std::istream&,
+ compression_type,
+ const std::string& system_id,
+ const std::string& public_id);
+
+ struct copy {};
+
+ // Throws the copy exception if this function is called more than once.
+ //
+ virtual xercesc::BinInputStream*
+ makeStream () const;
+
+private:
+ mutable std::istream* is_;
+ compression_type type_;
+};
+
+// Xerces-C++ BinInputStream interface implementation with on-the-fly, zlib-
+// based decompression.
+//
+class compressed_input_stream: public xercesc::BinInputStream
+{
+public:
+ enum compression_type
+ {
+ raw,
+ zlib,
+ gzip
+ };
+
+ compressed_input_stream (std::istream&, compression_type);
+
+ virtual
+ ~compressed_input_stream ();
+
+ virtual XMLFilePos
+ curPos () const;
+
+ virtual XMLSize_t
+ readBytes (XMLByte* const buf, const XMLSize_t size);
+
+ virtual const XMLCh*
+ getContentType () const;
+
+private:
+ std::size_t
+ read ();
+
+private:
+ std::istream& is_;
+ z_stream zs_;
+ bool end_;
+
+ static const std::size_t buf_size_ = 65536;
+ char in_[buf_size_];
+ std::size_t pos_; // Current decompressed stream position.
+};
+
+#endif // COMPRESSED_INPUT_SOURCE_HXX
diff --git a/xsd-examples/cxx/tree/compression/driver.cxx b/xsd-examples/cxx/tree/compression/driver.cxx
new file mode 100644
index 0000000..15d842b
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/driver.cxx
@@ -0,0 +1,124 @@
+// file : cxx/tree/compression/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "library.hxx"
+
+#include "compressed-input-source.hxx"
+#include "compressed-format-target.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml.gz" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we are
+ // using the Xerces-C++ input/output interfaces.
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace library;
+
+ // Read in the XML file and obtain its object model.
+ //
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1], ifstream::in | ifstream::binary);
+
+ compressed_input_source cis (ifs, compressed_input_source::gzip, argv[1]);
+
+ unique_ptr<catalog> c (
+ catalog_ (cis, xml_schema::flags::dont_initialize));
+
+
+ // Let's print what we've got.
+ //
+ for (catalog::book_const_iterator bi (c->book ().begin ());
+ bi != c->book ().end ();
+ ++bi)
+ {
+ cerr << endl
+ << "ID : " << bi->id () << endl
+ << "ISBN : " << bi->isbn () << endl
+ << "Title : " << bi->title () << endl
+ << "Genre : " << bi->genre () << endl;
+
+ for (book::author_const_iterator ai (bi->author ().begin ());
+ ai != bi->author ().end ();
+ ++ai)
+ {
+ cerr << "Author : " << ai->name () << endl;
+ cerr << " Born : " << ai->born () << endl;
+
+ if (ai->died ())
+ cerr << " Died : " << *ai->died () << endl;
+
+ if (ai->recommends ())
+ cerr << " Recommends : " << (*ai->recommends ())->title () << endl;
+ }
+
+ cerr << "Available : " << std::boolalpha << bi->available () << endl;
+ }
+
+ // Prepare namespace mapping and schema location information.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["lib"].name = "http://www.codesynthesis.com/library";
+ map["lib"].schema = "library.xsd";
+
+ ofstream ofs;
+ ofs.exceptions (ofstream::badbit | ofstream::failbit | ofstream::eofbit);
+ ofs.open ("out.xml.gz", ofstream::out | ofstream::binary);
+
+ compressed_format_target cft (ofs, compressed_format_target::gzip);
+
+ // Write it out.
+ //
+ catalog_ (cft, *c, map, "UTF-8", xml_schema::flags::dont_initialize);
+
+ // Write out the compression stream trailer. If we don't do this
+ // explicitly, it will be done automatically in the cft's destructor
+ // but then any exceptions that might be throws will be ignored.
+ //
+ cft.close();
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const compression_failure& e)
+ {
+ cerr << "compression failure: " << e.message () << endl;
+ r = 1;
+ }
+ catch (const decompression_failure& e)
+ {
+ cerr << "decompression failure: " << e.message () << endl;
+ r = 1;
+ }
+ catch (const ios_base::failure&)
+ {
+ cerr << "file open or read/write failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/examples/cxx/tree/compression/library.xml.gz b/xsd-examples/cxx/tree/compression/library.xml.gz
index dd71159..dd71159 100644
--- a/examples/cxx/tree/compression/library.xml.gz
+++ b/xsd-examples/cxx/tree/compression/library.xml.gz
Binary files differ
diff --git a/xsd-examples/cxx/tree/compression/library.xsd b/xsd-examples/cxx/tree/compression/library.xsd
new file mode 100644
index 0000000..a741e7e
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/library.xsd
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/compression/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/compression/testscript b/xsd-examples/cxx/tree/compression/testscript
new file mode 100644
index 0000000..649de5a
--- /dev/null
+++ b/xsd-examples/cxx/tree/compression/testscript
@@ -0,0 +1,4 @@
+# file : cxx/tree/compression/testscript
+# license : not copyrighted - public domain
+
+$* $src_base/library.xml.gz &out.xml.gz 2>| : compressed-out
diff --git a/examples/cxx/tree/custom/README b/xsd-examples/cxx/tree/custom/README
index b2a65b5..b2a65b5 100644
--- a/examples/cxx/tree/custom/README
+++ b/xsd-examples/cxx/tree/custom/README
diff --git a/xsd-examples/cxx/tree/custom/buildfile b/xsd-examples/cxx/tree/custom/buildfile
new file mode 100644
index 0000000..e650f99
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/buildfile
@@ -0,0 +1,6 @@
+# file : cxx/tree/custom/buildfile
+# license : not copyrighted - public domain
+
+# Exclude examples which depend on not yet packaged libraries.
+#
+./: {*/ -calendar/}
diff --git a/xsd-examples/cxx/tree/custom/calendar/.gitignore b/xsd-examples/cxx/tree/custom/calendar/.gitignore
new file mode 100644
index 0000000..2f35b6b
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/.gitignore
@@ -0,0 +1,2 @@
+calendar.?xx
+xml-schema.hxx
diff --git a/examples/cxx/tree/custom/calendar/README b/xsd-examples/cxx/tree/custom/calendar/README
index f7f6989..f7f6989 100644
--- a/examples/cxx/tree/custom/calendar/README
+++ b/xsd-examples/cxx/tree/custom/calendar/README
diff --git a/xsd-examples/cxx/tree/custom/calendar/buildfile b/xsd-examples/cxx/tree/custom/calendar/buildfile
new file mode 100644
index 0000000..3c26122
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/buildfile
@@ -0,0 +1,47 @@
+# file : cxx/tree/custom/calendar/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libboost-date-time%lib{boost_date_time}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -calendar -xml-schema} \
+ {hxx ixx cxx}{calendar} \
+ {hxx }{xml-schema} \
+ $libs
+
+exe{driver}: xml{calendar}: test.input = true
+
+<{hxx ixx cxx}{calendar}>: xsd{calendar} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --extern-xml-schema xml-schema.xsd \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+hxx{xml-schema}: $xsd
+{{
+ diag xsd gen ($>[0])
+
+ # Note that the specified xml-schema.xsd doesn't exist and is only used to
+ # deduce the generated header name.
+ #
+ $xsd cxx-tree --std c++11 \
+ --generate-xml-schema \
+ --custom-type date \
+ --hxx-epilogue '#include "xml-schema-custom.hxx"' \
+ --output-dir $out_base \
+ xml-schema.xsd
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/custom/calendar/calendar.xml b/xsd-examples/cxx/tree/custom/calendar/calendar.xml
new file mode 100644
index 0000000..8fff59c
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/calendar.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/calendar/calendar.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<cal:events xmlns:cal="http://www.codesynthesis.com/calendar"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/calendar calendar.xsd">
+
+ <event title="Bike ride" date="2006-09-04">
+ Don't forget to change the tire.
+ </event>
+
+ <event title="Mountain hike" date="2006-09-05">
+ Can be cancelled if it is too cold.
+ </event>
+
+</cal:events>
diff --git a/xsd-examples/cxx/tree/custom/calendar/calendar.xsd b/xsd-examples/cxx/tree/custom/calendar/calendar.xsd
new file mode 100644
index 0000000..8b36c34
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/calendar.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/calendar/calendar.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:cal="http://www.codesynthesis.com/calendar"
+ targetNamespace="http://www.codesynthesis.com/calendar">
+
+ <xsd:complexType name="event">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="title" type="xsd:string" use="required"/>
+ <xsd:attribute name="date" type="xsd:date" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="events">
+ <xsd:sequence>
+ <xsd:element name="event" type="cal:event" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="events" type="cal:events"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/custom/calendar/driver.cxx b/xsd-examples/cxx/tree/custom/calendar/driver.cxx
new file mode 100644
index 0000000..fdecf57
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/driver.cxx
@@ -0,0 +1,39 @@
+// file : cxx/tree/custom/calendar/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "calendar.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " calendar.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace calendar;
+
+ std::unique_ptr<events> e (events_ (argv[1]));
+
+ for (events::event_const_iterator i (e->event ().begin ());
+ i != e->event ().end (); ++i)
+ {
+ cerr << i->date () << " " << i->title () << endl
+ << *i << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.cxx b/xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.cxx
new file mode 100644
index 0000000..2bfe0f2
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.cxx
@@ -0,0 +1,56 @@
+// file : cxx/tree/custom/calendar/xml-schema-custom.cxx
+// copyright : not copyrighted - public domain
+
+// Include xml-schema.hxx instead of xml-schema-custom.hxx here.
+//
+#include "xml-schema.hxx"
+
+#include <xsd/cxx/xml/string.hxx> // xsd::cxx::xml::transcode
+#include <xsd/cxx/tree/text.hxx> // xsd::cxx::tree::text_content
+
+using namespace boost;
+using namespace boost::gregorian;
+
+namespace xml_schema
+{
+ date::
+ date (const xercesc::DOMElement& e, flags f, container* c)
+ : simple_type (e, f, c),
+ gregorian::date (
+ from_simple_string (
+ xsd::cxx::tree::text_content<char> (e)))
+ {
+ }
+
+ date::
+ date (const xercesc::DOMAttr& a, flags f, container* c)
+ : simple_type (a, f, c),
+ gregorian::date (
+ from_simple_string (
+ xsd::cxx::xml::transcode<char> (a.getValue ())))
+ {
+ }
+
+ date::
+ date (const std::string& s,
+ const xercesc::DOMElement* e,
+ flags f,
+ container* c)
+ : simple_type (s, e, f, c),
+ gregorian::date (from_simple_string (s))
+ {
+ }
+
+ date::
+ date (const date& d, flags f, container* c)
+ : simple_type (d, f, c),
+ gregorian::date (d)
+ {
+ }
+
+ date* date::
+ _clone (flags f, container* c) const
+ {
+ return new date (*this, f, c);
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.hxx b/xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.hxx
new file mode 100644
index 0000000..f8f8218
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/calendar/xml-schema-custom.hxx
@@ -0,0 +1,33 @@
+// file : cxx/tree/custom/calendar/xml-schema-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use xml-schema.hxx instead. This
+// file is included into generated xml-schema.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+#include <boost/date_time/gregorian/gregorian.hpp> // boost::gregorian::date
+
+namespace xml_schema
+{
+ class date: public simple_type,
+ public boost::gregorian::date
+ {
+ public:
+ // Parsing c-tors: element, attribute, and list item.
+ //
+ date (const xercesc::DOMElement&, flags = 0, container* = 0);
+ date (const xercesc::DOMAttr&, flags = 0, container* = 0);
+ date (const std::string&,
+ const xercesc::DOMElement*,
+ flags = 0,
+ container* = 0);
+
+ // Copy c-tor and _clone.
+ //
+ date (const date&, flags = 0, container* = 0);
+
+ virtual date*
+ _clone (flags = 0, container* = 0) const;
+ };
+}
diff --git a/xsd-examples/cxx/tree/custom/comments/.gitignore b/xsd-examples/cxx/tree/custom/comments/.gitignore
new file mode 100644
index 0000000..78cfc67
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/.gitignore
@@ -0,0 +1,2 @@
+people.?xx
+xml-schema.hxx
diff --git a/examples/cxx/tree/custom/comments/README b/xsd-examples/cxx/tree/custom/comments/README
index 8fd69d0..8fd69d0 100644
--- a/examples/cxx/tree/custom/comments/README
+++ b/xsd-examples/cxx/tree/custom/comments/README
diff --git a/xsd-examples/cxx/tree/custom/comments/buildfile b/xsd-examples/cxx/tree/custom/comments/buildfile
new file mode 100644
index 0000000..093a6cc
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/buildfile
@@ -0,0 +1,48 @@
+# file : cxx/tree/custom/comments/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -people -xml-schema} \
+ {hxx ixx cxx}{people} \
+ {hxx }{xml-schema} \
+ $libs
+
+exe{driver}: xml{people}: test.input = true
+
+<{hxx ixx cxx}{people}>: xsd{people} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --extern-xml-schema xml-schema.xsd \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+hxx{xml-schema}: $xsd
+{{
+ diag xsd gen ($>[0])
+
+ # Note that the specified xml-schema.xsd doesn't exist and is only used to
+ # deduce the generated header name.
+ #
+ $xsd cxx-tree --std c++11 \
+ --generate-xml-schema \
+ --generate-serialization \
+ --custom-type anyType=/type_base \
+ --hxx-epilogue '#include "xml-schema-custom.hxx"' \
+ --output-dir $out_base \
+ xml-schema.xsd
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/custom/comments/dom-parse.cxx b/xsd-examples/cxx/tree/custom/comments/dom-parse.cxx
new file mode 100644
index 0000000..2fa6a70
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/dom-parse.cxx
@@ -0,0 +1,93 @@
+// file : cxx/tree/custom/comments/dom-parse.cxx
+// copyright : not copyrighted - public domain
+
+#include "dom-parse.hxx"
+
+#include <istream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+xml::dom::unique_ptr<DOMDocument>
+parse (std::istream& is, const std::string& id, bool validate)
+{
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ xml::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Preserve comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, true);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable/Disable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, validate);
+ conf->setParameter (XMLUni::fgXercesSchema, validate);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Prepare input stream.
+ //
+ xml::sax::std_input_source isrc (is, id);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ xml::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<tree::parsing<char> > ();
+
+ return doc;
+}
diff --git a/xsd-examples/cxx/tree/custom/comments/dom-parse.hxx b/xsd-examples/cxx/tree/custom/comments/dom-parse.hxx
new file mode 100644
index 0000000..83c3dd4
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/dom-parse.hxx
@@ -0,0 +1,23 @@
+// file : cxx/tree/custom/comments/dom-parse.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef DOM_PARSE
+#define DOM_PARSE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+// Parse an XML document from the standard input stream with an
+// optional resource id. Resource id is used in diagnostics as
+// well as to locate schemas referenced from inside the document.
+//
+xsd::cxx::xml::dom::unique_ptr<xercesc::DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate);
+
+#endif // DOM_PARSE
diff --git a/xsd-examples/cxx/tree/custom/comments/driver.cxx b/xsd-examples/cxx/tree/custom/comments/driver.cxx
new file mode 100644
index 0000000..5588273
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/driver.cxx
@@ -0,0 +1,90 @@
+// file : cxx/tree/custom/commens/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "people.hxx"
+#include "dom-parse.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " people.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we
+ // are doing the XML-to-DOM parsing ourselves (see below).
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace people;
+ namespace xml = xsd::cxx::xml;
+
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ // For performance reasons the internal XML to DOM parsing code
+ // discards comments in the resulting DOM document. To overcome
+ // this we are going to use our own parse() function from
+ // dom-parse.hxx that preserves comments in the resulting DOM
+ // documents.
+ //
+ xml_schema::dom::unique_ptr<xercesc::DOMDocument> doc (
+ parse (ifs, argv[1], true));
+
+ // Parse the DOM document to the object model.
+ //
+ unique_ptr<catalog> c (catalog_ (*doc));
+
+ // Change the object model.
+ //
+ catalog::person_sequence& ps (c->person ());
+
+ for (catalog::person_iterator i (ps.begin ()); i != ps.end (); ++i)
+ {
+ i->age (i->age () + 1);
+ }
+
+ person john ("John Doe", 30);
+ john.comment ("Record for John Doe");
+
+ ps.push_back (john);
+
+ // Serialize.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["ppl"].name = "http://www.codesynthesis.com/people";
+ map["ppl"].schema = "people.xsd";
+
+ catalog_ (std::cout, *c, map);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/custom/comments/people.xml b/xsd-examples/cxx/tree/custom/comments/people.xml
new file mode 100644
index 0000000..08d69e9
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/people.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/comments/people.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<ppl:catalog xmlns:ppl="http://www.codesynthesis.com/people"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
+
+ <person>
+ <!--Record for Joe Dirt-->
+ <name>Joe Dirt</name>
+ <age>28</age>
+ </person>
+
+</ppl:catalog>
diff --git a/xsd-examples/cxx/tree/custom/comments/people.xsd b/xsd-examples/cxx/tree/custom/comments/people.xsd
new file mode 100644
index 0000000..20f265f
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/people.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/comments/people.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ppl="http://www.codesynthesis.com/people"
+ targetNamespace="http://www.codesynthesis.com/people">
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="age" type="xsd:unsignedShort"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="ppl:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/custom/comments/xml-schema-custom.cxx b/xsd-examples/cxx/tree/custom/comments/xml-schema-custom.cxx
new file mode 100644
index 0000000..265e0cb
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/xml-schema-custom.cxx
@@ -0,0 +1,117 @@
+// file : cxx/tree/custom/comments/xml-schema-custom.cxx
+// copyright : not copyrighted - public domain
+
+// Include xml-schema.hxx instead of xml-schema-custom.hxx here.
+//
+#include "xml-schema.hxx"
+
+#include <xercesc/dom/DOMComment.hpp>
+#include <xercesc/dom/DOMDocument.hpp>
+
+#include <xsd/cxx/xml/string.hxx> // xml::transcode, xml::string
+
+namespace xml = xsd::cxx::xml;
+
+namespace xml_schema
+{
+ type::
+ type ()
+ : type_base ()
+ {
+ }
+
+ type::
+ type (const xercesc::DOMElement& e, flags f, container* c)
+ : type_base (e, f, c)
+ {
+ using namespace xercesc;
+
+ // Here we are only handling a comment that is the first
+ // node in the element's content.
+ //
+ const DOMNode* n (e.getFirstChild ());
+
+ if (n != 0 && n->getNodeType () == DOMNode::COMMENT_NODE)
+ {
+ const DOMComment* c (static_cast<const DOMComment*> (n));
+ comment_ = xml::transcode<char> (c->getData ());
+ }
+ }
+
+ type::
+ type (const xercesc::DOMAttr& a, flags f, container* c)
+ : type_base (a, f, c)
+ {
+ // No comments for attributes.
+ //
+ }
+
+ type::
+ type (const std::string& s, const xercesc::DOMElement* e,
+ flags f, container* c)
+ : type_base (s, e, f, c)
+ {
+ // No comments for list items.
+ //
+ }
+
+ type::
+ type (const type& x, flags f, container* c)
+ : type_base (x, f, c), comment_ (x.comment_)
+ {
+ }
+
+ type* type::
+ _clone (flags f, container* c) const
+ {
+ return new type (*this, f, c);
+ }
+
+ // Serialization operators.
+ //
+ void
+ operator<< (xercesc::DOMElement& e, const type& x)
+ {
+ // Call our base first.
+ //
+ const type_base& b (x);
+ e << b;
+
+ // Add the comment if any.
+ //
+ const std::string s (x.comment ());
+
+ if (!s.empty ())
+ {
+ using namespace xercesc;
+
+ DOMDocument* doc (e.getOwnerDocument ());
+ DOMComment* c (doc->createComment (xml::string (s).c_str ()));
+ e.appendChild (c);
+ }
+ }
+
+ void
+ operator<< (xercesc::DOMAttr& a, const type& x)
+ {
+ // Call our base first.
+ //
+ const type_base& b (x);
+ a << b;
+
+ // No comments for attributes.
+ //
+ }
+
+ void
+ operator<< (xml_schema::list_stream& ls, const type& x)
+ {
+ // Call our base first.
+ //
+ const type_base& b (x);
+ ls << b;
+
+ // No comments for list items.
+ //
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/comments/xml-schema-custom.hxx b/xsd-examples/cxx/tree/custom/comments/xml-schema-custom.hxx
new file mode 100644
index 0000000..01a4f9c
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/comments/xml-schema-custom.hxx
@@ -0,0 +1,60 @@
+// file : cxx/tree/custom/comments/xml-schema-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use xml-schema.hxx instead. This
+// file is included into generated xml-schema.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+#include <string>
+
+namespace xml_schema
+{
+ // When customizing anyType always inherit from the original type.
+ //
+ class type: public type_base
+ {
+ public:
+ type ();
+ type (const xercesc::DOMElement&, flags = 0, container* = 0);
+ type (const xercesc::DOMAttr&, flags = 0, container* = 0);
+ type (const std::string&, const xercesc::DOMElement*,
+ flags = 0, container* = 0);
+ type (const type&, flags = 0, container* = 0);
+
+ type&
+ operator= (const type&) = default;
+
+ virtual type*
+ _clone (flags = 0, container* = 0) const;
+
+ public:
+ // Comment manipulation API.
+ //
+ const std::string&
+ comment () const
+ {
+ return comment_;
+ }
+
+ void
+ comment (const std::string& c)
+ {
+ comment_ = c;
+ }
+
+ private:
+ std::string comment_;
+ };
+
+ // New serialization operators.
+ //
+ void
+ operator<< (xercesc::DOMElement&, const type&);
+
+ void
+ operator<< (xercesc::DOMAttr&, const type&);
+
+ void
+ operator<< (xml_schema::list_stream&, const type&);
+}
diff --git a/xsd-examples/cxx/tree/custom/contacts/.gitignore b/xsd-examples/cxx/tree/custom/contacts/.gitignore
new file mode 100644
index 0000000..43c214d
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/.gitignore
@@ -0,0 +1 @@
+contacts.?xx
diff --git a/examples/cxx/tree/custom/contacts/README b/xsd-examples/cxx/tree/custom/contacts/README
index 072ede3..072ede3 100644
--- a/examples/cxx/tree/custom/contacts/README
+++ b/xsd-examples/cxx/tree/custom/contacts/README
diff --git a/xsd-examples/cxx/tree/custom/contacts/buildfile b/xsd-examples/cxx/tree/custom/contacts/buildfile
new file mode 100644
index 0000000..190306c
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/custom/contacts/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -contacts} {hxx ixx cxx}{contacts} $libs
+
+exe{driver}: xml{contacts}: test.input = true
+
+<{hxx ixx cxx}{contacts}>: xsd{contacts} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --custom-type contact=/contact_base \
+ --hxx-epilogue '#include "contacts-custom.hxx"' \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/tree/custom/contacts/contacts-custom.cxx b/xsd-examples/cxx/tree/custom/contacts/contacts-custom.cxx
new file mode 100644
index 0000000..208b00f
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/contacts-custom.cxx
@@ -0,0 +1,50 @@
+// file : cxx/tree/custom/contacts/contacts-custom.cxx
+// copyright : not copyrighted - public domain
+
+#include <ostream>
+
+// Include contacts.hxx instead of contacts-custom.hxx here.
+//
+#include "contacts.hxx"
+
+namespace contacts
+{
+ // We implement the following constructs by simply forwarding
+ // to our base.
+ //
+ contact::
+ contact (const name_type& n,
+ const email_type& e,
+ const phone_type& p)
+ : contact_base (n, e, p)
+ {
+ }
+
+ contact::
+ contact (const xercesc::DOMElement& e,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : contact_base (e, f, c)
+ {
+ }
+
+ contact::
+ contact (const contact& x,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : contact_base (x, f, c)
+ {
+ }
+
+ contact* contact::
+ _clone (xml_schema::flags f, xml_schema::container* c) const
+ {
+ return new contact (*this, f, c);
+ }
+
+ void contact::
+ print (std::ostream& os) const
+ {
+ os << name () << " e| " << email () << " t| " << phone () << std::endl;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/contacts/contacts-custom.hxx b/xsd-examples/cxx/tree/custom/contacts/contacts-custom.hxx
new file mode 100644
index 0000000..a5bc893
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/contacts-custom.hxx
@@ -0,0 +1,43 @@
+// file : cxx/tree/custom/contacts/contacts-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use contacts.hxx instead. This
+// file is included into generated contacts.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+#include <iosfwd> // std::ostream
+
+namespace contacts
+{
+ class contact: public contact_base
+ {
+ // The following constructor signatures are copied from
+ // contact_base except for the copy constructor and the
+ // _clone function where we had to change the type from
+ // contact_base to contact.
+ //
+ public:
+ contact (const name_type&,
+ const email_type&,
+ const phone_type&);
+
+ contact (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ contact (const contact&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ virtual contact*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ // Our customizations.
+ //
+ public:
+ void
+ print (std::ostream&) const;
+ };
+}
diff --git a/xsd-examples/cxx/tree/custom/contacts/contacts.xml b/xsd-examples/cxx/tree/custom/contacts/contacts.xml
new file mode 100644
index 0000000..884c25e
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/contacts.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/contacts/contacts.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<cts:catalog xmlns:cts="http://www.codesynthesis.com/contacts"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/contacts contacts.xsd">
+
+ <contact>
+ <name>Joe Dirt</name>
+ <email>joe@dirt.com</email>
+ <phone>555 DIRT</phone>
+ </contact>
+
+</cts:catalog>
diff --git a/xsd-examples/cxx/tree/custom/contacts/contacts.xsd b/xsd-examples/cxx/tree/custom/contacts/contacts.xsd
new file mode 100644
index 0000000..5348810
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/contacts.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/contacts/contacts.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:cts="http://www.codesynthesis.com/contacts"
+ targetNamespace="http://www.codesynthesis.com/contacts">
+
+ <xsd:complexType name="contact">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="email" type="xsd:string"/>
+ <xsd:element name="phone" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="contact" type="cts:contact" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <xsd:element name="catalog" type="cts:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/custom/contacts/driver.cxx b/xsd-examples/cxx/tree/custom/contacts/driver.cxx
new file mode 100644
index 0000000..a0c7510
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/contacts/driver.cxx
@@ -0,0 +1,38 @@
+// file : cxx/tree/custom/contacts/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "contacts.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " contacts.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace contacts;
+
+ std::unique_ptr<catalog> c (catalog_ (argv[1]));
+
+ for (catalog::contact_const_iterator i (c->contact ().begin ());
+ i != c->contact ().end (); ++i)
+ {
+ i->print (cerr);
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/double/.gitignore b/xsd-examples/cxx/tree/custom/double/.gitignore
new file mode 100644
index 0000000..5cc7f75
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/double/.gitignore
@@ -0,0 +1,2 @@
+order.?xx
+xml-schema.hxx
diff --git a/examples/cxx/tree/custom/double/README b/xsd-examples/cxx/tree/custom/double/README
index 15348d2..15348d2 100644
--- a/examples/cxx/tree/custom/double/README
+++ b/xsd-examples/cxx/tree/custom/double/README
diff --git a/xsd-examples/cxx/tree/custom/double/buildfile b/xsd-examples/cxx/tree/custom/double/buildfile
new file mode 100644
index 0000000..258191a
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/double/buildfile
@@ -0,0 +1,46 @@
+# file : cxx/tree/custom/double/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -order -xml-schema} \
+ {hxx ixx cxx}{order} \
+ {hxx }{xml-schema} \
+ $libs
+
+<{hxx ixx cxx}{order}>: xsd{order} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --extern-xml-schema xml-schema.xsd \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+hxx{xml-schema}: $xsd
+{{
+ diag xsd gen ($>[0])
+
+ # Note that the specified xml-schema.xsd doesn't exist and is only used to
+ # deduce the generated header name.
+ #
+ $xsd cxx-tree --std c++11 \
+ --generate-xml-schema \
+ --generate-serialization \
+ --custom-type double=double \
+ --hxx-epilogue '#include "double-custom.hxx"' \
+ --output-dir $out_base \
+ xml-schema.xsd
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/custom/double/double-custom.cxx b/xsd-examples/cxx/tree/custom/double/double-custom.cxx
new file mode 100644
index 0000000..bfec6e0
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/double/double-custom.cxx
@@ -0,0 +1,96 @@
+// file : cxx/tree/custom/double/double-custom.cxx
+// copyright : not copyrighted - public domain
+
+// Include xml-schema.hxx instead of double-custom.hxx here.
+//
+#include "xml-schema.hxx"
+
+#include <limits>
+#include <locale>
+#include <sstream>
+
+#include <xsd/cxx/ro-string.hxx>
+#include <xsd/cxx/zc-istream.hxx>
+
+using namespace std;
+
+// Parsing.
+//
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ double traits<double, char, schema_type::double_>::
+ create (const std::string& s,
+ const xercesc::DOMElement*,
+ flags,
+ type*)
+ {
+ // This type cannot have whitespaces in its values. As result we
+ // don't need to waste time collapsing whitespaces. All we need to
+ // do is trim the string representation which can be done without
+ // copying.
+ //
+ ro_string<char> tmp (s);
+ trim (tmp);
+
+ zc_istream<char> is (tmp);
+ is.imbue (locale::classic ());
+
+ double t;
+ is >> t;
+
+ return t;
+ }
+ }
+ }
+}
+
+// Serialization.
+//
+namespace XERCES_CPP_NAMESPACE
+{
+ void
+ operator<< (xercesc::DOMElement& e, const xml_schema::as_double& d)
+ {
+ ostringstream os;
+ os.imbue (locale::classic ());
+
+ os.precision (2);
+ os << fixed << d.x;
+
+ e << os.str ();
+ }
+
+ void
+ operator<< (xercesc::DOMAttr& a, const xml_schema::as_double& d)
+ {
+ ostringstream os;
+ os.imbue (locale::classic ());
+
+ os.precision (2);
+ os << fixed << d.x;
+
+ a << os.str ();
+ }
+}
+
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ void
+ operator<< (xml_schema::list_stream& ls,
+ const xml_schema::as_double& d)
+ {
+ ls.os_.imbue (locale::classic ());
+ ls.os_.precision (2);
+ ls.os_ << fixed << d.x;
+ }
+ }
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/double/double-custom.hxx b/xsd-examples/cxx/tree/custom/double/double-custom.hxx
new file mode 100644
index 0000000..cb74442
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/double/double-custom.hxx
@@ -0,0 +1,67 @@
+// file : cxx/tree/custom/double/double-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use xml-schema.hxx instead. This
+// file is included into generated xml-schema.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+#include <xsd/cxx/xml/string.hxx> // xml::transcode
+#include <xsd/cxx/tree/text.hxx> // text_content
+
+// Parsing.
+//
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ template<>
+ struct traits<double, char, schema_type::double_>
+ {
+ static double
+ create (const xercesc::DOMElement& e, flags f, type* c)
+ {
+ return create (text_content<char> (e), 0, f, c);
+ }
+
+ static double
+ create (const xercesc::DOMAttr& a, flags f, type* c)
+ {
+ return create (xml::transcode<char> (a.getValue ()), 0, f, c);
+ }
+
+ static double
+ create (const std::string& s,
+ const xercesc::DOMElement*,
+ flags,
+ type*);
+ };
+ }
+ }
+}
+
+// Serialization.
+//
+namespace XERCES_CPP_NAMESPACE
+{
+ void
+ operator<< (xercesc::DOMElement& e, const xml_schema::as_double& d);
+
+ void
+ operator<< (xercesc::DOMAttr& a, const xml_schema::as_double& d);
+}
+
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ void
+ operator<< (xml_schema::list_stream& ls,
+ const xml_schema::as_double& d);
+ }
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/double/driver.cxx b/xsd-examples/cxx/tree/custom/double/driver.cxx
new file mode 100644
index 0000000..e3f1800
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/double/driver.cxx
@@ -0,0 +1,31 @@
+// file : cxx/tree/custom/double/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <iostream>
+
+#include "order.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main ()
+{
+ try
+ {
+ // Order one Airbus A380.
+ //
+ order o;
+ o.item ().push_back (item ("Airbus A380", 317000000.90));
+
+
+ // Serialize.
+ //
+ order_ (std::cout, o);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/double/order.xsd b/xsd-examples/cxx/tree/custom/double/order.xsd
new file mode 100644
index 0000000..8066975
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/double/order.xsd
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/double/order.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="item">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="price" type="xsd:double" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="order">
+ <xsd:sequence>
+ <xsd:element name="item" type="item" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="order" type="order"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/custom/mixed/.gitignore b/xsd-examples/cxx/tree/custom/mixed/.gitignore
new file mode 100644
index 0000000..83d0a51
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/.gitignore
@@ -0,0 +1 @@
+people.?xx
diff --git a/examples/cxx/tree/custom/mixed/README b/xsd-examples/cxx/tree/custom/mixed/README
index 7b56812..7b56812 100644
--- a/examples/cxx/tree/custom/mixed/README
+++ b/xsd-examples/cxx/tree/custom/mixed/README
diff --git a/xsd-examples/cxx/tree/custom/mixed/buildfile b/xsd-examples/cxx/tree/custom/mixed/buildfile
new file mode 100644
index 0000000..9da936e
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/buildfile
@@ -0,0 +1,30 @@
+# file : cxx/tree/custom/mixed/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -people} {hxx ixx cxx}{people} $libs
+
+exe{driver}: xml{people}: test.input = true
+
+<{hxx ixx cxx}{people}>: xsd{people} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --custom-type bio=/bio_base \
+ --hxx-epilogue '#include "people-custom.hxx"' \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/custom/mixed/driver.cxx b/xsd-examples/cxx/tree/custom/mixed/driver.cxx
new file mode 100644
index 0000000..08c83e0
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/driver.cxx
@@ -0,0 +1,122 @@
+// file : cxx/tree/custom/mixed/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "people.hxx"
+
+// The following transcode() utility function is handy when working with
+// Xerces. Include it after the generated header in order to get only char
+// or wchar_t version depending on how you compiled your schemas.
+//
+#include <xsd/cxx/xml/string.hxx>
+
+using std::cerr;
+using std::endl;
+using namespace xercesc;
+
+void
+xhtml2txt (const DOMElement*);
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " people.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // The Xerces-C++ DOM document that will be used to store the XHTML
+ // fragments "out-live" the call to the parsing function. Therefore
+ // we need to initialize the Xerces-C++ runtime ourselves.
+ //
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace people;
+
+ // Parse.
+ //
+ std::unique_ptr<directory> d (
+ directory_ (argv[1], xml_schema::flags::dont_initialize));
+
+ // Print what we've got.
+ //
+ const directory::person_sequence& s (d->person ());
+
+ for (directory::person_const_iterator i (s.begin ()); i != s.end (); ++i)
+ {
+ cerr << "First : " << i->first_name () << endl
+ << "Last : " << i->last_name () << endl
+ << "Gender : " << i->gender () << endl
+ << "Age : " << i->age () << endl;
+
+ const bio& b (i->bio ());
+ const DOMElement* xhtml (b.xhtml ());
+
+ if (xhtml != 0)
+ {
+ cerr << "Bio : " << endl;
+ xhtml2txt (xhtml);
+ }
+
+ cerr << endl;
+ }
+
+ // Serialize.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["ppl"].name = "http://www.codesynthesis.com/people";
+ map["ppl"].schema = "people.xsd";
+
+ directory_ (
+ std::cout, *d, map, "UTF-8", xml_schema::flags::dont_initialize);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
+
+// Primitive XHTML to text converter that just prints all the text
+// nodes and ignores everything else.
+//
+void
+xhtml2txt (const DOMElement* e)
+{
+ namespace xml = xsd::cxx::xml;
+
+ for (const DOMNode* n (e->getFirstChild ());
+ n != 0;
+ n = n->getNextSibling ())
+ {
+ switch (n->getNodeType ())
+ {
+ case DOMNode::TEXT_NODE:
+ {
+ cerr << xml::transcode<char> (n->getTextContent ());
+ break;
+ }
+ case DOMNode::ELEMENT_NODE:
+ {
+ xhtml2txt (static_cast<const DOMElement*> (n));
+ break;
+ }
+ default:
+ break; // Ignore all other nodes (e.g., comments, etc).
+ }
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/mixed/people-custom.cxx b/xsd-examples/cxx/tree/custom/mixed/people-custom.cxx
new file mode 100644
index 0000000..bd03fcc
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/people-custom.cxx
@@ -0,0 +1,89 @@
+// file : cxx/tree/custom/mixed/people-custom.cxx
+// copyright : not copyrighted - public domain
+
+#include <ostream>
+
+// Include people.hxx instead of people-custom.hxx here.
+//
+#include "people.hxx"
+
+namespace people
+{
+ using namespace xercesc;
+
+ const XMLCh ls[] = {chLatin_L, chLatin_S, chNull};
+
+ bio::
+ bio ()
+ : xhtml_ (0)
+ {
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls));
+
+ doc_.reset (impl->createDocument ());
+ }
+
+ bio::
+ bio (const DOMElement& e,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : bio_base (e, f, c), xhtml_ (0)
+ {
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls));
+
+ doc_.reset (impl->createDocument ());
+
+ // Copy the xhtml element. Assume the first child element in
+ // e is always xhtml.
+ //
+ for (DOMNode* n (e.getFirstChild ()); n != 0; n = n->getNextSibling ())
+ {
+ if (n->getNodeType () == DOMNode::ELEMENT_NODE)
+ {
+ xhtml_ = static_cast<DOMElement*> (doc_->importNode (n, true));
+ break;
+ }
+ }
+ }
+
+ bio::
+ bio (const bio& d,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : bio_base (d, f, c), xhtml_ (0)
+ {
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls));
+
+ doc_.reset (impl->createDocument ());
+
+ xhtml_ = static_cast<DOMElement*> (
+ doc_->importNode (const_cast<DOMElement*> (d.xhtml_), true));
+ }
+
+ bio* bio::
+ _clone (xml_schema::flags f, xml_schema::container* c) const
+ {
+ return new bio (*this, f, c);
+ }
+
+ void
+ operator<< (DOMElement& e, const bio& x)
+ {
+ // Allow our base to serialize first.
+ //
+ const bio_base& b (x);
+ e << b;
+
+ // Copy the XHTML fragment if we have one.
+ //
+ const DOMElement* xhtml (x.xhtml ());
+
+ if (xhtml != 0)
+ {
+ DOMDocument* doc (e.getOwnerDocument ());
+ e.appendChild (doc->importNode (const_cast<DOMElement*> (xhtml), true));
+ }
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/mixed/people-custom.hxx b/xsd-examples/cxx/tree/custom/mixed/people-custom.hxx
new file mode 100644
index 0000000..2ab949d
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/people-custom.hxx
@@ -0,0 +1,83 @@
+// file : cxx/tree/custom/mixed/people-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use people.hxx instead. This
+// file is included into generated people.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+#include <cassert>
+#include <xercesc/dom/DOM.hpp>
+
+namespace people
+{
+ class bio: public bio_base
+ {
+ // Standard constructors.
+ //
+ public:
+ bio ();
+
+ bio (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ bio (const bio&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ virtual bio*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ // XHTML bio as a DOM document.
+ //
+ public:
+ const xercesc::DOMElement*
+ xhtml () const
+ {
+ return xhtml_;
+ }
+
+ xercesc::DOMElement*
+ xhtml ()
+ {
+ return xhtml_;
+ }
+
+ // The element should belong to the DOMDocument returned by
+ // the dom_document() functions.
+ //
+ void
+ xhtml (xercesc::DOMElement* e)
+ {
+ assert (e->getOwnerDocument () == doc_.get ());
+
+ if (xhtml_ != 0)
+ xhtml_->release ();
+
+ xhtml_ = e;
+ }
+
+ const xercesc::DOMDocument&
+ dom_document () const
+ {
+ return *doc_;
+ }
+
+ xercesc::DOMDocument&
+ dom_document ()
+ {
+ return *doc_;
+ }
+
+ private:
+ xercesc::DOMElement* xhtml_;
+ xml_schema::dom::unique_ptr<xercesc::DOMDocument> doc_;
+ };
+
+ // Serialization operator.
+ //
+ void
+ operator<< (xercesc::DOMElement&, const bio&);
+}
diff --git a/xsd-examples/cxx/tree/custom/mixed/people.xml b/xsd-examples/cxx/tree/custom/mixed/people.xml
new file mode 100644
index 0000000..4033f95
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/people.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/mixed/people.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<ppl:directory xmlns:ppl="http://www.codesynthesis.com/people"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
+
+ <person>
+ <first-name>John</first-name>
+ <last-name>Doe</last-name>
+ <gender>male</gender>
+ <age>32</age>
+ <bio>
+ <xhtml xmlns="http://www.w3.org/1999/xhtml">
+ <p>Married to Jane Doe.</p>
+ </xhtml>
+ </bio>
+ </person>
+
+ <person>
+ <first-name>Jane</first-name>
+ <last-name>Doe</last-name>
+ <gender>female</gender>
+ <age>28</age>
+ <bio>
+ <xhtml xmlns="http://www.w3.org/1999/xhtml">
+ <p>Married to John Doe.</p>
+ </xhtml>
+ </bio>
+ </person>
+
+</ppl:directory>
diff --git a/xsd-examples/cxx/tree/custom/mixed/people.xsd b/xsd-examples/cxx/tree/custom/mixed/people.xsd
new file mode 100644
index 0000000..739861b
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/mixed/people.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/mixed/people.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ppl="http://www.codesynthesis.com/people"
+ targetNamespace="http://www.codesynthesis.com/people">
+
+ <xsd:simpleType name="gender">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="male"/>
+ <xsd:enumeration value="female"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="bio" mixed="true">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="first-name" type="xsd:string"/>
+ <xsd:element name="last-name" type="xsd:string"/>
+ <xsd:element name="gender" type="ppl:gender"/>
+ <xsd:element name="age" type="xsd:unsignedShort"/>
+ <xsd:element name="bio" type="ppl:bio"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="directory">
+ <xsd:sequence>
+ <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="directory" type="ppl:directory"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/.gitignore b/xsd-examples/cxx/tree/custom/taxonomy/.gitignore
new file mode 100644
index 0000000..71428ab
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/.gitignore
@@ -0,0 +1,2 @@
+people.?xx
+people-fwd.hxx
diff --git a/examples/cxx/tree/custom/taxonomy/README b/xsd-examples/cxx/tree/custom/taxonomy/README
index c2e425a..c2e425a 100644
--- a/examples/cxx/tree/custom/taxonomy/README
+++ b/xsd-examples/cxx/tree/custom/taxonomy/README
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/buildfile b/xsd-examples/cxx/tree/custom/taxonomy/buildfile
new file mode 100644
index 0000000..9267c68
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/buildfile
@@ -0,0 +1,31 @@
+# file : cxx/tree/custom/taxonomy/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -people} {hxx ixx cxx}{people} hxx{people-fwd} $libs
+
+exe{driver}: xml{people}: test.input = true
+
+<{hxx ixx cxx}{people} hxx{people-fwd}>: xsd{people} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-forward \
+ --generate-polymorphic \
+ --polymorphic-type person \
+ --custom-type "person=person_impl<person_base>/person_base" \
+ --custom-type "superman=superman_impl<superman_base>/superman_base" \
+ --custom-type "batman=batman_impl<batman_base>/batman_base" \
+ --fwd-prologue '#include "people-custom-fwd.hxx"' \
+ --hxx-prologue '#include "people-custom.hxx"' \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/driver.cxx b/xsd-examples/cxx/tree/custom/taxonomy/driver.cxx
new file mode 100644
index 0000000..f719bbb
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/driver.cxx
@@ -0,0 +1,38 @@
+// file : cxx/tree/custom/taxonomy/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "people.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " people.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace people;
+
+ std::unique_ptr<catalog> c (catalog_ (argv[1]));
+
+ for (catalog::person_const_iterator i (c->person ().begin ());
+ i != c->person ().end (); ++i)
+ {
+ i->print (cerr);
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx b/xsd-examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx
new file mode 100644
index 0000000..1b59a54
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/people-custom-fwd.hxx
@@ -0,0 +1,19 @@
+// file : cxx/tree/custom/taxonomy/people-custom-fwd.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use people-fwd.hxx instead. This
+// file is included into generated people-fwd.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+namespace people
+{
+ template <typename base>
+ class person_impl;
+
+ template <typename base>
+ class superman_impl;
+
+ template <typename base>
+ class batman_impl;
+}
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/people-custom.cxx b/xsd-examples/cxx/tree/custom/taxonomy/people-custom.cxx
new file mode 100644
index 0000000..decc847
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/people-custom.cxx
@@ -0,0 +1,156 @@
+// file : cxx/tree/custom/taxonomy/people-custom.cxx
+// copyright : not copyrighted - public domain
+
+#include <ostream>
+
+// Include people.hxx instead of people-custom.hxx here.
+//
+#include "people.hxx"
+
+namespace people
+{
+ // person_impl
+ //
+ template <typename base>
+ person_impl<base>::
+ person_impl (const xml_schema::string& name)
+ : base (name)
+ {
+ }
+
+ template <typename base>
+ person_impl<base>::
+ person_impl (const xercesc::DOMElement& e,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : base (e, f, c)
+ {
+ }
+
+ template <typename base>
+ person_impl<base>::
+ person_impl (const person_impl& p,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : base (p, f, c)
+ {
+ }
+
+ template <typename base>
+ person_impl<base>* person_impl<base>::
+ _clone (xml_schema::flags f, xml_schema::container* c) const
+ {
+ return new person_impl (*this, f, c);
+ }
+
+ template <typename base>
+ void person_impl<base>::
+ print (std::ostream& os) const
+ {
+ os << this->name () << std::endl;
+ }
+
+ // Explicitly instantiate person_impl class template for person_base.
+ //
+ template class person_impl<person_base>;
+
+
+ // superman_impl
+ //
+ template <typename base>
+ superman_impl<base>::
+ superman_impl (const xml_schema::string& name, bool can_fly)
+ : base (name, can_fly)
+ {
+ }
+
+ template <typename base>
+ superman_impl<base>::
+ superman_impl (const xercesc::DOMElement& e,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : base (e, f, c)
+ {
+ }
+
+ template <typename base>
+ superman_impl<base>::
+ superman_impl (const superman_impl& s,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : base (s, f, c)
+ {
+ }
+
+ template <typename base>
+ superman_impl<base>* superman_impl<base>::
+ _clone (xml_schema::flags f, xml_schema::container* c) const
+ {
+ return new superman_impl (*this, f, c);
+ }
+
+ template <typename base>
+ void superman_impl<base>::
+ print (std::ostream& os) const
+ {
+ if (this->can_fly ())
+ os << "Flying superman ";
+ else
+ os << "Superman ";
+
+ os << this->name () << std::endl;
+ }
+
+ // Explicitly instantiate superman_impl class template for superman_base.
+ //
+ template class superman_impl<superman_base>;
+
+
+ // batman_impl
+ //
+ template <typename base>
+ batman_impl<base>::
+ batman_impl (const xml_schema::string& name,
+ bool can_fly,
+ unsigned int wing_span)
+ : base (name, can_fly, wing_span)
+ {
+ }
+
+ template <typename base>
+ batman_impl<base>::
+ batman_impl (const xercesc::DOMElement& e,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : base (e, f, c)
+ {
+ }
+
+ template <typename base>
+ batman_impl<base>::
+ batman_impl (const batman_impl& s,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : base (s, f, c)
+ {
+ }
+
+ template <typename base>
+ batman_impl<base>* batman_impl<base>::
+ _clone (xml_schema::flags f, xml_schema::container* c) const
+ {
+ return new batman_impl (*this, f, c);
+ }
+
+ template <typename base>
+ void batman_impl<base>::
+ print (std::ostream& os) const
+ {
+ os << "Batman " << this->name () << " with " <<
+ this->wing_span () << "m wing span" << std::endl;
+ }
+
+ // Explicitly instantiate batman_impl class template for batman_base.
+ //
+ template class batman_impl<batman_base>;
+}
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/people-custom.hxx b/xsd-examples/cxx/tree/custom/taxonomy/people-custom.hxx
new file mode 100644
index 0000000..58c94c4
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/people-custom.hxx
@@ -0,0 +1,105 @@
+// file : cxx/tree/custom/taxonomy/people-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use people.hxx instead. This
+// file is included into generated people.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+#include <iosfwd> // std::ostream
+
+// Include people-fwd.hxx here so that we can refer to the generated
+// types.
+//
+#include "people-fwd.hxx"
+
+namespace people
+{
+ //
+ //
+ template <typename base>
+ class person_impl: public base
+ {
+ public:
+ person_impl (const xml_schema::string& name);
+
+ person_impl (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ person_impl (const person_impl&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ person_impl&
+ operator= (const person_impl&) = default;
+
+ virtual person_impl*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ public:
+ virtual void
+ print (std::ostream&) const;
+ };
+
+
+ //
+ //
+ template <typename base>
+ class superman_impl: public base
+ {
+ public:
+ superman_impl (const xml_schema::string& name, bool can_fly);
+
+ superman_impl (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ superman_impl (const superman_impl&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ virtual superman_impl*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ superman_impl&
+ operator= (const superman_impl&) = default;
+
+ public:
+ virtual void
+ print (std::ostream&) const;
+ };
+
+
+ //
+ //
+ template <typename base>
+ class batman_impl: public base
+ {
+ public:
+ batman_impl (const xml_schema::string& name,
+ bool can_fly,
+ unsigned int wing_span);
+
+ batman_impl (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ batman_impl (const batman_impl&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ batman_impl&
+ operator= (const batman_impl&) = default;
+
+ virtual batman_impl*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ public:
+ virtual void
+ print (std::ostream&) const;
+ };
+}
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/people.xml b/xsd-examples/cxx/tree/custom/taxonomy/people.xml
new file mode 100644
index 0000000..831c547
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/people.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/taxonomy/people.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<ppl:catalog xmlns:ppl="http://www.codesynthesis.com/people"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
+
+ <person>
+ <name>Joe Dirt</name>
+ </person>
+
+ <person xsi:type="ppl:superman" can-fly="false">
+ <name>James "007" Bond</name>
+ </person>
+
+ <person xsi:type="ppl:batman" can-fly="true" wing-span="10">
+ <name>Bruce Wayne</name>
+ </person>
+
+</ppl:catalog>
diff --git a/xsd-examples/cxx/tree/custom/taxonomy/people.xsd b/xsd-examples/cxx/tree/custom/taxonomy/people.xsd
new file mode 100644
index 0000000..b07f338
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/taxonomy/people.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/taxonomy/people.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ppl="http://www.codesynthesis.com/people"
+ targetNamespace="http://www.codesynthesis.com/people">
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="superman">
+ <xsd:complexContent>
+ <xsd:extension base="ppl:person">
+ <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="batman">
+ <xsd:complexContent>
+ <xsd:extension base="ppl:superman">
+ <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="ppl:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/custom/wildcard/.gitignore b/xsd-examples/cxx/tree/custom/wildcard/.gitignore
new file mode 100644
index 0000000..f32cbe8
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/.gitignore
@@ -0,0 +1 @@
+wildcard.?xx
diff --git a/examples/cxx/tree/custom/wildcard/README b/xsd-examples/cxx/tree/custom/wildcard/README
index 70eaea4..70eaea4 100644
--- a/examples/cxx/tree/custom/wildcard/README
+++ b/xsd-examples/cxx/tree/custom/wildcard/README
diff --git a/xsd-examples/cxx/tree/custom/wildcard/buildfile b/xsd-examples/cxx/tree/custom/wildcard/buildfile
new file mode 100644
index 0000000..e386709
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/custom/wildcard/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -wildcard} {hxx ixx cxx}{wildcard} $libs
+
+exe{driver}: xml{wildcard}: test.input = true
+
+<{hxx ixx cxx}{wildcard}>: xsd{wildcard} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-ostream \
+ --custom-type data=/data_base \
+ --hxx-epilogue '#include "wildcard-custom.hxx"' \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-examples/cxx/tree/custom/wildcard/driver.cxx b/xsd-examples/cxx/tree/custom/wildcard/driver.cxx
new file mode 100644
index 0000000..43fae82
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/driver.cxx
@@ -0,0 +1,47 @@
+// file : cxx/tree/custom/wildcard/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "wildcard.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " wildcard.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace wildcard;
+
+ // Parse.
+ //
+ std::unique_ptr<data> d (data_ (argv[1]));
+
+ // Print.
+ //
+ cerr << *d << endl;
+
+ // Serialize.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["wc"].name = "http://www.codesynthesis.com/wildcard";
+ map["wc"].schema = "wildcard.xsd";
+
+ data_ (std::cout, *d, map);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.cxx b/xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.cxx
new file mode 100644
index 0000000..16798d2
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.cxx
@@ -0,0 +1,84 @@
+// file : cxx/tree/custom/wildcard/wildcard-custom.cxx
+// copyright : not copyrighted - public domain
+
+#include <ostream>
+
+// Include wildcard.hxx instead of wildcard-custom.hxx here.
+//
+#include "wildcard.hxx"
+
+namespace wildcard
+{
+ data::
+ data (const xml_schema::string& d)
+ : data_base (d), scope_present_ (false)
+ {
+ }
+
+ data::
+ data (const xercesc::DOMElement& e,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : data_base (e, f, c), scope_present_ (false)
+ {
+ // Check if we've got the scope attribute.
+ //
+ namespace xml = xsd::cxx::xml;
+ xml::string name ("scope");
+
+ if (e.hasAttribute (name.c_str ()))
+ {
+ scope (xml::transcode<char> (e.getAttribute (name.c_str ())));
+ }
+ }
+
+ data::
+ data (const data& d,
+ xml_schema::flags f,
+ xml_schema::container* c)
+ : data_base (d, f, c),
+ scope_present_ (d.scope_present_),
+ scope_ (d.scope_)
+ {
+ }
+
+ data* data::
+ _clone (xml_schema::flags f, xml_schema::container* c) const
+ {
+ return new data (*this, f, c);
+ }
+
+ void
+ operator<< (xercesc::DOMElement& e, const data& x)
+ {
+ // Use our base to serialize data and id.
+ //
+ const data_base& b (x);
+ e << b;
+
+ // Add the scope attribute if present.
+ //
+ if (x.scope_present ())
+ {
+ namespace xml = xsd::cxx::xml;
+ xml::string name ("scope");
+ xml::string value (x.scope ());
+
+ e.setAttribute (name.c_str (), value.c_str ());
+ }
+ }
+
+ std::ostream&
+ operator<< (std::ostream& os, const data& x)
+ {
+ // Use our base to print date and id.
+ //
+ const data_base& b (x);
+ os << b;
+
+ if (x.scope_present ())
+ os << std::endl << "scope: " << x.scope ();
+
+ return os;
+ }
+}
diff --git a/xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.hxx b/xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
new file mode 100644
index 0000000..e789a86
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/wildcard-custom.hxx
@@ -0,0 +1,66 @@
+// file : cxx/tree/custom/wildcard/wildcard-custom.hxx
+// copyright : not copyrighted - public domain
+
+// Do not include this file directly, use wildcard.hxx instead. This
+// file is included into generated wildcard.hxx so we do not need to
+// guard against multiple inclusions.
+//
+
+namespace wildcard
+{
+ class data: public data_base
+ {
+ // Standard constructors.
+ //
+ public:
+ data (const xml_schema::string&);
+
+ data (const xercesc::DOMElement&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ data (const data&,
+ xml_schema::flags = 0,
+ xml_schema::container* = 0);
+
+ virtual data*
+ _clone (xml_schema::flags = 0,
+ xml_schema::container* = 0) const;
+
+ // Our customizations.
+ //
+ public:
+ bool
+ scope_present () const
+ {
+ return scope_present_;
+ }
+
+ const xml_schema::string&
+ scope () const
+ {
+ return scope_;
+ }
+
+ void
+ scope (const xml_schema::string& s)
+ {
+ scope_present_ = true;
+ scope_ = s;
+ }
+
+ private:
+ bool scope_present_;
+ xml_schema::string scope_;
+ };
+
+ // Serialization operator.
+ //
+ void
+ operator<< (xercesc::DOMElement&, const data&);
+
+ // std::ostream insertion operator.
+ //
+ std::ostream&
+ operator<< (std::ostream&, const data&);
+}
diff --git a/xsd-examples/cxx/tree/custom/wildcard/wildcard.xml b/xsd-examples/cxx/tree/custom/wildcard/wildcard.xml
new file mode 100644
index 0000000..8f6ba65
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/wildcard.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/wildcard/wildcard.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<wc:data xmlns:wc="http://www.codesynthesis.com/wildcard"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/wildcard wildcard.xsd"
+ id="1"
+ scope="global">abc123</wc:data>
diff --git a/xsd-examples/cxx/tree/custom/wildcard/wildcard.xsd b/xsd-examples/cxx/tree/custom/wildcard/wildcard.xsd
new file mode 100644
index 0000000..a19be3f
--- /dev/null
+++ b/xsd-examples/cxx/tree/custom/wildcard/wildcard.xsd
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/custom/wildcard/wildcard.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wc="http://www.codesynthesis.com/wildcard"
+ targetNamespace="http://www.codesynthesis.com/wildcard">
+
+ <xsd:complexType name="data">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="id" type="xsd:unsignedInt"/>
+ <xsd:anyAttribute namespace="##any" processContents="skip"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:element name="data" type="wc:data"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/embedded/.gitignore b/xsd-examples/cxx/tree/embedded/.gitignore
new file mode 100644
index 0000000..9023e82
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/.gitignore
@@ -0,0 +1,3 @@
+xsdbin
+library.?xx
+library-schema.?xx
diff --git a/examples/cxx/tree/embedded/README b/xsd-examples/cxx/tree/embedded/README
index 266a8ff..266a8ff 100644
--- a/examples/cxx/tree/embedded/README
+++ b/xsd-examples/cxx/tree/embedded/README
diff --git a/xsd-examples/cxx/tree/embedded/buildfile b/xsd-examples/cxx/tree/embedded/buildfile
new file mode 100644
index 0000000..c8e7808
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/buildfile
@@ -0,0 +1,46 @@
+# file : cxx/tree/embedded/buildfile
+# license : not copyrighted - public domain
+
+import libxsd = libxsd%lib{xsd}
+import libxerces = libxerces-c%lib{xerces-c}
+
+./: exe{driver} exe{xsdbin} doc{README}
+
+# exe{driver}
+#
+exe{driver}: {hxx cxx}{* -xsdbin -library -library-schema} \
+ {hxx ixx cxx}{library} \
+ {hxx cxx}{library-schema} \
+ $libxsd $libxerces
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+<{hxx cxx}{library-schema}>: xsd{library} exe{xsdbin}
+{{
+ diag xsdbin ($<[0]) # @@ TMP
+
+ ($<[1]) --output-dir $out_base $path($<[0])
+}}
+
+# exe{xsdbin}
+#
+exe{xsdbin}: cxx{xsdbin} $libxerces
+exe{xsdbin}: test = false
+
+# Build options.
+#
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/embedded/driver.cxx b/xsd-examples/cxx/tree/embedded/driver.cxx
new file mode 100644
index 0000000..445d046
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/driver.cxx
@@ -0,0 +1,183 @@
+// file : cxx/tree/embedded/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
+
+#include <xsd/cxx/xml/string.hxx>
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "library.hxx"
+#include "library-schema.hxx"
+#include "grammar-input-stream.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we
+ // are doing the XML-to-DOM parsing ourselves.
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace xercesc;
+ namespace xml = xsd::cxx::xml;
+ namespace tree = xsd::cxx::tree;
+
+ // Create and load the grammar pool.
+ //
+ MemoryManager* mm (XMLPlatformUtils::fgMemoryManager);
+
+ unique_ptr<XMLGrammarPool> gp (new XMLGrammarPoolImpl (mm));
+
+ try
+ {
+ grammar_input_stream is (library_schema, sizeof (library_schema));
+ gp->deserializeGrammars(&is);
+ }
+ catch(const XSerializationException& e)
+ {
+ cerr << "unable to load schema: " <<
+ xml::transcode<char> (e.getMessage ()) << endl;
+ return 1;
+ }
+
+ // Lock the grammar pool. This is necessary if we plan to use the
+ // same grammar pool in multiple threads (this way we can reuse the
+ // same grammar in multiple parsers). Locking the pool disallows any
+ // modifications to the pool, such as an attempt by one of the threads
+ // to cache additional schemas.
+ //
+ gp->lockPool ();
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ xml::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (
+ DOMImplementationLS::MODE_SYNCHRONOUS, 0, mm, gp.get ()));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, true);
+ conf->setParameter (XMLUni::fgXercesSchema, true);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // Use the loaded grammar during parsing.
+ //
+ conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
+
+ // Disable loading schemas via other means (e.g., schemaLocation).
+ //
+ conf->setParameter (XMLUni::fgXercesLoadSchema, false);
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Parse XML documents.
+ //
+ for (unsigned long i (0); i < 10; ++i)
+ {
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ // Wrap the standard input stream.
+ //
+ xml::sax::std_input_source isrc (ifs, argv[1]);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ // Parse XML to DOM.
+ //
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<xml_schema::parsing> ();
+
+ // Parse DOM to the object model.
+ //
+ unique_ptr<library::catalog> c (library::catalog_ (*doc));
+
+ cerr << "catalog with " << c->book ().size () << " books" << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/embedded/grammar-input-stream.cxx b/xsd-examples/cxx/tree/embedded/grammar-input-stream.cxx
new file mode 100644
index 0000000..118ecb0
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/grammar-input-stream.cxx
@@ -0,0 +1,95 @@
+// file : cxx/tree/embedded/grammar-input-stream.cxx
+// copyright : not copyrighted - public domain
+
+#include <cassert>
+#include "grammar-input-stream.hxx"
+
+grammar_input_stream::
+grammar_input_stream (const XMLByte* data, std::size_t size)
+ : data_ (data),
+ size_ (size),
+ pos_ (0),
+ vpos_ (0),
+ cseq_ (0),
+ add_zero_ (false)
+{
+}
+
+XMLFilePos grammar_input_stream::
+curPos () const
+{
+ return static_cast<XMLFilePos> (vpos_);
+}
+
+XMLSize_t grammar_input_stream::
+readBytes (XMLByte* const buf, const XMLSize_t size)
+{
+ std::size_t i (0);
+
+ // Add a zero from the alternating sequence if it didn't
+ // fit on the previous read.
+ //
+ if (add_zero_)
+ {
+ buf[i++] = 0;
+ add_zero_ = false;
+ }
+
+ // If have an unfinished sequential sequence, output it now.
+ //
+ if (cseq_ != 0 && !alt_)
+ {
+ for (; cseq_ != 0 && i < size; --cseq_)
+ buf[i++] = 0;
+ }
+
+ for (; i < size && pos_ < size_;)
+ {
+ XMLByte b = buf[i++] = data_[pos_++];
+
+ // See if we are in a compression sequence.
+ //
+ if (cseq_ != 0)
+ {
+ if (i < size)
+ buf[i++] = 0;
+ else
+ add_zero_ = true; // Add it on the next read.
+
+ cseq_--;
+ continue;
+ }
+
+ // If we are not in a compression sequence and this byte is
+ // not zero then we are done.
+ //
+ if (b != 0)
+ continue;
+
+ // We have a zero.
+ //
+ assert (pos_ < size_); // There has to be another byte.
+ unsigned char v (static_cast<unsigned char> (data_[pos_++]));
+ alt_ = (v & 128) != 0;
+ cseq_ = v & 127;
+
+ // If it is a sequential sequence, output as many zeros as
+ // we can.
+ //
+ if (!alt_)
+ {
+ for (; cseq_ != 0 && i < size; --cseq_)
+ buf[i++] = 0;
+ }
+ }
+
+ vpos_ += i;
+
+ return static_cast<XMLSize_t> (i);
+}
+
+const XMLCh* grammar_input_stream::
+getContentType () const
+{
+ return 0;
+}
diff --git a/xsd-examples/cxx/tree/embedded/grammar-input-stream.hxx b/xsd-examples/cxx/tree/embedded/grammar-input-stream.hxx
new file mode 100644
index 0000000..701be31
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/grammar-input-stream.hxx
@@ -0,0 +1,40 @@
+// file : cxx/tree/embedded/grammar-input-stream.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef GRAMMAR_INPUT_STREAM_HXX
+#define GRAMMAR_INPUT_STREAM_HXX
+
+#include <cstddef>
+#include <xercesc/util/BinInputStream.hpp>
+
+// Memory buffer input stream with the special-purpose schema
+// grammar decompression.
+//
+class grammar_input_stream: public xercesc::BinInputStream
+{
+public :
+ grammar_input_stream (const XMLByte* data, std::size_t size);
+
+ virtual XMLFilePos
+ curPos () const;
+
+ virtual XMLSize_t
+ readBytes (XMLByte* const buf, const XMLSize_t size);
+
+ virtual const XMLCh*
+ getContentType () const;
+
+private :
+ const XMLByte* data_;
+ std::size_t size_;
+ std::size_t pos_;
+ std::size_t vpos_;
+
+ // Compression data.
+ //
+ size_t cseq_; // Number of bytes left in a compression sequence.
+ bool alt_; // Alternating or sequential sequence.
+ bool add_zero_; // Add a zero on the next read.
+};
+
+#endif // GRAMMAR_INPUT_STREAM_HXX
diff --git a/xsd-examples/cxx/tree/embedded/library.xml b/xsd-examples/cxx/tree/embedded/library.xml
new file mode 100644
index 0000000..f2816e7
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/embedded/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/embedded/library.xsd b/xsd-examples/cxx/tree/embedded/library.xsd
new file mode 100644
index 0000000..0ffee32
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/library.xsd
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/embedded/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/embedded/xsdbin.cxx b/xsd-examples/cxx/tree/embedded/xsdbin.cxx
new file mode 100644
index 0000000..3539c52
--- /dev/null
+++ b/xsd-examples/cxx/tree/embedded/xsdbin.cxx
@@ -0,0 +1,494 @@
+// file : cxx/tree/embedded/xsdbin.cxx
+// copyright : not copyrighted - public domain
+
+// This program loads the XML Schema file(s) and converts them to
+// the Xerces-C++ binary schema format which can then be embedded
+// into C++ programs and used to validate XML documents. The output
+// is written as a C++ source file containing the array with the
+// binary data.
+//
+
+#include <string>
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/util/XMLUni.hpp>
+#include <xercesc/util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/util/XercesVersion.hpp>
+
+#include <xercesc/internal/BinMemOutputStream.hpp>
+#include <xercesc/validators/common/Grammar.hpp>
+
+#include <xercesc/sax/ErrorHandler.hpp>
+#include <xercesc/sax/SAXParseException.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+
+#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
+
+using namespace std;
+using namespace xercesc;
+
+class error_handler: public ErrorHandler
+{
+public:
+ error_handler ()
+ : failed_ (false)
+ {
+ }
+
+ bool
+ failed () const
+ {
+ return failed_;
+ }
+
+ enum severity {s_warning, s_error, s_fatal};
+
+ virtual void
+ warning (const SAXParseException&);
+
+ virtual void
+ error (const SAXParseException&);
+
+ virtual void
+ fatalError (const SAXParseException&);
+
+ virtual void
+ resetErrors ()
+ {
+ failed_ = false;
+ }
+
+ void
+ handle (const SAXParseException&, severity);
+
+private:
+ bool failed_;
+};
+
+void
+cxx_escape (string&);
+
+int
+main (int argc, char* argv[])
+{
+ const char* hxx_suffix = "-schema.hxx";
+ const char* cxx_suffix = "-schema.cxx";
+
+ string name;
+ string base;
+ string outdir;
+
+ struct usage
+ {
+ usage (bool e = true): error (e) {}
+ bool error;
+ };
+
+ int argi (1);
+ bool multi_import (true);
+ bool verbose (false);
+
+ try
+ {
+ for (; argi < argc; ++argi)
+ {
+ string a (argv[argi]);
+
+ if (a == "--help")
+ throw usage (false);
+ else if (a == "--verbose")
+ {
+ verbose = true;
+ }
+ else if (a == "--hxx-suffix")
+ {
+ if (++argi >= argc)
+ throw usage ();
+
+ hxx_suffix = argv[argi];
+ }
+ else if (a == "--cxx-suffix")
+ {
+ if (++argi >= argc)
+ throw usage ();
+
+ cxx_suffix = argv[argi];
+ }
+ else if (a == "--output-dir")
+ {
+ if (++argi >= argc)
+ throw usage ();
+
+ outdir = argv[argi];
+ }
+ else if (a == "--array-name")
+ {
+ if (++argi >= argc)
+ throw usage ();
+
+ name = argv[argi];
+ }
+ else if (a == "--disable-multi-import")
+ {
+ multi_import = false;
+ }
+ else
+ break;
+ }
+
+ if (argi >= argc)
+ {
+ cerr << "no input file specified" << endl;
+ throw usage ();
+ }
+
+ base = argv[argi];
+ }
+ catch (usage const& e)
+ {
+ ostream& o (e.error ? cerr : cout);
+
+ o << "Usage: " << argv[0] << " [options] <files>" << endl
+ << "Options:" << endl
+ << " --help Print usage information and exit." << endl
+ << " --verbose Print progress information." << endl
+ << " --output-dir <dir> Write generated files to <dir>." << endl
+ << " --hxx-suffix <sfx> Header file suffix instead of '-schema.hxx'." << endl
+ << " --cxx-suffix <sfx> Source file suffix instead of '-schema.cxx'." << endl
+ << " --array-name <name> Binary data array name." << endl
+ << " --disable-multi-import Disable multiple import support." << endl
+ << endl;
+
+ return e.error ? 0 : 1;
+ }
+
+ XMLPlatformUtils::Initialize ();
+
+ {
+ MemoryManager* mm (XMLPlatformUtils::fgMemoryManager);
+
+ unique_ptr<XMLGrammarPool> gp (new XMLGrammarPoolImpl (mm));
+
+ // Load the schemas into grammar pool.
+ //
+ {
+ unique_ptr<SAX2XMLReader> parser (
+ XMLReaderFactory::createXMLReader (mm, gp.get ()));
+
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
+ parser->setFeature (XMLUni::fgSAX2CoreValidation, true);
+ parser->setFeature (XMLUni::fgXercesSchema, true);
+ parser->setFeature (XMLUni::fgXercesSchemaFullChecking, true);
+ parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ parser->setFeature (XMLUni::fgXercesHandleMultipleImports, multi_import);
+#endif
+
+ error_handler eh;
+ parser->setErrorHandler (&eh);
+
+ for (; argi < argc; ++argi)
+ {
+ if (verbose)
+ cerr << "loading " << argv[argi] << endl;
+
+ if (!parser->loadGrammar (argv[argi], Grammar::SchemaGrammarType, true))
+ {
+ cerr << argv[argi] << ": error: unable to load" << endl;
+ return 1;
+ }
+
+ if (eh.failed ())
+ return 1;
+ }
+ }
+
+ // Get the binary representation.
+ //
+ BinMemOutputStream data;
+
+ try
+ {
+ gp->serializeGrammars (&data);
+ }
+ catch (const XSerializationException& e)
+ {
+ char* msg (XMLString::transcode (e.getMessage ()));
+ cerr << "error: " << msg << endl;
+ XMLString::release (&msg);
+ return 1;
+ }
+
+ size_t n (static_cast<size_t> (data.curPos ()));
+ const unsigned char* buf (
+ static_cast<const unsigned char*> (data.getRawBuffer ()));
+
+ if (verbose)
+ cerr << "uncomressed data size " << n << " bytes" << endl;
+
+ // Compress zeros.
+ //
+ size_t cn (0);
+ unsigned char* cbuf = new unsigned char[n];
+
+ size_t cseq (0); // Number of bytes left in a compression sequence.
+ bool alt (false); // Alternating or sequential sequence.
+
+ for (size_t i (0); i < n;)
+ {
+ unsigned char v (buf[i++]);
+
+ // See if we are in a compression sequence.
+ //
+ if (cseq != 0)
+ {
+ // See if this byte needs to be copied.
+ //
+ if (alt && cseq % 2 == 0)
+ cbuf[cn++] = v;
+
+ cseq--;
+ continue;
+ }
+
+ // If we are not in a compression sequence and this byte is
+ // not zero then simply copy it.
+ //
+ if (v != 0)
+ {
+ cbuf[cn++] = v;
+ continue;
+ }
+
+ // We have a zero.
+ //
+ cbuf[cn++] = 0;
+
+ // See if we can start a new compression sequence.
+ //
+ if (i < n)
+ {
+ if (buf[i] == 0)
+ {
+ // Sequential sequence. See how far it runs.
+ //
+ alt = false;
+
+ for (cseq = 1; cseq < 127 && cseq + i < n; cseq++)
+ if (buf[cseq + i] != 0)
+ break;
+ }
+ else if (i + 1 < n && buf[i + 1] == 0)
+ {
+ // Alternating sequence. See how far it runs.
+ //
+ alt = true;
+
+ for (cseq = 1; cseq < 127 && cseq * 2 + i + 1 < n; cseq++)
+ {
+ if (buf[cseq * 2 + i + 1] != 0)
+ break;
+
+ // For longer sequences prefer sequential to alternating.
+ //
+ if (cseq > 2 &&
+ buf[cseq * 2 + i] == 0 &&
+ buf[(cseq - 1) * 2 + i] == 0 &&
+ buf[(cseq - 2) * 2 + i] == 0)
+ {
+ cseq -= 2;
+ break;
+ }
+ }
+
+ cseq *= 2;
+ }
+ }
+
+ if (cseq != 0)
+ {
+ cbuf[cn++] = static_cast<unsigned char> (
+ alt ? (128 | cseq / 2) : cseq);
+ }
+ else
+ cbuf[cn++] = 0;
+ }
+
+ if (verbose)
+ cerr << "comressed data size " << cn << " bytes" << endl;
+
+ buf = cbuf;
+ n = cn;
+
+ // Figure out the file names.
+ //
+ string::size_type p (base.rfind ('/')), p1 (base.rfind ('\\'));
+
+ if (p1 != string::npos && (p == string::npos || p1 > p))
+ p = p1;
+
+ if (p != string::npos)
+ base = string (base, p + 1);
+
+ p = base.rfind ('.');
+
+ if (p != string::npos)
+ base.resize (p);
+
+ string hxx (base + hxx_suffix);
+ string cxx (base + cxx_suffix);
+
+ if (!outdir.empty ())
+ {
+#if defined (WIN32) || defined (__WIN32__)
+ hxx = outdir + '\\' + hxx;
+ cxx = outdir + '\\' + cxx;
+#else
+ hxx = outdir + '/' + hxx;
+ cxx = outdir + '/' + cxx;
+#endif
+ }
+
+ if (name.empty ())
+ {
+ name = base + "_schema";
+ cxx_escape (name);
+ }
+
+ // Write header.
+ //
+ {
+ ofstream os (hxx.c_str ());
+
+ if (!os.is_open ())
+ {
+ cerr << hxx << ": error: unable to open" << endl;
+ return 1;
+ }
+
+ os << "// Automatically generated. Do not edit." << endl
+ << "//" << endl
+ << endl
+ << "#include <xercesc/util/XercesDefs.hpp>" << endl
+ << endl
+ << "extern const XMLByte " << name << "[" << n << "UL];" << endl;
+ }
+
+ {
+ ofstream os (cxx.c_str ());
+
+ if (!os.is_open ())
+ {
+ cerr << cxx << ": error: unable to open" << endl;
+ return 1;
+ }
+
+ os << "// Automatically generated. Do not edit." << endl
+ << "//" << endl
+ << endl
+ << "#include <xercesc/util/XercesDefs.hpp>" << endl
+ << "#include <xercesc/util/XercesVersion.hpp>" << endl
+ << endl
+ << "#if XERCES_GRAMMAR_SERIALIZATION_LEVEL != " <<
+ XERCES_GRAMMAR_SERIALIZATION_LEVEL << endl
+ << "# error incompatible Xerces-C++ version detected" << endl
+ << "#endif" << endl
+ << endl
+ << "extern const XMLByte " << name << "[" << n << "UL] =" << endl
+ << "{";
+
+ for (size_t i (0); i < n; ++i)
+ {
+ if (i != 0)
+ os << ',';
+
+ os << (i % 12 == 0 ? "\n " : " ") << "0x";
+ os.width (2);
+ os.fill ('0');
+ os << hex << static_cast<unsigned short> (buf[i]);
+ }
+
+ os << endl
+ << "};" << endl
+ << endl;
+ }
+
+ delete[] cbuf;
+ }
+
+ XMLPlatformUtils::Terminate ();
+}
+
+void
+cxx_escape (string& s)
+{
+ for (string::size_type i (0); i < s.size (); ++i)
+ {
+ char& c (s[i]);
+
+ if (i == 0)
+ {
+ if (!((c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ c == '_'))
+ c = '_';
+ }
+ else
+ {
+ if (!((c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c >= '0' && c <= '9') ||
+ c == '_'))
+ c = '_';
+ }
+ }
+}
+
+void error_handler::
+warning (const SAXParseException& e)
+{
+ handle (e, s_warning);
+}
+
+void error_handler::
+error (const SAXParseException& e)
+{
+ failed_ = true;
+ handle (e, s_error);
+}
+
+void error_handler::
+fatalError (const SAXParseException& e)
+{
+ failed_ = true;
+ handle (e, s_fatal);
+}
+
+void error_handler::
+handle (const SAXParseException& e, severity s)
+{
+ const XMLCh* xid (e.getPublicId ());
+
+ if (xid == 0)
+ xid = e.getSystemId ();
+
+ char* id (XMLString::transcode (xid));
+ char* msg (XMLString::transcode (e.getMessage ()));
+
+ cerr << id << ":"
+ << e.getLineNumber () << ":" << e.getColumnNumber () << " "
+ << (s == s_warning ? "warning: " : "error: ") << msg << endl;
+
+ XMLString::release (&id);
+ XMLString::release (&msg);
+}
diff --git a/xsd-examples/cxx/tree/hello/.gitignore b/xsd-examples/cxx/tree/hello/.gitignore
new file mode 100644
index 0000000..d73130a
--- /dev/null
+++ b/xsd-examples/cxx/tree/hello/.gitignore
@@ -0,0 +1 @@
+hello.?xx
diff --git a/examples/cxx/tree/hello/README b/xsd-examples/cxx/tree/hello/README
index bb98584..bb98584 100644
--- a/examples/cxx/tree/hello/README
+++ b/xsd-examples/cxx/tree/hello/README
diff --git a/xsd-examples/cxx/tree/hello/buildfile b/xsd-examples/cxx/tree/hello/buildfile
new file mode 100644
index 0000000..241d6f1
--- /dev/null
+++ b/xsd-examples/cxx/tree/hello/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/tree/hello/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -hello} {hxx ixx cxx}{hello} $libs
+
+exe{driver}: xml{hello}: test.input = true
+
+<{hxx ixx cxx}{hello}>: xsd{hello} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/tree/hello/driver.cxx b/xsd-examples/cxx/tree/hello/driver.cxx
new file mode 100644
index 0000000..7c8cec0
--- /dev/null
+++ b/xsd-examples/cxx/tree/hello/driver.cxx
@@ -0,0 +1,36 @@
+// file : cxx/tree/hello/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "hello.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " hello.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ unique_ptr<hello_t> h (hello (argv[1]));
+
+ for (hello_t::name_const_iterator i (h->name ().begin ());
+ i != h->name ().end ();
+ ++i)
+ {
+ cout << h->greeting () << ", " << *i << "!" << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/hello/hello.xml b/xsd-examples/cxx/tree/hello/hello.xml
new file mode 100644
index 0000000..b534d21
--- /dev/null
+++ b/xsd-examples/cxx/tree/hello/hello.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/hello/hello.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ <greeting>Hello</greeting>
+
+ <name>sun</name>
+ <name>moon</name>
+ <name>world</name>
+
+</hello>
diff --git a/xsd-examples/cxx/tree/hello/hello.xsd b/xsd-examples/cxx/tree/hello/hello.xsd
new file mode 100644
index 0000000..a945ecf
--- /dev/null
+++ b/xsd-examples/cxx/tree/hello/hello.xsd
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/hello/hello.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="hello_t">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ The hello_t type consists of a greeting phrase and a
+ collection of names to which this greeting applies.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:sequence>
+
+ <xsd:element name="greeting" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>
+ The greeting element contains the greeting phrase
+ for this hello object.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="name" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ The name elements contains names to be greeted.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="hello" type="hello_t">
+ <xsd:annotation>
+ <xsd:documentation>
+ The hello element is a root of the Hello XML vocabulary.
+ Every conforming document should start with this element.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/library/.gitignore b/xsd-examples/cxx/tree/library/.gitignore
new file mode 100644
index 0000000..c116ec1
--- /dev/null
+++ b/xsd-examples/cxx/tree/library/.gitignore
@@ -0,0 +1 @@
+library.?xx
diff --git a/examples/cxx/tree/library/README b/xsd-examples/cxx/tree/library/README
index 0b8638c..0b8638c 100644
--- a/examples/cxx/tree/library/README
+++ b/xsd-examples/cxx/tree/library/README
diff --git a/xsd-examples/cxx/tree/library/buildfile b/xsd-examples/cxx/tree/library/buildfile
new file mode 100644
index 0000000..4ab023b
--- /dev/null
+++ b/xsd-examples/cxx/tree/library/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/library/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --generate-serialization \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/tree/library/driver.cxx b/xsd-examples/cxx/tree/library/driver.cxx
new file mode 100644
index 0000000..9086891
--- /dev/null
+++ b/xsd-examples/cxx/tree/library/driver.cxx
@@ -0,0 +1,130 @@
+// file : cxx/tree/library/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "library.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ using namespace library;
+
+ // Read in the XML file and obtain its object model.
+ //
+ std::unique_ptr<catalog> c (catalog_ (argv[1]));
+
+
+ // Let's print what we've got.
+ //
+ for (catalog::book_const_iterator bi (c->book ().begin ());
+ bi != c->book ().end ();
+ ++bi)
+ {
+ cerr << endl
+ << "ID : " << bi->id () << endl
+ << "ISBN : " << bi->isbn () << endl
+ << "Title : " << bi->title () << endl
+ << "Genre : " << bi->genre () << endl;
+
+ for (book::author_const_iterator ai (bi->author ().begin ());
+ ai != bi->author ().end ();
+ ++ai)
+ {
+ cerr << "Author : " << ai->name () << endl;
+ cerr << " Born : " << ai->born () << endl;
+
+ if (ai->died ())
+ cerr << " Died : " << *ai->died () << endl;
+
+ if (ai->recommends ())
+ cerr << " Recommends : " << (*ai->recommends ())->title () << endl;
+ }
+
+ cerr << "Available : " << std::boolalpha << bi->available () << endl;
+ }
+
+
+ // Now we are going to modify the object model and serialize it
+ // back to XML.
+ //
+
+ catalog::book_sequence& books (c->book ());
+
+
+ // Get rid of all unavailable books.
+ //
+ for (catalog::book_iterator bi (books.begin ()); bi != books.end ();)
+ {
+ if (!bi->available ())
+ bi = books.erase (bi);
+ else
+ ++bi;
+ }
+
+
+ // Insert a new book.
+ //
+ book b (679776443, // ISBN
+ "Dead Souls", // Title
+ genre::philosophy, // Genre
+ "DS"); // ID
+
+ b.author ().push_back (author ("Nikolai Gogol",
+ xml_schema::date (1809, 3, 31)));
+
+ books.insert (books.begin (), b);
+
+
+ // Because we removed all unavailable books, some IDREFs might be
+ // broken. Let's fix this.
+ //
+ for (catalog::book_iterator bi (books.begin ()); bi != books.end (); ++bi)
+ {
+ for (book::author_iterator ai (bi->author ().begin ());
+ ai != bi->author ().end ();
+ ++ai)
+ {
+ author::recommends_optional& c (ai->recommends ());
+
+ if (c.present ())
+ {
+ author::recommends_type& ref (c.get ());
+
+ if (!ref)
+ c.reset ();
+ }
+ }
+ }
+
+
+ // Prepare namespace mapping and schema location information.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["lib"].name = "http://www.codesynthesis.com/library";
+ map["lib"].schema = "library.xsd";
+
+
+ // Write it out.
+ //
+ catalog_ (std::cout, *c, map);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/library/library.xml b/xsd-examples/cxx/tree/library/library.xml
new file mode 100644
index 0000000..d048aa4
--- /dev/null
+++ b/xsd-examples/cxx/tree/library/library.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/library/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/library/library.xsd b/xsd-examples/cxx/tree/library/library.xsd
new file mode 100644
index 0000000..4db07ef
--- /dev/null
+++ b/xsd-examples/cxx/tree/library/library.xsd
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/library/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/messaging/.gitignore b/xsd-examples/cxx/tree/messaging/.gitignore
new file mode 100644
index 0000000..f493b6c
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/.gitignore
@@ -0,0 +1 @@
+protocol.?xx
diff --git a/examples/cxx/tree/messaging/README b/xsd-examples/cxx/tree/messaging/README
index 435a4cf..435a4cf 100644
--- a/examples/cxx/tree/messaging/README
+++ b/xsd-examples/cxx/tree/messaging/README
diff --git a/xsd-examples/cxx/tree/messaging/balance.xml b/xsd-examples/cxx/tree/messaging/balance.xml
new file mode 100644
index 0000000..27c1509
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/balance.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/messaging/balance.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:balance xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+
+</p:balance>
diff --git a/xsd-examples/cxx/tree/messaging/buildfile b/xsd-examples/cxx/tree/messaging/buildfile
new file mode 100644
index 0000000..62fadda
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/buildfile
@@ -0,0 +1,29 @@
+# file : cxx/tree/messaging/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} xml{balance deposit withdraw} doc{README}
+
+exe{driver}: {hxx cxx}{* -protocol} {hxx ixx cxx}{protocol} $libs testscript
+
+<{hxx ixx cxx}{protocol}>: xsd{protocol} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --root-element-all \
+ --generate-element-type \
+ --generate-element-map \
+ --generate-serialization \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/messaging/deposit.xml b/xsd-examples/cxx/tree/messaging/deposit.xml
new file mode 100644
index 0000000..5be2a0a
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/deposit.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/messaging/deposit.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:deposit xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+ <amount>1000000</amount>
+
+</p:deposit>
diff --git a/xsd-examples/cxx/tree/messaging/dom-parse.cxx b/xsd-examples/cxx/tree/messaging/dom-parse.cxx
new file mode 100644
index 0000000..3ae5787
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/dom-parse.cxx
@@ -0,0 +1,93 @@
+// file : cxx/tree/messaging/dom-parse.cxx
+// copyright : not copyrighted - public domain
+
+#include "dom-parse.hxx"
+
+#include <istream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+xml::dom::unique_ptr<DOMDocument>
+parse (std::istream& is, const std::string& id, bool validate)
+{
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ xml::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable/Disable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, validate);
+ conf->setParameter (XMLUni::fgXercesSchema, validate);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Prepare input stream.
+ //
+ xml::sax::std_input_source isrc (is, id);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ xml::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<tree::parsing<char> > ();
+
+ return doc;
+}
diff --git a/xsd-examples/cxx/tree/messaging/dom-parse.hxx b/xsd-examples/cxx/tree/messaging/dom-parse.hxx
new file mode 100644
index 0000000..b73c52d
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/dom-parse.hxx
@@ -0,0 +1,22 @@
+// file : cxx/tree/messaging/dom-parse.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef DOM_PARSE
+#define DOM_PARSE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+// Parse an XML document from the standard input stream with an
+// optional resource id. Resource id is used in diagnostics as
+// well as to locate schemas referenced from inside the document.
+//
+xsd::cxx::xml::dom::unique_ptr<xercesc::DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate);
+
+#endif // DOM_PARSE
diff --git a/xsd-examples/cxx/tree/messaging/dom-serialize.cxx b/xsd-examples/cxx/tree/messaging/dom-serialize.cxx
new file mode 100644
index 0000000..b32c5a2
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/dom-serialize.cxx
@@ -0,0 +1,64 @@
+// file : cxx/tree/messaging/dom-serialize.cxx
+// copyright : not copyrighted - public domain
+
+#include "dom-serialize.hxx"
+
+#include <ostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp>
+
+#include <xsd/cxx/xml/string.hxx>
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+#include <xsd/cxx/xml/dom/serialization-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+void
+serialize (std::ostream& os,
+ const xercesc::DOMDocument& doc,
+ const std::string& encoding)
+{
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+
+ xml::dom::ostream_format_target oft (os);
+
+ // Create a DOMSerializer.
+ //
+ xml::dom::unique_ptr<DOMLSSerializer> writer (
+ impl->createLSSerializer ());
+
+ DOMConfiguration* conf (writer->getDomConfig ());
+
+ // Set error handler.
+ //
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Set some generally nice features.
+ //
+ conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true);
+ conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true);
+ conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false);
+
+ xml::dom::unique_ptr<DOMLSOutput> out (impl->createLSOutput ());
+ out->setEncoding (xml::string (encoding).c_str ());
+ out->setByteStream (&oft);
+
+ writer->write (&doc, out.get ());
+
+ eh.throw_if_failed<tree::serialization<char> > ();
+}
diff --git a/xsd-examples/cxx/tree/messaging/dom-serialize.hxx b/xsd-examples/cxx/tree/messaging/dom-serialize.hxx
new file mode 100644
index 0000000..bf1e290
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/dom-serialize.hxx
@@ -0,0 +1,20 @@
+// file : cxx/tree/messaging/dom-serialize.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef DOM_SERIALIZE
+#define DOM_SERIALIZE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+
+// Serialize a DOM document to XML which is written to the standard
+// output stream.
+//
+void
+serialize (std::ostream& os,
+ const xercesc::DOMDocument& doc,
+ const std::string& encoding = "UTF-8");
+
+#endif // DOM_SERIALIZE
diff --git a/xsd-examples/cxx/tree/messaging/driver.cxx b/xsd-examples/cxx/tree/messaging/driver.cxx
new file mode 100644
index 0000000..a358014
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/driver.cxx
@@ -0,0 +1,146 @@
+// file : cxx/tree/messaging/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <string>
+#include <fstream>
+#include <typeinfo>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include <xsd/cxx/xml/string.hxx>
+
+#include "dom-parse.hxx"
+#include "dom-serialize.hxx"
+
+#include "protocol.hxx"
+
+using namespace std;
+using namespace protocol;
+using namespace xercesc;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " request.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we
+ // are doing the XML-to-DOM parsing ourselves.
+ //
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ unique_ptr<xml_schema::element_type> req, res;
+
+ // Parse the XML request to a DOM document using the parse()
+ // function from dom-parse.hxx.
+ //
+ {
+ xml_schema::dom::unique_ptr<DOMDocument> doc (
+ parse (ifs, argv[1], true));
+
+ DOMElement& root (*doc->getDocumentElement ());
+
+ req = xml_schema::element_map::parse (root);
+ }
+
+ // We can test which request we've got either using RTTI or by
+ // comparing the element names, as shown below.
+ //
+ if (balance* b = dynamic_cast<balance*> (req.get ()))
+ {
+ account_t& a (b->value ());
+
+ cerr << "balance request for acc# " << a.account () << endl;
+
+ res.reset (new success (balance_t (a.account (), 1000)));
+ }
+ else if (req->_name () == withdraw::name ())
+ {
+ withdraw& w (static_cast<withdraw&> (*req));
+ change_t& c (w.value ());
+
+ wcerr << "withdrawal request for acc# " << c.account () << ", "
+ << "amount: " << c.amount () << endl;
+
+ if (c.amount () > 1000)
+ res.reset (new insufficient_funds (balance_t (c.account (), 1000)));
+ else
+ res.reset (new success (balance_t (c.account (), 1000 - c.amount ())));
+
+ }
+ else if (req->_name () == deposit::name ())
+ {
+ deposit& d (static_cast<deposit&> (*req));
+ change_t& c (d.value ());
+
+ wcerr << "deposit request for acc# " << c.account () << ", "
+ << "amount: " << c.amount () << endl;
+
+ res.reset (new success (balance_t (c.account (), 1000 + c.amount ())));
+ }
+
+ // Serialize the response to a DOM document.
+ //
+ namespace xml = xsd::cxx::xml;
+
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ const string& name (res->_name ());
+ const string& ns (res->_namespace ());
+
+ xml_schema::dom::unique_ptr<DOMDocument> doc (
+ impl->createDocument (
+ xml::string (ns).c_str (),
+ xml::string ("p:" + name).c_str (),
+ 0));
+
+ xml_schema::element_map::serialize (*doc->getDocumentElement (), *res);
+
+ // Serialize the DOM document to XML using the serialize() function
+ // from dom-serialize.hxx.
+ //
+ cout << "response:" << endl
+ << endl;
+
+ serialize (cout, *doc);
+ }
+ catch (const xml_schema::no_element_info& e)
+ {
+ // This exception indicates that we tried to parse or serialize
+ // an unknown element.
+ //
+ cerr << "unknown request: " << e.element_namespace () << "#" <<
+ e.element_name () << endl;
+ r = 1;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/messaging/protocol.xsd b/xsd-examples/cxx/tree/messaging/protocol.xsd
new file mode 100644
index 0000000..4a28ac3
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/protocol.xsd
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/messaging/protocol.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:p="http://www.codesynthesis.com/protocol"
+ targetNamespace="http://www.codesynthesis.com/protocol">
+
+ <!-- types -->
+
+ <xsd:complexType name="account_t">
+ <xsd:sequence>
+ <xsd:element name="account" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="change_t">
+ <xsd:complexContent>
+ <xsd:extension base="p:account_t">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="balance_t">
+ <xsd:complexContent>
+ <xsd:extension base="p:account_t">
+ <xsd:sequence>
+ <xsd:element name="balance" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <!-- request elements -->
+
+ <xsd:element name="balance" type="p:account_t"/>
+ <xsd:element name="withdraw" type="p:change_t"/>
+ <xsd:element name="deposit" type="p:change_t"/>
+
+ <!-- response elements -->
+
+ <xsd:element name="success" type="p:balance_t"/>
+ <xsd:element name="insufficient-funds" type="p:balance_t"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/messaging/testscript b/xsd-examples/cxx/tree/messaging/testscript
new file mode 100644
index 0000000..c9df49f
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/testscript
@@ -0,0 +1,6 @@
+# file : cxx/tree/messaging/testscript
+# license : not copyrighted - public domain
+
+$* $src_base/balance.xml >| 2>| : balance
+$* $src_base/withdraw.xml >| 2>| : withdraw
+$* $src_base/deposit.xml >| 2>| : deposit
diff --git a/xsd-examples/cxx/tree/messaging/withdraw.xml b/xsd-examples/cxx/tree/messaging/withdraw.xml
new file mode 100644
index 0000000..e9ef526
--- /dev/null
+++ b/xsd-examples/cxx/tree/messaging/withdraw.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/messaging/withdraw.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:withdraw xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+ <amount>1000000</amount>
+
+</p:withdraw>
diff --git a/xsd-examples/cxx/tree/mixed/.gitignore b/xsd-examples/cxx/tree/mixed/.gitignore
new file mode 100644
index 0000000..cbeac00
--- /dev/null
+++ b/xsd-examples/cxx/tree/mixed/.gitignore
@@ -0,0 +1 @@
+text.?xx
diff --git a/examples/cxx/tree/mixed/README b/xsd-examples/cxx/tree/mixed/README
index fc23faa..fc23faa 100644
--- a/examples/cxx/tree/mixed/README
+++ b/xsd-examples/cxx/tree/mixed/README
diff --git a/xsd-examples/cxx/tree/mixed/buildfile b/xsd-examples/cxx/tree/mixed/buildfile
new file mode 100644
index 0000000..4c1be8e
--- /dev/null
+++ b/xsd-examples/cxx/tree/mixed/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/mixed/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -text} {hxx ixx cxx}{text} $libs
+
+exe{driver}: xml{text}: test.input = true
+
+<{hxx ixx cxx}{text}>: xsd{text} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/mixed/driver.cxx b/xsd-examples/cxx/tree/mixed/driver.cxx
new file mode 100644
index 0000000..cf64e7f
--- /dev/null
+++ b/xsd-examples/cxx/tree/mixed/driver.cxx
@@ -0,0 +1,122 @@
+// file : cxx/tree/mixed/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+
+#include "text.hxx"
+
+// The following transcode() utility function is handy when working with
+// Xerces. Include it after the generated header in order to get only char
+// or wchar_t version depending on how you compiled your schemas.
+//
+#include <xsd/cxx/xml/string.hxx>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+using std::unique_ptr;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " text.xml" << endl;
+ return 1;
+ }
+
+ using namespace xercesc;
+
+ int r (0);
+
+ // The Xerces-C++ DOM objects that will be associated with the
+ // document tree "out-live" the call to the parsing function.
+ // Therefore we need to initialize the Xerces-C++ runtime
+ // ourselves.
+ //
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ unique_ptr<text> t (
+ text_ (argv[1],
+ xml_schema::flags::keep_dom |
+ xml_schema::flags::dont_initialize));
+
+ // The DOM association can be recreated in a copy (the underlying
+ // DOM document is cloned) if explicitly requested with the keep_dom
+ // flag and only if this copy is "complete", i.e., made from the root
+ // of the tree.
+ //
+ text copy (*t, xml_schema::flags::keep_dom);
+
+ // Print text.
+ //
+ {
+ namespace xml = xsd::cxx::xml;
+
+ unsigned long ref (0);
+ DOMNode* root (copy._node ());
+
+ for (DOMNode* n (root->getFirstChild ());
+ n != 0;
+ n = n->getNextSibling ())
+ {
+ switch (n->getNodeType ())
+ {
+ case DOMNode::TEXT_NODE:
+ {
+ cout << xml::transcode<char> (n->getTextContent ());
+ break;
+ }
+ case DOMNode::ELEMENT_NODE:
+ {
+ // Let's get back to a tree node from this DOM node.
+ //
+ xml_schema::type& t (
+ *reinterpret_cast<xml_schema::type*> (
+ n->getUserData (xml_schema::dom::tree_node_key)));
+
+ anchor& a (dynamic_cast<anchor&> (t));
+
+ cout << a << "[" << ref << "]";
+
+ // Or we could continue using DOM interface:
+ //
+ //cout << xml::transcode<char> (n->getTextContent ())
+ // << "[" << ref << "]";
+
+ ++ref;
+ break;
+ }
+ default:
+ break; // Ignore all other nodes (e.g., comments, etc).
+ }
+ }
+ }
+
+ // Print references.
+ //
+ {
+ unsigned long r (0);
+
+ for (text::a_const_iterator i (copy.a ().begin ());
+ i != copy.a ().end ();
+ ++i, ++r)
+ {
+ cout << "[" << r << "] " << i->href () << endl;
+ }
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/mixed/text.xml b/xsd-examples/cxx/tree/mixed/text.xml
new file mode 100644
index 0000000..dfe730e
--- /dev/null
+++ b/xsd-examples/cxx/tree/mixed/text.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/mixed/text.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="text.xsd">
+
+The first paragraph of this text talks about <a href="http://en.wikipedia.org/wiki/time">time</a>.
+
+And this paragraph talks about <a href="http://en.wikipedia.org/wiki/space">space</a>.
+
+</text>
diff --git a/xsd-examples/cxx/tree/mixed/text.xsd b/xsd-examples/cxx/tree/mixed/text.xsd
new file mode 100644
index 0000000..f3c023d
--- /dev/null
+++ b/xsd-examples/cxx/tree/mixed/text.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/mixed/text.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="anchor">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="href" type="xsd:anyURI" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="text" mixed="true">
+ <xsd:sequence>
+ <xsd:element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="text" type="text"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/multiroot/.gitignore b/xsd-examples/cxx/tree/multiroot/.gitignore
new file mode 100644
index 0000000..f493b6c
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/.gitignore
@@ -0,0 +1 @@
+protocol.?xx
diff --git a/examples/cxx/tree/multiroot/README b/xsd-examples/cxx/tree/multiroot/README
index b742422..b742422 100644
--- a/examples/cxx/tree/multiroot/README
+++ b/xsd-examples/cxx/tree/multiroot/README
diff --git a/xsd-examples/cxx/tree/multiroot/balance.xml b/xsd-examples/cxx/tree/multiroot/balance.xml
new file mode 100644
index 0000000..5f4a441
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/balance.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/multiroot/balance.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:balance xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+
+</p:balance>
diff --git a/xsd-examples/cxx/tree/multiroot/buildfile b/xsd-examples/cxx/tree/multiroot/buildfile
new file mode 100644
index 0000000..dc10588
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/buildfile
@@ -0,0 +1,26 @@
+# file : cxx/tree/multiroot/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} xml{balance deposit withdraw} doc{README}
+
+exe{driver}: {hxx cxx}{* -protocol} {hxx ixx cxx}{protocol} $libs testscript
+
+<{hxx ixx cxx}{protocol}>: xsd{protocol} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/multiroot/deposit.xml b/xsd-examples/cxx/tree/multiroot/deposit.xml
new file mode 100644
index 0000000..9db2a2a
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/deposit.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/multiroot/deposit.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:deposit xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+ <amount>1000000</amount>
+
+</p:deposit>
diff --git a/xsd-examples/cxx/tree/multiroot/dom-parse.cxx b/xsd-examples/cxx/tree/multiroot/dom-parse.cxx
new file mode 100644
index 0000000..e67c187
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/dom-parse.cxx
@@ -0,0 +1,93 @@
+// file : cxx/tree/multiroot/dom-parse.cxx
+// copyright : not copyrighted - public domain
+
+#include "dom-parse.hxx"
+
+#include <istream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+xml::dom::unique_ptr<DOMDocument>
+parse (std::istream& is, const std::string& id, bool validate)
+{
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ xml::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable/Disable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, validate);
+ conf->setParameter (XMLUni::fgXercesSchema, validate);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Prepare input stream.
+ //
+ xml::sax::std_input_source isrc (is, id);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ xml::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<tree::parsing<char> > ();
+
+ return doc;
+}
diff --git a/xsd-examples/cxx/tree/multiroot/dom-parse.hxx b/xsd-examples/cxx/tree/multiroot/dom-parse.hxx
new file mode 100644
index 0000000..3699a77
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/dom-parse.hxx
@@ -0,0 +1,22 @@
+// file : cxx/tree/multiroot/dom-parse.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef DOM_PARSE
+#define DOM_PARSE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+// Parse an XML document from the standard input stream with an
+// optional resource id. Resource id is used in diagnostics as
+// well as to locate schemas referenced from inside the document.
+//
+xsd::cxx::xml::dom::unique_ptr<xercesc::DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate);
+
+#endif // DOM_PARSE
diff --git a/xsd-examples/cxx/tree/multiroot/driver.cxx b/xsd-examples/cxx/tree/multiroot/driver.cxx
new file mode 100644
index 0000000..d22c25e
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/driver.cxx
@@ -0,0 +1,124 @@
+// file : cxx/tree/multiroot/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include <xsd/cxx/xml/string.hxx> // xml::transcode
+
+#include "dom-parse.hxx"
+
+#include "protocol.hxx"
+
+using namespace std;
+using namespace protocol;
+
+// Parse an XML document and return a pointer to request_t which can
+// then be tested with dynamic_cast. If your vocabulary does not have
+// a common base type for all root element types then you can use
+// xml_schema::type which is a base for all generated types.
+//
+unique_ptr<request_t>
+parse (istream& is, const string& id)
+{
+ using namespace xercesc;
+ namespace xml = xsd::cxx::xml;
+
+ // Parse an XML instance to a DOM document using the parse()
+ // function from dom-parse.hxx.
+ //
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parse (is, id, true));
+
+ DOMElement* root (doc->getDocumentElement ());
+
+ string ns (xml::transcode<char> (root->getNamespaceURI ()));
+ string name (xml::transcode<char> (root->getLocalName ()));
+
+ unique_ptr<request_t> r;
+
+ // We could have handled the result directly in this function
+ // instead of returning it as an opaque pointer and using
+ // dynamic_cast later to figure out which request we are dealing
+ // with.
+ //
+ if (ns == "http://www.codesynthesis.com/protocol")
+ {
+ if (name == "balance")
+ {
+ // Use the balance parsing function.
+ //
+ r.reset (balance (*doc).release ());
+ }
+ else if (name == "withdraw")
+ {
+ // Use the withdraw parsing function.
+ //
+ r.reset (withdraw (*doc).release ());
+ }
+ }
+
+ if (r.get () == 0)
+ cerr << "ignoring unknown request: " << ns << "#" << name << endl;
+
+ return r;
+}
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " request.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we
+ // are doing the XML-to-DOM parsing ourselves.
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ unique_ptr<request_t> r (parse (ifs, argv[1]));
+
+ // Let's print what we've got.
+ //
+ if (balance_t* b = dynamic_cast<balance_t*> (r.get ()))
+ {
+ cerr << "balance request for acc# " << b->account () << endl;
+ }
+ else if (withdraw_t* w = dynamic_cast<withdraw_t*> (r.get ()))
+ {
+ cerr << "withdrawal request for acc# " << w->account () << ", "
+ << "amount: " << w->amount () << endl;
+ }
+ else
+ {
+ cerr << "unknown request" << endl;
+ }
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/multiroot/protocol.xsd b/xsd-examples/cxx/tree/multiroot/protocol.xsd
new file mode 100644
index 0000000..2fe9456
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/protocol.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/multiroot/protocol.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:p="http://www.codesynthesis.com/protocol"
+ targetNamespace="http://www.codesynthesis.com/protocol">
+
+ <xsd:complexType name="request_t">
+ <xsd:sequence>
+ <xsd:element name="account" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="balance_t">
+ <xsd:complexContent>
+ <xsd:extension base="p:request_t"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="withdraw_t">
+ <xsd:complexContent>
+ <xsd:extension base="p:request_t">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="deposit_t">
+ <xsd:complexContent>
+ <xsd:extension base="p:request_t">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="balance" type="p:balance_t"/>
+ <xsd:element name="withdraw" type="p:withdraw_t"/>
+ <xsd:element name="deposit" type="p:deposit_t"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/multiroot/testscript b/xsd-examples/cxx/tree/multiroot/testscript
new file mode 100644
index 0000000..383bed4
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/testscript
@@ -0,0 +1,6 @@
+# file : cxx/tree/multiroot/testscript
+# license : not copyrighted - public domain
+
+$* $src_base/balance.xml 2>| : balance
+$* $src_base/withdraw.xml 2>| : withdraw
+$* $src_base/deposit.xml 2>| : deposit
diff --git a/xsd-examples/cxx/tree/multiroot/withdraw.xml b/xsd-examples/cxx/tree/multiroot/withdraw.xml
new file mode 100644
index 0000000..f98ad16
--- /dev/null
+++ b/xsd-examples/cxx/tree/multiroot/withdraw.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/multiroot/withdraw.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<p:withdraw xmlns:p="http://www.codesynthesis.com/protocol"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/protocol protocol.xsd">
+
+ <account>123456789</account>
+ <amount>1000000</amount>
+
+</p:withdraw>
diff --git a/examples/cxx/tree/order/README b/xsd-examples/cxx/tree/order/README
index 7125a2d..7125a2d 100644
--- a/examples/cxx/tree/order/README
+++ b/xsd-examples/cxx/tree/order/README
diff --git a/xsd-examples/cxx/tree/order/element/.gitignore b/xsd-examples/cxx/tree/order/element/.gitignore
new file mode 100644
index 0000000..2fff792
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/element/.gitignore
@@ -0,0 +1 @@
+transactions.?xx
diff --git a/examples/cxx/tree/order/element/README b/xsd-examples/cxx/tree/order/element/README
index 19f2381..19f2381 100644
--- a/examples/cxx/tree/order/element/README
+++ b/xsd-examples/cxx/tree/order/element/README
diff --git a/xsd-examples/cxx/tree/order/element/buildfile b/xsd-examples/cxx/tree/order/element/buildfile
new file mode 100644
index 0000000..eb3834e
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/element/buildfile
@@ -0,0 +1,30 @@
+# file : cxx/tree/order/element/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -transactions} {hxx ixx cxx}{transactions} $libs
+
+exe{driver}: xml{transactions}: test.input = true
+
+<{hxx ixx cxx}{transactions}>: xsd{transactions} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-wildcard \
+ --ordered-type batch \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/order/element/driver.cxx b/xsd-examples/cxx/tree/order/element/driver.cxx
new file mode 100644
index 0000000..2f62700
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/element/driver.cxx
@@ -0,0 +1,147 @@
+// file : cxx/tree/order/element/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cassert>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "transactions.hxx"
+
+// The following string class keeps us sane when working with Xerces.
+// Include it after the generated header in order to get only char or
+// wchar_t version depending on how you compiled your schemas.
+//
+#include <xsd/cxx/xml/string.hxx>
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " transactions.xml" << endl;
+ return 1;
+ }
+
+ using namespace xercesc;
+
+ int r (0);
+
+ // The Xerces-C++ DOM objects that will be used to store the
+ // content matched by the wildcard "out-lives" the call to the
+ // parsing function. Therefore we need to initialize the
+ // Xerces-C++ runtime ourselves.
+ //
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace transactions;
+
+ // Parse the batch.
+ //
+ std::unique_ptr<batch> b (
+ batch_ (argv[1], xml_schema::flags::dont_initialize));
+
+ // Print what we've got in content order.
+ //
+ for (batch::content_order_const_iterator i (b->content_order ().begin ());
+ i != b->content_order ().end ();
+ ++i)
+ {
+ switch (i->id)
+ {
+ case batch::balance_id:
+ {
+ const balance& t (b->balance ()[i->index]);
+ cerr << t.account () << " balance" << endl;
+ break;
+ }
+ case batch::withdraw_id:
+ {
+ const withdraw& t (b->withdraw ()[i->index]);
+ cerr << t.account () << " withdraw " << t.amount () << endl;
+ break;
+ }
+ case batch::deposit_id:
+ {
+ const deposit& t (b->deposit ()[i->index]);
+ cerr << t.account () << " deposit " << t.amount () << endl;
+ break;
+ }
+ case batch::any_id:
+ {
+ namespace xml = xsd::cxx::xml;
+
+ const DOMElement& e (b->any ()[i->index]);
+ cerr << xml::transcode<char> (e.getLocalName ()) << endl;
+ break;
+ }
+ default:
+ {
+ assert (false); // Unknown content id.
+ }
+ }
+ }
+
+ cerr << endl;
+
+ // Modify the transaction batch. First remove the last transaction.
+ // Note that we have to update both the content itself and content
+ // order sequences.
+ //
+ batch::content_order_sequence& co (b->content_order ());
+
+ co.pop_back ();
+ b->withdraw ().pop_back ();
+
+ // Now add a few more transactions. Again we have to add both the
+ // content and its ordering. The order information consists of the
+ // content id and, in case of a sequence, the index.
+ //
+ b->deposit ().push_back (deposit (123456789, 100000));
+ co.push_back (
+ batch::content_order_type (
+ batch::deposit_id, b->deposit ().size () - 1));
+
+ // The next transaction we add at the beginning of the batch.
+ //
+ b->balance ().push_back (balance (123456789));
+ co.insert (co.begin (),
+ batch::content_order_type (
+ batch::balance_id, b->balance ().size () - 1));
+
+ // Note also that when we merely modify the content of one
+ // of the elements in place, we don't need to update its
+ // order. For example:
+ //
+ b->deposit ()[0].amount (2000000);
+
+ // Serialize the modified transaction batch back to XML.
+ //
+ xml_schema::namespace_infomap map;
+
+ map[""].name = "http://www.codesynthesis.com/transactions";
+ map[""].schema = "transactions.xsd";
+ map["te"].name = "http://www.codesynthesis.com/transactions-extras";
+
+ batch_ (std::cout,
+ *b,
+ map,
+ "UTF-8",
+ xml_schema::flags::dont_initialize);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/order/element/transactions.xml b/xsd-examples/cxx/tree/order/element/transactions.xml
new file mode 100644
index 0000000..7af9ab1
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/element/transactions.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/order/element/transactions.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<batch xmlns="http://www.codesynthesis.com/transactions"
+ xmlns:te="http://www.codesynthesis.com/transactions-extras"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/transactions transactions.xsd">
+ <deposit>
+ <account>123456789</account>
+ <amount>1000000</amount>
+ </deposit>
+
+ <balance>
+ <account>123456789</account>
+ </balance>
+
+ <te:block>
+ <account>123456789</account>
+ <amount>500000</amount>
+ </te:block>
+
+ <withdraw>
+ <account>123456789</account>
+ <amount>500000</amount>
+ </withdraw>
+</batch>
diff --git a/xsd-examples/cxx/tree/order/element/transactions.xsd b/xsd-examples/cxx/tree/order/element/transactions.xsd
new file mode 100644
index 0000000..7a63c9f
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/element/transactions.xsd
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/order/element/transactions.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:t="http://www.codesynthesis.com/transactions"
+ targetNamespace="http://www.codesynthesis.com/transactions"
+ elementFormDefault="qualified">
+
+ <xsd:complexType name="transaction">
+ <xsd:sequence>
+ <xsd:element name="account" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="balance">
+ <xsd:complexContent>
+ <xsd:extension base="t:transaction"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="withdraw">
+ <xsd:complexContent>
+ <xsd:extension base="t:transaction">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="deposit">
+ <xsd:complexContent>
+ <xsd:extension base="t:transaction">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:unsignedInt"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="batch">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="balance" type="t:balance"/>
+ <xsd:element name="withdraw" type="t:withdraw"/>
+ <xsd:element name="deposit" type="t:deposit"/>
+ <xsd:any namespace="##other" processContents="lax"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:element name="batch" type="t:batch"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/order/mixed/.gitignore b/xsd-examples/cxx/tree/order/mixed/.gitignore
new file mode 100644
index 0000000..cbeac00
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/mixed/.gitignore
@@ -0,0 +1 @@
+text.?xx
diff --git a/examples/cxx/tree/order/mixed/README b/xsd-examples/cxx/tree/order/mixed/README
index e66c1ad..e66c1ad 100644
--- a/examples/cxx/tree/order/mixed/README
+++ b/xsd-examples/cxx/tree/order/mixed/README
diff --git a/xsd-examples/cxx/tree/order/mixed/buildfile b/xsd-examples/cxx/tree/order/mixed/buildfile
new file mode 100644
index 0000000..149bca0
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/mixed/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/order/mixed/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -text} {hxx ixx cxx}{text} $libs
+
+exe{driver}: xml{text}: test.input = true
+
+<{hxx ixx cxx}{text}>: xsd{text} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --ordered-type-mixed \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/tree/order/mixed/driver.cxx b/xsd-examples/cxx/tree/order/mixed/driver.cxx
new file mode 100644
index 0000000..a18f4ad
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/mixed/driver.cxx
@@ -0,0 +1,89 @@
+// file : cxx/tree/order/mixed/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cassert>
+#include <iostream>
+
+#include "text.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " text.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ std::unique_ptr<text> t (text_ (argv[1]));
+
+ // Print what we've got in content order.
+ //
+ for (text::content_order_const_iterator i (t->content_order ().begin ());
+ i != t->content_order ().end ();
+ ++i)
+ {
+ switch (i->id)
+ {
+ case text::a_id:
+ {
+ const anchor& a (t->a ()[i->index]);
+ cerr << a << "[" << a.href () << "]";
+ break;
+ }
+ case text::text_content_id:
+ {
+ const xml_schema::string& s (t->text_content ()[i->index]);
+ cerr << s;
+ break;
+ }
+ default:
+ {
+ assert (false); // Unknown content id.
+ }
+ }
+ }
+
+ cerr << endl;
+
+ // Modify the document. Note that we have to update both the content
+ // itself and content order sequences.
+ //
+ typedef text::content_order_type order_type;
+
+ text::content_order_sequence& co (t->content_order ());
+ text::text_content_sequence& tc (t->text_content ());
+
+ tc.push_back ("The last paragraph doesn't talk about ");
+ co.push_back (order_type (text::text_content_id, tc.size () - 1));
+
+ t->a ().push_back (anchor ("anything", "http://en.wikipedia.org"));
+ co.push_back (order_type (text::a_id, t->a ().size () - 1));
+
+ tc.push_back (" in particular.\n\n");
+ co.push_back (order_type (text::text_content_id, tc.size () - 1));
+
+ // Serialize the modified document back to XML.
+ //
+ xml_schema::namespace_infomap map;
+
+ map[""].schema = "text.xsd";
+
+ text_ (std::cout,
+ *t,
+ map,
+ "UTF-8",
+ xml_schema::flags::dont_pretty_print);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/order/mixed/text.xml b/xsd-examples/cxx/tree/order/mixed/text.xml
new file mode 100644
index 0000000..3d7476d
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/mixed/text.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/order/mixed/text.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="text.xsd">
+
+The first paragraph of this text talks about <a href="http://en.wikipedia.org/wiki/time">time</a>.
+
+And this paragraph talks about <a href="http://en.wikipedia.org/wiki/space">space</a>.
+
+</text>
diff --git a/xsd-examples/cxx/tree/order/mixed/text.xsd b/xsd-examples/cxx/tree/order/mixed/text.xsd
new file mode 100644
index 0000000..b55d214
--- /dev/null
+++ b/xsd-examples/cxx/tree/order/mixed/text.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/order/mixed/text.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="anchor">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="href" type="xsd:anyURI" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="text" mixed="true">
+ <xsd:sequence>
+ <xsd:element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="text" type="text"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/performance/.gitignore b/xsd-examples/cxx/tree/performance/.gitignore
new file mode 100644
index 0000000..b143f97
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/.gitignore
@@ -0,0 +1,5 @@
+gen
+
+# Testscript output directory (can be symlink).
+#
+test-gen
diff --git a/xsd-examples/cxx/tree/performance/README b/xsd-examples/cxx/tree/performance/README
new file mode 100644
index 0000000..0206387
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/README
@@ -0,0 +1,62 @@
+This example measures the performance of parsing and serialization in
+the C++/Tree mapping. It also shows how to structure your code to
+achieve the maximum performance for these two operations.
+
+The example consists of the following files:
+
+test.xsd
+ XML Schema which describes the test vocabulary.
+
+test-50k.xml
+ Test XML document.
+
+gen.cxx
+ Program to generate a test document of desired size.
+
+time.hxx
+time.cxx
+ Class definition that represents time.
+
+test.hxx
+test.ixx
+test.cxx
+ C++ types that represent the given vocabulary, a set of parsing
+ functions that convert XML documents to a tree-like in-memory object
+ model, and a set of serialization functions that convert the object
+ model back to XML. These are generated by the XSD compiler from
+ test.xsd.
+
+parsing.cxx
+ Parsing performance test. It first reads the entire document into
+ a memory buffer. It then creates a DOM parser and pre-parses and
+ caches the schema if validation is enabled. Finally, it runs the
+ performance measurement loop which on each iteration parses the
+ XML document from the in-memory buffer into DOM and then DOM to
+ the object model.
+
+serialization.cxx
+ Serialization performance test. It first parses the XML document
+ into the object model. It then creates a memory buffer into which
+ the document is serialized and a DOM serializer. Finally, it runs
+ the performance measurement loop which on each iteration serializes
+ the object model to DOM and DOM to XML.
+
+driver.cxx
+ Driver for the example. It first parses the command line arguments.
+ It then initializes the Xerces-C++ runtime and calls the parsing
+ and serialization tests described above.
+
+To run the example on a test XML document simply execute:
+
+$ ./driver test-50k.xml
+
+The -v option can be used to turn on validation in the underlying XML
+parser (off by default). The -i option can be used to specify the
+number of parsing and serialization iterations (1000 by default). For
+example:
+
+$ ./driver -v -i 100 test-50k.xml
+
+To generate the test document execute, for example:
+
+$ ./gen 633 test-100k.xml
diff --git a/xsd-examples/cxx/tree/performance/buildfile b/xsd-examples/cxx/tree/performance/buildfile
new file mode 100644
index 0000000..e9faeef
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/buildfile
@@ -0,0 +1,36 @@
+# file : cxx/tree/performance/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: doc{README}
+
+# exe{driver}
+#
+./: exe{driver}: {hxx cxx}{* -gen -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test-50k}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+# exe{gen}
+#
+./: exe{gen}: cxx{gen} testscript{gen}
+
+# Build options.
+#
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/performance/driver.cxx b/xsd-examples/cxx/tree/performance/driver.cxx
new file mode 100644
index 0000000..b156f84
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/driver.cxx
@@ -0,0 +1,90 @@
+// file : cxx/tree/performance/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+using namespace std;
+
+// See parsing.cxx
+//
+bool
+parsing (const char* file, unsigned long iter, bool validate);
+
+// See serialization.cxx
+//
+bool
+serialization (const char* file, unsigned long iter);
+
+int
+main (int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ cerr << "usage: " << argv[0] << " [-v] [-i <count>] test.xml" << endl
+ << "\t -v turn on validation (default is off)" << endl
+ << "\t -i number of iterations to perform (default is 1000)" << endl;
+ return 1;
+ }
+
+ bool validate (false);
+ unsigned long iter (1000);
+ const char* file (0);
+
+ // Parse command line arguments.
+ //
+ for (int i (1); i < argc; ++i)
+ {
+ std::string arg (argv[i]);
+
+ if (arg == "-v")
+ {
+ validate = true;
+ }
+ else if (arg == "-i")
+ {
+ if (++i == argc)
+ {
+ cerr << "argument expected for the -i option" << endl;
+ return 1;
+ }
+
+ iter = 0;
+ istringstream is (argv[i]);
+ is >> iter;
+
+ if (iter == 0)
+ {
+ cerr << "invalid argument for the -i option" << endl;
+ return 1;
+ }
+ }
+ else
+ {
+ file = argv[i];
+ break;
+ }
+ }
+
+ if (file == 0)
+ {
+ cerr << "no input file specified" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ // Call parsing and serialization tests.
+ //
+ if (!parsing (file, iter, validate) || !serialization (file, iter))
+ r = 1;
+
+ xercesc::XMLPlatformUtils::Terminate ();
+
+ return r;
+}
diff --git a/examples/cxx/parser/performance/gen.cxx b/xsd-examples/cxx/tree/performance/gen.cxx
index b6392c0..b6392c0 100644
--- a/examples/cxx/parser/performance/gen.cxx
+++ b/xsd-examples/cxx/tree/performance/gen.cxx
diff --git a/xsd-examples/cxx/tree/performance/gen.testscript b/xsd-examples/cxx/tree/performance/gen.testscript
new file mode 100644
index 0000000..deefc05
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/gen.testscript
@@ -0,0 +1,9 @@
+# file : cxx/tree/performance/gen.testscript
+# license : not copyrighted - public domain
+
+: 50k
+:
+{
+ $* 317 test-50k.xml &test-50k.xml;
+ cat test-50k.xml >>>$src_base/test-50k.xml
+}
diff --git a/xsd-examples/cxx/tree/performance/parsing.cxx b/xsd-examples/cxx/tree/performance/parsing.cxx
new file mode 100644
index 0000000..c41b57d
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/parsing.cxx
@@ -0,0 +1,172 @@
+// file : cxx/tree/performance/parsing.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMLSParser.hpp>
+#include <xercesc/dom/DOMImplementation.hpp>
+#include <xercesc/dom/DOMImplementationRegistry.hpp>
+
+#include <xercesc/validators/common/Grammar.hpp>
+
+#include <xercesc/framework/MemBufInputSource.hpp>
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xercesc/util/XMLUniDefs.hpp>
+
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "time.hxx"
+#include "test.hxx"
+
+using namespace std;
+
+bool
+parsing (const char* file, unsigned long iter, bool validate)
+{
+ try
+ {
+ cerr << "parsing:" << endl;
+
+ ifstream ifs;
+ ifs.exceptions (ios_base::failbit);
+ ifs.open (file, ios::in | ios::ate);
+
+ size_t size (ifs.tellg ());
+ ifs.seekg (0, ios::beg);
+
+ char* buf = new char[size];
+ ifs.read (buf, size);
+ ifs.close ();
+
+ cerr << " document size: " << size << " bytes" << endl
+ << " iterations: " << iter << endl;
+
+ // Create XML parser that we are going to use in all iterations.
+ //
+ using namespace xercesc;
+
+ const XMLCh ls_id[] =
+ {xercesc::chLatin_L, xercesc::chLatin_S, xercesc::chNull};
+
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ // Use the error handler implementation provided by the XSD runtime.
+ //
+ xsd::cxx::tree::error_handler<char> eh;
+ xsd::cxx::xml::dom::bits::error_handler_proxy<char> ehp (eh);
+
+ xml_schema::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ conf->setParameter (XMLUni::fgDOMComments, false);
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Set error handler.
+ //
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ if (validate)
+ {
+ conf->setParameter (XMLUni::fgDOMValidate, true);
+ conf->setParameter (XMLUni::fgXercesSchema, true);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // If we are validating, pre-load and cache the schema.
+ //
+ if (!parser->loadGrammar ("test.xsd", Grammar::SchemaGrammarType, true))
+ {
+ // In Xerces-C++ grammar loading failure results in just a warning.
+ // Make it a fatal error.
+ //
+ eh.handle ("test.xsd", 0, 0,
+ xsd::cxx::tree::error_handler<char>::severity::fatal,
+ "unable to load schema");
+ }
+
+ eh.throw_if_failed<xml_schema::parsing> ();
+ conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);
+ conf->setParameter (XMLUni::fgXercesLoadSchema, false);
+ }
+ else
+ {
+ conf->setParameter (XMLUni::fgDOMValidate, false);
+ conf->setParameter (XMLUni::fgXercesSchema, false);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+ }
+
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Create memory buffer input source.
+ //
+ MemBufInputSource is (
+ reinterpret_cast<XMLByte*> (buf), size, file, false);
+ is.setCopyBufToStream (false);
+ Wrapper4InputSource wis (&is, false);
+
+ // Parsing loop.
+ //
+ os::time start;
+
+ for (unsigned long i (0); i < iter; ++i)
+ {
+ // First parse XML to DOM reusing the parser we created above.
+ //
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parser->parse (&wis));
+ eh.throw_if_failed<xml_schema::parsing> ();
+
+ // Then parse DOM to the object model.
+ //
+ unique_ptr<test::root> r (test::root_ (*doc));
+ }
+
+ os::time end;
+ os::time time (end - start);
+
+ delete[] buf;
+
+ cerr << " time: " << time << " sec" << endl;
+
+ double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
+
+ // Calculate throughput in documents/sec.
+ //
+ double tpd ((iter / ms) * 1000000);
+ cerr << " throughput: " << tpd << " documents/sec" << endl;
+
+ // Calculate throughput in MBytes/sec.
+ //
+ double tpb (((size * iter) / ms) * 1000000/(1024*1024));
+ cerr << " throughput: " << tpb << " MBytes/sec" << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return false;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return false;
+ }
+
+ return true;
+}
diff --git a/xsd-examples/cxx/tree/performance/serialization.cxx b/xsd-examples/cxx/tree/performance/serialization.cxx
new file mode 100644
index 0000000..e81fcbd
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/serialization.cxx
@@ -0,0 +1,132 @@
+// file : cxx/tree/performance/serialization.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/DOMLSOutput.hpp>
+#include <xercesc/dom/DOMLSSerializer.hpp>
+#include <xercesc/dom/DOMImplementation.hpp>
+#include <xercesc/dom/DOMImplementationRegistry.hpp>
+
+#include <xercesc/framework/MemBufFormatTarget.hpp>
+
+#include <xercesc/util/XMLUniDefs.hpp>
+
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "time.hxx"
+#include "test.hxx"
+
+using namespace std;
+
+bool
+serialization (const char* file, unsigned long iter)
+{
+ try
+ {
+ using namespace xercesc;
+
+ cerr << "serialization:" << endl;
+
+ // Get the object model using the standard parsing function.
+ //
+ unique_ptr<test::root> r (
+ test::root_ (file,
+ xml_schema::flags::dont_initialize |
+ xml_schema::flags::dont_validate));
+
+ // Serialize it to the in-memory buffer. This makes sure the buffer
+ // pre-allocates enough memory.
+ //
+ xml_schema::namespace_infomap map;
+ map["t"].name = "test";
+ map["t"].schema = "test.xsd";
+
+ MemBufFormatTarget ft (10240);
+ test::root_ (ft, *r, map, "UTF-8",
+ xml_schema::flags::dont_initialize |
+ xml_schema::flags::dont_pretty_print |
+ xml_schema::flags::no_xml_declaration);
+
+ size_t size (ft.getLen ());
+ cerr << " document size: " << size << " bytes" << endl
+ << " iterations: " << iter << endl;
+
+ // Create XML serializer that we are going to use in all iterations.
+ //
+ const XMLCh ls_id[] =
+ {xercesc::chLatin_L, xercesc::chLatin_S, xercesc::chNull};
+
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ // Use the error handler implementation provided by the XSD runtime.
+ //
+ xsd::cxx::tree::error_handler<char> eh;
+ xsd::cxx::xml::dom::bits::error_handler_proxy<char> ehp (eh);
+
+ xml_schema::dom::unique_ptr<DOMLSSerializer> writer (
+ impl->createLSSerializer ());
+
+ DOMConfiguration* conf (writer->getDomConfig ());
+
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+ conf->setParameter (XMLUni::fgDOMXMLDeclaration, false);
+
+ xml_schema::dom::unique_ptr<DOMLSOutput> out (impl->createLSOutput ());
+
+ out->setByteStream (&ft);
+
+ // Serialization loop.
+ //
+ os::time start;
+
+ for (unsigned long i (0); i < iter; ++i)
+ {
+ // First serialize the object model to DOM.
+ //
+ xml_schema::dom::unique_ptr<DOMDocument> doc (test::root_ (*r, map));
+
+ ft.reset ();
+
+ // Then serialize DOM to XML reusing the serializer we created above.
+ //
+ writer->write (doc.get (), out.get ());
+ eh.throw_if_failed<xml_schema::serialization> ();
+ }
+
+ os::time end;
+ os::time time (end - start);
+
+ cerr << " time: " << time << " sec" << endl;
+
+ double ms (time.sec () * 1000000ULL + time.nsec () / 1000ULL);
+
+ // Calculate throughput in documents/sec.
+ //
+ double tpd ((iter / ms) * 1000000);
+ cerr << " throughput: " << tpd << " documents/sec" << endl;
+
+ // Calculate throughput in MBytes/sec.
+ //
+ double tpb (((size * iter) / ms) * 1000000/(1024*1024));
+ cerr << " throughput: " << tpb << " MBytes/sec" << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return false;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return false;
+ }
+
+ return true;
+}
diff --git a/examples/cxx/tree/performance/test-50k.xml b/xsd-examples/cxx/tree/performance/test-50k.xml
index 42e22f3..42e22f3 100644
--- a/examples/cxx/tree/performance/test-50k.xml
+++ b/xsd-examples/cxx/tree/performance/test-50k.xml
diff --git a/xsd-examples/cxx/tree/performance/test.xsd b/xsd-examples/cxx/tree/performance/test.xsd
new file mode 100644
index 0000000..98ee921
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/test.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/performance/test.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<schema targetNamespace="test" xmlns:t="test"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <simpleType name="enum">
+ <restriction base="string">
+ <enumeration value="romance"/>
+ <enumeration value="fiction"/>
+ <enumeration value="horror"/>
+ <enumeration value="history"/>
+ <enumeration value="philosophy"/>
+ </restriction>
+ </simpleType>
+
+ <complexType name="record">
+ <sequence>
+ <element name="int" type="unsignedInt"/>
+ <element name="double" type="double"/>
+ <element name="name" type="NCName"/>
+ <element name="string" type="string" minOccurs="0" maxOccurs="1"/>
+ <choice>
+ <element name="choice1" type="string"/>
+ <element name="choice2" type="string"/>
+ <element name="choice3" type="string"/>
+ <element name="choice4" type="string"/>
+ </choice>
+ <element name="enum" type="t:enum"/>
+ </sequence>
+ <attribute name="apple" type="boolean"/>
+ <attribute name="orange" type="unsignedLong" use="required"/>
+ </complexType>
+
+ <complexType name="root">
+ <sequence>
+ <element name="record" type="t:record" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="root" type="t:root"/>
+
+</schema>
diff --git a/xsd-examples/cxx/tree/performance/time.cxx b/xsd-examples/cxx/tree/performance/time.cxx
new file mode 100644
index 0000000..48385a1
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/time.cxx
@@ -0,0 +1,46 @@
+// file : cxx/tree/performance/time.cxx
+// copyright : not copyrighted - public domain
+
+#include "time.hxx"
+
+#if defined (WIN32) || defined (__WIN32__)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h> // GetSystemTimeAsFileTime
+#else
+# include <time.h> // gettimeofday
+# include <sys/time.h> // timeval
+#endif
+
+#include <ostream> // std::ostream
+#include <iomanip> // std::setfill, std::setw
+
+namespace os
+{
+ time::
+ time ()
+ {
+#if defined (WIN32) || defined (__WIN32__)
+ FILETIME ft;
+ GetSystemTimeAsFileTime (&ft);
+ unsigned long long v (
+ ((unsigned long long) (ft.dwHighDateTime) << 32) + ft.dwLowDateTime);
+
+ sec_ = static_cast<unsigned long> (v / 10000000ULL);
+ nsec_ = static_cast<unsigned long> ((v % 10000000ULL) * 100);
+#else
+ timeval tv;
+ if (gettimeofday(&tv, 0) != 0)
+ throw failed ();
+
+ sec_ = static_cast<unsigned long> (tv.tv_sec);
+ nsec_ = static_cast<unsigned long> (tv.tv_usec * 1000);
+#endif
+ }
+
+ std::ostream&
+ operator<< (std::ostream& o, time const& t)
+ {
+ return o << t.sec () << '.'
+ << std::setfill ('0') << std::setw (9) << t.nsec ();
+ }
+}
diff --git a/xsd-examples/cxx/tree/performance/time.hxx b/xsd-examples/cxx/tree/performance/time.hxx
new file mode 100644
index 0000000..b05414b
--- /dev/null
+++ b/xsd-examples/cxx/tree/performance/time.hxx
@@ -0,0 +1,110 @@
+// file : cxx/tree/performance/time.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef TIME_HXX
+#define TIME_HXX
+
+#include <iosfwd> // std::ostream&
+
+namespace os
+{
+ class time
+ {
+ public:
+ class failed {};
+
+ // Create a time object representing the current time.
+ //
+ time ();
+
+ time (unsigned long long nsec)
+ {
+ sec_ = static_cast<unsigned long> (nsec / 1000000000ULL);
+ nsec_ = static_cast<unsigned long> (nsec % 1000000000ULL);
+ }
+
+ time (unsigned long sec, unsigned long nsec)
+ {
+ sec_ = sec;
+ nsec_ = nsec;
+ }
+
+ public:
+ unsigned long
+ sec () const
+ {
+ return sec_;
+ }
+
+ unsigned long
+ nsec () const
+ {
+ return nsec_;
+ }
+
+ public:
+ class overflow {};
+ class underflow {};
+
+ time
+ operator+= (time const& b)
+ {
+ unsigned long long tmp = 0ULL + nsec_ + b.nsec_;
+
+ sec_ += static_cast<unsigned long> (b.sec_ + tmp / 1000000000ULL);
+ nsec_ = static_cast<unsigned long> (tmp % 1000000000ULL);
+
+ return *this;
+ }
+
+ time
+ operator-= (time const& b)
+ {
+ if (*this < b)
+ throw underflow ();
+
+ sec_ -= b.sec_;
+
+ if (nsec_ < b.nsec_)
+ {
+ --sec_;
+ nsec_ += 1000000000ULL - b.nsec_;
+ }
+ else
+ nsec_ -= b.nsec_;
+
+ return *this;
+ }
+
+ friend time
+ operator+ (time const& a, time const& b)
+ {
+ time r (a);
+ r += b;
+ return r;
+ }
+
+ friend time
+ operator- (time const& a, time const& b)
+ {
+ time r (a);
+ r -= b;
+ return r;
+ }
+
+ friend bool
+ operator < (time const& a, time const& b)
+ {
+ return (a.sec_ < b.sec_) || (a.sec_ == b.sec_ && a.nsec_ < b.nsec_);
+ }
+
+ private:
+ unsigned long sec_;
+ unsigned long nsec_;
+ };
+
+ std::ostream&
+ operator<< (std::ostream&, time const&);
+}
+
+#endif // TIME_HXX
diff --git a/xsd-examples/cxx/tree/polymorphism/.gitignore b/xsd-examples/cxx/tree/polymorphism/.gitignore
new file mode 100644
index 0000000..f2e9b04
--- /dev/null
+++ b/xsd-examples/cxx/tree/polymorphism/.gitignore
@@ -0,0 +1 @@
+supermen.?xx
diff --git a/examples/cxx/tree/polymorphism/README b/xsd-examples/cxx/tree/polymorphism/README
index 6e54e49..6e54e49 100644
--- a/examples/cxx/tree/polymorphism/README
+++ b/xsd-examples/cxx/tree/polymorphism/README
diff --git a/xsd-examples/cxx/tree/polymorphism/buildfile b/xsd-examples/cxx/tree/polymorphism/buildfile
new file mode 100644
index 0000000..754c6c2
--- /dev/null
+++ b/xsd-examples/cxx/tree/polymorphism/buildfile
@@ -0,0 +1,26 @@
+# file : cxx/tree/polymorphism/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -supermen} {hxx ixx cxx}{supermen} $libs
+
+exe{driver}: xml{supermen}: test.input = true
+
+<{hxx ixx cxx}{supermen}>: xsd{supermen} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-polymorphic \
+ --generate-serialization \
+ --root-element-last \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-examples/cxx/tree/polymorphism/driver.cxx b/xsd-examples/cxx/tree/polymorphism/driver.cxx
new file mode 100644
index 0000000..6458170
--- /dev/null
+++ b/xsd-examples/cxx/tree/polymorphism/driver.cxx
@@ -0,0 +1,59 @@
+// file : cxx/tree/polymorphism/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <iostream>
+
+#include "supermen.hxx"
+
+using std::cerr;
+using std::endl;
+using std::unique_ptr;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " supermen.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ unique_ptr<supermen> sm (supermen_ (argv[1]));
+
+ supermen copy (*sm); // Dynamic types are preserved in copies.
+
+ // Print what we've got.
+ //
+ for (supermen::person_const_iterator i (copy.person ().begin ());
+ i != copy.person ().end ();
+ ++i)
+ {
+ cerr << i->name ();
+
+ if (const superman* s = dynamic_cast<const superman*> (&*i))
+ {
+ if (s->can_fly ())
+ cerr << ", flying superman";
+ else
+ cerr << ", superman";
+ }
+
+ cerr << endl;
+ }
+
+ // Serialize back to XML.
+ //
+ xml_schema::namespace_infomap map;
+ map[""].schema = "supermen.xsd";
+
+ supermen_ (std::cout, copy, map);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/xsd-examples/cxx/tree/polymorphism/supermen.xml b/xsd-examples/cxx/tree/polymorphism/supermen.xml
new file mode 100644
index 0000000..08430fa
--- /dev/null
+++ b/xsd-examples/cxx/tree/polymorphism/supermen.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/polymorphism/supermen.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<supermen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="supermen.xsd">
+
+ <person>
+ <name>John Doe</name>
+ </person>
+
+ <superman can-fly="false">
+ <name>James "007" Bond</name>
+ </superman>
+
+ <superman can-fly="true" wing-span="10" xsi:type="batman">
+ <name>Bruce Wayne</name>
+ </superman>
+
+</supermen>
diff --git a/xsd-examples/cxx/tree/polymorphism/supermen.xsd b/xsd-examples/cxx/tree/polymorphism/supermen.xsd
new file mode 100644
index 0000000..cf5ff0c
--- /dev/null
+++ b/xsd-examples/cxx/tree/polymorphism/supermen.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/polymorphism/supermen.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- substitution group root -->
+ <xsd:element name="person" type="person"/>
+
+
+ <xsd:complexType name="superman">
+ <xsd:complexContent>
+ <xsd:extension base="person">
+ <xsd:attribute name="can-fly" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="superman" type="superman" substitutionGroup="person"/>
+
+ <xsd:complexType name="batman">
+ <xsd:complexContent>
+ <xsd:extension base="superman">
+ <xsd:attribute name="wing-span" type="xsd:unsignedInt" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="supermen">
+ <xsd:sequence>
+ <xsd:element ref="person" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="supermen" type="supermen"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/secure/.gitignore b/xsd-examples/cxx/tree/secure/.gitignore
new file mode 100644
index 0000000..c116ec1
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/.gitignore
@@ -0,0 +1 @@
+library.?xx
diff --git a/examples/cxx/tree/secure/README b/xsd-examples/cxx/tree/secure/README
index 649f0a3..649f0a3 100644
--- a/examples/cxx/tree/secure/README
+++ b/xsd-examples/cxx/tree/secure/README
diff --git a/xsd-examples/cxx/tree/secure/buildfile b/xsd-examples/cxx/tree/secure/buildfile
new file mode 100644
index 0000000..b1ca71f
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/secure/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -library} {hxx ixx cxx}{library} $libs
+
+exe{driver}: xml{library}: test.input = true
+
+<{hxx ixx cxx}{library}>: xsd{library} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/secure/driver.cxx b/xsd-examples/cxx/tree/secure/driver.cxx
new file mode 100644
index 0000000..7b6886f
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/driver.cxx
@@ -0,0 +1,141 @@
+// file : cxx/tree/secure/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/string.hxx>
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "library.hxx"
+#include "secure-dom-parser.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " library.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we
+ // are doing the XML-to-DOM parsing ourselves.
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace xercesc;
+ namespace xml = xsd::cxx::xml;
+ namespace tree = xsd::cxx::tree;
+
+ xml::dom::unique_ptr<DOMLSParser> parser (new SecureDOMParser ());
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, true);
+ conf->setParameter (XMLUni::fgXercesSchema, true);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // Disable loading schemas via other means (e.g., schemaLocation).
+ //
+ // Note: this might be a good idea though if you need validation,
+ // you will need to pre-load the schema via other means. See the
+ // 'caching' and 'embedded' examples for different approaches.
+ // Both of them can be used with SecureDOMParser.
+ //
+ // conf->setParameter (XMLUni::fgXercesLoadSchema, false);
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Parse the XML document.
+ //
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ // Wrap the standard input stream.
+ //
+ xml::sax::std_input_source isrc (ifs, argv[1]);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ // Parse XML to DOM.
+ //
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<xml_schema::parsing> ();
+
+ // Parse DOM to the object model.
+ //
+ unique_ptr<library::catalog> c (library::catalog_ (*doc));
+
+ cerr << "catalog with " << c->book ().size () << " books" << endl;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/secure/library.xml b/xsd-examples/cxx/tree/secure/library.xml
new file mode 100644
index 0000000..fa5f044
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/library.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!DOCTYPE lib:catalog>
+<!--
+<!DOCTYPE lib:catalog [<!ENTITY xxe SYSTEM "file:///dev/random" >]>
+-->
+<!--
+<!DOCTYPE lib:catalog PUBLIC "public id" "http://example.org">
+-->
+
+<!--
+
+file : cxx/tree/secure/library.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<lib:catalog xmlns:lib="http://www.codesynthesis.com/library"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/library library.xsd">
+
+ <book id="MM" available="false">
+ <isbn>0679760806</isbn>
+ <title>The Master and Margarita</title>
+ <genre>fiction</genre>
+
+ <author recommends="WP">
+ <name>Mikhail Bulgakov</name>
+ <born>1891-05-15</born>
+ <died>1940-03-10</died>
+ </author>
+ </book>
+
+
+ <book id="WP">
+ <isbn>0679600841</isbn>
+ <title>War and Peace</title>
+ <genre>history</genre>
+
+ <author recommends="CP">
+ <name>Leo Tolstoy</name>
+ <born>1828-09-09</born>
+ <died>1910-11-20</died>
+ </author>
+ </book>
+
+
+ <book id="CP" available="false">
+ <isbn>0679420290</isbn>
+ <title>Crime and Punishment</title>
+ <genre>philosophy</genre>
+
+ <author>
+ <name>Fyodor Dostoevsky</name>
+ <born>1821-11-11</born>
+ <died>1881-02-09</died>
+ </author>
+ </book>
+
+</lib:catalog>
diff --git a/xsd-examples/cxx/tree/secure/library.xsd b/xsd-examples/cxx/tree/secure/library.xsd
new file mode 100644
index 0000000..f80da3c
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/library.xsd
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/secure/library.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
+ xmlns:lib="http://www.codesynthesis.com/library"
+ targetNamespace="http://www.codesynthesis.com/library">
+
+ <xsd:simpleType name="isbn">
+ <xsd:restriction base="xsd:unsignedInt"/>
+ </xsd:simpleType>
+
+ <xsd:complexType name="title">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="lang" type="xsd:language"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:simpleType name="genre">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="romance"/>
+ <xsd:enumeration value="fiction"/>
+ <xsd:enumeration value="horror"/>
+ <xsd:enumeration value="history"/>
+ <xsd:enumeration value="philosophy"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="born" type="xsd:date"/>
+ <xsd:element name="died" type="xsd:date" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="author">
+ <xsd:complexContent>
+ <xsd:extension base="lib:person">
+ <xsd:attribute name="recommends" type="xsd:IDREF" xse:refType="lib:book"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="book">
+ <xsd:sequence>
+ <xsd:element name="isbn" type="lib:isbn"/>
+ <xsd:element name="title" type="lib:title"/>
+ <xsd:element name="genre" type="lib:genre"/>
+ <xsd:element name="author" type="lib:author" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="available" type="xsd:boolean" default="true"/>
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="catalog">
+ <xsd:sequence>
+ <xsd:element name="book" type="lib:book" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="catalog" type="lib:catalog"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/secure/secure-dom-parser.cxx b/xsd-examples/cxx/tree/secure/secure-dom-parser.cxx
new file mode 100644
index 0000000..8eb7a28
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/secure-dom-parser.cxx
@@ -0,0 +1,24 @@
+// file : cxx/tree/secure/secure-dom-parser.cxx
+// copyright : not copyrighted - public domain
+
+#include "secure-dom-parser.hxx"
+
+#include <xercesc/util/XMLException.hpp>
+#include <xercesc/util/XMLExceptMsgs.hpp>
+
+using namespace xercesc;
+
+void SecureDOMParser::
+doctypeDecl (const DTDElementDecl& e,
+ const XMLCh* const pub_id,
+ const XMLCh* const sys_id,
+ const bool hasi,
+ const bool hase)
+{
+ if (hasi || hase)
+ ThrowXMLwithMemMgr(RuntimeException,
+ XMLExcepts::Gen_NoDTDValidator,
+ fMemoryManager);
+
+ DOMLSParserImpl::doctypeDecl (e, pub_id, sys_id, hasi, hase);
+}
diff --git a/xsd-examples/cxx/tree/secure/secure-dom-parser.hxx b/xsd-examples/cxx/tree/secure/secure-dom-parser.hxx
new file mode 100644
index 0000000..d70dff0
--- /dev/null
+++ b/xsd-examples/cxx/tree/secure/secure-dom-parser.hxx
@@ -0,0 +1,25 @@
+// file : cxx/tree/secure/secure-dom-parser.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef SECURE_DOM_PARSER_HXX
+#define SECURE_DOM_PARSER_HXX
+
+#include <xercesc/parsers/DOMLSParserImpl.hpp>
+
+class SecureDOMParser: public xercesc::DOMLSParserImpl
+{
+public:
+ SecureDOMParser (xercesc::MemoryManager* mm =
+ xercesc::XMLPlatformUtils::fgMemoryManager,
+ xercesc::XMLGrammarPool* gp = 0)
+ : DOMLSParserImpl (0, mm, gp) {}
+
+ virtual void
+ doctypeDecl (const xercesc::DTDElementDecl& root,
+ const XMLCh* const public_id,
+ const XMLCh* const system_id,
+ const bool has_internal,
+ const bool has_external);
+};
+
+#endif // SECURE_DOM_PARSER_HXX
diff --git a/xsd-examples/cxx/tree/streaming/.gitignore b/xsd-examples/cxx/tree/streaming/.gitignore
new file mode 100644
index 0000000..db4a6e9
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/.gitignore
@@ -0,0 +1 @@
+position.?xx
diff --git a/examples/cxx/tree/streaming/README b/xsd-examples/cxx/tree/streaming/README
index 5a467e0..5a467e0 100644
--- a/examples/cxx/tree/streaming/README
+++ b/xsd-examples/cxx/tree/streaming/README
diff --git a/xsd-examples/cxx/tree/streaming/buildfile b/xsd-examples/cxx/tree/streaming/buildfile
new file mode 100644
index 0000000..8c34b17
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/buildfile
@@ -0,0 +1,26 @@
+# file : cxx/tree/streaming/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} xml{position} doc{README}
+
+exe{driver}: {hxx cxx}{* -position} {hxx ixx cxx}{position} $libs testscript
+
+<{hxx ixx cxx}{position}>: xsd{position} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/streaming/driver.cxx b/xsd-examples/cxx/tree/streaming/driver.cxx
new file mode 100644
index 0000000..8a70f58
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/driver.cxx
@@ -0,0 +1,139 @@
+// file : cxx/tree/streaming/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <iostream>
+#include <fstream>
+
+#include <xercesc/dom/DOM.hpp>
+
+#include <xsd/cxx/xml/string.hxx> // xml::string
+
+#include "parser.hxx"
+#include "serializer.hxx"
+#include "position.hxx"
+
+using namespace std;
+using namespace xercesc;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " position.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // We need to initialize the Xerces-C++ runtime because we are doing
+ // the XML-to-DOM parsing ourselves.
+ //
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace op;
+ namespace xml = xsd::cxx::xml;
+
+ // Parse and serialize at the same time, in the streaming mode.
+ //
+
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ ofstream ofs;
+ ofs.exceptions (ios_base::badbit | ios_base::failbit);
+ ofs.open ("out.xml");
+
+ xml_schema::namespace_infomap ns_map;
+ ns_map["op"].name = "http://www.codesynthesis.com/op";
+ ns_map["op"].schema = "position.xsd";
+
+ parser p;
+ serializer s;
+
+ p.start (ifs, argv[1], true);
+ s.start (ofs);
+
+ typedef xml_schema::dom::unique_ptr<DOMDocument> document_ptr;
+
+ // Peek at the root element. This way we only get the "carcase"
+ // of the document, that is, the root element with its name, all
+ // the attributes, and namespace declarations but without any of
+ // the nested elements.
+ //
+ document_ptr docr (p.peek ());
+ bool parsed (false);
+
+ // Parse first-level elements.
+ //
+ for (document_ptr doc1 (p.peek ()); doc1.get () != 0; doc1 = p.peek ())
+ {
+ // Check whether it is an element that we should stream (position) or
+ // just add to the root (header).
+ //
+ string n1 (xml::transcode<char> (
+ doc1->getDocumentElement ()->getLocalName ()));
+
+ // If we see the first streaming element, then parse the root carcase.
+ //
+ if (!parsed && n1 == "position")
+ {
+ object o (*docr->getDocumentElement ());
+
+ cerr << "id: " << o.id () << endl
+ << "name: " << o.header ().name () << endl
+ << "type: " << o.header ().type () << endl;
+
+ // Start serializing the document by writing out the root carcase.
+ // Note that we leave it open so that we can serialize more elements.
+ //
+ s.next_open (ns_map["op"].name, "op:object", ns_map, o);
+ parsed = true;
+ }
+
+ // Handle elements that need streaming.
+ //
+ if (n1 == "position")
+ {
+ // Position has no nested elements that we need to stream so we
+ // finish parsing it in one go.
+ //
+ doc1 = p.next (move (doc1));
+ position pos (*doc1->getDocumentElement ());
+
+ cerr << "lat: " << pos.lat () << " lon: " << pos.lon () << endl;
+
+ // Serialize it (append) to the root element.
+ //
+ s.next ("position", pos);
+ }
+ else
+ {
+ // Element that doesn't require streaming (header in our case). Add
+ // to the root element and finish parsing.
+ //
+ docr = p.next (move (doc1), move (docr));
+ }
+ }
+
+ // Close the root element in serializer.
+ //
+ s.next_close ("op:object");
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const ios_base::failure&)
+ {
+ cerr << "io failure" << endl;
+ r = 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/streaming/grammar-input-stream.cxx b/xsd-examples/cxx/tree/streaming/grammar-input-stream.cxx
new file mode 100644
index 0000000..6f17f33
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/grammar-input-stream.cxx
@@ -0,0 +1,96 @@
+// file : cxx/tree/streaming/grammar-input-stream.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#include <cassert>
+#include "grammar-input-stream.hxx"
+
+grammar_input_stream::
+grammar_input_stream (const XMLByte* data, std::size_t size)
+ : data_ (data),
+ size_ (size),
+ pos_ (0),
+ vpos_ (0),
+ cseq_ (0),
+ add_zero_ (false)
+{
+}
+
+XMLFilePos grammar_input_stream::
+curPos () const
+{
+ return static_cast<XMLFilePos> (vpos_);
+}
+
+XMLSize_t grammar_input_stream::
+readBytes (XMLByte* const buf, const XMLSize_t size)
+{
+ std::size_t i (0);
+
+ // Add a zero from the alternating sequence if it didn't
+ // fit on the previous read.
+ //
+ if (add_zero_)
+ {
+ buf[i++] = 0;
+ add_zero_ = false;
+ }
+
+ // If have an unfinished sequential sequence, output it now.
+ //
+ if (cseq_ != 0 && !alt_)
+ {
+ for (; cseq_ != 0 && i < size; --cseq_)
+ buf[i++] = 0;
+ }
+
+ for (; i < size && pos_ < size_;)
+ {
+ XMLByte b = buf[i++] = data_[pos_++];
+
+ // See if we are in a compression sequence.
+ //
+ if (cseq_ != 0)
+ {
+ if (i < size)
+ buf[i++] = 0;
+ else
+ add_zero_ = true; // Add it on the next read.
+
+ cseq_--;
+ continue;
+ }
+
+ // If we are not in a compression sequence and this byte is
+ // not zero then we are done.
+ //
+ if (b != 0)
+ continue;
+
+ // We have a zero.
+ //
+ assert (pos_ < size_); // There has to be another byte.
+ unsigned char v (static_cast<unsigned char> (data_[pos_++]));
+ alt_ = (v & 128) != 0;
+ cseq_ = v & 127;
+
+ // If it is a sequential sequence, output as many zeros as
+ // we can.
+ //
+ if (!alt_)
+ {
+ for (; cseq_ != 0 && i < size; --cseq_)
+ buf[i++] = 0;
+ }
+ }
+
+ vpos_ += i;
+
+ return static_cast<XMLSize_t> (i);
+}
+
+const XMLCh* grammar_input_stream::
+getContentType () const
+{
+ return 0;
+}
diff --git a/xsd-examples/cxx/tree/streaming/grammar-input-stream.hxx b/xsd-examples/cxx/tree/streaming/grammar-input-stream.hxx
new file mode 100644
index 0000000..17e6913
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/grammar-input-stream.hxx
@@ -0,0 +1,41 @@
+// file : cxx/tree/streaming/grammar-input-stream.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#ifndef GRAMMAR_INPUT_STREAM_HXX
+#define GRAMMAR_INPUT_STREAM_HXX
+
+#include <cstddef>
+#include <xercesc/util/BinInputStream.hpp>
+
+// Memory buffer input stream with the special-purpose schema
+// grammar decompression.
+//
+class grammar_input_stream: public xercesc::BinInputStream
+{
+public :
+ grammar_input_stream (const XMLByte* data, std::size_t size);
+
+ virtual XMLFilePos
+ curPos () const;
+
+ virtual XMLSize_t
+ readBytes (XMLByte* const buf, const XMLSize_t size);
+
+ virtual const XMLCh*
+ getContentType () const;
+
+private :
+ const XMLByte* data_;
+ std::size_t size_;
+ std::size_t pos_;
+ std::size_t vpos_;
+
+ // Compression data.
+ //
+ size_t cseq_; // Number of bytes left in a compression sequence.
+ bool alt_; // Alternating or sequential sequence.
+ bool add_zero_; // Add a zero on the next read.
+};
+
+#endif // GRAMMAR_INPUT_STREAM_HXX
diff --git a/xsd-examples/cxx/tree/streaming/parser.cxx b/xsd-examples/cxx/tree/streaming/parser.cxx
new file mode 100644
index 0000000..064dc77
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/parser.cxx
@@ -0,0 +1,371 @@
+#include <cassert>
+#include <utility> // std::move()
+
+#include <xercesc/util/XMLUni.hpp>
+#include <xercesc/util/XMLString.hpp>
+
+#include <xercesc/sax2/Attributes.hpp>
+#include <xercesc/sax2/DefaultHandler.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/impl/DOMTextImpl.hpp>
+
+#include <xercesc/validators/common/Grammar.hpp> // xercesc::Grammar
+#include <xercesc/framework/XMLGrammarPoolImpl.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/sax/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "parser.hxx"
+#include "grammar-input-stream.hxx"
+
+using namespace std;
+using namespace xercesc;
+
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+typedef parser::document_ptr document_ptr;
+
+class parser_impl: public DefaultHandler
+{
+public:
+ parser_impl (const XMLByte* grammar, size_t grammar_size);
+
+ void
+ start (istream& is, const string& id, bool validate);
+
+ document_ptr
+ peek ();
+
+ document_ptr
+ next (document_ptr doc = document_ptr (),
+ document_ptr outer_doc = document_ptr ());
+
+ // SAX event handlers.
+ //
+private:
+ virtual void
+ startElement (const XMLCh* const uri,
+ const XMLCh* const lname,
+ const XMLCh* const qname,
+ const Attributes& attributes);
+
+ virtual void
+ endElement (const XMLCh* const uri,
+ const XMLCh* const lname,
+ const XMLCh* const qname);
+
+ virtual void
+ characters (const XMLCh* const s,
+ const XMLSize_t length);
+
+private:
+ // SAX parser.
+ //
+ bool clean_;
+ unique_ptr<XMLGrammarPool> grammar_pool_;
+ unique_ptr<SAX2XMLReader> parser_;
+ XMLPScanToken token_;
+ tree::error_handler<char> error_handler_;
+ xml::sax::bits::error_handler_proxy<char> error_proxy_;
+ unique_ptr<xml::sax::std_input_source> isrc_;
+
+ size_t depth_;
+ size_t whitespace_depth_; // Depth at which to ignore whitespaces.
+
+ bool peek_;
+ size_t next_depth_; // Depth at which next() should work.
+
+ // DOM document being built.
+ //
+ DOMImplementation& dom_impl_;
+ document_ptr doc_;
+ DOMElement* cur_;
+};
+
+const XMLCh ls[] = {chLatin_L, chLatin_S, chNull};
+
+parser_impl::
+parser_impl (const XMLByte* grammar, size_t grammar_size)
+ : clean_ (true),
+ error_proxy_ (error_handler_),
+ dom_impl_ (*DOMImplementationRegistry::getDOMImplementation (ls))
+{
+ MemoryManager* mm (XMLPlatformUtils::fgMemoryManager);
+
+ if (grammar != 0)
+ {
+ assert (grammar_size != 0);
+ grammar_pool_.reset (new XMLGrammarPoolImpl (mm));
+
+ grammar_input_stream is (grammar, grammar_size);
+ grammar_pool_->deserializeGrammars(&is);
+ grammar_pool_->lockPool ();
+ }
+
+ parser_.reset (XMLReaderFactory::createXMLReader (mm, grammar_pool_.get ()));
+
+ parser_->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
+ parser_->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
+ parser_->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true);
+ parser_->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support. It also allows us to disable buffering in the parser
+ // so that the data is parsed and returned as soon as it is
+ // available.
+ //
+#if _XERCES_VERSION >= 30100
+ parser_->setFeature (XMLUni::fgXercesHandleMultipleImports, true);
+
+ XMLSize_t lwm = 0;
+ parser_->setProperty (XMLUni::fgXercesLowWaterMark, &lwm);
+#endif
+
+ parser_->setErrorHandler (&error_proxy_);
+ parser_->setContentHandler (this);
+}
+
+void parser_impl::
+start (istream& is, const string& id, bool val)
+{
+ // Reset our state.
+ //
+ depth_ = 0;
+ peek_ = false;
+ doc_.reset ();
+ error_handler_.reset ();
+
+ if (!clean_)
+ parser_->parseReset (token_);
+ else
+ clean_ = false;
+
+ isrc_.reset (new xml::sax::std_input_source (is, id));
+
+ parser_->setFeature (XMLUni::fgSAX2CoreValidation, val);
+ parser_->setFeature (XMLUni::fgXercesSchema, val);
+
+ if (val && grammar_pool_.get () != 0)
+ {
+ // Use the loaded grammar during parsing.
+ //
+ parser_->setFeature (XMLUni::fgXercesUseCachedGrammarInParse, true);
+
+ // Disable loading schemas via other means (e.g., schemaLocation).
+ //
+ parser_->setFeature (XMLUni::fgXercesLoadSchema, false);
+ }
+
+ parser_->parseFirst (*isrc_, token_);
+ error_handler_.throw_if_failed<tree::parsing<char> > ();
+}
+
+document_ptr parser_impl::
+peek ()
+{
+ bool r (true);
+
+ size_t d (depth_);
+ whitespace_depth_ = d;
+
+ peek_ = true;
+
+ // Parse (skip whitespace content) until the depth increases or we get
+ // a document. The latter test covers <element/> cases where both start
+ // and end events will trigger and therefore leave the depth unchanged.
+ //
+ while (r && depth_ == d && doc_.get () == 0)
+ {
+ r = parser_->parseNext (token_);
+ error_handler_.throw_if_failed<tree::parsing<char> > ();
+ }
+
+ if (!r)
+ return document_ptr ();
+
+ return move (doc_);
+}
+
+document_ptr parser_impl::
+next (document_ptr doc, document_ptr outer_doc)
+{
+ assert (peek_ == (doc.get () != 0));
+
+ // Install doc/outer_doc as the document we are parsing.
+ //
+ if (doc.get () != 0)
+ {
+ if (outer_doc.get () != 0)
+ {
+ // Move doc to outer_doc.
+ //
+ doc_ = move (outer_doc);
+ cur_ = static_cast<DOMElement*> (
+ doc_->importNode (doc->getDocumentElement (), true));
+ doc_->getDocumentElement ()->appendChild (cur_);
+ }
+ else
+ {
+ doc_ = move (doc);
+ cur_ = doc_->getDocumentElement ();
+ }
+
+ // This handles the <element/> case where we get both start and
+ // end events in peek(). In this case the element is fully parsed
+ // and next() has nothing to do.
+ //
+ if (depth_ != next_depth_)
+ {
+ peek_ = false;
+ return move (doc_);
+ }
+ }
+
+ bool r (true);
+
+ // If we peeked, then we have already seen the start tag and our
+ // return depth is one above the current depth.
+ //
+ size_t d (peek_ ? depth_ - 1 : depth_);
+ whitespace_depth_ = d;
+
+ peek_ = false;
+
+ // Keep calling parseNext() until we either move to a greater depth or
+ // get a document. This way we skip the text (presumably whitespaces)
+ // that may be preceding this chunk.
+ //
+ while (r && depth_ == d && doc_.get () == 0)
+ {
+ parser_->parseNext (token_);
+ error_handler_.throw_if_failed<tree::parsing<char> > ();
+ }
+
+ if (!r)
+ return document_ptr ();
+
+ // If we are not at our start depth, keep calling parseNext() until we
+ // get there again.
+ //
+ while (r && depth_ != d)
+ {
+ r = parser_->parseNext (token_);
+ error_handler_.throw_if_failed<tree::parsing<char> > ();
+ }
+
+ if (!r)
+ return document_ptr ();
+
+ return move (doc_);
+}
+
+// DOM builder.
+//
+
+void parser_impl::
+startElement (const XMLCh* const uri,
+ const XMLCh* const /*lname*/,
+ const XMLCh* const qname,
+ const Attributes& attr)
+{
+ if (doc_.get () == 0)
+ {
+ doc_.reset (dom_impl_.createDocument (uri, qname, 0));
+ cur_ = doc_->getDocumentElement ();
+ }
+ else
+ {
+ DOMElement* e = doc_->createElementNS (uri, qname);
+ cur_->appendChild (e);
+ cur_ = e;
+ }
+
+ // Set attributes.
+ //
+ for (XMLSize_t i (0), end (attr.getLength()); i < end; ++i)
+ {
+ const XMLCh* qn (attr.getQName (i));
+ const XMLCh* ns (attr.getURI (i));
+
+ // When SAX2 reports the xmlns attribute, it does not include
+ // the proper attribute namespace. So we have to detect and
+ // handle this case.
+ //
+ if (XMLString::equals (qn, XMLUni::fgXMLNSString))
+ ns = XMLUni::fgXMLNSURIName;
+
+ cur_->setAttributeNS (ns, qn, attr.getValue (i));
+ }
+
+ depth_++;
+
+ if (peek_)
+ next_depth_ = depth_;
+}
+
+void parser_impl::
+endElement (const XMLCh* const /*uri*/,
+ const XMLCh* const /*lname*/,
+ const XMLCh* const /*qname*/)
+{
+ // We have an element parent only on depth 2 or greater.
+ //
+ if (--depth_ > 1)
+ cur_ = static_cast<DOMElement*> (cur_->getParentNode ());
+}
+
+void parser_impl::
+characters (const XMLCh* const s, const XMLSize_t length)
+{
+ const XMLCh empty[] = {chNull};
+
+ // Ignore text content (presumably whitespaces) while looking for
+ // the next element.
+ //
+ if (depth_ > whitespace_depth_)
+ {
+ DOMText* t = doc_->createTextNode (empty);
+ static_cast<DOMTextImpl*> (t)->appendData (s, length);
+ cur_->appendChild (t);
+ }
+}
+
+//
+// parser
+//
+
+parser::
+~parser ()
+{
+}
+
+parser::
+parser (const XMLByte* grammar, size_t grammar_size)
+ : impl_ (new parser_impl (grammar, grammar_size))
+{
+}
+
+void parser::
+start (istream& is, const string& id, bool val)
+{
+ return impl_->start (is, id, val);
+}
+
+document_ptr parser::
+peek ()
+{
+ return impl_->peek ();
+}
+
+document_ptr parser::
+next (document_ptr doc, document_ptr outer_doc)
+{
+ return impl_->next (move (doc), move (outer_doc));
+}
diff --git a/xsd-examples/cxx/tree/streaming/parser.hxx b/xsd-examples/cxx/tree/streaming/parser.hxx
new file mode 100644
index 0000000..605d236
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/parser.hxx
@@ -0,0 +1,67 @@
+#ifndef PARSER_HXX
+#define PARSER_HXX
+
+#include <string>
+#include <iosfwd>
+#include <cstddef> // std::size_t
+#include <memory> // std::unique_ptr
+
+#include <xercesc/dom/DOMDocument.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+class parser_impl;
+
+class parser
+{
+public:
+ // We can specify embedded XML Schema grammar to be used by the parser
+ // that was created by the xsdbin utility from the 'embedded' example.
+ //
+ parser (const XMLByte* grammar = 0, std::size_t grammar_size = 0);
+ ~parser ();
+
+ // The start function prepares everything for parsing a new document.
+ //
+ void
+ start (std::istream& is, const std::string& id, bool validate);
+
+ typedef xsd::cxx::xml::dom::unique_ptr<xercesc::DOMDocument> document_ptr;
+
+ // The peek function parses just the next element (ignoring any
+ // preceding content assuming it is whitespace) without parsing
+ // any of its nested content (but it includes the element's
+ // attributes). It returns NULL if there are no more elements
+ // at this level (there could still be on outer levels in case
+ // of nested streaming).
+ //
+ document_ptr
+ peek ();
+
+ // The next function parses (or finishes parsing after peek) the
+ // next element including its nested content. It returns NULL if
+ // there are no more elements at this level (there could still
+ // be on outer levels in case of nested streaming).
+ //
+ // If doc is not NULL, then it should be the document returned
+ // by peek(). That is, a document with only the root element.
+ // In this case next() finishes parsing this element.
+ //
+ // If outer_doc is not NULL, then next() will first add doc to
+ // outer_doc as a child of the document root.
+ //
+ document_ptr
+ next (document_ptr doc = document_ptr (),
+ document_ptr outer_doc = document_ptr ());
+
+private:
+ parser (const parser&);
+
+ parser&
+ operator= (const parser&);
+
+private:
+ std::unique_ptr<parser_impl> impl_;
+};
+
+#endif // PARSER_HXX
diff --git a/xsd-examples/cxx/tree/streaming/position.xml b/xsd-examples/cxx/tree/streaming/position.xml
new file mode 100644
index 0000000..3308306
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/position.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/streaming/position.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<op:object xmlns:op="http://www.codesynthesis.com/op"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/op position.xsd"
+ id="123">
+
+ <header>
+ <name>Lion's Head</name>
+ <type>rock</type>
+ </header>
+
+ <position lat="-33.8569" lon="18.5083"/>
+ <position lat="-33.8568" lon="18.5083"/>
+ <position lat="-33.8568" lon="18.5082"/>
+ <position lat="-33.8570" lon="18.5083"/>
+ <position lat="-33.8569" lon="18.5084"/>
+ <position lat="-33.8570" lon="18.5084"/>
+ <position lat="-33.8570" lon="18.5082"/>
+ <position lat="-33.8569" lon="18.5082"/>
+
+</op:object>
diff --git a/xsd-examples/cxx/tree/streaming/position.xsd b/xsd-examples/cxx/tree/streaming/position.xsd
new file mode 100644
index 0000000..0fbcf87
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/position.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/streaming/position.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:op="http://www.codesynthesis.com/op"
+ targetNamespace="http://www.codesynthesis.com/op">
+
+
+ <xsd:complexType name="header">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="type" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="position">
+ <xsd:attribute name="lat" type="xsd:float" use="required"/>
+ <xsd:attribute name="lon" type="xsd:float" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="object">
+ <xsd:sequence>
+ <xsd:element name="header" type="op:header"/>
+ <xsd:element name="position" type="op:position" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:unsignedInt" use="required"/>
+ </xsd:complexType>
+
+ <xsd:element name="object" type="op:object"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/streaming/serializer.cxx b/xsd-examples/cxx/tree/streaming/serializer.cxx
new file mode 100644
index 0000000..b903a49
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/serializer.cxx
@@ -0,0 +1,636 @@
+#include <vector>
+#include <cassert>
+#include <cstddef>
+
+#include <xercesc/util/XMLUni.hpp>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/dom/impl/DOMDocumentImpl.hpp>
+#include <xercesc/dom/impl/DOMLSSerializerImpl.hpp>
+
+#include <xsd/cxx/xml/string.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+#include <xsd/cxx/xml/dom/serialization-source.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+#include "serializer.hxx"
+
+using namespace std;
+using namespace xercesc;
+
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+static const XMLCh gEOLSeq[] =
+{
+ chLF, chNull
+};
+
+static const XMLCh gUTF8[] =
+{
+ chLatin_U, chLatin_T, chLatin_F, chDash, chDigit_8, chNull
+};
+
+static const XMLCh gEndElement[] =
+{
+ chOpenAngle, chForwardSlash, chNull
+};
+
+static const int DISCARD_DEFAULT_CONTENT_ID = 0x1;
+static const int ENTITIES_ID = 0x2;
+static const int FORMAT_PRETTY_PRINT_1ST_LEVEL_ID = 0xA;
+
+class StreamingDOMSerializer: public DOMLSSerializerImpl
+{
+public:
+ StreamingDOMSerializer (MemoryManager* manager)
+ : DOMLSSerializerImpl (manager)
+ {
+ }
+
+ bool
+ startOpen (const DOMElement* e, DOMLSOutput* const destination)
+ {
+ const DOMDocument* docu (e->getOwnerDocument ());
+ assert (docu != 0);
+
+ // Code adapted from DOMLSSerializerImpl::write().
+ //
+ target_ = destination->getByteStream();
+
+ fEncodingUsed = gUTF8;
+
+ const XMLCh* lsEncoding=destination->getEncoding();
+ if (lsEncoding && *lsEncoding)
+ {
+ fEncodingUsed = lsEncoding;
+ }
+ else if (docu)
+ {
+ const XMLCh* tmpEncoding = docu->getInputEncoding();
+
+ if ( tmpEncoding && *tmpEncoding)
+ {
+ fEncodingUsed = tmpEncoding;
+ }
+ else
+ {
+ tmpEncoding = docu->getXmlEncoding();
+
+ if ( tmpEncoding && *tmpEncoding)
+ {
+ fEncodingUsed = tmpEncoding;
+ }
+ }
+ }
+
+ fNewLineUsed = (fNewLine && *fNewLine)? fNewLine : gEOLSeq;
+
+ fDocumentVersion = (docu->getXmlVersion() && *(docu->getXmlVersion()))
+ ? docu->getXmlVersion()
+ : XMLUni::fgVersion1_0;
+
+ fErrorCount = 0;
+
+ fLineFeedInTextNodePrinted = false;
+ fLastWhiteSpaceInTextNode = 0;
+
+ level_ = 0;
+ namespace_map_.clear ();
+
+ fFormatter = new (fMemoryManager) XMLFormatter( fEncodingUsed
+ ,fDocumentVersion
+ ,target_
+ ,XMLFormatter::NoEscapes
+ ,XMLFormatter::UnRep_CharRef
+ ,fMemoryManager);
+ formatter_.reset (fFormatter);
+
+ // Write out the XML declaration, etc. Here we assume that the document
+ // has no children (i.e., no root element).
+ //
+ processNode (docu, 0);
+ fLineFeedInTextNodePrinted = true;
+
+ return writeOpen (e);
+ }
+
+ bool
+ writeOpen (const DOMElement* e)
+ {
+ // Code adapted from the first part of ELEMENT_NODE case in
+ // DOMLSSerializerImpl::processNode().
+ //
+
+ if (!fLineFeedInTextNodePrinted)
+ {
+ if(level_ == 1 && getFeature(FORMAT_PRETTY_PRINT_1ST_LEVEL_ID))
+ printNewLine();
+
+ printNewLine();
+ }
+ else
+ {
+ fLineFeedInTextNodePrinted = false;
+ }
+
+ printIndent(level_);
+
+ RefHashTableOf<XMLCh>* namespaceMap = NULL;
+
+ *fFormatter << XMLFormatter::NoEscapes << chOpenAngle <<
+ e->getNodeName ();
+
+ setURCharRef();
+ DOMNamedNodeMap *attributes = e->getAttributes();
+ XMLSize_t attrCount = attributes->getLength();
+
+ const XMLCh* prefix = e->getPrefix();
+ const XMLCh* uri = e->getNamespaceURI();
+ if((uri && uri[0]) ||
+ ((prefix==0 || prefix[0]==0) && isDefaultNamespacePrefixDeclared()))
+ {
+ if(prefix==0 || prefix[0]==0)
+ prefix=XMLUni::fgZeroLenString;
+ if(!isNamespaceBindingActive(prefix, uri))
+ {
+ if(namespaceMap==NULL)
+ {
+ namespaceMap=new (fMemoryManager) RefHashTableOf<XMLCh>(12, false, fMemoryManager);
+ fNamespaceStack->addElement(namespaceMap);
+ }
+ namespaceMap->put((void*)prefix,(XMLCh*)uri);
+ *fFormatter << XMLFormatter::NoEscapes
+ << chSpace << XMLUni::fgXMLNSString;
+
+ if(!XMLString::equals(prefix,XMLUni::fgZeroLenString))
+ *fFormatter << chColon << prefix;
+
+ *fFormatter << chEqual << chDoubleQuote
+ << XMLFormatter::AttrEscapes
+ << uri
+ << XMLFormatter::NoEscapes
+ << chDoubleQuote;
+ }
+ }
+
+ bool discard = getFeature(DISCARD_DEFAULT_CONTENT_ID);
+ for (XMLSize_t i = 0; i < attrCount; i++)
+ {
+ DOMAttr* attribute = (DOMAttr*)attributes->item(i);
+
+ if (discard && !((DOMAttr*)attribute )->getSpecified())
+ continue;
+
+ // if this attribute is a namespace declaration, add it to the namespace map for the current level
+ const XMLCh* ns = attribute->getNamespaceURI();
+ if (ns != 0 )
+ {
+ if(XMLString::equals(ns, XMLUni::fgXMLNSURIName))
+ {
+ if(namespaceMap==NULL)
+ {
+ namespaceMap=new (fMemoryManager) RefHashTableOf<XMLCh>(12, false, fMemoryManager);
+ fNamespaceStack->addElement(namespaceMap);
+ }
+ const XMLCh* nsPrefix = attribute->getLocalName();
+ if(XMLString::equals(attribute->getNodeName(),XMLUni::fgXMLNSString))
+ nsPrefix = XMLUni::fgZeroLenString;
+ if(namespaceMap->containsKey((void*)nsPrefix))
+ continue;
+ namespaceMap->put((void*)attribute->getLocalName(),(XMLCh*)attribute->getNodeValue());
+ }
+ else if(!XMLString::equals(ns, XMLUni::fgXMLURIName))
+ {
+ // check if the namespace for the current node is already defined
+ const XMLCh* prefix = attribute->getPrefix();
+ if(prefix && prefix[0])
+ {
+ const XMLCh* uri = attribute->getNamespaceURI();
+ if(!isNamespaceBindingActive(prefix, uri))
+ {
+ if(namespaceMap==NULL)
+ {
+ namespaceMap=new (fMemoryManager) RefHashTableOf<XMLCh>(12, false, fMemoryManager);
+ fNamespaceStack->addElement(namespaceMap);
+ }
+ namespaceMap->put((void*)prefix,(XMLCh*)uri);
+
+ *fFormatter << XMLFormatter::NoEscapes
+ << chSpace << XMLUni::fgXMLNSString << chColon << prefix
+ << chEqual << chDoubleQuote
+ << XMLFormatter::AttrEscapes
+ << uri
+ << XMLFormatter::NoEscapes
+ << chDoubleQuote;
+ }
+ }
+ }
+ }
+
+ if (XMLString::equals(ns, XMLUni::fgXMLNSURIName) || checkFilter(attribute) == DOMNodeFilter::FILTER_ACCEPT)
+ {
+ *fFormatter << XMLFormatter::NoEscapes
+ << chSpace << attribute->getNodeName()
+ << chEqual << chDoubleQuote
+ << XMLFormatter::AttrEscapes;
+
+ if (getFeature(ENTITIES_ID))
+ {
+ DOMNode* child = attribute->getFirstChild();
+ while( child != 0)
+ {
+ if(child->getNodeType()==DOMNode::TEXT_NODE)
+ *fFormatter << child->getNodeValue();
+ else if(child->getNodeType()==DOMNode::ENTITY_REFERENCE_NODE)
+ *fFormatter << XMLFormatter::NoEscapes
+ << chAmpersand << child->getNodeName() << chSemiColon
+ << XMLFormatter::AttrEscapes;
+ child = child->getNextSibling();
+ }
+ }
+ else
+ *fFormatter << attribute->getNodeValue();
+
+ *fFormatter << XMLFormatter::NoEscapes << chDoubleQuote;
+ }
+ }
+
+ *fFormatter << XMLFormatter::NoEscapes << chCloseAngle;
+
+ // Keep track of whether we have added a namespace map for this
+ // element. Used to pop it in writeClose().
+ //
+ namespace_map_.push_back (namespaceMap != 0);
+
+ level_++;
+
+ DOMNode* child = e->getFirstChild();
+ while (child != 0)
+ {
+ processNode (child, level_);
+ child = child->getNextSibling();
+ }
+
+ return fErrorCount == 0;
+ }
+
+ bool
+ writeClose (const XMLCh* name)
+ {
+ // Code adapted from the second part of ELEMENT_NODE case in
+ // DOMLSSerializerImpl::processNode().
+ //
+ level_--;
+
+ // Assume we are not on the same line (nodeLine != fCurrentLine).
+ //
+ {
+ if (!fLineFeedInTextNodePrinted)
+ {
+ printNewLine();
+ }
+ else
+ {
+ fLineFeedInTextNodePrinted = false;
+ }
+
+ if(level_ == 0 && getFeature(FORMAT_PRETTY_PRINT_1ST_LEVEL_ID))
+ printNewLine();
+
+ printIndent(level_);
+ }
+
+ *fFormatter << XMLFormatter::NoEscapes << gEndElement <<
+ name << chCloseAngle;
+
+ if (namespace_map_.back ())
+ fNamespaceStack->removeLastElement();
+
+ namespace_map_.pop_back ();
+
+ if (level_ == 0)
+ {
+ printNewLine();
+ target_->flush ();
+ }
+
+ return fErrorCount == 0;
+ }
+
+ bool
+ write (const DOMElement* e)
+ {
+ processNode (e, level_);
+ return fErrorCount == 0;
+ }
+
+ using DOMLSSerializerImpl::write; // Whole document.
+
+public:
+ // Update the namespace stack to point to the strings from the
+ // new document's string pool.
+ //
+ void
+ update_namespace_stack (DOMDocument& d)
+ {
+ DOMDocumentImpl& di (dynamic_cast<DOMDocumentImpl&> (d));
+
+ for (XMLSize_t i (0); i != fNamespaceStack->size (); ++i)
+ {
+ RefHashTableOf<XMLCh>& t (*fNamespaceStack->elementAt (i));
+ RefHashTableOfEnumerator<XMLCh> e (&t, false, fMemoryManager);
+ while (e.hasMoreElements ())
+ {
+ XMLCh* k ((XMLCh*) (e.nextElementKey ()));
+ XMLCh* v (t.get (k));
+ t.put ((void*) (di.getPooledString (k)),
+ (XMLCh*) (di.getPooledString (v)));
+ }
+ }
+ }
+
+private:
+ XMLFormatTarget* target_;
+ std::unique_ptr<XMLFormatter> formatter_;
+ int level_;
+
+ std::vector<bool> namespace_map_;
+};
+
+class serializer_impl
+{
+public:
+ typedef serializer::namespace_infomap namespace_infomap;
+
+ serializer_impl ();
+
+ void
+ start (ostream& os, const string& encoding);
+
+ DOMElement*
+ create (const string& name, const namespace_infomap&);
+
+ DOMElement*
+ create (const string& ns, const string& qname, const namespace_infomap&);
+
+ void
+ serialize (xml::dom::unique_ptr<DOMElement>);
+
+ void
+ serialize_open (xml::dom::unique_ptr<DOMElement>);
+
+ void
+ serialize_close (const string&);
+
+private:
+ void
+ clear_document ();
+
+private:
+ bool start_;
+
+ // Serializer.
+ //
+ xml::dom::unique_ptr<DOMLSOutput> out_;
+ xml::dom::unique_ptr<StreamingDOMSerializer> serializer_;
+
+ unique_ptr<xml::dom::ostream_format_target> oft_;
+
+ tree::error_handler<char> error_handler_;
+ xml::dom::bits::error_handler_proxy<char> error_proxy_;
+
+ // DOM document that we use to create the elements.
+ //
+ DOMImplementation& dom_impl_;
+ xml::dom::unique_ptr<DOMDocument> doc_;
+ vector<DOMElement*> element_stack_;
+
+ size_t element_count_; // Number of elements serialized using current doc.
+ static const size_t element_count_limit_ = 500;
+};
+
+const XMLCh ls[] = {chLatin_L, chLatin_S, chNull};
+
+serializer_impl::
+serializer_impl ()
+ : error_proxy_ (error_handler_),
+ dom_impl_ (*DOMImplementationRegistry::getDOMImplementation (ls))
+{
+ serializer_.reset (
+ new (XMLPlatformUtils::fgMemoryManager)
+ StreamingDOMSerializer (XMLPlatformUtils::fgMemoryManager));
+
+ DOMConfiguration* conf (serializer_->getDomConfig ());
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &error_proxy_);
+ conf->setParameter (XMLUni::fgDOMXMLDeclaration, true);
+ conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true);
+ conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true);
+ conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false);
+}
+
+void serializer_impl::
+start (ostream& os, const string& encoding)
+{
+ element_stack_.clear ();
+ doc_.reset (dom_impl_.createDocument ());
+ element_count_ = 0;
+
+ error_handler_.reset ();
+ oft_.reset (new xml::dom::ostream_format_target (os));
+
+ out_.reset (dom_impl_.createLSOutput ());
+ out_->setEncoding (xml::string (encoding).c_str ());
+ out_->setByteStream (oft_.get ());
+
+ start_ = true;
+}
+
+DOMElement* serializer_impl::
+create (const string& name, const namespace_infomap& map)
+{
+ DOMElement* r (doc_->createElement (xml::string (name).c_str ()));
+
+ if (!map.empty ())
+ xml::dom::add_namespaces<char> (*r, map);
+
+ // Add the element as the child of the stack "tip" so that it
+ // "sees" all the namespace declarations active from this point.
+ //
+ if (!element_stack_.empty ())
+ element_stack_.back ()->appendChild (r);
+
+ return r;
+}
+
+DOMElement* serializer_impl::
+create (const string& ns, const string& qname, const namespace_infomap& map)
+{
+ DOMElement* r (
+ doc_->createElementNS (
+ xml::string (ns).c_str (), xml::string (qname).c_str ()));
+
+ if (!map.empty ())
+ xml::dom::add_namespaces<char> (*r, map);
+
+ // Add the element as the child of the stack "tip" so that it
+ // "sees" all the namespace declarations active from this point.
+ //
+ if (!element_stack_.empty ())
+ element_stack_.back ()->appendChild (r);
+
+ return r;
+}
+
+void serializer_impl::
+serialize (xml::dom::unique_ptr<DOMElement> p)
+{
+ DOMElement* e (p.get ());
+
+ if (start_)
+ {
+ serializer_->write (e, out_.get ());
+ start_ = false;
+ }
+ else
+ serializer_->write (e);
+
+ error_handler_.throw_if_failed<tree::serialization<char> > ();
+
+ // Remove this element from its parent before we release.
+ //
+ if (!element_stack_.empty ())
+ element_stack_.back ()->removeChild (e);
+
+ p.reset (); // Release it before we may clear the document below.
+
+ if (element_count_++ > element_count_limit_)
+ clear_document ();
+}
+
+void serializer_impl::
+serialize_open (xml::dom::unique_ptr<DOMElement> p)
+{
+ DOMElement* e (p.get ());
+
+ if (start_)
+ {
+ serializer_->startOpen (e, out_.get ());
+ start_ = false;
+ }
+ else
+ serializer_->writeOpen (e);
+
+ error_handler_.throw_if_failed<tree::serialization<char> > ();
+
+ // Add this element to the element stack. serialize_close() is
+ // responsible for its removal and releasing.
+ //
+ element_stack_.push_back (e);
+ p.release ();
+}
+
+void serializer_impl::
+serialize_close (const string& name)
+{
+ serializer_->writeClose (xml::string (name).c_str ());
+ error_handler_.throw_if_failed<tree::serialization<char> > ();
+
+ // Release the element.
+ //
+ DOMElement* e (element_stack_.back ());
+ element_stack_.pop_back ();
+
+ if (!element_stack_.empty ())
+ element_stack_.back ()->removeChild (e);
+
+ e->release ();
+
+ if (element_count_++ > element_count_limit_)
+ clear_document ();
+}
+
+void serializer_impl::
+clear_document ()
+{
+ // Re-create the document in order to force deallocation of its
+ // internal heap. While Xerces-C++ DOM tries to re-use memory,
+ // it still accumulates no longer used memory blocks.
+ //
+ xml::dom::unique_ptr<DOMDocument> doc (dom_impl_.createDocument ());
+
+ if (!element_stack_.empty ())
+ {
+ DOMElement* e (
+ static_cast<DOMElement*> (
+ doc->importNode (element_stack_.front (), true)));
+
+ for (vector<DOMElement*>::iterator i (element_stack_.begin ());
+ i != element_stack_.end ();
+ ++i)
+ {
+ *i = e;
+ e = static_cast<DOMElement*> (e->getFirstChild ());
+ }
+ }
+
+ // Update the namespace stack to use the new document.
+ //
+ serializer_->update_namespace_stack (*doc);
+
+ doc_ = move (doc);
+ element_count_ = 0;
+}
+
+//
+// serializer
+//
+
+serializer::
+~serializer ()
+{
+}
+
+serializer::
+serializer ()
+ : impl_ (new serializer_impl)
+{
+}
+
+void serializer::
+start (ostream& os, const string& encoding)
+{
+ impl_->start (os, encoding);
+}
+
+DOMElement* serializer::
+create (const string& name, const namespace_infomap& map)
+{
+ return impl_->create (name, map);
+}
+
+DOMElement* serializer::
+create (const string& ns, const string& qname, const namespace_infomap& map)
+{
+ return impl_->create (ns, qname, map);
+}
+
+void serializer::
+serialize (xml::dom::unique_ptr<DOMElement> e)
+{
+ impl_->serialize (move (e));
+}
+
+void serializer::
+serialize_open (xml::dom::unique_ptr<DOMElement> e)
+{
+ impl_->serialize_open (move (e));
+}
+
+void serializer::
+serialize_close (const string& name)
+{
+ impl_->serialize_close (name);
+}
diff --git a/xsd-examples/cxx/tree/streaming/serializer.hxx b/xsd-examples/cxx/tree/streaming/serializer.hxx
new file mode 100644
index 0000000..585bd76
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/serializer.hxx
@@ -0,0 +1,209 @@
+// file : cxx/tree/streaming/serializer.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : not copyrighted - public domain
+
+#ifndef SERIALIZER_HXX
+#define SERIALIZER_HXX
+
+#include <string>
+#include <iosfwd>
+#include <memory> // std::unique_ptr
+
+#include <xercesc/dom/DOMElement.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+#include <xsd/cxx/xml/dom/serialization-header.hxx> // namespace_infomap
+
+class serializer_impl;
+
+class serializer
+{
+public:
+ typedef xsd::cxx::xml::dom::namespace_infomap<char> namespace_infomap;
+
+ ~serializer ();
+ serializer ();
+
+ // Start the serialization process.
+ //
+ void
+ start (std::ostream& is, const std::string& encoding = "UTF-8");
+
+ // Serialize next object model fragment into an element with the specified
+ // name.
+ //
+ template <typename T>
+ void
+ next (const std::string& name, const T& x);
+
+ // Serialize next object model fragment into an element with the specified
+ // name and namespace declarations.
+ //
+ template <typename T>
+ void
+ next (const std::string& name, const namespace_infomap&, const T& x);
+
+ // Serialize next object model fragment into an element with the specified
+ // namespace and qualified name.
+ //
+ template <typename T>
+ void
+ next (const std::string& ns, const std::string& name, const T& x);
+
+ // Serialize next object model fragment into an element with the specified
+ // namespace and qualified name as well as namespace declarations.
+ //
+ template <typename T>
+ void
+ next (const std::string& ns,
+ const std::string& name,
+ const namespace_infomap&,
+ const T& x);
+
+ // The next_open/close functions are like next() but split into two steps.
+ // next_open() serializes the object model fragment into an element leaving
+ // it open while next_close() closes the element.
+ //
+ template <typename T>
+ void
+ next_open (const std::string& name, const T& x);
+
+ template <typename T>
+ void
+ next_open (const std::string& name, const namespace_infomap&, const T& x);
+
+ template <typename T>
+ void
+ next_open (const std::string& ns, const std::string& name, const T& x);
+
+ template <typename T>
+ void
+ next_open (const std::string& ns,
+ const std::string& name,
+ const namespace_infomap&,
+ const T& x);
+
+ void
+ next_close (const std::string& name);
+
+private:
+ serializer (const serializer&);
+
+ serializer&
+ operator= (const serializer&);
+
+private:
+ xercesc::DOMElement*
+ create (const std::string& name, const namespace_infomap&);
+
+ xercesc::DOMElement*
+ create (const std::string& ns,
+ const std::string& name,
+ const namespace_infomap&);
+
+ void
+ serialize (xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement>);
+
+ void
+ serialize_open (xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement>);
+
+ void
+ serialize_close (const std::string& name);
+
+private:
+ std::unique_ptr<serializer_impl> impl_;
+};
+
+template <typename T>
+inline void serializer::
+next (const std::string& name, const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (
+ create (name, namespace_infomap ()));
+ *e << x;
+ serialize (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next (const std::string& name, const namespace_infomap& map, const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (create (name, map));
+ *e << x;
+ serialize (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next (const std::string& ns, const std::string& name, const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (
+ create (ns, name, namespace_infomap ()));
+ *e << x;
+ serialize (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next (const std::string& ns,
+ const std::string& name,
+ const namespace_infomap& map,
+ const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (
+ create (ns, name, map));
+
+ *e << x;
+ serialize (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next_open (const std::string& name, const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (
+ create (name, namespace_infomap ()));
+ *e << x;
+ serialize_open (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next_open (const std::string& name, const namespace_infomap& map, const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (create (name, map));
+ *e << x;
+ serialize_open (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next_open (const std::string& ns, const std::string& name, const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (
+ create (ns, name, namespace_infomap ()));
+ *e << x;
+ serialize_open (std::move (e));
+}
+
+template <typename T>
+inline void serializer::
+next_open (const std::string& ns,
+ const std::string& name,
+ const namespace_infomap& map,
+ const T& x)
+{
+ xsd::cxx::xml::dom::unique_ptr<xercesc::DOMElement> e (
+ create (ns, name, map));
+
+ *e << x;
+ serialize_open (std::move (e));
+}
+
+inline void serializer::
+next_close (const std::string& name)
+{
+ serialize_close (name);
+}
+
+#endif // SERIALIZER_HXX
diff --git a/xsd-examples/cxx/tree/streaming/testscript b/xsd-examples/cxx/tree/streaming/testscript
new file mode 100644
index 0000000..d3c744d
--- /dev/null
+++ b/xsd-examples/cxx/tree/streaming/testscript
@@ -0,0 +1,10 @@
+# file : cxx/tree/streaming/testscript
+# license : not copyrighted - public domain
+
+: position
+:
+{
+ $* $src_base/position.xml 2>| &out.xml;
+ echo '' >|;
+ cat out.xml >|
+}
diff --git a/xsd-examples/cxx/tree/wildcard/.gitignore b/xsd-examples/cxx/tree/wildcard/.gitignore
new file mode 100644
index 0000000..234645e
--- /dev/null
+++ b/xsd-examples/cxx/tree/wildcard/.gitignore
@@ -0,0 +1 @@
+email.?xx
diff --git a/examples/cxx/tree/wildcard/README b/xsd-examples/cxx/tree/wildcard/README
index d451509..d451509 100644
--- a/examples/cxx/tree/wildcard/README
+++ b/xsd-examples/cxx/tree/wildcard/README
diff --git a/xsd-examples/cxx/tree/wildcard/buildfile b/xsd-examples/cxx/tree/wildcard/buildfile
new file mode 100644
index 0000000..5bc63c5
--- /dev/null
+++ b/xsd-examples/cxx/tree/wildcard/buildfile
@@ -0,0 +1,30 @@
+# file : cxx/tree/wildcard/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -email} {hxx ixx cxx}{email} $libs
+
+exe{driver}: xml{email}: test.input = true
+
+<{hxx ixx cxx}{email}>: xsd{email} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-wildcard \
+ --generate-serialization \
+ --root-element message \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/wildcard/driver.cxx b/xsd-examples/cxx/tree/wildcard/driver.cxx
new file mode 100644
index 0000000..146a2d9
--- /dev/null
+++ b/xsd-examples/cxx/tree/wildcard/driver.cxx
@@ -0,0 +1,159 @@
+// file : cxx/tree/wildcard/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <string>
+#include <memory> // std::unique_ptr
+#include <cstring> // std::memcpy
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "email.hxx"
+
+// The following string class keeps us sane when working with Xerces.
+// Include it after the generated header in order to get only char or
+// wchar_t version depending on how you compiled your schemas.
+//
+#include <xsd/cxx/xml/string.hxx>
+
+using std::cerr;
+using std::endl;
+using std::string;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " email.xml" << endl;
+ return 1;
+ }
+
+ using namespace xercesc;
+
+ int r (0);
+
+ // The Xerces-C++ DOM objects that will be used to store the
+ // content matched by wildcards "out-live" the call to the
+ // parsing function. Therefore we need to initialize the
+ // Xerces-C++ runtime ourselves.
+ //
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ using namespace email;
+ namespace xml = xsd::cxx::xml;
+
+ // Read in the message.
+ //
+ std::unique_ptr<envelope> msg (
+ message (argv[1], xml_schema::flags::dont_initialize));
+
+ // Print what we've got.
+ //
+ cerr << "To: " << msg->to () << endl
+ << "From: " << msg->from () << endl
+ << "Subject: " << msg->subject () << endl;
+
+ envelope::any_sequence& body (msg->any ());
+
+ for (envelope::any_iterator i (body.begin ()); i != body.end (); ++i)
+ {
+ DOMElement& e (*i);
+ string name (xml::transcode<char> (e.getLocalName ()));
+
+ if (name == "text")
+ {
+ // Create object representation for the text element.
+ //
+ xml_schema::string text (e);
+
+ cerr << text << endl
+ << endl;
+ }
+ else if (name == "binary")
+ {
+ // Create object representation for the binary element.
+ //
+ binary bin (e);
+
+ cerr << "binary: " << bin.name () << " type: " << bin.mime () << endl
+ << endl;
+ }
+ else
+ {
+ cerr << "unknown body type: " << name << endl;
+ }
+ }
+
+ // Create a reply message.
+ //
+ envelope reply (msg->from (), msg->to (), "Re: " + msg->subject ());
+
+ // Copy the thread-id attribute from the original message if any.
+ //
+ envelope::any_attribute_set& as (msg->any_attribute ());
+ envelope::any_attribute_iterator ti (
+ as.find ("http://www.codesynthesis.com/email", "thread-id"));
+
+ if (ti != as.end ())
+ reply.any_attribute ().insert (*ti);
+
+ // Add a text body.
+ //
+ DOMDocument& doc (reply.dom_document ());
+ envelope::any_sequence& rbody (reply.any ());
+
+ xml_schema::string text ("Hi!\n\n"
+ "Indeed nice pictures. Check out mine.\n\n"
+ "Jane");
+
+ DOMElement* e (
+ doc.createElementNS (
+ xml::string ("http://www.codesynthesis.com/email").c_str (),
+ xml::string ("eml:text").c_str ()));
+
+ *e << text;
+ rbody.push_back (e);
+
+ // Add a (fake) image.
+ //
+ binary pic ("pic.jpg", "image/jpeg");
+ pic.size (3);
+ std::memcpy (pic.data (), "123", 3);
+
+ e = doc.createElementNS (
+ xml::string ("http://www.codesynthesis.com/email").c_str (),
+ xml::string ("eml:binary").c_str ());
+
+ *e << pic;
+ rbody.push_back (e);
+
+
+ // Prepare namespace mapping and schema location information for
+ // serialization.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["eml"].name = "http://www.codesynthesis.com/email";
+ map["eml"].schema = "email.xsd";
+
+ // Write it out.
+ //
+ message (std::cout,
+ reply,
+ map,
+ "UTF-8",
+ xml_schema::flags::dont_initialize);
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/wildcard/email.xml b/xsd-examples/cxx/tree/wildcard/email.xml
new file mode 100644
index 0000000..a9331e5
--- /dev/null
+++ b/xsd-examples/cxx/tree/wildcard/email.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/wildcard/email.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<eml:message xmlns:eml="http://www.codesynthesis.com/email"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/email email.xsd"
+ eml:thread-id="123456789">
+
+ <to>Jane Doe &lt;jane@doe.com></to>
+ <from>John Doe &lt;john@doe.com></from>
+ <subject>Surfing pictures</subject>
+
+ <eml:text>
+Hi Jane,
+
+Here are cool pictures of me surfing.
+
+Cheers,
+John
+ </eml:text>
+
+ <eml:binary name="pic1.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
+ <eml:binary name="pic2.jpg" mime="image/jpeg">YmFzZTY0IGJpbmFyeQ==</eml:binary>
+
+</eml:message>
diff --git a/xsd-examples/cxx/tree/wildcard/email.xsd b/xsd-examples/cxx/tree/wildcard/email.xsd
new file mode 100644
index 0000000..c051e85
--- /dev/null
+++ b/xsd-examples/cxx/tree/wildcard/email.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/wildcard/email.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:eml="http://www.codesynthesis.com/email"
+ targetNamespace="http://www.codesynthesis.com/email">
+
+ <!-- Predefined envolop body types. -->
+
+ <xsd:element name="text" type="xsd:string"/>
+
+ <xsd:complexType name="binary">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="mime" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:element name="binary" type="eml:binary"/>
+
+ <!-- Predefined envelop attributes. -->
+
+ <xsd:attribute name="thread-id" type="xsd:unsignedInt"/>
+
+
+ <xsd:complexType name="envelope">
+ <xsd:sequence>
+ <xsd:element name="to" type="xsd:string"/>
+ <xsd:element name="from" type="xsd:string"/>
+ <xsd:element name="subject" type="xsd:string"/>
+
+ <!-- Extensible envelope body. -->
+
+ <xsd:any namespace="##targetNamespace" processContents="strict"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:anyAttribute namespace="##targetNamespace" processContents="strict"/>
+ </xsd:complexType>
+
+ <xsd:element name="message" type="eml:envelope"/>
+
+</xsd:schema>
diff --git a/xsd-examples/cxx/tree/xpath/.gitignore b/xsd-examples/cxx/tree/xpath/.gitignore
new file mode 100644
index 0000000..83d0a51
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/.gitignore
@@ -0,0 +1 @@
+people.?xx
diff --git a/examples/cxx/tree/xpath/README b/xsd-examples/cxx/tree/xpath/README
index 1187743..1187743 100644
--- a/examples/cxx/tree/xpath/README
+++ b/xsd-examples/cxx/tree/xpath/README
diff --git a/xsd-examples/cxx/tree/xpath/buildfile b/xsd-examples/cxx/tree/xpath/buildfile
new file mode 100644
index 0000000..c6f090a
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/buildfile
@@ -0,0 +1,28 @@
+# file : cxx/tree/xpath/buildfile
+# license : not copyrighted - public domain
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libxqilla%lib{xqilla}
+
+./: exe{driver} doc{README}
+
+exe{driver}: {hxx cxx}{* -people} {hxx ixx cxx}{people} $libs
+
+exe{driver}: xml{people}: test.input = true
+
+<{hxx ixx cxx}{people}>: xsd{people} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-examples/cxx/tree/xpath/dom-parse.cxx b/xsd-examples/cxx/tree/xpath/dom-parse.cxx
new file mode 100644
index 0000000..f033de6
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/dom-parse.cxx
@@ -0,0 +1,88 @@
+// file : cxx/tree/xpath/dom-parse.cxx
+// copyright : not copyrighted - public domain
+
+#include "dom-parse.hxx"
+
+#include <istream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+xml::dom::unique_ptr<DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate,
+ DOMImplementation* impl)
+{
+ xml::dom::unique_ptr<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable/Disable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, validate);
+ conf->setParameter (XMLUni::fgXercesSchema, validate);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Prepare input stream.
+ //
+ xml::sax::std_input_source isrc (is, id);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ xml::dom::unique_ptr<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<tree::parsing<char> > ();
+
+ return doc;
+}
diff --git a/xsd-examples/cxx/tree/xpath/dom-parse.hxx b/xsd-examples/cxx/tree/xpath/dom-parse.hxx
new file mode 100644
index 0000000..61dbbfe
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/dom-parse.hxx
@@ -0,0 +1,25 @@
+// file : cxx/tree/xpath/dom-parse.hxx
+// copyright : not copyrighted - public domain
+
+#ifndef DOM_PARSE
+#define DOM_PARSE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+#include <xercesc/dom/DOMImplementation.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+// Parse an XML document from the standard input stream with an
+// optional resource id. Resource id is used in diagnostics as
+// well as to locate schemas referenced from inside the document.
+//
+xsd::cxx::xml::dom::unique_ptr<xercesc::DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate,
+ xercesc::DOMImplementation*);
+
+#endif // DOM_PARSE
diff --git a/xsd-examples/cxx/tree/xpath/driver.cxx b/xsd-examples/cxx/tree/xpath/driver.cxx
new file mode 100644
index 0000000..246f804
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/driver.cxx
@@ -0,0 +1,137 @@
+// file : cxx/tree/xpath/driver.cxx
+// copyright : not copyrighted - public domain
+
+#include <memory> // std::unique_ptr
+#include <utility> // std::move()
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+
+#include <xqilla/xqilla-dom3.hpp>
+
+#include <xsd/cxx/xml/string.hxx> // xml::string, xml::transcode
+
+#include "dom-parse.hxx"
+
+#include "people.hxx"
+
+using namespace std;
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " people.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ // Initialise Xerces-C++ and XQilla.
+ //
+ XQillaPlatformUtils::initialize();
+
+ // Get the XQilla DOMImplementation object with support for XPath.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation(
+ xml::string ("XPath2 3.0").c_str ()));
+
+ try
+ {
+ using namespace people;
+
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ // Parse the XML file to DOM using the XQilla DOMImplementation.
+ //
+ xml_schema::dom::unique_ptr<xercesc::DOMDocument> dom (
+ parse (ifs, argv[1], true, impl));
+
+ // Parse the DOM document to the object model. We also request that
+ // the DOM document to be associated with the object model.
+ //
+ std::unique_ptr<directory> d (
+ directory_ (move (dom),
+ xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+
+ // Obtain the root element and document corresponding to the
+ // directory object.
+ //
+ DOMElement* root (static_cast<DOMElement*> (d->_node ()));
+ DOMDocument* doc (root->getOwnerDocument ());
+
+ // Obtain namespace resolver.
+ //
+ xml_schema::dom::unique_ptr<DOMXPathNSResolver> resolver (
+ doc->createNSResolver (root));
+
+ // Set the namespace prefix for the people namespace that we can
+ // use reliably in XPath expressions regardless of what is used
+ // in XML documents.
+ //
+ resolver->addNamespaceBinding (
+ xml::string ("p").c_str (),
+ xml::string ("http://www.codesynthesis.com/people").c_str ());
+
+ // Create XPath expression.
+ //
+ xml_schema::dom::unique_ptr<DOMXPathExpression> expr (
+ doc->createExpression (
+ xml::string ("p:directory/person[age > 30]").c_str (),
+ resolver.get ()));
+
+ // Execute the query.
+ //
+ xml_schema::dom::unique_ptr<DOMXPathResult> r (
+ expr->evaluate (doc, DOMXPathResult::ITERATOR_RESULT_TYPE, 0));
+
+ // Iterate over the result.
+ //
+ cerr << "Records matching the query:" << endl;
+
+ while (r->iterateNext ())
+ {
+ DOMNode* n (r->getNodeValue ());
+
+ // Obtain the object model node corresponding to this DOM node.
+ //
+ person* p (
+ static_cast<person*> (
+ n->getUserData (xml_schema::dom::tree_node_key)));
+
+ // Print the data using the object model.
+ //
+ cerr << endl
+ << "First : " << p->first_name () << endl
+ << "Last : " << p->last_name () << endl
+ << "Gender : " << p->gender () << endl
+ << "Age : " << p->age () << endl;
+ }
+ }
+ catch(const DOMException& e)
+ {
+ cerr << xml::transcode<char> (e.getMessage ()) << std::endl;
+ r = 1;
+ }
+ catch (const xml_schema::exception& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ XQillaPlatformUtils::terminate();
+ return r;
+}
diff --git a/xsd-examples/cxx/tree/xpath/people.xml b/xsd-examples/cxx/tree/xpath/people.xml
new file mode 100644
index 0000000..3ce6e38
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/people.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/xpath/people.xml
+copyright : not copyrighted - public domain
+
+-->
+
+<ppl:directory xmlns:ppl="http://www.codesynthesis.com/people"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/people people.xsd">
+
+ <person>
+ <first-name>John</first-name>
+ <last-name>Doe</last-name>
+ <gender>male</gender>
+ <age>32</age>
+ </person>
+
+ <person>
+ <first-name>Jane</first-name>
+ <last-name>Doe</last-name>
+ <gender>female</gender>
+ <age>28</age>
+ </person>
+
+</ppl:directory>
diff --git a/xsd-examples/cxx/tree/xpath/people.xsd b/xsd-examples/cxx/tree/xpath/people.xsd
new file mode 100644
index 0000000..951d410
--- /dev/null
+++ b/xsd-examples/cxx/tree/xpath/people.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : cxx/tree/xpath/people.xsd
+copyright : not copyrighted - public domain
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ppl="http://www.codesynthesis.com/people"
+ targetNamespace="http://www.codesynthesis.com/people">
+
+ <xsd:simpleType name="gender">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="male"/>
+ <xsd:enumeration value="female"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="person">
+ <xsd:sequence>
+ <xsd:element name="first-name" type="xsd:string"/>
+ <xsd:element name="last-name" type="xsd:string"/>
+ <xsd:element name="gender" type="ppl:gender"/>
+ <xsd:element name="age" type="xsd:unsignedShort"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="directory">
+ <xsd:sequence>
+ <xsd:element name="person" type="ppl:person" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="directory" type="ppl:directory"/>
+
+</xsd:schema>
diff --git a/xsd-examples/manifest b/xsd-examples/manifest
new file mode 100644
index 0000000..456f833
--- /dev/null
+++ b/xsd-examples/manifest
@@ -0,0 +1,17 @@
+: 1
+name: xsd-examples
+version: 4.2.0-b.1.z
+project: xsd
+summary: XML Schema to C++ data binding compiler examples
+license: Unlicence
+description-file: README
+url: https://www.codesynthesis.com/projects/xsd/
+doc-url: https://www.codesynthesis.com/projects/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd-examples/
+email: xsd-users@codesynthesis.com ; Mailing list
+depends: * build2 >= 0.13.0
+depends: * bpkg >= 0.13.0
+depends: libxsd == $
+depends: libxerces-c ^3.0.0
+depends: libexpat ^2.1.0
+depends: libz ^1.2.1100
diff --git a/xsd-tests/.gitignore b/xsd-tests/.gitignore
new file mode 100644
index 0000000..d87c74c
--- /dev/null
+++ b/xsd-tests/.gitignore
@@ -0,0 +1,32 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.ii
+*.o
+*.obj
+*.so
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
+
+# Test executables.
+#
+driver
+
+# XSD-generated files.
+#
+test.?xx
+
+# Testscript output directories (can be symlinks).
+#
+test
+test-driver
diff --git a/xsd-tests/FLOSSE b/xsd-tests/FLOSSE
new file mode 120000
index 0000000..be6df3d
--- /dev/null
+++ b/xsd-tests/FLOSSE
@@ -0,0 +1 @@
+../FLOSSE \ No newline at end of file
diff --git a/xsd-tests/GPLv2 b/xsd-tests/GPLv2
new file mode 120000
index 0000000..08e5586
--- /dev/null
+++ b/xsd-tests/GPLv2
@@ -0,0 +1 @@
+../GPLv2 \ No newline at end of file
diff --git a/xsd-tests/LICENSE b/xsd-tests/LICENSE
new file mode 120000
index 0000000..ea5b606
--- /dev/null
+++ b/xsd-tests/LICENSE
@@ -0,0 +1 @@
+../LICENSE \ No newline at end of file
diff --git a/xsd-tests/README b/xsd-tests/README
new file mode 100644
index 0000000..1b529ab
--- /dev/null
+++ b/xsd-tests/README
@@ -0,0 +1,8 @@
+This package contains tests for the XSD to C++ data binding compiler.
+
+See the LICENSE file for distribution conditions.
+
+The project page is at https://www.codesynthesis.com/projects/xsd/.
+
+Send bug reports or any other feedback to the xsd-users@codesynthesis.com
+mailing list.
diff --git a/xsd-tests/build/.gitignore b/xsd-tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/xsd-tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/xsd-tests/build/bootstrap.build b/xsd-tests/build/bootstrap.build
new file mode 100644
index 0000000..49ad78f
--- /dev/null
+++ b/xsd-tests/build/bootstrap.build
@@ -0,0 +1,9 @@
+# file : build/bootstrap.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+project = xsd-tests
+
+using version
+using config
+using dist
+using test
diff --git a/xsd-tests/build/root.build b/xsd-tests/build/root.build
new file mode 100644
index 0000000..63c3bb4
--- /dev/null
+++ b/xsd-tests/build/root.build
@@ -0,0 +1,40 @@
+# file : build/root.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+define xsd: file
+xsd{*}: extension = xsd
+
+define xml: file
+xml{*}: extension = xml
+
+define map: file
+map{*}: extension = map
+
+using in
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+
+# Setup the xsd that we are testing.
+#
+import xsd = xsd%exe{xsd}
+
+# Every exe{} in this project is by default a test.
+#
+exe{*}: test = true
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/xsd-tests/buildfile b/xsd-tests/buildfile
new file mode 100644
index 0000000..e783791
--- /dev/null
+++ b/xsd-tests/buildfile
@@ -0,0 +1,4 @@
+# file : buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+./: {*/ -build/} doc{README} legal{GPLv2 LICENSE FLOSSE} manifest
diff --git a/xsd-tests/clash/.gitignore b/xsd-tests/clash/.gitignore
new file mode 100644
index 0000000..7349df1
--- /dev/null
+++ b/xsd-tests/clash/.gitignore
@@ -0,0 +1,2 @@
+clash.?xx
+foo.?xx
diff --git a/xsd-tests/clash/buildfile b/xsd-tests/clash/buildfile
new file mode 100644
index 0000000..e99dccf
--- /dev/null
+++ b/xsd-tests/clash/buildfile
@@ -0,0 +1,27 @@
+# file : clash/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = foo clash
+
+exe{driver}: {hxx cxx}{* -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/tests/clash/clash.xsd b/xsd-tests/clash/clash.xsd
index 8458908..8458908 100644
--- a/tests/clash/clash.xsd
+++ b/xsd-tests/clash/clash.xsd
diff --git a/xsd-tests/clash/driver.cxx b/xsd-tests/clash/driver.cxx
new file mode 100644
index 0000000..478e71a
--- /dev/null
+++ b/xsd-tests/clash/driver.cxx
@@ -0,0 +1,10 @@
+// file : clash/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "foo.hxx"
+#include "clash.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/clash/foo.xsd b/xsd-tests/clash/foo.xsd
index 8a06ba8..8a06ba8 100644
--- a/tests/clash/foo.xsd
+++ b/xsd-tests/clash/foo.xsd
diff --git a/xsd-tests/code/name-conflict/buildfile b/xsd-tests/code/name-conflict/buildfile
new file mode 100644
index 0000000..3a724f9
--- /dev/null
+++ b/xsd-tests/code/name-conflict/buildfile
@@ -0,0 +1,22 @@
+# file : code/name-conflict/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/code/name-conflict/driver.cxx b/xsd-tests/code/name-conflict/driver.cxx
new file mode 100644
index 0000000..a6eb4fe
--- /dev/null
+++ b/xsd-tests/code/name-conflict/driver.cxx
@@ -0,0 +1,9 @@
+// file : code/name-conflict/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/code/name-conflict/test.xsd b/xsd-tests/code/name-conflict/test.xsd
index a017cc8..a017cc8 100644
--- a/tests/code/name-conflict/test.xsd
+++ b/xsd-tests/code/name-conflict/test.xsd
diff --git a/xsd-tests/code/name-escaping/buildfile b/xsd-tests/code/name-escaping/buildfile
new file mode 100644
index 0000000..c252afd
--- /dev/null
+++ b/xsd-tests/code/name-escaping/buildfile
@@ -0,0 +1,22 @@
+# file : code/name-escaping/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/code/name-escaping/driver.cxx b/xsd-tests/code/name-escaping/driver.cxx
new file mode 100644
index 0000000..8d74030
--- /dev/null
+++ b/xsd-tests/code/name-escaping/driver.cxx
@@ -0,0 +1,9 @@
+// file : code/name-escaping/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/code/name-escaping/test.xsd b/xsd-tests/code/name-escaping/test.xsd
index 08c7530..08c7530 100644
--- a/tests/code/name-escaping/test.xsd
+++ b/xsd-tests/code/name-escaping/test.xsd
diff --git a/xsd-tests/cxx/parser/.gitignore b/xsd-tests/cxx/parser/.gitignore
new file mode 100644
index 0000000..5a7b950
--- /dev/null
+++ b/xsd-tests/cxx/parser/.gitignore
@@ -0,0 +1 @@
+*-pskel.?xx
diff --git a/xsd-tests/cxx/parser/built-in/buildfile b/xsd-tests/cxx/parser/built-in/buildfile
new file mode 100644
index 0000000..0522c9a
--- /dev/null
+++ b/xsd-tests/cxx/parser/built-in/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/parser/built-in/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/built-in/driver.cxx b/xsd-tests/cxx/parser/built-in/driver.cxx
new file mode 100644
index 0000000..008bc2d
--- /dev/null
+++ b/xsd-tests/cxx/parser/built-in/driver.cxx
@@ -0,0 +1,529 @@
+// file : cxx/parser/built-in/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test built-in type parsing.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+using xml_schema::ro_string;
+
+struct any_type_pimpl: xml_schema::any_type_pimpl
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ _start_any_element (ro_string const&,
+ ro_string const& n,
+ ro_string const*)
+ {
+ cout << " start any element '" << n << "'" << endl;
+ }
+
+ virtual void
+ _end_any_element (ro_string const&, ro_string const& n)
+ {
+ cout << " end any element '" << n << "'" << endl;
+ }
+
+ virtual void
+ _any_attribute (ro_string const&,
+ ro_string const& n,
+ ro_string const& v)
+ {
+ cout << " any attribute " << n << " = '" << v << "'" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& s)
+ {
+ cout << " any text: '" << s << "'" << endl;
+ }
+
+ virtual void
+ post_any_type ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct any_simple_type_pimpl: xml_schema::any_simple_type_pimpl
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& s)
+ {
+ cout << " any text: '" << s << "'" << endl;
+ }
+
+ virtual void
+ post_any_simple_type ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+ virtual void
+ boolean (bool v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ byte (signed char v)
+ {
+ cout << short (v) << endl;
+ }
+
+ virtual void
+ unsigned_byte (unsigned char v)
+ {
+ cout << (unsigned short) (v) << endl;
+ }
+
+ virtual void
+ short_ (short v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ unsigned_short (unsigned short v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ int_ (int v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ unsigned_int (unsigned int v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ long_ (long long v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ unsigned_long (unsigned long long v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ integer (long long v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ negative_integer (long long v)
+ {
+ cout << v << endl;
+ }
+
+
+ virtual void
+ non_positive_integer (long long v)
+ {
+ cout << v << endl;
+ }
+
+
+ virtual void
+ positive_integer (unsigned long long v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ non_negative_integer (unsigned long long v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ float_ (float v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ double_ (double v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ decimal (double v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ string (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ normalized_string (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ token (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ name (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ nmtoken (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ nmtokens (xml_schema::string_sequence const& s)
+ {
+ cout << "'";
+
+ for (xml_schema::string_sequence::const_iterator i (s.begin ());
+ i != s.end (); ++i)
+ cout << *i << " ";
+
+ cout << "'" << endl;
+ }
+
+ virtual void
+ ncname (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ id (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ idref (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ idrefs (xml_schema::string_sequence const& s)
+ {
+ cout << "'";
+
+ for (xml_schema::string_sequence::const_iterator i (s.begin ());
+ i != s.end (); ++i)
+ cout << *i << " ";
+
+ cout << "'" << endl;
+ }
+
+ virtual void
+ language (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ uri (std::string const& v)
+ {
+ cout << "'" << v << "'" << endl;
+ }
+
+ virtual void
+ qname (xml_schema::qname const& v)
+ {
+ cout << "'" << v.prefix () << ":" << v.name () << "'" << endl;
+ }
+
+ virtual void
+ base64_binary (XSD_AUTO_PTR<xml_schema::buffer> v)
+ {
+ std::string tmp (v->data (), v->size ());
+ cout << "'" << tmp << "'" << endl;
+ }
+
+ virtual void
+ hex_binary (XSD_AUTO_PTR<xml_schema::buffer> v)
+ {
+ std::string tmp (v->data (), v->size ());
+ cout << "'" << tmp << "'" << endl;
+ }
+
+ virtual void
+ gday (xml_schema::gday const& v)
+ {
+ cout << v.day ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ gmonth (xml_schema::gmonth const& v)
+ {
+ cout << v.month ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ gyear (xml_schema::gyear const& v)
+ {
+ cout << v.year ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ gmonth_day (xml_schema::gmonth_day const& v)
+ {
+ cout << v.month () << '-' << v.day ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ gyear_month (xml_schema::gyear_month const& v)
+ {
+ cout << v.year () << '-' << v.month ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ date (xml_schema::date const& v)
+ {
+ cout << v.year () << '-' << v.month () << '-' << v.day ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ time (xml_schema::time const& v)
+ {
+ cout << v.hours () << ':' << v.minutes () << ':' << v.seconds ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ date_time (xml_schema::date_time const& v)
+ {
+ cout << v.year () << '-' << v.month () << '-' << v.day () << 'T'
+ << v.hours () << ':' << v.minutes () << ':' << v.seconds ();
+
+ if (v.zone_present ())
+ cout << (v.zone_hours () < 0 ? "" : "+") << v.zone_hours ()
+ << ':' << v.zone_minutes ();
+
+ cout << endl;
+ }
+
+ virtual void
+ duration (xml_schema::duration const& v)
+ {
+ cout << (v.negative () ? "-" : "") << 'P'
+ << v.years () << 'Y'
+ << v.months () << 'M'
+ << v.days () << 'D'
+ << 'T'
+ << v.hours () << 'H'
+ << v.minutes () << 'M'
+ << v.seconds () << 'S'
+ << endl;
+ }
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ any_type_pimpl any_type_p;
+ any_simple_type_pimpl any_simple_type_p;
+
+ xml_schema::boolean_pimpl boolean_p;
+
+ xml_schema::byte_pimpl byte_p;
+ xml_schema::unsigned_byte_pimpl unsigned_byte_p;
+ xml_schema::short_pimpl short_p;
+ xml_schema::unsigned_short_pimpl unsigned_short_p;
+ xml_schema::int_pimpl int_p;
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+ xml_schema::long_pimpl long_p;
+ xml_schema::unsigned_long_pimpl unsigned_long_p;
+
+ xml_schema::integer_pimpl integer_p;
+ xml_schema::negative_integer_pimpl negative_integer_p;
+ xml_schema::non_positive_integer_pimpl non_positive_integer_p;
+ xml_schema::positive_integer_pimpl positive_integer_p;
+ xml_schema::non_negative_integer_pimpl non_negative_integer_p;
+
+ xml_schema::float_pimpl float_p;
+ xml_schema::double_pimpl double_p;
+ xml_schema::decimal_pimpl decimal_p;
+
+ xml_schema::string_pimpl string_p;
+ xml_schema::normalized_string_pimpl normalized_string_p;
+ xml_schema::token_pimpl token_p;
+ xml_schema::name_pimpl name_p;
+ xml_schema::nmtoken_pimpl nmtoken_p;
+ xml_schema::nmtokens_pimpl nmtokens_p;
+ xml_schema::ncname_pimpl ncname_p;
+ xml_schema::id_pimpl id_p;
+ xml_schema::idref_pimpl idref_p;
+ xml_schema::idrefs_pimpl idrefs_p;
+
+ xml_schema::language_pimpl language_p;
+ xml_schema::uri_pimpl uri_p;
+ xml_schema::qname_pimpl qname_p;
+
+ xml_schema::base64_binary_pimpl base64_binary_p;
+ xml_schema::hex_binary_pimpl hex_binary_p;
+
+ xml_schema::gday_pimpl gday_p;
+ xml_schema::gmonth_pimpl gmonth_p;
+ xml_schema::gyear_pimpl gyear_p;
+ xml_schema::gmonth_day_pimpl gmonth_day_p;
+ xml_schema::gyear_month_pimpl gyear_month_p;
+ xml_schema::date_pimpl date_p;
+ xml_schema::time_pimpl time_p;
+ xml_schema::date_time_pimpl date_time_p;
+ xml_schema::duration_pimpl duration_p;
+
+ type_pimpl type_p;
+
+ type_p.parsers (any_type_p,
+ any_simple_type_p,
+ boolean_p,
+ byte_p,
+ unsigned_byte_p,
+ short_p,
+ unsigned_short_p,
+ int_p,
+ unsigned_int_p,
+ long_p,
+ unsigned_long_p,
+ integer_p,
+ negative_integer_p,
+ non_positive_integer_p,
+ positive_integer_p,
+ non_negative_integer_p,
+ float_p,
+ double_p,
+ decimal_p,
+ string_p,
+ normalized_string_p,
+ token_p,
+ name_p,
+ nmtoken_p,
+ nmtokens_p,
+ ncname_p,
+ id_p,
+ idref_p,
+ idrefs_p,
+ language_p,
+ uri_p,
+ qname_p,
+ base64_binary_p,
+ hex_binary_p,
+ gday_p,
+ gmonth_p,
+ gyear_p,
+ gmonth_day_p,
+ gyear_month_p,
+ date_p,
+ time_p,
+ date_time_p,
+ duration_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ type_p.pre ();
+ doc_p.parse (argv[1]);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/built-in/output b/xsd-tests/cxx/parser/built-in/output
index 756abcd..756abcd 100644
--- a/tests/cxx/parser/built-in/output
+++ b/xsd-tests/cxx/parser/built-in/output
diff --git a/tests/cxx/parser/built-in/test.xml b/xsd-tests/cxx/parser/built-in/test.xml
index 8d9332a..8d9332a 100644
--- a/tests/cxx/parser/built-in/test.xml
+++ b/xsd-tests/cxx/parser/built-in/test.xml
diff --git a/tests/cxx/parser/built-in/test.xsd b/xsd-tests/cxx/parser/built-in/test.xsd
index 9c00eb4..9c00eb4 100644
--- a/tests/cxx/parser/built-in/test.xsd
+++ b/xsd-tests/cxx/parser/built-in/test.xsd
diff --git a/xsd-tests/cxx/parser/enumeration/buildfile b/xsd-tests/cxx/parser/enumeration/buildfile
new file mode 100644
index 0000000..05163df
--- /dev/null
+++ b/xsd-tests/cxx/parser/enumeration/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/enumeration/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} map{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --type-map $path($<[1]) \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"
diff --git a/xsd-tests/cxx/parser/enumeration/driver.cxx b/xsd-tests/cxx/parser/enumeration/driver.cxx
new file mode 100644
index 0000000..4776ee2
--- /dev/null
+++ b/xsd-tests/cxx/parser/enumeration/driver.cxx
@@ -0,0 +1,81 @@
+// file : cxx/parser/enumeration/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test xsd:enumeration parsing.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace xml_schema;
+
+struct digit_pimpl: test::digit_pskel, int_pimpl
+{
+};
+
+struct gender_pimpl: test::gender_pskel, string_pimpl
+{
+ virtual ::gender
+ post_gender ()
+ {
+ std::string str (post_string ());
+
+ if (str == "male")
+ return male;
+ else
+ return female;
+ }
+};
+
+struct type_pimpl: test::type_pskel
+{
+ virtual void
+ digit (int i)
+ {
+ cout << i << endl;
+ }
+
+ virtual void
+ gender (::gender g)
+ {
+ cout << g << endl;
+ }
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ digit_pimpl digit_p;
+ gender_pimpl gender_p;
+ type_pimpl type_p;
+
+ type_p.parsers (digit_p, gender_p);
+
+ document doc_p (type_p, "test", "root");
+
+ type_p.pre ();
+ doc_p.parse (argv[1]);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/enumeration/gender.hxx b/xsd-tests/cxx/parser/enumeration/gender.hxx
index a2e5cd8..a2e5cd8 100644
--- a/tests/cxx/parser/enumeration/gender.hxx
+++ b/xsd-tests/cxx/parser/enumeration/gender.hxx
diff --git a/tests/cxx/parser/enumeration/output b/xsd-tests/cxx/parser/enumeration/output
index 16db301..16db301 100644
--- a/tests/cxx/parser/enumeration/output
+++ b/xsd-tests/cxx/parser/enumeration/output
diff --git a/tests/cxx/parser/enumeration/test.map b/xsd-tests/cxx/parser/enumeration/test.map
index f8868d6..f8868d6 100644
--- a/tests/cxx/parser/enumeration/test.map
+++ b/xsd-tests/cxx/parser/enumeration/test.map
diff --git a/tests/cxx/parser/enumeration/test.xml b/xsd-tests/cxx/parser/enumeration/test.xml
index a6fa893..a6fa893 100644
--- a/tests/cxx/parser/enumeration/test.xml
+++ b/xsd-tests/cxx/parser/enumeration/test.xml
diff --git a/tests/cxx/parser/enumeration/test.xsd b/xsd-tests/cxx/parser/enumeration/test.xsd
index ded3a18..ded3a18 100644
--- a/tests/cxx/parser/enumeration/test.xsd
+++ b/xsd-tests/cxx/parser/enumeration/test.xsd
diff --git a/xsd-tests/cxx/parser/generated-impl/.gitignore b/xsd-tests/cxx/parser/generated-impl/.gitignore
new file mode 100644
index 0000000..21b434c
--- /dev/null
+++ b/xsd-tests/cxx/parser/generated-impl/.gitignore
@@ -0,0 +1,2 @@
+test-pimpl.?xx
+test-driver.?xx
diff --git a/xsd-tests/cxx/parser/generated-impl/buildfile b/xsd-tests/cxx/parser/generated-impl/buildfile
new file mode 100644
index 0000000..8710a77
--- /dev/null
+++ b/xsd-tests/cxx/parser/generated-impl/buildfile
@@ -0,0 +1,31 @@
+# file : cxx/parser/generated-impl/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx ixx cxx}{test-pskel} \
+ {hxx cxx}{test-pimpl} \
+ { cxx}{test-driver} \
+ $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel} \
+ {hxx cxx}{test-pimpl} \
+ { cxx}{test-driver}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --generate-print-impl \
+ --generate-test-driver \
+ --force-overwrite \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/tests/cxx/parser/generated-impl/output b/xsd-tests/cxx/parser/generated-impl/output
index 7c58647..7c58647 100644
--- a/tests/cxx/parser/generated-impl/output
+++ b/xsd-tests/cxx/parser/generated-impl/output
diff --git a/tests/cxx/parser/generated-impl/test.xml b/xsd-tests/cxx/parser/generated-impl/test.xml
index 2f29a39..2f29a39 100644
--- a/tests/cxx/parser/generated-impl/test.xml
+++ b/xsd-tests/cxx/parser/generated-impl/test.xml
diff --git a/tests/cxx/parser/generated-impl/test.xsd b/xsd-tests/cxx/parser/generated-impl/test.xsd
index 7bc8f23..7bc8f23 100644
--- a/tests/cxx/parser/generated-impl/test.xsd
+++ b/xsd-tests/cxx/parser/generated-impl/test.xsd
diff --git a/xsd-tests/cxx/parser/list/buildfile b/xsd-tests/cxx/parser/list/buildfile
new file mode 100644
index 0000000..426101e
--- /dev/null
+++ b/xsd-tests/cxx/parser/list/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/parser/list/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/list/driver.cxx b/xsd-tests/cxx/parser/list/driver.cxx
new file mode 100644
index 0000000..382da5b
--- /dev/null
+++ b/xsd-tests/cxx/parser/list/driver.cxx
@@ -0,0 +1,105 @@
+// file : cxx/parser/list/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test xsd:list parsing.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct string_list_pimpl: string_list_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ item (string const& v)
+ {
+ cout << " '" << v << "'" << endl;
+ }
+
+ virtual void
+ post_string_list ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct string_list_lang_pimpl: string_list_lang_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ item (string const& v)
+ {
+ cout << " '" << v << "'" << endl;
+ }
+
+ virtual void
+ lang (string const& v)
+ {
+ cout << " lang: '" << v << "'" << endl;
+ }
+
+ virtual void
+ post_string_list_lang ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ string_list_pimpl string_list_p;
+ string_list_lang_pimpl string_list_lang_p;
+ type_pimpl type_p;
+
+ string_list_p.parsers (string_p);
+ string_list_lang_p.parsers (string_p, string_p);
+ type_p.parsers (string_list_p, string_list_lang_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ type_p.pre ();
+ doc_p.parse (argv[1]);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/list/output b/xsd-tests/cxx/parser/list/output
index 3642c4d..3642c4d 100644
--- a/tests/cxx/parser/list/output
+++ b/xsd-tests/cxx/parser/list/output
diff --git a/tests/cxx/parser/list/test.xml b/xsd-tests/cxx/parser/list/test.xml
index 52229db..52229db 100644
--- a/tests/cxx/parser/list/test.xml
+++ b/xsd-tests/cxx/parser/list/test.xml
diff --git a/tests/cxx/parser/list/test.xsd b/xsd-tests/cxx/parser/list/test.xsd
index 79bd084..79bd084 100644
--- a/tests/cxx/parser/list/test.xsd
+++ b/xsd-tests/cxx/parser/list/test.xsd
diff --git a/xsd-tests/cxx/parser/name-clash/inheritance/buildfile b/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
new file mode 100644
index 0000000..4bd7b48
--- /dev/null
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/name-clash/inheritance/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx b/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
new file mode 100644
index 0000000..9e9b905
--- /dev/null
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/driver.cxx
@@ -0,0 +1,62 @@
+// file : cxx/parser/name-clash/inheritance/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test for name clashes across inheritance hierarchy.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct derived_pimpl: derived_pskel
+{
+ virtual void
+ e (string const& v)
+ {
+ cout << "e: " << v << endl;
+ }
+
+ virtual void
+ e1 (string const& v)
+ {
+ cout << "e1: " << v << endl;
+ }
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ derived_pimpl derived_p;
+
+ derived_p.parsers (string_p, string_p);
+
+ xml_schema::document doc_p (derived_p, "test", "root");
+
+ derived_p.pre ();
+ doc_p.parse (argv[1]);
+ derived_p.post_derived ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/name-clash/inheritance/output b/xsd-tests/cxx/parser/name-clash/inheritance/output
index 4efd51b..4efd51b 100644
--- a/tests/cxx/parser/name-clash/inheritance/output
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/output
diff --git a/tests/cxx/parser/name-clash/inheritance/test.xml b/xsd-tests/cxx/parser/name-clash/inheritance/test.xml
index 8c17101..8c17101 100644
--- a/tests/cxx/parser/name-clash/inheritance/test.xml
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/test.xml
diff --git a/tests/cxx/parser/name-clash/inheritance/test.xsd b/xsd-tests/cxx/parser/name-clash/inheritance/test.xsd
index 62a782e..62a782e 100644
--- a/tests/cxx/parser/name-clash/inheritance/test.xsd
+++ b/xsd-tests/cxx/parser/name-clash/inheritance/test.xsd
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/buildfile b/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
new file mode 100644
index 0000000..629645b
--- /dev/null
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/polymorphism/recursive/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-polymorphic \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx b/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
new file mode 100644
index 0000000..26793a0
--- /dev/null
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/driver.cxx
@@ -0,0 +1,68 @@
+// file : cxx/parser/polymorphism/recursive/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test polymorphic recursive parsing.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+#include "test-pimpl.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::int_pimpl int_p;
+
+ root_pimpl root_p;
+ expression_pimpl expression_p;
+ recursive_pimpl recursive_p;
+ value_a_pimpl value_a_p;
+ value_b_pimpl value_b_p;
+
+ xml_schema::parser_map_impl expression_map;
+
+ // Connect the parsers together.
+ //
+ root_p.parsers (expression_p);
+ expression_map.insert(value_a_p);
+ expression_map.insert(value_b_p);
+ expression_map.insert(recursive_p);
+
+ root_p.expression_parser(expression_map);
+
+ recursive_p.parsers(expression_p);
+ recursive_p.expression_parser(expression_map);
+
+ value_a_p.parsers(int_p);
+ value_b_p.parsers(int_p);
+
+ xml_schema::document doc_p (root_p, "test", "root", true);
+
+ root_p.pre ();
+ doc_p.parse (argv[1]);
+ root_p.post_root ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/polymorphism/recursive/output b/xsd-tests/cxx/parser/polymorphism/recursive/output
index 28a835f..28a835f 100644
--- a/tests/cxx/parser/polymorphism/recursive/output
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/output
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
new file mode 100644
index 0000000..7c7f410
--- /dev/null
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx
@@ -0,0 +1,147 @@
+// file : cxx/parser/polymorphism/recursive/pimpl.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <iostream>
+
+#include "test-pimpl.hxx"
+
+using namespace std;
+
+namespace test
+{
+ // root_pimpl
+ //
+
+ void root_pimpl::
+ pre ()
+ {
+ cout << "root start" << endl;
+ }
+
+ void root_pimpl::
+ expression ()
+ {
+ cout << "root->expression" << endl;
+ }
+
+ void root_pimpl::
+ post_root ()
+ {
+ cout << "root end" << endl;
+ }
+
+ // expression_pimpl
+ //
+
+ void expression_pimpl::
+ pre ()
+ {
+ cout << "expression begin" << endl;
+ }
+
+ void expression_pimpl::
+ post_expression ()
+ {
+ cout << "expression end" << endl;
+ }
+
+ // recursive_pimpl
+ //
+
+ void recursive_pimpl::
+ pre ()
+ {
+ cout << "recursive start" << endl;
+ }
+
+ void recursive_pimpl::
+ expression ()
+ {
+ cout << "recursive->expression event" << endl;
+ }
+
+ void recursive_pimpl::
+ post_expression ()
+ {
+ cout << "recursive: post_expression override" << endl;
+ post_recursive ();
+ }
+
+ void recursive_pimpl::
+ post_recursive ()
+ {
+ cout << "recursive end" << endl;
+ }
+
+ // value_pimpl
+ //
+
+ void value_pimpl::
+ pre ()
+ {
+ cout << "value begin" << endl;
+ }
+
+ void value_pimpl::
+ constant (int)
+ {
+ cout << "value->constant" << endl;
+ }
+
+ void value_pimpl::
+ post_expression ()
+ {
+ cout << "value: post_expression override" << endl;
+ post_value ();
+ }
+
+ void value_pimpl::
+ post_value ()
+ {
+ cout << "value end" << endl;
+ }
+
+ // value_a_pimpl
+ //
+
+ void value_a_pimpl::
+ pre ()
+ {
+ cout << "value_a begin" << endl;
+ }
+
+ void value_a_pimpl::
+ post_value ()
+ {
+ cout << "value_a: post_value override" << endl;
+ post_value_a ();
+ }
+
+ void value_a_pimpl::
+ post_value_a ()
+ {
+ cout << "value_a end" << endl;
+ }
+
+ // value_b_pimpl
+ //
+
+ void value_b_pimpl::
+ pre ()
+ {
+ cout << "value_b begin" << endl;
+ }
+
+ void value_b_pimpl::
+ post_value ()
+ {
+ cout << "value_b: post_value override" << endl;
+ post_value_b ();
+ }
+
+ void value_b_pimpl::
+ post_value_b ()
+ {
+ cout << "value_b end" << endl;
+ }
+}
diff --git a/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx
new file mode 100644
index 0000000..928b880
--- /dev/null
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx
@@ -0,0 +1,94 @@
+// file : cxx/parser/polymorphism/recursive/pimpl.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef TEST_PIMPL_HXX
+#define TEST_PIMPL_HXX
+
+#include "test-pskel.hxx"
+
+namespace test
+{
+ class root_pimpl: public virtual root_pskel
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ expression ();
+
+ virtual void
+ post_root ();
+ };
+
+ class expression_pimpl: public virtual expression_pskel
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ post_expression ();
+ };
+
+ class recursive_pimpl: public virtual recursive_pskel,
+ public expression_pimpl
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ expression ();
+
+ virtual void
+ post_expression ();
+
+ virtual void
+ post_recursive ();
+ };
+
+ class value_pimpl: public virtual value_pskel, public expression_pimpl
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ constant (int);
+
+ virtual void
+ post_expression ();
+
+ virtual void
+ post_value ();
+ };
+
+ class value_a_pimpl: public virtual value_a_pskel, public value_pimpl
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ post_value ();
+
+ virtual void
+ post_value_a ();
+ };
+
+ class value_b_pimpl: public virtual value_b_pskel, public value_pimpl
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ post_value ();
+
+ virtual void
+ post_value_b ();
+ };
+}
+
+#endif // TEST_PIMPL_HXX
diff --git a/tests/cxx/parser/polymorphism/recursive/test.xml b/xsd-tests/cxx/parser/polymorphism/recursive/test.xml
index 42035ba..42035ba 100644
--- a/tests/cxx/parser/polymorphism/recursive/test.xml
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/test.xml
diff --git a/tests/cxx/parser/polymorphism/recursive/test.xsd b/xsd-tests/cxx/parser/polymorphism/recursive/test.xsd
index affcc8a..affcc8a 100644
--- a/tests/cxx/parser/polymorphism/recursive/test.xsd
+++ b/xsd-tests/cxx/parser/polymorphism/recursive/test.xsd
diff --git a/xsd-tests/cxx/parser/polymorphism/same-type/buildfile b/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
new file mode 100644
index 0000000..d98e917
--- /dev/null
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/polymorphism/same-type/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-polymorphic \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx b/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
new file mode 100644
index 0000000..6da4a0a
--- /dev/null
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/driver.cxx
@@ -0,0 +1,62 @@
+// file : cxx/parser/polymorphism/same-type/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test substitution group and xsi:type that don't change the type.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct base_pimpl: base_pskel
+{
+ virtual void
+ a (string const& v)
+ {
+ cout << v << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ base_pimpl base_p;
+ type_pimpl type_p;
+
+ base_p.parsers (string_p);
+ type_p.parsers (base_p);
+
+ xml_schema::document doc_p (type_p, "test", "root", true);
+
+ type_p.pre ();
+ doc_p.parse (argv[1]);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/polymorphism/same-type/output b/xsd-tests/cxx/parser/polymorphism/same-type/output
index d418277..d418277 100644
--- a/tests/cxx/parser/polymorphism/same-type/output
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/output
diff --git a/tests/cxx/parser/polymorphism/same-type/test.xml b/xsd-tests/cxx/parser/polymorphism/same-type/test.xml
index f8b6d1e..f8b6d1e 100644
--- a/tests/cxx/parser/polymorphism/same-type/test.xml
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/test.xml
diff --git a/tests/cxx/parser/polymorphism/same-type/test.xsd b/xsd-tests/cxx/parser/polymorphism/same-type/test.xsd
index a4157d3..a4157d3 100644
--- a/tests/cxx/parser/polymorphism/same-type/test.xsd
+++ b/xsd-tests/cxx/parser/polymorphism/same-type/test.xsd
diff --git a/xsd-tests/cxx/parser/recursive/buildfile b/xsd-tests/cxx/parser/recursive/buildfile
new file mode 100644
index 0000000..237855c
--- /dev/null
+++ b/xsd-tests/cxx/parser/recursive/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/recursive/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/recursive/driver.cxx b/xsd-tests/cxx/parser/recursive/driver.cxx
new file mode 100644
index 0000000..c93fd35
--- /dev/null
+++ b/xsd-tests/cxx/parser/recursive/driver.cxx
@@ -0,0 +1,139 @@
+// file : cxx/parser/recursive/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test recursive parser invocation.
+//
+
+#include <iostream>
+#include <string>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+
+struct sub_pimpl: sub_type_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "sub::pre" << endl;
+ }
+
+ virtual void
+ sub ()
+ {
+ cout << "sub::sub" << endl;
+ }
+
+ virtual void
+ sub2 ()
+ {
+ cout << "sub::sub2" << endl;
+ }
+
+ virtual void
+ name (string const& n)
+ {
+ cout << "sub::name: " << n << endl;
+ }
+
+ virtual void
+ post_sub_type ()
+ {
+ cout << "sub::post" << endl;
+ }
+};
+
+struct indir_pimpl: indir_type_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "indir::pre" << endl;
+ }
+
+ virtual void
+ sub ()
+ {
+ cout << "indir::sub" << endl;
+ }
+
+ virtual void
+ name (string const& n)
+ {
+ cout << "indir::name: " << n << endl;
+ }
+
+ virtual void
+ post_indir_type ()
+ {
+ cout << "indir::post" << endl;
+ }
+};
+
+struct test_pimpl: test_type_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "test::pre" << endl;
+ }
+
+ virtual void
+ sub ()
+ {
+ cout << "test::sub" << endl;
+ }
+
+ virtual void
+ name (string const& n)
+ {
+ cout << "test::name: " << n << endl;
+ }
+
+ virtual void
+ post_test_type ()
+ {
+ cout << "test::post" << endl;
+ }
+};
+
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+
+ sub_pimpl sub_p;
+ indir_pimpl indir_p;
+ test_pimpl test_p;
+
+ sub_p.parsers (sub_p, indir_p, sub_p, string_p);
+ indir_p.parsers (sub_p, string_p);
+ test_p.parsers (sub_p, string_p);
+
+ xml_schema::document doc_p (test_p, "test");
+
+ test_p.pre ();
+ doc_p.parse (argv[1]);
+ test_p.post_test_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/recursive/output b/xsd-tests/cxx/parser/recursive/output
index f26fb72..f26fb72 100644
--- a/tests/cxx/parser/recursive/output
+++ b/xsd-tests/cxx/parser/recursive/output
diff --git a/tests/cxx/parser/recursive/test.xml b/xsd-tests/cxx/parser/recursive/test.xml
index f6c219d..f6c219d 100644
--- a/tests/cxx/parser/recursive/test.xml
+++ b/xsd-tests/cxx/parser/recursive/test.xml
diff --git a/tests/cxx/parser/recursive/test.xsd b/xsd-tests/cxx/parser/recursive/test.xsd
index 33e1d2d..33e1d2d 100644
--- a/tests/cxx/parser/recursive/test.xsd
+++ b/xsd-tests/cxx/parser/recursive/test.xsd
diff --git a/xsd-tests/cxx/parser/test-template/buildfile b/xsd-tests/cxx/parser/test-template/buildfile
new file mode 100644
index 0000000..9f7f5d3
--- /dev/null
+++ b/xsd-tests/cxx/parser/test-template/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/parser/test-template/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/test-template/driver.cxx b/xsd-tests/cxx/parser/test-template/driver.cxx
new file mode 100644
index 0000000..333c6fd
--- /dev/null
+++ b/xsd-tests/cxx/parser/test-template/driver.cxx
@@ -0,0 +1,66 @@
+// file : cxx/parser/test-template/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Insert test description here.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct type_pimpl: type_pskel
+{
+ virtual void
+ pre ()
+ {
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << v << endl;
+ }
+
+ virtual void
+ post_type ()
+ {
+ }
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ type_pimpl type_p;
+
+ type_p.parsers (string_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ type_p.pre ();
+ doc_p.parse (argv[1]);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/test-template/output b/xsd-tests/cxx/parser/test-template/output
index 7898192..7898192 100644
--- a/tests/cxx/parser/test-template/output
+++ b/xsd-tests/cxx/parser/test-template/output
diff --git a/tests/cxx/parser/test-template/test.xml b/xsd-tests/cxx/parser/test-template/test.xml
index 624a80c..624a80c 100644
--- a/tests/cxx/parser/test-template/test.xml
+++ b/xsd-tests/cxx/parser/test-template/test.xml
diff --git a/tests/cxx/parser/test-template/test.xsd b/xsd-tests/cxx/parser/test-template/test.xsd
index 07bebc7..07bebc7 100644
--- a/tests/cxx/parser/test-template/test.xsd
+++ b/xsd-tests/cxx/parser/test-template/test.xsd
diff --git a/xsd-tests/cxx/parser/union/buildfile b/xsd-tests/cxx/parser/union/buildfile
new file mode 100644
index 0000000..1a8615c
--- /dev/null
+++ b/xsd-tests/cxx/parser/union/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/parser/union/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/union/driver.cxx b/xsd-tests/cxx/parser/union/driver.cxx
new file mode 100644
index 0000000..c5b5c71
--- /dev/null
+++ b/xsd-tests/cxx/parser/union/driver.cxx
@@ -0,0 +1,60 @@
+// file : cxx/parser/union/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test xsd:union parsing.
+//
+
+#include <string>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct int_string_union_pimpl: int_string_union_pskel
+{
+ virtual void
+ _characters (const xml_schema::ro_string& s)
+ {
+ cout << "'" << s << "'" << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ int_string_union_pimpl int_string_union_p;
+ type_pimpl type_p;
+
+ type_p.parsers (int_string_union_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ type_p.pre ();
+ doc_p.parse (argv[1]);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (std::ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/union/output b/xsd-tests/cxx/parser/union/output
index a92ffc3..a92ffc3 100644
--- a/tests/cxx/parser/union/output
+++ b/xsd-tests/cxx/parser/union/output
diff --git a/tests/cxx/parser/union/test.xml b/xsd-tests/cxx/parser/union/test.xml
index 5b3e799..5b3e799 100644
--- a/tests/cxx/parser/union/test.xml
+++ b/xsd-tests/cxx/parser/union/test.xml
diff --git a/tests/cxx/parser/union/test.xsd b/xsd-tests/cxx/parser/union/test.xsd
index 5bf3d47..5bf3d47 100644
--- a/tests/cxx/parser/union/test.xsd
+++ b/xsd-tests/cxx/parser/union/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/all/buildfile b/xsd-tests/cxx/parser/validation/all/buildfile
new file mode 100644
index 0000000..555843e
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/all/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/parser/validation/all/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
+ testscript
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/all/driver.cxx b/xsd-tests/cxx/parser/validation/all/driver.cxx
new file mode 100644
index 0000000..a8cbcca
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/all/driver.cxx
@@ -0,0 +1,98 @@
+// file : cxx/parser/validation/all/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the all compositor validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct all_pimpl: all_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ b (string const& v)
+ {
+ cout << " b = " << v << endl;
+ }
+
+ virtual void
+ c (string const& v)
+ {
+ cout << " c = " << v << endl;
+ }
+
+ virtual void
+ post_all ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ all_pimpl all_p;
+ type_pimpl type_p;
+
+ all_p.parsers (string_p, string_p, string_p);
+ type_p.parsers (all_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ try
+ {
+ ifstream ifs (argv[1]);
+ type_p.pre ();
+ doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cout << " " << e << endl
+ << "}" << endl
+ << endl;
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/all/test.xsd b/xsd-tests/cxx/parser/validation/all/test.xsd
index 1f670e3..1f670e3 100644
--- a/tests/cxx/parser/validation/all/test.xsd
+++ b/xsd-tests/cxx/parser/validation/all/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/all/testscript b/xsd-tests/cxx/parser/validation/all/testscript
new file mode 100644
index 0000000..e93e59c
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/all/testscript
@@ -0,0 +1,190 @@
+# file : cxx/parser/validation/all/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+test.arguments += test.xml
+
+: all-combinations
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- all combinations -->
+ <all>
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ </all>
+
+ <all>
+ <a>a</a>
+ <c>c</c>
+ <b>b</b>
+ </all>
+
+ <all>
+ <b>b</b>
+ <a>a</a>
+ <c>c</c>
+ </all>
+
+ <all>
+ <b>b</b>
+ <c>c</c>
+ <a>a</a>
+ </all>
+
+ <all>
+ <c>c</c>
+ <a>a</a>
+ <b>b</b>
+ </all>
+
+ <all>
+ <c>c</c>
+ <b>b</b>
+ <a>a</a>
+ </all>
+
+ <!-- optional c is not present -->
+ <all>
+ <a>a</a>
+ <b>b</b>
+ </all>
+
+ <all>
+ <a>a</a>
+ <b>b</b>
+ </all>
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ a = a
+ b = b
+ c = c
+ }
+
+ {
+ a = a
+ c = c
+ b = b
+ }
+
+ {
+ b = b
+ a = a
+ c = c
+ }
+
+ {
+ b = b
+ c = c
+ a = a
+ }
+
+ {
+ c = c
+ a = a
+ b = b
+ }
+
+ {
+ c = c
+ b = b
+ a = a
+ }
+
+ {
+ a = a
+ b = b
+ }
+
+ {
+ a = a
+ b = b
+ }
+
+ EOO
+}
+
+: required-not-present
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- required b is not present (invalid) -->
+ <all>
+ <a>a</a>
+ <c>c</c>
+ </all>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ a = a
+ c = c
+ :9:9 error: expected element 'b'
+ }
+
+ EOO
+}
+
+: absent
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- invalid -->
+ <all>
+ </all>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ :7:9 error: expected element 'a'
+ }
+
+ EOO
+}
+
+: unexpected
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- invalid -->
+ <all>
+ <a>a</a>
+ <b>b</b>
+ <a>a</a>
+ </all>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ a = a
+ b = b
+ :9:7 error: unexpected element 'a'
+ }
+
+ EOO
+}
diff --git a/xsd-tests/cxx/parser/validation/any/buildfile b/xsd-tests/cxx/parser/validation/any/buildfile
new file mode 100644
index 0000000..57135f4
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/any/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/validation/any/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/any/driver.cxx b/xsd-tests/cxx/parser/validation/any/driver.cxx
new file mode 100644
index 0000000..1eceda6
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/any/driver.cxx
@@ -0,0 +1,121 @@
+// file : cxx/parser/validation/any/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the any particle validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+using xml_schema::ro_string;
+
+struct any_a_pimpl: any_a_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ x (string const& v)
+ {
+ cout << " x = " << v << endl;
+ }
+
+ virtual void
+ _start_any_element (ro_string const&,
+ ro_string const& n,
+ ro_string const*)
+ {
+ cout << " start any element '" << n << "'" << endl;
+ }
+
+ virtual void
+ _end_any_element (ro_string const&, ro_string const& n)
+ {
+ cout << " end any element '" << n << "'" << endl;
+ }
+
+ virtual void
+ _any_attribute (ro_string const&,
+ ro_string const& n,
+ ro_string const& v)
+ {
+ cout << " any attribute " << n << " = '" << v << "'" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& s)
+ {
+ cout << " any text: '" << s << "'" << endl;
+ }
+
+ virtual void
+ post_any_a ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ any_a_pimpl any_a_p;
+ type_pimpl type_p;
+
+ any_a_p.parsers (string_p, string_p);
+ type_p.parsers (any_a_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ try
+ {
+ ifstream ifs (argv[1]);
+ type_p.pre ();
+ doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cout << " " << e << endl
+ << "}" << endl
+ << endl;
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/any/test-000.std b/xsd-tests/cxx/parser/validation/any/output
index a1cc6e3..a1cc6e3 100644
--- a/tests/cxx/parser/validation/any/test-000.std
+++ b/xsd-tests/cxx/parser/validation/any/output
diff --git a/tests/cxx/parser/validation/any/test-000.xml b/xsd-tests/cxx/parser/validation/any/test.xml
index f1a0c83..f1a0c83 100644
--- a/tests/cxx/parser/validation/any/test-000.xml
+++ b/xsd-tests/cxx/parser/validation/any/test.xml
diff --git a/tests/cxx/parser/validation/any/test.xsd b/xsd-tests/cxx/parser/validation/any/test.xsd
index c05aeb5..c05aeb5 100644
--- a/tests/cxx/parser/validation/any/test.xsd
+++ b/xsd-tests/cxx/parser/validation/any/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/attribute/buildfile b/xsd-tests/cxx/parser/validation/attribute/buildfile
new file mode 100644
index 0000000..d486193
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/attribute/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/validation/attribute/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/attribute/driver.cxx b/xsd-tests/cxx/parser/validation/attribute/driver.cxx
new file mode 100644
index 0000000..4710564
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/attribute/driver.cxx
@@ -0,0 +1,197 @@
+// file : cxx/parser/validation/attribute/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test attribute and attribute wildcard (anyAttribute) validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+using xml_schema::ro_string;
+
+struct pass_a_pimpl: pass_a_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "pass-a" << endl
+ << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ b (string const& v)
+ {
+ cout << " b = " << v << endl;
+ }
+
+ virtual void
+ _any_attribute (ro_string const& ns,
+ ro_string const& name,
+ ro_string const& value)
+ {
+ cout << " any: " << ns << "#" << name << " = " << value << endl;
+ }
+
+ virtual void
+ post_pass_a ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct pass_b_pimpl: pass_b_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "pass-b" << endl
+ << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ b (string const& v)
+ {
+ cout << " b = " << v << endl;
+ }
+
+ virtual void
+ _any_attribute (ro_string const& ns,
+ ro_string const& name,
+ ro_string const& value)
+ {
+ cout << " any: " << ns << "#" << name << " = " << value << endl;
+ }
+
+ virtual void
+ post_pass_b ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct pass_c_pimpl: pass_c_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "pass-c" << endl
+ << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ b (string const& v)
+ {
+ cout << " b = " << v << endl;
+ }
+
+ virtual void
+ post_pass_c ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct fail_pimpl: fail_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "fail" << endl
+ << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ post_fail ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ pass_a_pimpl pass_a_p;
+ pass_b_pimpl pass_b_p;
+ pass_c_pimpl pass_c_p;
+ fail_pimpl fail_p;
+ type_pimpl type_p;
+
+ pass_a_p.parsers (string_p, string_p);
+ pass_b_p.parsers (string_p, string_p);
+ pass_c_p.parsers (string_p, string_p);
+ fail_p.parsers (string_p);
+ type_p.parsers (pass_a_p, pass_b_p, pass_c_p, fail_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ try
+ {
+ ifstream ifs (argv[1]);
+ type_p.pre ();
+ doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cout << " " << e << endl
+ << "}" << endl
+ << endl;
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/attribute/test-000.std b/xsd-tests/cxx/parser/validation/attribute/output
index 847b054..847b054 100644
--- a/tests/cxx/parser/validation/attribute/test-000.std
+++ b/xsd-tests/cxx/parser/validation/attribute/output
diff --git a/tests/cxx/parser/validation/attribute/test-000.xml b/xsd-tests/cxx/parser/validation/attribute/test.xml
index b994d1a..b994d1a 100644
--- a/tests/cxx/parser/validation/attribute/test-000.xml
+++ b/xsd-tests/cxx/parser/validation/attribute/test.xml
diff --git a/tests/cxx/parser/validation/attribute/test.xsd b/xsd-tests/cxx/parser/validation/attribute/test.xsd
index 833eb8e..833eb8e 100644
--- a/tests/cxx/parser/validation/attribute/test.xsd
+++ b/xsd-tests/cxx/parser/validation/attribute/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile b/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile
new file mode 100644
index 0000000..a6f366b
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/parser/validation/built-in/any-type/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
new file mode 100644
index 0000000..cbeb864
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/driver.cxx
@@ -0,0 +1,154 @@
+// file : cxx/parser/validation/built-in/any-type/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the anyType and anySimpleType validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+using xml_schema::ro_string;
+
+struct any_type_pimpl: xml_schema::any_type_pimpl
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ _start_any_element (ro_string const&,
+ ro_string const& n,
+ ro_string const*)
+ {
+ cout << " start any element '" << n << "'" << endl;
+ }
+
+ virtual void
+ _end_any_element (ro_string const&, ro_string const& n)
+ {
+ cout << " end any element '" << n << "'" << endl;
+ }
+
+ virtual void
+ _any_attribute (ro_string const&,
+ ro_string const& n,
+ ro_string const& v)
+ {
+ cout << " any attribute " << n << " = '" << v << "'" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& s)
+ {
+ cout << " any text: '" << s << "'" << endl;
+ }
+
+ virtual void
+ post_any_type ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct any_simple_type_pimpl: xml_schema::any_simple_type_pimpl
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& s)
+ {
+ cout << " any text: '" << s << "'" << endl;
+ }
+
+ virtual void
+ post_any_simple_type ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct any_extension_pimpl: virtual any_extension_pskel,
+ any_type_pimpl
+
+{
+ virtual void
+ x (const string& v)
+ {
+ cout << " x = " << v << endl;
+ }
+};
+
+struct any_simple_extension_pimpl: virtual any_simple_extension_pskel,
+ any_simple_type_pimpl
+{
+ virtual void
+ x (const string& v)
+ {
+ cout << " x = " << v << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+
+ any_type_pimpl any_type_p;
+ any_simple_type_pimpl any_simple_type_p;
+
+ any_extension_pimpl any_extension_p;
+ any_simple_extension_pimpl any_simple_extension_p;
+
+ type_pimpl type_p;
+
+ any_extension_p.parsers (string_p);
+ any_simple_extension_p.parsers (string_p);
+
+ type_p.parsers (any_type_p,
+ any_extension_p,
+ any_simple_extension_p,
+ any_simple_type_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ ifstream ifs (argv[1]);
+ type_p.pre ();
+ doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/built-in/any-type/test-000.std b/xsd-tests/cxx/parser/validation/built-in/any-type/output
index 84d7b3a..84d7b3a 100644
--- a/tests/cxx/parser/validation/built-in/any-type/test-000.std
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/output
diff --git a/tests/cxx/parser/validation/built-in/any-type/test-000.xml b/xsd-tests/cxx/parser/validation/built-in/any-type/test.xml
index 7875b7e..7875b7e 100644
--- a/tests/cxx/parser/validation/built-in/any-type/test-000.xml
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/test.xml
diff --git a/tests/cxx/parser/validation/built-in/any-type/test.xsd b/xsd-tests/cxx/parser/validation/built-in/any-type/test.xsd
index 86a4e13..86a4e13 100644
--- a/tests/cxx/parser/validation/built-in/any-type/test.xsd
+++ b/xsd-tests/cxx/parser/validation/built-in/any-type/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/built-in/binary/buildfile b/xsd-tests/cxx/parser/validation/built-in/binary/buildfile
new file mode 100644
index 0000000..fd1594f
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/binary/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/binary/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
new file mode 100644
index 0000000..3fe20ec
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/binary/driver.cxx
@@ -0,0 +1,153 @@
+// file : cxx/parser/validation/built-in/binary/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in base64Binary and hexBinary types validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ typedef xsd::cxx::parser::buffer buffer;
+
+ // Good.
+ //
+
+ // hexBinary
+ //
+ {
+ hex_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters (" ");
+ p._post ();
+ assert (*p.post_hex_binary () == buffer ());
+ }
+
+ {
+ hex_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n313");
+ p._characters ("23334356162636a6b ");
+ p._post ();
+ assert (*p.post_hex_binary () == buffer ("12345abcjk", 10));
+ }
+
+ // base64Binary
+ //
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("MTIzND ");
+ p._characters ("VhYmNqaw = = ");
+ p._post ();
+ assert (*p.post_base64_binary () == buffer ("12345abcjk", 10));
+ }
+
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("YQ==");
+ p._post ();
+ assert (*p.post_base64_binary () == buffer ("a", 1));
+ }
+
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("YWI=");
+ p._post ();
+ assert (*p.post_base64_binary () == buffer ("ab", 2));
+ }
+
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("YWJj");
+ p._post ();
+ assert (*p.post_base64_binary () == buffer ("abc", 3));
+ }
+
+ // Bad
+ //
+
+ // hexBinary
+ //
+ {
+ hex_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("313");
+ assert (test_post_fail (p));
+ }
+
+ {
+ hex_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("313233343X6162636a6b");
+ assert (test_post_fail (p));
+ }
+
+ // base64Binary
+ //
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("YQ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("==");
+ assert (test_post_fail (p));
+ }
+
+ {
+ base64_binary_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("MTIzNDVhYmNqaw=A");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/boolean/buildfile b/xsd-tests/cxx/parser/validation/built-in/boolean/buildfile
new file mode 100644
index 0000000..259614e
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/boolean/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/boolean/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
new file mode 100644
index 0000000..f1499cd
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/boolean/driver.cxx
@@ -0,0 +1,145 @@
+// file : cxx/parser/validation/built-in/boolean/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in boolean type validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+bool
+test_post_fail (boolean_pimpl<char>& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("true");
+ p._post ();
+ assert (p.post_boolean ());
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1");
+ p._post ();
+ assert (p.post_boolean ());
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("false");
+ p._post ();
+ assert (!p.post_boolean ());
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (!p.post_boolean ());
+ }
+
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" true ");
+ p._post ();
+ assert (p.post_boolean ());
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ p._characters (" \n ");
+ p._characters (" fa");
+ p._characters ("l");
+ p._characters ("se ");
+ p._characters (" \n ");
+ p._characters (" ");
+ p._post ();
+ assert (!p.post_boolean ());
+ }
+
+ // Bad
+ //
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ //p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("fal");
+ p._characters ("s ");
+ p._characters ("e");
+ assert (test_post_fail (p));
+ }
+
+ {
+ boolean_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("01");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/byte/buildfile b/xsd-tests/cxx/parser/validation/built-in/byte/buildfile
new file mode 100644
index 0000000..87de911
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/byte/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/byte/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
new file mode 100644
index 0000000..b533cfd
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/byte/driver.cxx
@@ -0,0 +1,256 @@
+// file : cxx/parser/validation/built-in/byte/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in byte and unsigned byte types validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("123");
+ p._post ();
+ assert (p.post_byte () == 123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("\t +123 \n ");
+ p._post ();
+ assert (p.post_byte () == 123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-123");
+ p._post ();
+ assert (p.post_byte () == -123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+123");
+ p._post ();
+ assert (p.post_byte () == 123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0000000000000000123");
+ p._post ();
+ assert (p.post_byte () == 123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+0000000000000000123");
+ p._post ();
+ assert (p.post_byte () == 123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0000000000000000123");
+ p._post ();
+ assert (p.post_byte () == -123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("\t \n");
+ p._characters (" -");
+ p._characters ("00000");
+ p._characters ("001");
+ p._characters ("23 \n\t");
+ p._post ();
+ assert (p.post_byte () == -123);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-128");
+ p._post ();
+ assert (p.post_byte () == -128);
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("127");
+ p._post ();
+ assert (p.post_byte () == 127);
+ }
+
+ {
+ unsigned_byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+123");
+ p._post ();
+ assert (p.post_unsigned_byte () == 123);
+ }
+
+ {
+ unsigned_byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_unsigned_byte () == 0);
+ }
+
+ {
+ unsigned_byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("255");
+ p._post ();
+ assert (p.post_unsigned_byte () == 255);
+ }
+
+ // Bad
+ //
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n \t ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("++01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-01");
+ p._characters (" ");
+ p._characters ("23 ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ unsigned_byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-123");
+ assert (test_post_fail (p));
+ }
+
+ // Ranges
+ //
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-129");
+ assert (test_post_fail (p));
+ }
+
+ {
+ byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("128");
+ assert (test_post_fail (p));
+ }
+
+ {
+ unsigned_byte_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("256");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/date-time/buildfile b/xsd-tests/cxx/parser/validation/built-in/date-time/buildfile
new file mode 100644
index 0000000..47791e5
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/date-time/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/date-time/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
new file mode 100644
index 0000000..da02a50
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/date-time/driver.cxx
@@ -0,0 +1,1533 @@
+// file : cxx/parser/validation/built-in/date-time/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in date and time types validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ typedef xsd::cxx::parser::gday gday;
+ typedef xsd::cxx::parser::gmonth gmonth;
+ typedef xsd::cxx::parser::gyear gyear;
+ typedef xsd::cxx::parser::gmonth_day gmonth_day;
+ typedef xsd::cxx::parser::gyear_month gyear_month;
+ typedef xsd::cxx::parser::date date;
+ typedef xsd::cxx::parser::time time;
+ typedef xsd::cxx::parser::date_time date_time;
+ typedef xsd::cxx::parser::duration duration;
+
+ // Good.
+ //
+
+ // gday & time zone parsing
+ //
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("---1");
+ p._characters ("2+12:00");
+ p._post ();
+ assert (p.post_gday () == gday (12, 12, 00));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---01");
+ p._post ();
+ assert (p.post_gday () == gday (1));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---31");
+ p._post ();
+ assert (p.post_gday () == gday (31));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---15Z");
+ p._post ();
+ assert (p.post_gday () == gday (15, 0, 0));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---15-14:00");
+ p._post ();
+ assert (p.post_gday () == gday (15, -14, 0));
+ }
+
+ // gmonth
+ //
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("--1");
+ p._characters ("0+12:00");
+ p._post ();
+ assert (p.post_gmonth () == gmonth (10, 12, 0));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--01");
+ p._post ();
+ assert (p.post_gmonth () == gmonth (1));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12Z");
+ p._post ();
+ assert (p.post_gmonth () == gmonth (12, 0, 0));
+ }
+
+ // gyear
+ //
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("20");
+ p._characters ("07+12:00");
+ p._post ();
+ assert (p.post_gyear () == gyear (2007, 12, 00));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0001");
+ p._post ();
+ assert (p.post_gyear () == gyear (1));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-20000Z");
+ p._post ();
+ assert (p.post_gyear () == gyear (-20000, 0, 0));
+ }
+
+ // gmonth_day
+ //
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("--1");
+ p._characters ("0-28+12:00 ");
+ p._post ();
+ assert (p.post_gmonth_day () == gmonth_day (10, 28, 12, 00));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12-31");
+ p._post ();
+ assert (p.post_gmonth_day () == gmonth_day (12, 31));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--01-01Z");
+ p._post ();
+ assert (p.post_gmonth_day () == gmonth_day (1, 1, 0, 0));
+ }
+
+ // gyear_month
+ //
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("200");
+ p._characters ("7-12+12:00 ");
+ p._post ();
+ assert (p.post_gyear_month () == gyear_month (2007, 12, 12, 00));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-2007-10");
+ p._post ();
+ assert (p.post_gyear_month () == gyear_month (-2007, 10));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20007-10Z");
+ p._post ();
+ assert (p.post_gyear_month () == gyear_month (20007, 10, 0, 0));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-20007-01");
+ p._post ();
+ assert (p.post_gyear_month () == gyear_month (-20007, 1));
+ }
+
+ // date
+ //
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("200");
+ p._characters ("7-12-26+12:00 ");
+ p._post ();
+ assert (p.post_date () == date (2007, 12, 26, 12, 0));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-2007-10-15");
+ p._post ();
+ assert (p.post_date () == date (-2007, 10, 15));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20007-12-31Z");
+ p._post ();
+ assert (p.post_date () == date (20007, 12, 31, 0, 0));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-20007-01-01");
+ p._post ();
+ assert (p.post_date () == date (-20007, 1, 1));
+ }
+
+ // time
+ //
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("12:");
+ p._characters ("46:23.456+12:00 ");
+ p._post ();
+ assert (p.post_time () == time (12, 46, 23.456, 12, 0));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("12:13:14");
+ p._post ();
+ assert (p.post_time () == time (12, 13, 14.0));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("12:13:14Z");
+ p._post ();
+ assert (p.post_time () == time (12, 13, 14.0, 0, 0));
+ }
+
+ // date_time
+ //
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("200");
+ p._characters ("7-12-26T12:13:14.123+12:00 ");
+ p._post ();
+ assert (p.post_date_time () ==
+ date_time (2007, 12, 26, 12, 13, 14.123, 12, 0));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-2007-10-15T12:13:14");
+ p._post ();
+ assert (p.post_date_time () == date_time (-2007, 10, 15, 12, 13, 14.0));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20007-12-31T12:13:14Z");
+ p._post ();
+ assert (p.post_date_time () ==
+ date_time (20007, 12, 31, 12, 13, 14.0, 0, 0));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-20007-01-01T12:13:14");
+ p._post ();
+ assert (p.post_date_time () == date_time (-20007, 1, 1, 12, 13, 14.0));
+ }
+
+ // duration
+ //
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \t\n ");
+ p._characters ("-P200");
+ p._characters ("7Y13M32DT25H61M61.123S ");
+ p._post ();
+ assert (p.post_duration () ==
+ duration (true, 2007, 13, 32, 25, 61, 61.123));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1Y");
+ p._post ();
+ assert (p.post_duration () == duration (false, 1, 0, 0, 0, 0, 0.0));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1M");
+ p._post ();
+ assert (p.post_duration () == duration (false, 0, 1, 0, 0, 0, 0.0));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1D");
+ p._post ();
+ assert (p.post_duration () == duration (false, 0, 0, 1, 0, 0, 0.0));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT1H");
+ p._post ();
+ assert (p.post_duration () == duration (false, 0, 0, 0, 1, 0, 0.0));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT1M");
+ p._post ();
+ assert (p.post_duration () == duration (false, 0, 0, 0, 0, 1, 0.0));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT1.1S");
+ p._post ();
+ assert (p.post_duration () == duration (false, 0, 0, 0, 0, 0, 1.1));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1YT1S");
+ p._post ();
+ assert (p.post_duration () == duration (false, 1, 0, 0, 0, 0, 1.0));
+ }
+
+ // Bad
+ //
+
+ // gday & time zone parsing
+ //
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---1");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---32");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---2X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12asd");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---1212:00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12+2:00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12+1200");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12+15:00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12+12:60");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gday_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("---12+14:01");
+ assert (test_post_fail (p));
+ }
+
+ // gmonth
+ //
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--13");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--1X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--11+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // gyear
+ //
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("207");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-207");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0000");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20X7");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // gmonth_day
+ //
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-12-12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--1212");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12?12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--00-12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12-00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--13-23");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12-32");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--1X-12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--12-2X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gmonth_day_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("--11-11+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // gyear_month
+ //
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("207-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-207-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0000-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20X7-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007?12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-0");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-13");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-1X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ gyear_month_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // date
+ //
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("207-01-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-207-01-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0000-01-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20X7-01-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007?01-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-0-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-00-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-13-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-1X-01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10?12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-0");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-32");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-2X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // time
+ //
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1:01:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2X:01:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23?01:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:0:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:60:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:4X:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10?12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10:");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10:0");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10:01.");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10:60");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:10:2X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("24:01:00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("24:00:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:01:01+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // date_time
+ //
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("207-01-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-207-01-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0000-01-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("20X7-01-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007?01-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-0-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-00-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-13-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-1X-01T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10?12T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-0T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-00T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-32T12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-10-2XT12:13:14");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T1:01:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T2X:01:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23?01:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:0:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:60:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:4X:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10?12");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10:");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10:0");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10:01.");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10:60");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T23:10:2X");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T24:01:00");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T24:00:01");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("23:01:01+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ {
+ date_time_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007-01-01T12:13:14+12:3o");
+ assert (test_post_fail (p));
+ }
+
+ // duration
+ //
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ // p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2007Y");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-2007Y");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P-2007Y");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P-1M");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P-1D");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT-1H");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT-1M");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT-1.1S");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1H1M1S");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1M1Y");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT1S1H");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("PT1H1Y");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1Ygarbage");
+ assert (test_post_fail (p));
+ }
+
+ {
+ duration_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("P1YT");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/float/buildfile b/xsd-tests/cxx/parser/validation/built-in/float/buildfile
new file mode 100644
index 0000000..ca0eac1
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/float/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/float/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
new file mode 100644
index 0000000..bb67eb7
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/float/driver.cxx
@@ -0,0 +1,285 @@
+// file : cxx/parser/validation/built-in/float/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in float, double, and decimal types validation.
+//
+#include <math.h>
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+
+ // float
+ //
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" 0000123.456 ");
+ p._post ();
+ assert (p.post_float () == 123.456F);
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-12.345E2");
+ p._post ();
+ assert (p.post_float () == -12.345E2F);
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_float () == 0.0F);
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0");
+ p._post ();
+ assert (p.post_float () == -0.0F);
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("INF");
+ p._post ();
+ assert (isinf (p.post_float ()));
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-INF");
+ p._post ();
+ assert (isinf (p.post_float ()));
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("NaN");
+ p._post ();
+ assert (isnan (p.post_float ()));
+ }
+
+ // double
+ //
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" 0000123.456789 ");
+ p._post ();
+ assert (p.post_double () == 123.456789);
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-12.3456789E2");
+ p._post ();
+ assert (p.post_double () == -12.3456789E2);
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_double () == 0.0);
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0");
+ p._post ();
+ assert (p.post_double () == -0.0);
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("INF");
+ p._post ();
+ assert (isinf (p.post_double ()));
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-INF");
+ p._post ();
+ assert (isinf (p.post_double ()));
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("NaN");
+ p._post ();
+ assert (isnan (p.post_double ()));
+ }
+
+ // decimal
+ //
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" 0000123.456789 ");
+ p._post ();
+ assert (p.post_decimal () == 123.456789);
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-123.45678912345");
+ p._post ();
+ assert (p.post_decimal () == -123.45678912345);
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_decimal () == 0.0);
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0");
+ p._post ();
+ assert (p.post_decimal () == -0.0);
+ }
+
+
+ // Bad
+ //
+
+ // float
+ //
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+INF");
+ assert (test_post_fail (p));
+ }
+
+ {
+ float_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1.45 E2");
+ assert (test_post_fail (p));
+ }
+
+ // double
+ //
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+INF");
+ assert (test_post_fail (p));
+ }
+
+ {
+ double_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1.45 E2");
+ assert (test_post_fail (p));
+ }
+
+ // decimal
+ //
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("INF");
+ assert (test_post_fail (p));
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+INF");
+ assert (test_post_fail (p));
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-INF");
+ assert (test_post_fail (p));
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("NaN");
+ assert (test_post_fail (p));
+ }
+
+ {
+ decimal_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1.45 2");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/int/buildfile b/xsd-tests/cxx/parser/validation/built-in/int/buildfile
new file mode 100644
index 0000000..51bdf12
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/int/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/int/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
new file mode 100644
index 0000000..d31d206
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/int/driver.cxx
@@ -0,0 +1,116 @@
+// file : cxx/parser/validation/built-in/int/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in int and unsigned int types validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+ {
+ int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-2147483648");
+ p._post ();
+ assert (p.post_int () == -2147483648);
+ }
+
+ {
+ int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_int () == 0);
+ }
+
+ {
+ int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2147483647");
+ p._post ();
+ assert (p.post_int () == 2147483647);
+ }
+
+ {
+ unsigned_int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_unsigned_int () == 0);
+ }
+
+ {
+ unsigned_int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("4294967295");
+ p._post ();
+ assert (p.post_unsigned_int () == 4294967295);
+ }
+
+ // Bad
+ //
+
+ {
+ unsigned_int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-123");
+ assert (test_post_fail (p));
+ }
+
+
+ // Ranges
+ //
+ {
+ int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-2147483649");
+ assert (test_post_fail (p));
+ }
+
+ {
+ int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("2147483648");
+ assert (test_post_fail (p));
+ }
+
+ {
+ unsigned_int_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("4294967296");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/integer/buildfile b/xsd-tests/cxx/parser/validation/built-in/integer/buildfile
new file mode 100644
index 0000000..4d63a19
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/integer/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/integer/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
new file mode 100644
index 0000000..3a5fdd5
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/integer/driver.cxx
@@ -0,0 +1,303 @@
+// file : cxx/parser/validation/built-in/integer/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in integer & friends types validation.
+//
+#include <limits.h>
+
+#include <string>
+#include <sstream>
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace std;
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+
+ std::string min;
+ std::string max;
+ std::string umax;
+
+ {
+ ostringstream ostr;
+ ostr << LLONG_MIN;
+ min = ostr.str ();
+ }
+
+ {
+ ostringstream ostr;
+ ostr << LLONG_MAX;
+ max = ostr.str ();
+ }
+
+ {
+ ostringstream ostr;
+ ostr << ULLONG_MAX;
+ umax = ostr.str ();
+ }
+
+ // integer
+ //
+ {
+ integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (min.c_str ());
+ p._post ();
+ assert (p.post_integer () == LLONG_MIN);
+ }
+
+ {
+ integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_integer () == 0);
+ }
+
+ {
+ integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (max.c_str ());
+ p._post ();
+ assert (p.post_integer () == LLONG_MAX);
+ }
+
+ // negative_integer
+ //
+ {
+ negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (min.c_str ());
+ p._post ();
+ assert (p.post_negative_integer () == LLONG_MIN);
+ }
+
+ {
+ negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-1");
+ p._post ();
+ assert (p.post_negative_integer () == -1);
+ }
+
+ // non_positive_integer
+ //
+ {
+ non_positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (min.c_str ());
+ p._post ();
+ assert (p.post_non_positive_integer () == LLONG_MIN);
+ }
+
+ {
+ non_positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+0");
+ p._post ();
+ assert (p.post_non_positive_integer () == 0);
+ }
+
+ // positive_integer
+ //
+ {
+ positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1");
+ p._post ();
+ assert (p.post_positive_integer () == 1);
+ }
+
+ {
+ positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (umax.c_str ());
+ p._post ();
+ assert (p.post_positive_integer () == ULLONG_MAX);
+ }
+
+ // non_negative_integer
+ //
+ /*
+ {
+ non_negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0");
+ p._post ();
+ assert (p.post_non_negative_integer () == 0);
+ }
+ */
+
+ {
+ non_negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_non_negative_integer () == 0);
+ }
+
+ {
+ non_negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (umax.c_str ());
+ p._post ();
+ assert (p.post_non_negative_integer () == ULLONG_MAX);
+ }
+
+
+ // Bad
+ //
+
+ std::string past_min (min);
+ std::string past_max (max);
+ std::string past_umax (umax);
+
+ assert (*past_min.rbegin () != '9');
+ assert (*past_max.rbegin () != '9');
+ assert (*past_umax.rbegin () != '9');
+
+ (*past_min.rbegin ())++;
+ (*past_max.rbegin ())++;
+ (*past_umax.rbegin ())++;
+
+ // integer
+ //
+ {
+ integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (past_min.c_str ());
+ assert (test_post_fail (p));
+ }
+
+ {
+ integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (past_max.c_str ());
+ assert (test_post_fail (p));
+ }
+
+ // negative_integer
+ //
+ {
+ negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (past_min.c_str ());
+ assert (test_post_fail (p));
+ }
+
+ {
+ negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-0");
+ assert (test_post_fail (p));
+ }
+
+ {
+ negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1");
+ assert (test_post_fail (p));
+ }
+
+ // non_positive_integer
+ //
+ {
+ non_positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (past_min.c_str ());
+ assert (test_post_fail (p));
+ }
+
+ {
+ non_positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1");
+ assert (test_post_fail (p));
+ }
+
+ // positive_integer
+ //
+ {
+ positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-1");
+ assert (test_post_fail (p));
+ }
+
+ {
+ positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("+0");
+ assert (test_post_fail (p));
+ }
+
+ {
+ positive_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (past_umax.c_str ());
+ assert (test_post_fail (p));
+ }
+
+ // non_negative_integer
+ //
+ {
+ non_negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-1");
+ assert (test_post_fail (p));
+ }
+
+ {
+ non_negative_integer_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (past_umax.c_str ());
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/long/buildfile b/xsd-tests/cxx/parser/validation/built-in/long/buildfile
new file mode 100644
index 0000000..285ad70
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/long/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/long/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
new file mode 100644
index 0000000..a4ab565
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/long/driver.cxx
@@ -0,0 +1,116 @@
+// file : cxx/parser/validation/built-in/long/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in long and unsigned long types validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+ {
+ long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-9223372036854775808");
+ p._post ();
+ assert (p.post_long () == (-9223372036854775807LL - 1));
+ }
+
+ {
+ long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_long () == 0);
+ }
+
+ {
+ long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("9223372036854775807");
+ p._post ();
+ assert (p.post_long () == 9223372036854775807LL);
+ }
+
+ {
+ unsigned_long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_unsigned_long () == 0);
+ }
+
+ {
+ unsigned_long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("18446744073709551615");
+ p._post ();
+ assert (p.post_unsigned_long () == 18446744073709551615ULL);
+ }
+
+ // Bad
+ //
+
+ {
+ unsigned_long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-123");
+ assert (test_post_fail (p));
+ }
+
+
+ // Ranges
+ //
+ {
+ long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-9223372036854775809");
+ assert (test_post_fail (p));
+ }
+
+ {
+ long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("9223372036854775808");
+ assert (test_post_fail (p));
+ }
+
+ {
+ unsigned_long_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("18446744073709551616");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/qname/buildfile b/xsd-tests/cxx/parser/validation/built-in/qname/buildfile
new file mode 100644
index 0000000..47d644c
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/qname/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/qname/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
new file mode 100644
index 0000000..85acd1c
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/qname/driver.cxx
@@ -0,0 +1,105 @@
+// file : cxx/parser/validation/built-in/qname/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in QName type validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+bool
+test_post_fail (qname_pimpl<char>& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ typedef xsd::cxx::parser::qname<char> qname;
+
+ // Good.
+ //
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" xsi");
+ p._characters (":");
+ p._characters ("schemaLocation");
+ p._post ();
+ assert (p.post_qname () == qname ("xsi", "schemaLocation"));
+ }
+
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("schemaLocation");
+ p._post ();
+ assert (p.post_qname () == qname ("schemaLocation"));
+ }
+
+
+ // Bad
+ //
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ //p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (":");
+ assert (test_post_fail (p));
+ }
+
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("xsi:");
+ assert (test_post_fail (p));
+ }
+
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (":schemaLocation");
+ assert (test_post_fail (p));
+ }
+
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("x?i:schemaLocation");
+ assert (test_post_fail (p));
+ }
+
+ {
+ qname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("xsi:schema Location");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/short/buildfile b/xsd-tests/cxx/parser/validation/built-in/short/buildfile
new file mode 100644
index 0000000..782b404
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/short/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/short/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
new file mode 100644
index 0000000..7c79b22
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/short/driver.cxx
@@ -0,0 +1,116 @@
+// file : cxx/parser/validation/built-in/short/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in short and unsigned short types validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post ();
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ // Good.
+ //
+ {
+ short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-32768");
+ p._post ();
+ assert (p.post_short () == -32768);
+ }
+
+ {
+ short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_short () == 0);
+ }
+
+ {
+ short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("32767");
+ p._post ();
+ assert (p.post_short () == 32767);
+ }
+
+ {
+ unsigned_short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("0");
+ p._post ();
+ assert (p.post_unsigned_short () == 0);
+ }
+
+ {
+ unsigned_short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("65535");
+ p._post ();
+ assert (p.post_unsigned_short () == 65535);
+ }
+
+ // Bad
+ //
+
+ {
+ unsigned_short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-1234");
+ assert (test_post_fail (p));
+ }
+
+
+ // Ranges
+ //
+ {
+ short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-32769");
+ assert (test_post_fail (p));
+ }
+
+ {
+ short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("32768");
+ assert (test_post_fail (p));
+ }
+
+ {
+ unsigned_short_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("65536");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/string/buildfile b/xsd-tests/cxx/parser/validation/built-in/string/buildfile
new file mode 100644
index 0000000..83e5f7a
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/string/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/string/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
new file mode 100644
index 0000000..920385a
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/string/driver.cxx
@@ -0,0 +1,512 @@
+// file : cxx/parser/validation/built-in/string/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in string & friends types validation.
+//
+#include <string>
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+template <typename T>
+bool
+test_post_fail (T& p)
+{
+ try
+ {
+ p._post_impl (); // List implementation needs this to be post_impl.
+ }
+ catch (invalid_value<char> const&)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+int
+main ()
+{
+ typedef xsd::cxx::parser::string_sequence<char> strings;
+
+ // Good.
+ //
+
+ // string
+ //
+ {
+ string_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" aaa ");
+ p._characters ("bbb");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_string () == " \n\t aaa bbb ");
+ }
+
+ // normalized_string
+ //
+ {
+ normalized_string_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" aaa \n\t ");
+ p._characters (" bbb");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_normalized_string () == " aaa bbb ");
+ }
+
+ // token
+ //
+ {
+ token_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" aaa \n\t ");
+ p._characters (" bbb \n\t");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_token () == "aaa bbb");
+ }
+
+ // name
+ //
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" a:b-c_d123 ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_name () == "a:b-c_d123");
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" _12 ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_name () == "_12");
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" :12 ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_name () == ":12");
+ }
+
+ // nmtoken
+ //
+ {
+ nmtoken_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" 123a:b-c_d123 ");
+ p._characters (" \n\t");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_nmtoken () == "123a:b-c_d123");
+ }
+
+ // nmtokens
+ //
+ {
+ strings s;
+ s.push_back ("123");
+ s.push_back ("abc");
+
+ nmtokens_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" 123 ");
+ p._characters (" \n\t abc ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_nmtokens () == s);
+ }
+
+ // ncname
+ //
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" a.b-c_d123 ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_ncname () == "a.b-c_d123");
+ }
+
+ // id
+ //
+ {
+ id_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" a.b-c_d123 ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_id () == "a.b-c_d123");
+ }
+
+ // idref
+ //
+ {
+ idref_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" a.b-c_d123 ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_idref () == "a.b-c_d123");
+ }
+
+ // idrefs
+ //
+ {
+ strings s;
+ s.push_back ("a123");
+ s.push_back ("abc");
+
+ idrefs_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" \n\t");
+ p._characters (" a123 ");
+ p._characters (" \n\t abc ");
+ p._characters (" ");
+ p._post ();
+ assert (p.post_idrefs () == s);
+ }
+
+ // language
+ //
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" x ");
+ p._post ();
+ assert (p.post_language () == "x");
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" en ");
+ p._post ();
+ assert (p.post_language () == "en");
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" en");
+ p._characters ("-us ");
+ p._post ();
+ assert (p.post_language () == "en-us");
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("one-two-three-four44-seven77-eight888");
+ p._post ();
+ assert (p.post_language () == "one-two-three-four44-seven77-eight888");
+ }
+
+
+ // Bad
+ //
+
+ // name
+ //
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (".a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a,b");
+ assert (test_post_fail (p));
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a b");
+ assert (test_post_fail (p));
+ }
+
+ {
+ name_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a<b");
+ assert (test_post_fail (p));
+ }
+
+ // nmtoken
+ //
+ {
+ nmtoken_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ nmtoken_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a,b");
+ assert (test_post_fail (p));
+ }
+
+ {
+ nmtoken_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a b");
+ assert (test_post_fail (p));
+ }
+
+ {
+ nmtoken_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a<b");
+ assert (test_post_fail (p));
+ }
+
+ // nmtokens
+ //
+ {
+ nmtokens_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ p._characters (" \t\n ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ nmtokens_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("ab a,b");
+ assert (test_post_fail (p));
+ }
+
+ // ncname
+ //
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (".a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("-a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (":a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("1:a");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a,b");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a b");
+ assert (test_post_fail (p));
+ }
+
+ {
+ ncname_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a<b");
+ assert (test_post_fail (p));
+ }
+
+ // id
+ //
+ {
+ id_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a b");
+ assert (test_post_fail (p));
+ }
+
+ // idref
+ //
+ {
+ idref_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a b");
+ assert (test_post_fail (p));
+ }
+
+ // idrefs
+ //
+ {
+ idrefs_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ p._characters (" \t\n ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ idrefs_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("ab a<b");
+ assert (test_post_fail (p));
+ }
+
+ // language
+ //
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ assert (test_post_fail (p));
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("en-");
+ assert (test_post_fail (p));
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("a1");
+ assert (test_post_fail (p));
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("en+us");
+ assert (test_post_fail (p));
+ }
+
+ {
+ language_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("en-nine99999");
+ assert (test_post_fail (p));
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/built-in/uri/buildfile b/xsd-tests/cxx/parser/validation/built-in/uri/buildfile
new file mode 100644
index 0000000..a8fdf82
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/uri/buildfile
@@ -0,0 +1,10 @@
+# file : cxx/parser/validation/built-in/uri/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+
+exe{driver}: {hxx cxx}{*} $libs
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx b/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
new file mode 100644
index 0000000..dcc9242
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/built-in/uri/driver.cxx
@@ -0,0 +1,53 @@
+// file : cxx/parser/validation/built-in/uri/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the built-in anyURI type validation.
+//
+#include <cassert>
+
+#include <xsd/cxx/parser/validating/exceptions.hxx>
+#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>
+
+using namespace xsd::cxx::parser::validating;
+
+int
+main ()
+{
+ // Good.
+ //
+ {
+ uri_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters (" ");
+ p._post ();
+ assert (p.post_uri () == "");
+ }
+
+ {
+ uri_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("relative");
+ p._post ();
+ assert (p.post_uri () == "relative");
+ }
+
+ {
+ uri_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("#id");
+ p._post ();
+ assert (p.post_uri () == "#id");
+ }
+
+ {
+ uri_pimpl<char> p;
+ p.pre ();
+ p._pre ();
+ p._characters ("http://www.example.com/foo#bar");
+ p._post ();
+ assert (p.post_uri () == "http://www.example.com/foo#bar");
+ }
+}
diff --git a/xsd-tests/cxx/parser/validation/choice/buildfile b/xsd-tests/cxx/parser/validation/choice/buildfile
new file mode 100644
index 0000000..adf0832
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/choice/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/parser/validation/choice/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
+ testscript
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/choice/driver.cxx b/xsd-tests/cxx/parser/validation/choice/driver.cxx
new file mode 100644
index 0000000..4a52c5d
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/choice/driver.cxx
@@ -0,0 +1,126 @@
+// file : cxx/parser/validation/choice/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the choice compositor validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+using xml_schema::ro_string;
+
+struct choice_pimpl: choice_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ b (string const& v)
+ {
+ cout << " b = " << v << endl;
+ }
+
+ virtual void
+ c (string const& v)
+ {
+ cout << " c = " << v << endl;
+ }
+
+ virtual void
+ d (string const& v)
+ {
+ cout << " d = " << v << endl;
+ }
+
+ virtual void
+ _start_any_element (ro_string const& ns,
+ ro_string const& name,
+ ro_string const*)
+ {
+ cout << " any: " << ns << "#" << name << endl
+ << " {" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& v)
+ {
+ cout << " chars = " << v << endl;
+ }
+
+ virtual void
+ _end_any_element (ro_string const&, ro_string const&)
+ {
+ cout << " }" << endl;
+ }
+
+ virtual void
+ post_choice ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ choice_pimpl choice_p;
+ type_pimpl type_p;
+
+ choice_p.parsers (string_p, string_p, string_p, string_p);
+ type_p.parsers (choice_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ try
+ {
+ ifstream ifs (argv[1]);
+ type_p.pre ();
+ doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cout << " " << e << endl
+ << "}" << endl
+ << endl;
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/choice/test.xsd b/xsd-tests/cxx/parser/validation/choice/test.xsd
index 8132bbb..8132bbb 100644
--- a/tests/cxx/parser/validation/choice/test.xsd
+++ b/xsd-tests/cxx/parser/validation/choice/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/choice/testscript b/xsd-tests/cxx/parser/validation/choice/testscript
new file mode 100644
index 0000000..c5f5afa
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/choice/testscript
@@ -0,0 +1,179 @@
+# file : cxx/parser/validation/choice/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+test.arguments += test.xml
+
+: valid
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <choice>
+ <a>a</a>
+
+ <b>b</b>
+ </choice>
+
+ <choice>
+ <c>c</c>
+ <d>d</d>
+
+ <o:any>any</o:any>
+
+ <a>a</a>
+ </choice>
+
+ <choice>
+ <c>c</c>
+ <d>d</d>
+
+ <d>d</d>
+
+ <a>a</a>
+ </choice>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ a = a
+ b = b
+ }
+
+ {
+ c = c
+ d = d
+ any: other#any
+ {
+ chars = any
+ }
+ a = a
+ }
+
+ {
+ c = c
+ d = d
+ d = d
+ a = a
+ }
+
+ EOO
+}
+
+: absent1
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- invalid -->
+ <choice>
+ </choice>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ :8:12 error: expected element 'a'
+ }
+
+ EOO
+}
+
+: absent2
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- invalid -->
+ <choice>
+ <c>c</c>
+ <d>d</d>
+
+ <o:any>any</o:any>
+
+ <a>a</a>
+ <b>b</b>
+ </choice>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ c = c
+ d = d
+ any: other#any
+ {
+ chars = any
+ }
+ a = a
+ :14:8 error: unexpected element 'b'
+ }
+
+ EOO
+}
+
+: absent3
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- invalid -->
+ <choice>
+ <c>c</c>
+ </choice>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ c = c
+ :9:12 error: expected element 'd'
+ }
+
+ EOO
+}
+
+: absent4
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- invalid -->
+ <choice>
+ <x>x</x>
+ </choice>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ :8:8 error: expected element 'a' instead of 'x'
+ }
+
+ EOO
+}
diff --git a/xsd-tests/cxx/parser/validation/restriction/buildfile b/xsd-tests/cxx/parser/validation/restriction/buildfile
new file mode 100644
index 0000000..4c415bf
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/restriction/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/parser/validation/restriction/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
+ testscript
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/restriction/driver.cxx b/xsd-tests/cxx/parser/validation/restriction/driver.cxx
new file mode 100644
index 0000000..206b9f8
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/restriction/driver.cxx
@@ -0,0 +1,107 @@
+// file : cxx/parser/validation/restriction/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the restriction compositor validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+
+struct base_a_pimpl: base_a_pskel
+{
+};
+
+struct restriction_a_pimpl: restriction_a_pskel
+{
+};
+
+struct extension_b_pimpl: extension_b_pskel
+{
+};
+
+struct restriction_b_pimpl: restriction_b_pskel
+{
+};
+
+struct type_b_pimpl: type_b_pskel
+{
+};
+
+struct type_r_pimpl: type_r_pskel
+{
+};
+
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ base_a_pimpl base_a_p;
+ restriction_a_pimpl restriction_a_p;
+ extension_b_pimpl extension_b_p;
+ restriction_b_pimpl restriction_b_p;
+ type_b_pimpl type_b_p;
+ type_r_pimpl type_r_p;
+
+ base_a_p.parsers (string_p, string_p, string_p,
+ string_p, string_p, string_p);
+
+ restriction_a_p.parsers (string_p, string_p, string_p,
+ string_p, string_p, string_p);
+
+ extension_b_p.parsers (string_p, string_p, string_p,
+ string_p, string_p);
+
+ restriction_b_p.parsers (string_p, string_p, string_p,
+ string_p, string_p);
+
+ type_b_p.parsers (base_a_p, extension_b_p);
+ type_r_p.parsers (restriction_a_p, restriction_b_p);
+
+ xml_schema::document doc_b_p (type_b_p, "test", "root");
+ xml_schema::document doc_r_p (type_r_p, "test", "root");
+
+ {
+ ifstream ifs (argv[1]);
+ type_b_p.pre ();
+ doc_b_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_b_p.post_type_b ();
+ }
+
+ try
+ {
+ ifstream ifs (argv[1]);
+ type_r_p.pre ();
+ doc_r_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_r_p.post_type_r ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cout << e << endl;
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/restriction/test.xsd b/xsd-tests/cxx/parser/validation/restriction/test.xsd
index 158ded5..158ded5 100644
--- a/tests/cxx/parser/validation/restriction/test.xsd
+++ b/xsd-tests/cxx/parser/validation/restriction/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/restriction/testscript b/xsd-tests/cxx/parser/validation/restriction/testscript
new file mode 100644
index 0000000..ea5a4e8
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/restriction/testscript
@@ -0,0 +1,159 @@
+# file : cxx/parser/validation/all/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+test.arguments += test.xml
+
+: valid
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <restriction-a z="z">
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ </restriction-a>
+
+ <restriction-a x="x" y="y" z="z">
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ </restriction-a>
+
+ <restriction-b y="y">
+ <a>a</a>
+ <b>b</b>
+ </restriction-b>
+
+ <restriction-b y="y">
+ <a>a</a>
+ <c>c</c>
+ </restriction-b>
+
+ <restriction-b x="x" y="y">
+ <a>a</a>
+ </restriction-b>
+
+ </t:root>
+ EOI
+
+ $*
+}
+
+: invalid1
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- valid base but not restriction: a element -->
+ <restriction-a z="z">
+ <b>b</b>
+ <c>c</c>
+ </restriction-a>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ :7:8 error: expected element 'a' instead of 'b'
+ EOO
+}
+
+: invalid2
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- valid base but not restriction: z attribute -->
+ <restriction-a>
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ </restriction-a>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ :10:19 error: expected attribute 'z'
+ EOO
+}
+
+: invalid3
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- valid base but not restriction: sequence maxOccurs="1" -->
+ <restriction-a z="z">
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ </restriction-a>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ :11:8 error: unexpected element 'a'
+ EOO
+}
+
+: invalid4
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- valid extension but not restriction: a element -->
+ <restriction-b y="y">
+ <b>b</b>
+ </restriction-b>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ :7:8 error: expected element 'a' instead of 'b'
+ EOO
+}
+
+: invalid5
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- valid extension but not restriction: y attribute -->
+ <restriction-b>
+ <a>a</a>
+ <b>b</b>
+ </restriction-b>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ :9:19 error: expected attribute 'y'
+ EOO
+}
diff --git a/xsd-tests/cxx/parser/validation/sequence/buildfile b/xsd-tests/cxx/parser/validation/sequence/buildfile
new file mode 100644
index 0000000..b205091
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/sequence/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/parser/validation/sequence/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test-pskel} {hxx ixx cxx}{test-pskel} $libs \
+ testscript
+
+<{hxx ixx cxx}{test-pskel}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-parser --std c++11 \
+ --generate-inline \
+ --skel-file-suffix -pskel \
+ --output-dir $out_base \
+ --generate-validation \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/parser/validation/sequence/driver.cxx b/xsd-tests/cxx/parser/validation/sequence/driver.cxx
new file mode 100644
index 0000000..6b5bf70
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/sequence/driver.cxx
@@ -0,0 +1,139 @@
+// file : cxx/parser/validation/sequence/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the sequence compositor validation.
+//
+
+#include <string>
+#include <fstream>
+#include <iostream>
+
+#include "test-pskel.hxx"
+
+using namespace std;
+using namespace test;
+using xml_schema::ro_string;
+
+struct sequence_pimpl: sequence_pskel
+{
+ virtual void
+ pre ()
+ {
+ cout << "{" << endl;
+ }
+
+ virtual void
+ a (string const& v)
+ {
+ cout << " a = " << v << endl;
+ }
+
+ virtual void
+ b (string const& v)
+ {
+ cout << " b = " << v << endl;
+ }
+
+ virtual void
+ c (string const& v)
+ {
+ cout << " c = " << v << endl;
+ }
+
+ virtual void
+ d (string const& v)
+ {
+ cout << " d = " << v << endl;
+ }
+
+ virtual void
+ e (string const& v)
+ {
+ cout << " e = " << v << endl;
+ }
+
+ virtual void
+ f (string const& v)
+ {
+ cout << " f = " << v << endl;
+ }
+
+ virtual void
+ _start_any_element (ro_string const& ns,
+ ro_string const& name,
+ ro_string const*)
+ {
+ cout << " any: " << ns << "#" << name << endl
+ << " {" << endl;
+ }
+
+ virtual void
+ _any_characters (ro_string const& v)
+ {
+ cout << " chars = " << v << endl;
+ }
+
+ virtual void
+ _end_any_element (ro_string const&, ro_string const&)
+ {
+ cout << " }" << endl;
+ }
+
+ virtual void
+ post_sequence ()
+ {
+ cout << "}" << endl
+ << endl;
+ }
+};
+
+struct type_pimpl: type_pskel
+{
+};
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ xml_schema::string_pimpl string_p;
+ sequence_pimpl sequence_p;
+ type_pimpl type_p;
+
+ sequence_p.parsers (string_p, string_p, string_p,
+ string_p, string_p, string_p);
+ type_p.parsers (sequence_p);
+
+ xml_schema::document doc_p (type_p, "test", "root");
+
+ try
+ {
+ ifstream ifs (argv[1]);
+ type_p.pre ();
+ doc_p.parse (ifs, argv[1], "", xml_schema::flags::dont_validate);
+ type_p.post_type ();
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cout << " " << e << endl
+ << "}" << endl
+ << endl;
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+ catch (ios_base::failure const&)
+ {
+ cerr << "io failure" << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/parser/validation/sequence/test.xsd b/xsd-tests/cxx/parser/validation/sequence/test.xsd
index 8753f54..8753f54 100644
--- a/tests/cxx/parser/validation/sequence/test.xsd
+++ b/xsd-tests/cxx/parser/validation/sequence/test.xsd
diff --git a/xsd-tests/cxx/parser/validation/sequence/testscript b/xsd-tests/cxx/parser/validation/sequence/testscript
new file mode 100644
index 0000000..deebb9f
--- /dev/null
+++ b/xsd-tests/cxx/parser/validation/sequence/testscript
@@ -0,0 +1,328 @@
+# file : cxx/parser/validation/sequence/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+test.arguments += test.xml
+
+: valid
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <sequence>
+ <c>c</c>
+ <d>d</d>
+ <t:any>aaa<a>bbb</a>ccc</t:any>
+ <f>f</f>
+ <e>e</e>
+ </sequence>
+
+ <sequence>
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ <d>d</d>
+ <d>d</d>
+ <d>d</d>
+ <o:any>any</o:any>
+ <f>f</f>
+ <e>e</e>
+ <e>e</e>
+ </sequence>
+
+ <sequence>
+ <a>a</a>
+ <b>b</b>
+ <c>c</c>
+ <d>d</d>
+ <d>d</d>
+ <d>d</d>
+ <o:any>any</o:any>
+ <f>f</f>
+ <e>e</e>
+ <e>e</e>
+
+ <c>c</c>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ c = c
+ d = d
+ any: test#any
+ {
+ chars = aaa
+ any: #a
+ {
+ chars = bbb
+ }
+ chars = ccc
+ }
+ f = f
+ e = e
+ }
+
+ {
+ a = a
+ b = b
+ c = c
+ d = d
+ d = d
+ d = d
+ any: other#any
+ {
+ chars = any
+ }
+ f = f
+ e = e
+ e = e
+ }
+
+ {
+ a = a
+ b = b
+ c = c
+ d = d
+ d = d
+ d = d
+ any: other#any
+ {
+ chars = any
+ }
+ f = f
+ e = e
+ e = e
+ c = c
+ d = d
+ any: test#any
+ {
+ chars = any
+ }
+ f = f
+ e = e
+ }
+
+ EOO
+}
+
+: invalid1
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- fail minOccurs="1" -->
+ <sequence>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ :8:14 error: expected element 'a'
+ }
+
+ EOO
+}
+
+: invalid2
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- fail maxOccurs="2" -->
+ <sequence>
+ <c>c</c>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+
+ <c>c</c>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+
+ <c>c</c>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ c = c
+ d = d
+ any: test#any
+ {
+ chars = any
+ }
+ f = f
+ e = e
+ c = c
+ d = d
+ any: test#any
+ {
+ chars = any
+ }
+ f = f
+ e = e
+ :20:8 error: unexpected element 'c'
+ }
+
+ EOO
+}
+
+: invalid3
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- fail a maxOccurs="1" -->
+ <sequence>
+ <a>a</a>
+ <a>a</a>
+ <c>c</c>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ a = a
+ :9:8 error: expected element 'b' instead of 'a'
+ }
+
+ EOO
+}
+
+: invalid4
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- fail c minOccurs="1" -->
+ <sequence>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ :8:8 error: expected element 'a' instead of 'd'
+ }
+
+ EOO
+}
+
+: invalid5
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o1="other1"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- fail any namespace="##targetNamespace other" -->
+ <sequence>
+ <c>c</c>
+ <d>d</d>
+ <o1:any>any</o1:any>
+ <f>f</f>
+ <e>e</e>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ c = c
+ d = d
+ :10:13 error: expected element '##targetNamespace#*' instead of 'other1#any'
+ }
+
+ EOO
+}
+
+: invalid6
+:
+{
+ cat <<EOI >=test.xml;
+ <t:root xmlns:t="test"
+ xmlns:o="other"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="test test.xsd">
+
+ <!-- fail e maxOccurs="2" -->
+ <sequence>
+ <c>c</c>
+ <d>d</d>
+ <t:any>any</t:any>
+ <f>f</f>
+ <e>e</e>
+ <e>e</e>
+ <e>e</e>
+ </sequence>
+
+ </t:root>
+ EOI
+
+ $* >>EOO
+ {
+ c = c
+ d = d
+ any: test#any
+ {
+ chars = any
+ }
+ f = f
+ e = e
+ e = e
+ :14:8 error: unexpected element 'e'
+ }
+
+ EOO
+}
diff --git a/xsd-tests/cxx/tree/any-type/buildfile b/xsd-tests/cxx/tree/any-type/buildfile
new file mode 100644
index 0000000..c65c403
--- /dev/null
+++ b/xsd-tests/cxx/tree/any-type/buildfile
@@ -0,0 +1,26 @@
+# file : cxx/tree/any-type/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-any-type \
+ --generate-ostream \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/any-type/driver.cxx b/xsd-tests/cxx/tree/any-type/driver.cxx
new file mode 100644
index 0000000..a8fccf6
--- /dev/null
+++ b/xsd-tests/cxx/tree/any-type/driver.cxx
@@ -0,0 +1,144 @@
+// file : cxx/tree/any-type/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test anyType and anySimpleType content extraction.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <utility> // std::move
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx" // Get XSD_CXX11 defined.
+
+#include <xsd/cxx/xml/string.hxx>
+
+using namespace std;
+using namespace test;
+using namespace xercesc;
+
+namespace xml = xsd::cxx::xml;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Test parsing
+ //
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ // Test API.
+ //
+ {
+ assert (type::a_default_value ().text_content () == "default value");
+ }
+
+ {
+ xml_schema::simple_type x ("fox");
+ assert (x.text_content () == "fox");
+ x.text_content ("foo");
+ assert (x.text_content () == "foo");
+ x.text_content ().clear ();
+ assert (x.text_content () == "");
+ x.text_content () = "baz";
+ r->s ().push_back (x);
+ }
+
+ {
+ xml_schema::type x;
+
+ DOMDocument& doc (x.dom_content_document ());
+
+ // Copy.
+ //
+ DOMElement* e (doc.createElement (xml::string ("dummy").c_str ()));
+ e->setAttribute (xml::string ("x").c_str (),
+ xml::string ("foo").c_str ());
+ e->setTextContent (xml::string ("data").c_str ());
+ x.dom_content ().set (*e);
+ e->release ();
+
+ r->t ().push_back (x);
+ }
+
+ {
+ XSD_AUTO_PTR<xml_schema::type> x (new xml_schema::type);
+
+ DOMDocument& doc (x->dom_content_document ());
+
+ // Assume ownership.
+ //
+ DOMElement* e (doc.createElement (xml::string ("dummy").c_str ()));
+ e->setAttribute (xml::string ("x").c_str (),
+ xml::string ("foo").c_str ());
+ e->setTextContent (xml::string ("data").c_str ());
+ x->dom_content ().set (e);
+
+#ifdef XSD_CXX11
+ r->t ().push_back (std::move (x));
+#else
+ r->t ().push_back (x);
+#endif
+ }
+
+ // Test printing.
+ //
+ cout << *r << endl
+ << endl;
+
+ // Test serialization.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["t"].name = "test";
+ map["t"].schema = "test.xsd";
+ map["o"].name = "other";
+
+ stringstream iostr;
+ root (iostr, *r, map);
+
+ cout << iostr.str () << endl
+ << endl;
+
+ {
+ XSD_AUTO_PTR<type> r1 (root (iostr, argv[1]));
+
+ // Xerces-C++ mis-indentation of mixed content messes this up.
+ // assert (*r == *r);
+
+ stringstream iostr;
+ root (iostr, *r1, map);
+
+ cout << iostr.str () << endl
+ << endl;
+ }
+
+ // Test comparison.
+ //
+ assert (*r == *r);
+
+ // Test copy c-tor.
+ //
+ type copy (*r);
+ assert (copy == *r);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/any-type/output b/xsd-tests/cxx/tree/any-type/output
index 580e7db..580e7db 100644
--- a/tests/cxx/tree/any-type/output
+++ b/xsd-tests/cxx/tree/any-type/output
diff --git a/tests/cxx/tree/any-type/test.xml b/xsd-tests/cxx/tree/any-type/test.xml
index 7c9035a..7c9035a 100644
--- a/tests/cxx/tree/any-type/test.xml
+++ b/xsd-tests/cxx/tree/any-type/test.xml
diff --git a/tests/cxx/tree/any-type/test.xsd b/xsd-tests/cxx/tree/any-type/test.xsd
index 37dcc8d..37dcc8d 100644
--- a/tests/cxx/tree/any-type/test.xsd
+++ b/xsd-tests/cxx/tree/any-type/test.xsd
diff --git a/xsd-tests/cxx/tree/binary/cdr/buildfile b/xsd-tests/cxx/tree/binary/cdr/buildfile
new file mode 100644
index 0000000..7a1c5b4
--- /dev/null
+++ b/xsd-tests/cxx/tree/binary/cdr/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/binary/cdr/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libace%lib{ACE}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-insertion 'ACE_OutputCDR' \
+ --generate-extraction 'ACE_InputCDR' \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/tests/cxx/tree/binary/cdr/driver.cxx b/xsd-tests/cxx/tree/binary/cdr/driver.cxx
index fe74bb5..fe74bb5 100644
--- a/tests/cxx/tree/binary/cdr/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/cdr/driver.cxx
diff --git a/tests/cxx/tree/binary/cdr/test.xml b/xsd-tests/cxx/tree/binary/cdr/test.xml
index 5cedd98..5cedd98 100644
--- a/tests/cxx/tree/binary/cdr/test.xml
+++ b/xsd-tests/cxx/tree/binary/cdr/test.xml
diff --git a/tests/cxx/tree/binary/cdr/test.xsd b/xsd-tests/cxx/tree/binary/cdr/test.xsd
index 0629e94..0629e94 100644
--- a/tests/cxx/tree/binary/cdr/test.xsd
+++ b/xsd-tests/cxx/tree/binary/cdr/test.xsd
diff --git a/xsd-tests/cxx/tree/binary/polymorphic/buildfile b/xsd-tests/cxx/tree/binary/polymorphic/buildfile
new file mode 100644
index 0000000..d34ef27
--- /dev/null
+++ b/xsd-tests/cxx/tree/binary/polymorphic/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/binary/polymorphic/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+import libs += libace%lib{ACE}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-polymorphic \
+ --root-element-last \
+ --generate-insertion 'ACE_OutputCDR' \
+ --generate-extraction 'ACE_InputCDR' \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/tests/cxx/tree/binary/polymorphic/driver.cxx b/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
index 15ebf17..15ebf17 100644
--- a/tests/cxx/tree/binary/polymorphic/driver.cxx
+++ b/xsd-tests/cxx/tree/binary/polymorphic/driver.cxx
diff --git a/tests/cxx/tree/binary/polymorphic/test.xml b/xsd-tests/cxx/tree/binary/polymorphic/test.xml
index ad3a403..ad3a403 100644
--- a/tests/cxx/tree/binary/polymorphic/test.xml
+++ b/xsd-tests/cxx/tree/binary/polymorphic/test.xml
diff --git a/tests/cxx/tree/binary/polymorphic/test.xsd b/xsd-tests/cxx/tree/binary/polymorphic/test.xsd
index 8c214e5..8c214e5 100644
--- a/tests/cxx/tree/binary/polymorphic/test.xsd
+++ b/xsd-tests/cxx/tree/binary/polymorphic/test.xsd
diff --git a/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile b/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
new file mode 100644
index 0000000..09414c7
--- /dev/null
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/buildfile
@@ -0,0 +1,28 @@
+# file : cxx/tree/binary/xdr-ordered/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+if ($cxx.target.class == 'linux')
+ import libs += libtirpc%lib{tirpc}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-insertion 'XDR' \
+ --generate-extraction 'XDR' \
+ --generate-comparison \
+ --ordered-type-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx b/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
new file mode 100644
index 0000000..d61a645
--- /dev/null
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/driver.cxx
@@ -0,0 +1,206 @@
+// file : tests/cxx/tree/binary/xdr-ordered/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test non-polymorphic ordered binary serialization to XDR.
+//
+// Note: just a copy of xdr test with --ordered-type-all option.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <cstring> // std::memcpy
+#include <cassert>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+extern "C" int
+overflow (void* p, char* buf, int in)
+{
+ xml_schema::buffer* dst (reinterpret_cast<xml_schema::buffer*> (p));
+
+ size_t n (static_cast<size_t> (in)), size (dst->size ());
+ dst->size (size + n);
+ memcpy (dst->data () + size, buf, n);
+
+ return static_cast<int> (n);
+}
+
+struct underflow_info
+{
+ xml_schema::buffer* buf;
+ std::size_t pos;
+};
+
+extern "C" int
+underflow (void* p, char* buf, int in)
+{
+ underflow_info* ui (reinterpret_cast<underflow_info*> (p));
+
+ size_t n (static_cast<size_t> (in)), size (ui->buf->size () - ui->pos);
+ n = size > n ? n : size;
+
+ memcpy (buf, ui->buf->data () + ui->pos, n);
+ ui->pos += n;
+
+ return static_cast<int> (n);
+}
+
+// The xdrrec_create function (used below) has slightly different
+// prototypes on different platforms. To make this test portable
+// we will need to cast the actual function to the following common
+// prototype.
+//
+extern "C"
+typedef void (*xdrrec_create_p) (
+ XDR*,
+ unsigned int write_size,
+ unsigned int read_size,
+ void* user_data,
+ int (*read) (void* user_data, char* buf, int n),
+ int (*write) (void* user_data, char* buf, int n));
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ xdrrec_create_p xdrrec_create_ =
+ reinterpret_cast<xdrrec_create_p> (::xdrrec_create);
+
+ // Save to an XDR stream.
+ //
+ XDR xdr;
+ xml_schema::buffer buf;
+ xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&buf), 0, &overflow);
+ xdr.x_op = XDR_ENCODE;
+ xsd::cxx::tree::ostream<XDR> oxdr (xdr);
+ oxdr << *r;
+ xdrrec_endofrecord (&xdr, true); // flush the data
+ xdr_destroy (&xdr);
+
+ // Load from an XDR stream.
+ //
+ underflow_info ui;
+ ui.buf = &buf;
+ ui.pos = 0;
+ xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&ui), &underflow, 0);
+ xdr.x_op = XDR_DECODE;
+ xdrrec_skiprecord (&xdr);
+ xsd::cxx::tree::istream<XDR> ixdr (xdr);
+ XSD_AUTO_PTR<type> c (new type (ixdr));
+ xdr_destroy (&xdr);
+
+ // Compare the two.
+ //
+ assert (r->list () == c->list ());
+ assert (r->union_ () == c->union_ ());
+ assert (r->enumeration () == c->enumeration ());
+
+ type::complex_sequence rs (r->complex ()), cs (c->complex ());
+
+ for (type::complex_iterator ri (rs.begin ()), ci (cs.begin ());
+ ri != rs.end () && ci != rs.end (); ++ri, ++ci)
+ {
+ assert (ri->a () == ci->a ());
+ if (ri->b ())
+ assert (ri->b () == ci->b ());
+ assert (ri->c () == ci->c ());
+
+ assert (ri->x () == ci->x ());
+ if (ri->y ())
+ assert (ri->y () == ci->y ());
+ }
+
+ // integers
+ //
+ assert (r->byte () == c->byte ());
+ assert (r->unsigned_byte () == c->unsigned_byte ());
+ assert (r->short_ () == c->short_ ());
+ assert (r->unsigned_short () == c->unsigned_short ());
+ assert (r->int_ () == c->int_ ());
+ assert (r->unsigned_int () == c->unsigned_int ());
+ assert (r->long_ () == c->long_ ());
+ assert (r->unsigned_long () == c->unsigned_long ());
+ assert (r->integer () == c->integer ());
+ assert (r->non_positive_integer () == c->non_positive_integer ());
+ assert (r->non_negative_integer () == c->non_negative_integer ());
+ assert (r->positive_integer () == c->positive_integer ());
+ assert (r->negative_integer () == c->negative_integer ());
+
+ // boolean
+ //
+ assert (r->boolean () == c->boolean ());
+
+ // floats
+ //
+ assert (r->float_ () == c->float_ ());
+ assert (r->double_ () == c->double_ ());
+ assert (r->decimal () == c->decimal ());
+
+ // strings
+ //
+ assert (r->string () == c->string ());
+ assert (r->normalized_string () == c->normalized_string ());
+ assert (r->token () == c->token ());
+ assert (r->name () == c->name ());
+ assert (r->name_token () == c->name_token ());
+ assert (r->name_tokens () == c->name_tokens ());
+ assert (r->ncname () == c->ncname ());
+ assert (r->language () == c->language ());
+
+ // qualified name
+ //
+ assert (r->qname () == c->qname ());
+
+ // ID/IDREF
+ //
+ assert (r->id () == c->id ());
+ assert (r->id_ref () == c->id_ref ());
+ assert (r->id_refs () == c->id_refs ());
+
+ // URI
+ //
+ assert (r->any_uri () == c->any_uri ());
+
+ // binary
+ //
+ assert (r->base64_binary () == c->base64_binary ());
+ assert (r->hex_binary () == c->hex_binary ());
+
+ // date/time
+ //
+ assert (r->date () == c->date ());
+ assert (r->date_time () == c->date_time ());
+ assert (r->duration () == c->duration ());
+ assert (r->day () == c->day ());
+ assert (r->month () == c->month ());
+ assert (r->month_day () == c->month_day ());
+ assert (r->year () == c->year ());
+ assert (r->year_month () == c->year_month ());
+ assert (r->time () == c->time ());
+
+ // anySimpleType
+ //
+ assert (!r->any_simple_type_attr ().text_content ().empty ());
+ assert (r->any_simple_type_attr () == c->any_simple_type_attr ());
+
+ assert (!r->any_simple_type ().text_content ().empty ());
+ assert (r->any_simple_type () == c->any_simple_type ());
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/binary/xdr-ordered/test.xml b/xsd-tests/cxx/tree/binary/xdr-ordered/test.xml
index 5cedd98..5cedd98 100644
--- a/tests/cxx/tree/binary/xdr-ordered/test.xml
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/test.xml
diff --git a/tests/cxx/tree/binary/xdr-ordered/test.xsd b/xsd-tests/cxx/tree/binary/xdr-ordered/test.xsd
index 0629e94..0629e94 100644
--- a/tests/cxx/tree/binary/xdr-ordered/test.xsd
+++ b/xsd-tests/cxx/tree/binary/xdr-ordered/test.xsd
diff --git a/xsd-tests/cxx/tree/binary/xdr/buildfile b/xsd-tests/cxx/tree/binary/xdr/buildfile
new file mode 100644
index 0000000..b8fc2f4
--- /dev/null
+++ b/xsd-tests/cxx/tree/binary/xdr/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/binary/xdr/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+if ($cxx.target.class == 'linux')
+ import libs += libtirpc%lib{tirpc}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-insertion 'XDR' \
+ --generate-extraction 'XDR' \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/binary/xdr/driver.cxx b/xsd-tests/cxx/tree/binary/xdr/driver.cxx
new file mode 100644
index 0000000..04606ea
--- /dev/null
+++ b/xsd-tests/cxx/tree/binary/xdr/driver.cxx
@@ -0,0 +1,204 @@
+// file : tests/cxx/tree/binary/xdr/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test non-polymorphic binary serialization to XDR.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <cstring> // std::memcpy
+#include <cassert>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+extern "C" int
+overflow (void* p, char* buf, int in)
+{
+ xml_schema::buffer* dst (reinterpret_cast<xml_schema::buffer*> (p));
+
+ size_t n (static_cast<size_t> (in)), size (dst->size ());
+ dst->size (size + n);
+ memcpy (dst->data () + size, buf, n);
+
+ return static_cast<int> (n);
+}
+
+struct underflow_info
+{
+ xml_schema::buffer* buf;
+ std::size_t pos;
+};
+
+extern "C" int
+underflow (void* p, char* buf, int in)
+{
+ underflow_info* ui (reinterpret_cast<underflow_info*> (p));
+
+ size_t n (static_cast<size_t> (in)), size (ui->buf->size () - ui->pos);
+ n = size > n ? n : size;
+
+ memcpy (buf, ui->buf->data () + ui->pos, n);
+ ui->pos += n;
+
+ return static_cast<int> (n);
+}
+
+// The xdrrec_create function (used below) has slightly different
+// prototypes on different platforms. To make this test portable
+// we will need to cast the actual function to the following common
+// prototype.
+//
+extern "C"
+typedef void (*xdrrec_create_p) (
+ XDR*,
+ unsigned int write_size,
+ unsigned int read_size,
+ void* user_data,
+ int (*read) (void* user_data, char* buf, int n),
+ int (*write) (void* user_data, char* buf, int n));
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ xdrrec_create_p xdrrec_create_ =
+ reinterpret_cast<xdrrec_create_p> (::xdrrec_create);
+
+ // Save to an XDR stream.
+ //
+ XDR xdr;
+ xml_schema::buffer buf;
+ xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&buf), 0, &overflow);
+ xdr.x_op = XDR_ENCODE;
+ xsd::cxx::tree::ostream<XDR> oxdr (xdr);
+ oxdr << *r;
+ xdrrec_endofrecord (&xdr, true); // flush the data
+ xdr_destroy (&xdr);
+
+ // Load from an XDR stream.
+ //
+ underflow_info ui;
+ ui.buf = &buf;
+ ui.pos = 0;
+ xdrrec_create_ (&xdr, 0, 0, reinterpret_cast<char*> (&ui), &underflow, 0);
+ xdr.x_op = XDR_DECODE;
+ xdrrec_skiprecord (&xdr);
+ xsd::cxx::tree::istream<XDR> ixdr (xdr);
+ XSD_AUTO_PTR<type> c (new type (ixdr));
+ xdr_destroy (&xdr);
+
+ // Compare the two.
+ //
+ assert (r->list () == c->list ());
+ assert (r->union_ () == c->union_ ());
+ assert (r->enumeration () == c->enumeration ());
+
+ type::complex_sequence rs (r->complex ()), cs (c->complex ());
+
+ for (type::complex_iterator ri (rs.begin ()), ci (cs.begin ());
+ ri != rs.end () && ci != rs.end (); ++ri, ++ci)
+ {
+ assert (ri->a () == ci->a ());
+ if (ri->b ())
+ assert (ri->b () == ci->b ());
+ assert (ri->c () == ci->c ());
+
+ assert (ri->x () == ci->x ());
+ if (ri->y ())
+ assert (ri->y () == ci->y ());
+ }
+
+ // integers
+ //
+ assert (r->byte () == c->byte ());
+ assert (r->unsigned_byte () == c->unsigned_byte ());
+ assert (r->short_ () == c->short_ ());
+ assert (r->unsigned_short () == c->unsigned_short ());
+ assert (r->int_ () == c->int_ ());
+ assert (r->unsigned_int () == c->unsigned_int ());
+ assert (r->long_ () == c->long_ ());
+ assert (r->unsigned_long () == c->unsigned_long ());
+ assert (r->integer () == c->integer ());
+ assert (r->non_positive_integer () == c->non_positive_integer ());
+ assert (r->non_negative_integer () == c->non_negative_integer ());
+ assert (r->positive_integer () == c->positive_integer ());
+ assert (r->negative_integer () == c->negative_integer ());
+
+ // boolean
+ //
+ assert (r->boolean () == c->boolean ());
+
+ // floats
+ //
+ assert (r->float_ () == c->float_ ());
+ assert (r->double_ () == c->double_ ());
+ assert (r->decimal () == c->decimal ());
+
+ // strings
+ //
+ assert (r->string () == c->string ());
+ assert (r->normalized_string () == c->normalized_string ());
+ assert (r->token () == c->token ());
+ assert (r->name () == c->name ());
+ assert (r->name_token () == c->name_token ());
+ assert (r->name_tokens () == c->name_tokens ());
+ assert (r->ncname () == c->ncname ());
+ assert (r->language () == c->language ());
+
+ // qualified name
+ //
+ assert (r->qname () == c->qname ());
+
+ // ID/IDREF
+ //
+ assert (r->id () == c->id ());
+ assert (r->id_ref () == c->id_ref ());
+ assert (r->id_refs () == c->id_refs ());
+
+ // URI
+ //
+ assert (r->any_uri () == c->any_uri ());
+
+ // binary
+ //
+ assert (r->base64_binary () == c->base64_binary ());
+ assert (r->hex_binary () == c->hex_binary ());
+
+ // date/time
+ //
+ assert (r->date () == c->date ());
+ assert (r->date_time () == c->date_time ());
+ assert (r->duration () == c->duration ());
+ assert (r->day () == c->day ());
+ assert (r->month () == c->month ());
+ assert (r->month_day () == c->month_day ());
+ assert (r->year () == c->year ());
+ assert (r->year_month () == c->year_month ());
+ assert (r->time () == c->time ());
+
+ // anySimpleType
+ //
+ assert (!r->any_simple_type_attr ().text_content ().empty ());
+ assert (r->any_simple_type_attr () == c->any_simple_type_attr ());
+
+ assert (!r->any_simple_type ().text_content ().empty ());
+ assert (r->any_simple_type () == c->any_simple_type ());
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/binary/xdr/test.xml b/xsd-tests/cxx/tree/binary/xdr/test.xml
index 5cedd98..5cedd98 100644
--- a/tests/cxx/tree/binary/xdr/test.xml
+++ b/xsd-tests/cxx/tree/binary/xdr/test.xml
diff --git a/tests/cxx/tree/binary/xdr/test.xsd b/xsd-tests/cxx/tree/binary/xdr/test.xsd
index 0629e94..0629e94 100644
--- a/tests/cxx/tree/binary/xdr/test.xsd
+++ b/xsd-tests/cxx/tree/binary/xdr/test.xsd
diff --git a/xsd-tests/cxx/tree/buildfile b/xsd-tests/cxx/tree/buildfile
new file mode 100644
index 0000000..cfaf0bd
--- /dev/null
+++ b/xsd-tests/cxx/tree/buildfile
@@ -0,0 +1,6 @@
+# file : cxx/tree/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Exclude tests which depend on not yet packaged libraries.
+#
+./: {*/ -binary/}
diff --git a/xsd-tests/cxx/tree/built-in/.gitignore b/xsd-tests/cxx/tree/built-in/.gitignore
new file mode 100644
index 0000000..f86b7a2
--- /dev/null
+++ b/xsd-tests/cxx/tree/built-in/.gitignore
@@ -0,0 +1 @@
+types.?xx
diff --git a/xsd-tests/cxx/tree/built-in/buildfile b/xsd-tests/cxx/tree/built-in/buildfile
new file mode 100644
index 0000000..8ee8585
--- /dev/null
+++ b/xsd-tests/cxx/tree/built-in/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/build-in/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -types} {hxx ixx cxx}{types} $libs testscript
+
+<{hxx ixx cxx}{types}>: xsd{types} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --generate-serialization \
+ --char-type char \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/built-in/driver.cxx b/xsd-tests/cxx/tree/built-in/driver.cxx
new file mode 100644
index 0000000..4141290
--- /dev/null
+++ b/xsd-tests/cxx/tree/built-in/driver.cxx
@@ -0,0 +1,93 @@
+// file : cxx/tree/built-in/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test built-in type mapping.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <sstream>
+#include <iostream>
+
+
+#include "types.hxx"
+
+using std::cerr;
+using std::endl;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 4)
+ {
+ cerr << "usage: " << argv[0] << " elements.xml attributes.xml inherited.xml" << endl;
+ return 1;
+ }
+
+ XSD_AUTO_PTR<xmlns::test::Elements> elements (
+ xmlns::test::elements (argv[1]));
+
+ XSD_AUTO_PTR<xmlns::test::Attributes> attributes (
+ xmlns::test::attributes (argv[2]));
+
+ XSD_AUTO_PTR<xmlns::test::Inherited> inherited (
+ xmlns::test::inherited (argv[3]));
+
+ cerr << "elements:" << *elements << endl
+ << endl
+ << "attributes:" << *attributes << endl
+ << endl
+ << "inherited:" << *inherited << endl;
+
+ // Test parsing/serialization.
+ //
+
+ xml_schema::namespace_infomap map;
+
+ map["test"].name = "http://www.codesynthesis.com/xmlns/test";
+ map["test"].schema = "types.xsd";
+
+ {
+ std::ostringstream ostr;
+ xmlns::test::elements (ostr, *elements, map);
+
+ std::istringstream istr (ostr.str ());
+ XSD_AUTO_PTR<xmlns::test::Elements> elements1 (
+ xmlns::test::elements (istr));
+
+ std::ostringstream ostr1;
+ xmlns::test::elements (ostr1, *elements1, map);
+
+ if (ostr.str () != ostr1.str ())
+ return 1;
+ }
+
+ {
+ std::ostringstream ostr;
+ xmlns::test::attributes (ostr, *attributes, map);
+
+ std::istringstream istr (ostr.str ());
+ XSD_AUTO_PTR<xmlns::test::Attributes> attributes1 (
+ xmlns::test::attributes (istr));
+
+ std::ostringstream ostr1;
+ xmlns::test::attributes (ostr1, *attributes1, map);
+
+ if (ostr.str () != ostr1.str ())
+ return 1;
+ }
+
+ {
+ std::ostringstream ostr;
+ xmlns::test::inherited (ostr, *inherited, map);
+
+ std::istringstream istr (ostr.str ());
+ XSD_AUTO_PTR<xmlns::test::Inherited> inherited1 (
+ xmlns::test::inherited (istr));
+
+ std::ostringstream ostr1;
+ xmlns::test::inherited (ostr1, *inherited1, map);
+
+ if (ostr.str () != ostr1.str ())
+ return 1;
+ }
+}
diff --git a/xsd-tests/cxx/tree/built-in/testscript b/xsd-tests/cxx/tree/built-in/testscript
new file mode 100644
index 0000000..4dae039
--- /dev/null
+++ b/xsd-tests/cxx/tree/built-in/testscript
@@ -0,0 +1,394 @@
+# file : cxx/tree/any-type/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: types
+:
+{
+ cat <<EOI >=elements.xml;
+ <?xml version="1.0" encoding="UTF-8"?>
+ <test:elements
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd">
+
+ <!-- integers -->
+ <byte>65</byte>
+ <unsigned_byte>66</unsigned_byte>
+ <short>-222</short>
+ <unsigned_short>57005</unsigned_short>
+ <int>-57005</int>
+ <unsigned_int>3735928559</unsigned_int>
+ <long>-3735928559</long>
+ <unsigned_long>16045690984833335023</unsigned_long>
+ <integer>-3735928559</integer>
+ <non_positive_integer>-3735928559</non_positive_integer>
+ <non_negative_integer>3735928559</non_negative_integer>
+ <positive_integer>3735928559</positive_integer>
+ <negative_integer>-3735928559</negative_integer>
+
+
+ <!-- boolean -->
+ <boolean>true</boolean>
+
+
+ <!-- floats -->
+ <float>1234.1234</float>
+ <double>12345678.12345678</double>
+ <decimal>12345678.12345678</decimal>
+
+
+ <!-- strings -->
+ <string>string</string>
+ <normalized_string>normalized
+ string</normalized_string>
+ <token>
+ one
+ two three </token>
+ <name>name</name>
+ <name_token>name-token</name_token>
+ <name_tokens>name tokens</name_tokens>
+ <ncname>ncname</ncname>
+ <language>en-us</language>
+
+ <!-- qualified name -->
+ <qname>xsi:schemaLocation</qname>
+
+
+ <!-- ID/IDREF -->
+ <id>elements1</id>
+ <id>elements2</id>
+ <id_ref>elements1</id_ref>
+ <id_refs>elements1 elements2</id_refs>
+
+
+ <!-- URI -->
+ <any_uri>http://www.codesynthesis.com</any_uri>
+
+
+ <!-- binary -->
+ <base64_binary>YmFzZTY0IGJpbmFyeQ==</base64_binary>
+ <hex_binary>6865782052696E617279</hex_binary>
+
+
+ <!-- date/time -->
+ <date>2001-10-26+02:00</date>
+ <date_time>2001-10-26T21:32:52+02:00</date_time>
+ <duration>P1Y2M3DT5H20M30S</duration>
+ <day>---01+02:00</day>
+ <month>--11+02:00</month>
+ <month_day>--11-02+02:00</month_day>
+ <year>2001+02:00</year>
+ <year_month>2001-11+02:00</year_month>
+ <time>21:32:52+02:00</time>
+
+
+ <!-- entity -->
+ <!--
+ <entity>foo</entity>
+ <entities>foo bar</entities>
+ -->
+
+ </test:elements>
+ EOI
+
+ cat <<EOI >=attributes.xml;
+ <?xml version="1.0" encoding="UTF-8"?>
+ <test:attributes
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd"
+
+
+ byte="65"
+ unsigned_byte="66"
+ short="-222"
+ unsigned_short="57005"
+ int="-57005"
+ unsigned_int="3735928559"
+ long="-3735928559"
+ unsigned_long="16045690984833335023"
+ integer="-3735928559"
+ non_positive_integer="-3735928559"
+ non_negative_integer="3735928559"
+ positive_integer="3735928559"
+ negative_integer="-3735928559"
+
+
+
+ boolean="false"
+
+
+
+ float="1234.1234"
+ double="12345678.12345678"
+ decimal="12345678.12345678"
+
+
+
+ string="string"
+ normalized_string="normalized string"
+ token=" one two three "
+ name="name"
+ name_token="name-token"
+ name_tokens="name tokens"
+ ncname="ncname"
+ language="en-us"
+
+
+ qname="xsi:schemaLocation"
+
+
+
+ id="attributes"
+ id_ref="attributes"
+ id_refs="attributes"
+
+
+
+ any_uri="http://www.codesynthesis.com"
+
+
+
+ base64_binary="YmFzZTY0IGJpbmFyeQ=="
+ hex_binary="6865782052696E617279"
+
+
+
+ date="2001-10-26+02:00"
+ date_time="2001-10-26T21:32:52+02:00"
+ duration="P1Y2M3DT5H20M30S"
+ day="---01+02:00"
+ month="--11+02:00"
+ month_day="--11-02+02:00"
+ year="2001+02:00"
+ year_month="2001-11+02:00"
+ time="21:32:52+02:00"
+
+ />
+ EOI
+
+ cat <<EOI >=inherited.xml;
+ <?xml version="1.0" encoding="UTF-8"?>
+ <test:inherited
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.codesynthesis.com/xmlns/test types.xsd">
+
+ <!-- integers -->
+ <byte>65</byte>
+ <unsigned_byte>66</unsigned_byte>
+ <short>-222</short>
+ <unsigned_short>57005</unsigned_short>
+ <int>-57005</int>
+ <unsigned_int>3735928559</unsigned_int>
+ <long>-3735928559</long>
+ <unsigned_long>16045690984833335023</unsigned_long>
+ <integer>-3735928559</integer>
+ <non_positive_integer>-3735928559</non_positive_integer>
+ <non_negative_integer>3735928559</non_negative_integer>
+ <positive_integer>3735928559</positive_integer>
+ <negative_integer>-3735928559</negative_integer>
+
+
+ <!-- boolean -->
+ <boolean>true</boolean>
+
+
+ <!-- floats -->
+ <float>1234.1234</float>
+ <double>12345678.12345678</double>
+ <decimal>12345678.12345678</decimal>
+
+
+ <!-- strings -->
+ <string>string</string>
+ <normalized_string>normalized
+ string</normalized_string>
+ <token>
+ one
+ two three </token>
+ <name>name</name>
+ <name_token>name-token</name_token>
+ <name_tokens>name tokens</name_tokens>
+ <ncname>ncname</ncname>
+ <language>en-us</language>
+
+ <!-- qualified name -->
+ <qname>xsi:schemaLocation</qname>
+
+
+ <!-- ID/IDREF -->
+ <id>elements1</id>
+ <id>elements2</id>
+ <id_ref>elements1</id_ref>
+ <id_refs>elements1 elements2</id_refs>
+
+
+ <!-- URI -->
+ <any_uri>http://www.codesynthesis.com</any_uri>
+
+
+ <!-- binary -->
+ <base64_binary>YmFzZTY0IGJpbmFyeQ==</base64_binary>
+ <hex_binary>6865782052696E617279</hex_binary>
+
+
+ <!-- date/time -->
+ <date>2001-10-26+02:00</date>
+ <date_time>2001-10-26T21:32:52+02:00</date_time>
+ <duration>P1Y2M3DT5H20M30S</duration>
+ <day>---01+02:00</day>
+ <month>--11+02:00</month>
+ <month_day>--11-02+02:00</month_day>
+ <year>2001+02:00</year>
+ <year_month>2001-11+02:00</year_month>
+ <time>21:32:52+02:00</time>
+
+
+ <!-- entity -->
+ <!--
+ <entity>foo</entity>
+ <entities>foo bar</entities>
+ -->
+
+ </test:inherited>
+ EOI
+
+ ln -s $src_base/types.xsd ./;
+
+ $* elements.xml attributes.xml inherited.xml 2>>EOE
+ elements:
+ byte: A
+ unsigned_byte: B
+ short: -222
+ unsigned_short: 57005
+ int: -57005
+ unsigned_int: 3735928559
+ long: -3735928559
+ unsigned_long: 16045690984833335023
+ integer: -3735928559
+ non_positive_integer: -3735928559
+ non_negative_integer: 3735928559
+ positive_integer: 3735928559
+ negative_integer: -3735928559
+ boolean: 1
+ float: 1234.12
+ double: 1.23457e+07
+ decimal: 1.23457e+07
+ string: string
+ normalized_string: normalized string
+ token: one two three
+ name: name
+ name_token: name-token
+ name_tokens: name tokens
+ ncname: ncname
+ language: en-us
+ qname: http://www.w3.org/2001/XMLSchema-instance#schemaLocation
+ id: elements1
+ id: elements2
+ id_ref: elements1
+ id_refs: elements1 elements2
+ any_uri: http://www.codesynthesis.com
+ base64_binary: YmFzZTY0IGJpbmFyeQ==
+
+ hex_binary: 6865782052696E617279
+ date: 2001-10-26+02:00
+ date_time: 2001-10-26T21:32:52.000000+02:00
+ duration: P1Y2M3DT5H20M30.000000S
+ day: 01+02:00
+ month: 11+02:00
+ month_day: 11-02+02:00
+ year: 2001+02:00
+ year_month: 2001-11+02:00
+ time: 21:32:52.000000+02:00
+
+ attributes:
+ byte: A
+ unsigned_byte: B
+ short: -222
+ unsigned_short: 57005
+ int: -57005
+ unsigned_int: 3735928559
+ long: -3735928559
+ unsigned_long: 16045690984833335023
+ integer: -3735928559
+ non_positive_integer: -3735928559
+ non_negative_integer: 3735928559
+ positive_integer: 3735928559
+ negative_integer: -3735928559
+ boolean: 0
+ float: 1234.12
+ double: 1.23457e+07
+ decimal: 1.23457e+07
+ string: string
+ normalized_string: normalized string
+ token: one two three
+ name: name
+ name_token: name-token
+ name_tokens: name tokens
+ ncname: ncname
+ language: en-us
+ qname: http://www.w3.org/2001/XMLSchema-instance#schemaLocation
+ id: attributes
+ id_ref: attributes
+ id_refs: attributes
+ any_uri: http://www.codesynthesis.com
+ base64_binary: YmFzZTY0IGJpbmFyeQ==
+
+ hex_binary: 6865782052696E617279
+ date: 2001-10-26+02:00
+ date_time: 2001-10-26T21:32:52.000000+02:00
+ duration: P1Y2M3DT5H20M30.000000S
+ day: 01+02:00
+ month: 11+02:00
+ month_day: 11-02+02:00
+ year: 2001+02:00
+ year_month: 2001-11+02:00
+ time: 21:32:52.000000+02:00
+
+ inherited:
+ byte: A
+ unsigned_byte: B
+ short: -222
+ unsigned_short: 57005
+ int: -57005
+ unsigned_int: 3735928559
+ long: -3735928559
+ unsigned_long: 16045690984833335023
+ integer: -3735928559
+ non_positive_integer: -3735928559
+ non_negative_integer: 3735928559
+ positive_integer: 3735928559
+ negative_integer: -3735928559
+ boolean: 1
+ float: 1234.12
+ double: 1.23457e+07
+ decimal: 1.23457e+07
+ string: string
+ normalized_string: normalized string
+ token: one two three
+ name: name
+ name_token: name-token
+ name_tokens: name tokens
+ ncname: ncname
+ language: en-us
+ qname: http://www.w3.org/2001/XMLSchema-instance#schemaLocation
+ id: elements1
+ id: elements2
+ id_ref: elements1
+ id_refs: elements1 elements2
+ any_uri: http://www.codesynthesis.com
+ base64_binary: YmFzZTY0IGJpbmFyeQ==
+
+ hex_binary: 6865782052696E617279
+ date: 2001-10-26+02:00
+ date_time: 2001-10-26T21:32:52.000000+02:00
+ duration: P1Y2M3DT5H20M30.000000S
+ day: 01+02:00
+ month: 11+02:00
+ month_day: 11-02+02:00
+ year: 2001+02:00
+ year_month: 2001-11+02:00
+ time: 21:32:52.000000+02:00
+ EOE
+}
diff --git a/tests/cxx/tree/built-in/types.xsd b/xsd-tests/cxx/tree/built-in/types.xsd
index 22582cb..22582cb 100644
--- a/tests/cxx/tree/built-in/types.xsd
+++ b/xsd-tests/cxx/tree/built-in/types.xsd
diff --git a/xsd-tests/cxx/tree/chameleon/.gitignore b/xsd-tests/cxx/tree/chameleon/.gitignore
new file mode 100644
index 0000000..4ec7484
--- /dev/null
+++ b/xsd-tests/cxx/tree/chameleon/.gitignore
@@ -0,0 +1 @@
+includer.?xx
diff --git a/xsd-tests/cxx/tree/chameleon/buildfile b/xsd-tests/cxx/tree/chameleon/buildfile
new file mode 100644
index 0000000..cec3b01
--- /dev/null
+++ b/xsd-tests/cxx/tree/chameleon/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/tree/chameleon/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -includer} {hxx ixx cxx}{includer} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{includer}>: xsd{includer includee} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --root-element root \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/chameleon/driver.cxx b/xsd-tests/cxx/tree/chameleon/driver.cxx
new file mode 100644
index 0000000..c22ca55
--- /dev/null
+++ b/xsd-tests/cxx/tree/chameleon/driver.cxx
@@ -0,0 +1,35 @@
+// file : cxx/tree/chameleon/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test chameleon inclusion.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "includer.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<root_t> r (root (argv[1]));
+
+ cout << *r << endl;
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/chameleon/includee.xsd b/xsd-tests/cxx/tree/chameleon/includee.xsd
index 531a7d0..531a7d0 100644
--- a/tests/cxx/tree/chameleon/includee.xsd
+++ b/xsd-tests/cxx/tree/chameleon/includee.xsd
diff --git a/tests/cxx/tree/chameleon/includer.xsd b/xsd-tests/cxx/tree/chameleon/includer.xsd
index a1c850a..a1c850a 100644
--- a/tests/cxx/tree/chameleon/includer.xsd
+++ b/xsd-tests/cxx/tree/chameleon/includer.xsd
diff --git a/tests/cxx/tree/chameleon/output b/xsd-tests/cxx/tree/chameleon/output
index c40f715..c40f715 100644
--- a/tests/cxx/tree/chameleon/output
+++ b/xsd-tests/cxx/tree/chameleon/output
diff --git a/tests/cxx/tree/chameleon/test.xml b/xsd-tests/cxx/tree/chameleon/test.xml
index 12ff279..12ff279 100644
--- a/tests/cxx/tree/chameleon/test.xml
+++ b/xsd-tests/cxx/tree/chameleon/test.xml
diff --git a/xsd-tests/cxx/tree/comparison/buildfile b/xsd-tests/cxx/tree/comparison/buildfile
new file mode 100644
index 0000000..507a703
--- /dev/null
+++ b/xsd-tests/cxx/tree/comparison/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/tree/comparison/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/comparison/driver.cxx b/xsd-tests/cxx/tree/comparison/driver.cxx
new file mode 100644
index 0000000..aa7b66d
--- /dev/null
+++ b/xsd-tests/cxx/tree/comparison/driver.cxx
@@ -0,0 +1,38 @@
+// file : cxx/tree/comparison/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test generated comparison operators.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ type::complex_sequence s (r->complex ());
+
+ assert (s[0] == s[0]);
+ assert (s[0] != s[1]);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/comparison/test.xml b/xsd-tests/cxx/tree/comparison/test.xml
index b5d8158..b5d8158 100644
--- a/tests/cxx/tree/comparison/test.xml
+++ b/xsd-tests/cxx/tree/comparison/test.xml
diff --git a/tests/cxx/tree/comparison/test.xsd b/xsd-tests/cxx/tree/comparison/test.xsd
index c234add..c234add 100644
--- a/tests/cxx/tree/comparison/test.xsd
+++ b/xsd-tests/cxx/tree/comparison/test.xsd
diff --git a/xsd-tests/cxx/tree/compilation/buildfile b/xsd-tests/cxx/tree/compilation/buildfile
new file mode 100644
index 0000000..bec2b4b
--- /dev/null
+++ b/xsd-tests/cxx/tree/compilation/buildfile
@@ -0,0 +1,20 @@
+# file : cxx/tree/compilation/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/compilation/driver.cxx b/xsd-tests/cxx/tree/compilation/driver.cxx
new file mode 100644
index 0000000..5c5ab39
--- /dev/null
+++ b/xsd-tests/cxx/tree/compilation/driver.cxx
@@ -0,0 +1,116 @@
+// file : cxx/tree/compilation/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Make sure the runtime library compiles by explicitly instantiating
+// all the types.
+//
+
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+template class xsd::cxx::tree::simple_type<char, xml_schema::type>;
+
+// String types.
+//
+template class xsd::cxx::tree::string< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::normalized_string< char, xml_schema::string >;
+template class xsd::cxx::tree::token< char, xml_schema::normalized_string >;
+template class xsd::cxx::tree::name< char, xml_schema::token >;
+template class xsd::cxx::tree::nmtoken< char, xml_schema::token >;
+template class xsd::cxx::tree::nmtokens< char, xml_schema::simple_type, xml_schema::nmtoken >;
+template class xsd::cxx::tree::ncname< char, xml_schema::name >;
+template class xsd::cxx::tree::language< char, xml_schema::token >;
+
+// ID/IDREF.
+//
+template class xsd::cxx::tree::id< char, xml_schema::ncname >;
+template class xsd::cxx::tree::idref< char, xml_schema::ncname, xml_schema::type >;
+template class xsd::cxx::tree::idrefs< char, xml_schema::simple_type, xml_schema::idref >;
+
+// URI.
+//
+template class xsd::cxx::tree::uri< char, xml_schema::simple_type >;
+
+// Qualified name.
+//
+template class xsd::cxx::tree::qname< char, xml_schema::simple_type, xml_schema::uri, xml_schema::ncname >;
+
+// Binary.
+//
+template class xsd::cxx::tree::buffer< char >;
+template class xsd::cxx::tree::base64_binary< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::hex_binary< char, xml_schema::simple_type >;
+
+// Date/time.
+//
+template class xsd::cxx::tree::date< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::date_time< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::duration< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::gday< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::gmonth< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::gmonth_day< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::gyear< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::gyear_month< char, xml_schema::simple_type >;
+template class xsd::cxx::tree::time< char, xml_schema::simple_type >;
+
+// Entity.
+//
+template class xsd::cxx::tree::entity< char, xml_schema::ncname >;
+template class xsd::cxx::tree::entities< char, xml_schema::simple_type, xml_schema::entity >;
+
+// Namespace information and list stream. Used in
+// serialization functions.
+//
+template class xsd::cxx::xml::dom::namespace_info < char >;
+template class xsd::cxx::xml::dom::namespace_infomap < char >;
+template class xsd::cxx::tree::list_stream < char >;
+
+// Flags and properties.
+//
+template class xsd::cxx::tree::properties< char >;
+
+// Exceptions.
+//
+template class xsd::cxx::tree::exception< char >;
+template class xsd::cxx::tree::parsing< char >;
+template class xsd::cxx::tree::expected_element< char >;
+template class xsd::cxx::tree::unexpected_element< char >;
+template class xsd::cxx::tree::expected_attribute< char >;
+template class xsd::cxx::tree::unexpected_enumerator< char >;
+template class xsd::cxx::tree::expected_text_content< char >;
+template class xsd::cxx::tree::no_type_info< char >;
+template class xsd::cxx::tree::not_derived< char >;
+template class xsd::cxx::tree::duplicate_id< char >;
+template class xsd::cxx::tree::serialization< char >;
+template class xsd::cxx::tree::no_prefix_mapping< char >;
+template class xsd::cxx::tree::bounds< char >;
+
+// Parsing/serialization diagnostics.
+//
+template class xsd::cxx::tree::error< char >;
+template class xsd::cxx::tree::diagnostics< char >;
+
+// Error handler interface.
+//
+template class xsd::cxx::xml::error_handler< char >;
+
+
+//
+//
+template class xsd::cxx::tree::fundamental_base<int, char, xml_schema::type>;
+template class xsd::cxx::tree::one<int>;
+template class xsd::cxx::tree::one<xml_schema::string>;
+template class xsd::cxx::tree::optional<int>;
+template class xsd::cxx::tree::optional<xml_schema::string>;
+template class xsd::cxx::tree::sequence<int>;
+template class xsd::cxx::tree::sequence<xml_schema::string>;
+
+
+int
+main ()
+{
+}
diff --git a/tests/cxx/tree/compilation/test.xsd b/xsd-tests/cxx/tree/compilation/test.xsd
index 07bebc7..07bebc7 100644
--- a/tests/cxx/tree/compilation/test.xsd
+++ b/xsd-tests/cxx/tree/compilation/test.xsd
diff --git a/xsd-tests/cxx/tree/complex/ctor/buildfile b/xsd-tests/cxx/tree/complex/ctor/buildfile
new file mode 100644
index 0000000..53e32b7
--- /dev/null
+++ b/xsd-tests/cxx/tree/complex/ctor/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/complex/ctor/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --generate-doxygen \
+ --generate-polymorphic \
+ --polymorphic-type-all \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/complex/ctor/driver.cxx b/xsd-tests/cxx/tree/complex/ctor/driver.cxx
new file mode 100644
index 0000000..7beaa93
--- /dev/null
+++ b/xsd-tests/cxx/tree/complex/ctor/driver.cxx
@@ -0,0 +1,122 @@
+// file : cxx/tree/complex/ctor/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test generation of varous complex type constructors.
+//
+
+#include <cassert>
+#include <memory>
+
+#include "test.hxx"
+
+#ifdef XSD_CXX11
+# include <utility> // std::move
+# define XSD_MOVE(x) std::move(x)
+#else
+# define XSD_MOVE(x) x
+#endif
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ // Test case A.
+ //
+ {
+ a_base b1;
+ a_base b2 ("abc"); // empty ultimate base + required
+ a_base b3 ("abc", "foo"); // ultimate base + required
+
+ a_derived a1;
+ a_derived a2 ("foo", "bar"); // empty ultimate base + required
+ a_derived a3 (b3, "bar"); // base + required
+ a_derived a4 ("abc", "foo", "bar"); // ultimate base + required
+ }
+
+ // Test case B.
+ //
+ {
+ b_simple s ("base");
+ b_base b ("base", "foo");
+ b_derived d ("base", "foo", "bar");
+ b_type t ("base");
+ }
+
+ // Test case C.
+ //
+ {
+ c_simple s (c_enum::a);
+ c_base b (c_enum::a, "foo");
+ c_derived d (c_enum::a, "foo", "bar");
+ c_type t (c_enum::a);
+ }
+
+ // Test case D.
+ //
+ {
+ d_simple s (1);
+ d_base b (1, "foo");
+ d_derived d (1, "foo", "bar");
+ d_type t (1);
+ }
+
+ // Test case E.
+ //
+ {
+ // e_base
+ //
+ e_base b1 (1, "foo", e_complex_type ("bar"));
+
+ XSD_AUTO_PTR<e_complex_type> c2 (new e_complex_type ("bar"));
+ e_base b2 (1, "foo", XSD_MOVE (c2));
+
+ XSD_AUTO_PTR<e_simple_type> s3 (new e_simple_type ("foo"));
+ XSD_AUTO_PTR<e_complex_type> c3 (new e_complex_type ("bar"));
+ e_base b3 (1, XSD_MOVE (s3), XSD_MOVE (c3));
+
+ assert (b1 == b2);
+ assert (b1 == b3);
+
+ // e_derived
+ //
+ e_derived d1 (1, "foo", e_complex_type ("bar"),
+ true, "baz", e_complex_type ("biz"));
+
+ XSD_AUTO_PTR<e_complex_type> c2a (new e_complex_type ("bar"));
+ XSD_AUTO_PTR<e_complex_type> c2b (new e_complex_type ("biz"));
+ e_derived d2 (1, "foo", XSD_MOVE (c2a), true, "baz", XSD_MOVE (c2b));
+
+ XSD_AUTO_PTR<e_simple_type> s3a (new e_simple_type ("foo"));
+ XSD_AUTO_PTR<xml_schema::string> s3b (new xml_schema::string ("baz"));
+ XSD_AUTO_PTR<e_complex_type> c3a (new e_complex_type ("bar"));
+ XSD_AUTO_PTR<e_complex_type> c3b (new e_complex_type ("biz"));
+ e_derived d3 (1,
+ XSD_MOVE (s3a),
+ XSD_MOVE (c3a),
+ true,
+ XSD_MOVE (s3b),
+ XSD_MOVE (c3b));
+
+ assert (d1 == d2);
+ assert (d1 == d3);
+
+ }
+
+ // Test case F.
+ //
+ {
+ f_type f1 (xml_schema::type (), 1, "foo", f_complex_type ("bar"));
+
+ XSD_AUTO_PTR<f_complex_type> c2 (new f_complex_type ("bar"));
+ f_type f2 (1, "foo", XSD_MOVE (c2));
+
+ XSD_AUTO_PTR<f_simple_type> s3 (new f_simple_type ("foo"));
+ XSD_AUTO_PTR<f_complex_type> c3 (new f_complex_type ("bar"));
+ f_type f3 (1, XSD_MOVE (s3), XSD_MOVE (c3));
+
+ assert (f1 == f2);
+ assert (f1 == f3);
+ }
+}
diff --git a/tests/cxx/tree/complex/ctor/test.xsd b/xsd-tests/cxx/tree/complex/ctor/test.xsd
index b8dd95e..b8dd95e 100644
--- a/tests/cxx/tree/complex/ctor/test.xsd
+++ b/xsd-tests/cxx/tree/complex/ctor/test.xsd
diff --git a/xsd-tests/cxx/tree/containment/buildfile b/xsd-tests/cxx/tree/containment/buildfile
new file mode 100644
index 0000000..1d0272b
--- /dev/null
+++ b/xsd-tests/cxx/tree/containment/buildfile
@@ -0,0 +1,20 @@
+# file : cxx/tree/containment/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-default-ctor \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/containment/driver.cxx b/xsd-tests/cxx/tree/containment/driver.cxx
new file mode 100644
index 0000000..65c17fc
--- /dev/null
+++ b/xsd-tests/cxx/tree/containment/driver.cxx
@@ -0,0 +1,118 @@
+// file : cxx/tree/containment/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test tree node containment.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <cassert>
+
+#include "test.hxx"
+
+#ifdef XSD_CXX11
+# include <utility> // std::move
+# define XSD_MOVE(x) std::move(x)
+#else
+# define XSD_MOVE(x) x
+#endif
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ // Change of a container in a sub-tree without ID.
+ //
+ {
+ XSD_AUTO_PTR<inner> i (new inner ());
+ i->ref ("foo");
+
+ outer o;
+ o.i (XSD_MOVE (i));
+ o.ref ("foo");
+
+ assert (o.i ()->ref ()->get () == 0);
+ assert (o.ref ()->get () == 0);
+ }
+
+ // Change of container in a sub-tree with ID inside.
+ //
+ {
+ XSD_AUTO_PTR<inner> i (new inner ());
+ inner* p (i.get ());
+ i->id ("foo");
+ i->ref ("foo");
+ assert (i->ref ()->get () == p);
+
+ outer o;
+ o.i (XSD_MOVE (i));
+ o.ref ("foo");
+
+ assert (o.i ()->ref ()->get () == p);
+ assert (o.ref ()->get () == p);
+ }
+
+ // Change of a container in ID.
+ //
+ {
+ XSD_AUTO_PTR<xml_schema::id> id (new xml_schema::id ("foo"));
+
+ inner i;
+ i.id (XSD_MOVE (id));
+ i.ref ("foo");
+ assert (i.ref ()->get () == &i);
+ }
+
+ // Change of a container in a type derived from ID with ID inside.
+ //
+ {
+ XSD_AUTO_PTR<id_ex> id (new id_ex ("foo"));
+ id_ex* p (id.get ());
+ id->id ("bar");
+
+ inner i;
+ i.id_ex (XSD_MOVE (id));
+
+ i.ref ("foo");
+ assert (i.ref ()->get () == &i);
+
+ i.ref ("bar");
+ assert (i.ref ()->get () == p);
+ }
+
+ // IDREF lists
+ //
+ {
+ id i1 ("a"), i2 ("b");
+
+ XSD_AUTO_PTR<ids> ic (new ids);
+ ic->id ().push_back (i1);
+ ic->id ().push_back (i2);
+
+ XSD_AUTO_PTR<xml_schema::idrefs> r1 (new xml_schema::idrefs);
+ r1->push_back (xml_schema::idref ("a"));
+ r1->push_back (xml_schema::idref ("b"));
+
+ XSD_AUTO_PTR<idref_list> r2 (new idref_list);
+ r2->push_back (xml_schema::idref ("a"));
+ r2->push_back (xml_schema::idref ("b"));
+
+ XSD_AUTO_PTR<idrefs1> rc1 (new idrefs1);
+ XSD_AUTO_PTR<idrefs2> rc2 (new idrefs2);
+
+ rc1->idrefs (XSD_MOVE (r1));
+ rc2->idrefs (XSD_MOVE (r2));
+
+ model m;
+ m.ids (XSD_MOVE (ic));
+ m.idrefs1 (XSD_MOVE (rc1));
+ m.idrefs2 (XSD_MOVE (rc2));
+
+ assert (m.idrefs1 ().idrefs ()[0].get () != 0);
+ assert (m.idrefs1 ().idrefs ()[1].get () != 0);
+
+ assert (m.idrefs2 ().idrefs ()[0].get () != 0);
+ assert (m.idrefs2 ().idrefs ()[1].get () != 0);
+ }
+}
diff --git a/tests/cxx/tree/containment/test.xsd b/xsd-tests/cxx/tree/containment/test.xsd
index 72c9379..72c9379 100644
--- a/tests/cxx/tree/containment/test.xsd
+++ b/xsd-tests/cxx/tree/containment/test.xsd
diff --git a/xsd-tests/cxx/tree/default/general/buildfile b/xsd-tests/cxx/tree/default/general/buildfile
new file mode 100644
index 0000000..4e482ce
--- /dev/null
+++ b/xsd-tests/cxx/tree/default/general/buildfile
@@ -0,0 +1,26 @@
+# file : cxx/tree/default/general/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-ostream \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/default/general/driver.cxx b/xsd-tests/cxx/tree/default/general/driver.cxx
new file mode 100644
index 0000000..7031636
--- /dev/null
+++ b/xsd-tests/cxx/tree/default/general/driver.cxx
@@ -0,0 +1,37 @@
+// file : cxx/tree/default/general/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test default attribute/element values.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1], xml_schema::flags::dont_validate));
+
+ xml_schema::namespace_infomap map;
+ map["t"].name = "test";
+ root (cout, *r, map);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/default/general/output b/xsd-tests/cxx/tree/default/general/output
index 396a698..396a698 100644
--- a/tests/cxx/tree/default/general/output
+++ b/xsd-tests/cxx/tree/default/general/output
diff --git a/tests/cxx/tree/default/general/test.xml b/xsd-tests/cxx/tree/default/general/test.xml
index 11bd0a7..11bd0a7 100644
--- a/tests/cxx/tree/default/general/test.xml
+++ b/xsd-tests/cxx/tree/default/general/test.xml
diff --git a/tests/cxx/tree/default/general/test.xsd b/xsd-tests/cxx/tree/default/general/test.xsd
index 9d9cd38..9d9cd38 100644
--- a/tests/cxx/tree/default/general/test.xsd
+++ b/xsd-tests/cxx/tree/default/general/test.xsd
diff --git a/xsd-tests/cxx/tree/default/omit/buildfile b/xsd-tests/cxx/tree/default/omit/buildfile
new file mode 100644
index 0000000..407ab1e
--- /dev/null
+++ b/xsd-tests/cxx/tree/default/omit/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/default/omit/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-ostream \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --omit-default-attributes \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/default/omit/driver.cxx b/xsd-tests/cxx/tree/default/omit/driver.cxx
new file mode 100644
index 0000000..3dcc0d8
--- /dev/null
+++ b/xsd-tests/cxx/tree/default/omit/driver.cxx
@@ -0,0 +1,46 @@
+// file : cxx/tree/default/omit/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test default attribute omission from the output.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1], xml_schema::flags::dont_validate));
+
+ cout << *r << endl
+ << "default x: " << derived::x_default_value () << endl
+ << "default y: " << derived::y_default_value () << endl
+ << "fixed p: " << derived::p_default_value () << endl
+ << "fixed q1: " << derived::q1_default_value () << endl
+ << "fixed q2: " << derived::q2_default_value () << endl;
+
+ // Serialize.
+ //
+ xml_schema::namespace_infomap map;
+ map["t"].name = "test";
+ root (cout, *r, map);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/default/omit/output b/xsd-tests/cxx/tree/default/omit/output
index 150ad58..150ad58 100644
--- a/tests/cxx/tree/default/omit/output
+++ b/xsd-tests/cxx/tree/default/omit/output
diff --git a/tests/cxx/tree/default/omit/test.xml b/xsd-tests/cxx/tree/default/omit/test.xml
index dec39b4..dec39b4 100644
--- a/tests/cxx/tree/default/omit/test.xml
+++ b/xsd-tests/cxx/tree/default/omit/test.xml
diff --git a/tests/cxx/tree/default/omit/test.xsd b/xsd-tests/cxx/tree/default/omit/test.xsd
index bfc68d4..bfc68d4 100644
--- a/tests/cxx/tree/default/omit/test.xsd
+++ b/xsd-tests/cxx/tree/default/omit/test.xsd
diff --git a/xsd-tests/cxx/tree/detach/buildfile b/xsd-tests/cxx/tree/detach/buildfile
new file mode 100644
index 0000000..07f5f03
--- /dev/null
+++ b/xsd-tests/cxx/tree/detach/buildfile
@@ -0,0 +1,21 @@
+# file : cxx/tree/detach/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-detach \
+ --generate-default-ctor \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/detach/driver.cxx b/xsd-tests/cxx/tree/detach/driver.cxx
new file mode 100644
index 0000000..b632b5d
--- /dev/null
+++ b/xsd-tests/cxx/tree/detach/driver.cxx
@@ -0,0 +1,108 @@
+// file : cxx/tree/detach/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the detach functionality.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <cassert>
+
+#include "test.hxx"
+
+#ifdef XSD_CXX11
+# include <utility> // std::move
+# define XSD_MOVE(x) std::move(x)
+#else
+# define XSD_MOVE(x) x
+#endif
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ using test::ref;
+
+ // Construct the model.
+ //
+ object o1 ("o1");
+ o1.data ().push_back ("1-1");
+ o1.data ().push_back ("1-2");
+ o1.data ().push_back ("1-3");
+
+ object o2 ("o2");
+ o1.data ().push_back ("2-1");
+ o1.data ().push_back ("2-2");
+ o1.data ().push_back ("2-3");
+
+ object o3 ("o3");
+ o1.data ().push_back ("3-1");
+ o1.data ().push_back ("3-2");
+ o1.data ().push_back ("3-3");
+
+ object o4 ("o4");
+ o1.data ().push_back ("4-1");
+ o1.data ().push_back ("4-2");
+ o1.data ().push_back ("4-3");
+
+ subtree s1;
+ s1.o ().push_back (o1);
+ s1.o ().push_back (o2);
+ s1.r ().push_back (ref ("o2"));
+ s1.r ().push_back (ref ("o3"));
+
+ subtree s2;
+ s2.o ().push_back (o3);
+ s2.o ().push_back (o4);
+ s2.r ().push_back (ref ("o4"));
+ s2.r ().push_back (ref ("o1"));
+
+ model m;
+ m.one (s1);
+ m.opt (s2);
+
+ // Detach one.
+ //
+ XSD_AUTO_PTR<subtree> p (m.detach_one ());
+ assert (p->_container () == 0);
+ assert (p->r ()[0].get () == &p->o ()[1]);
+ assert (m.opt ()->r ()[1].get () == 0);
+
+ m.one (XSD_MOVE (p));
+ assert (m.opt ()->r ()[1].get () == &m.one ().o ()[0]);
+ p = m.detach_one ();
+
+ model m1;
+ m1.one (XSD_MOVE (p));
+ m1.opt (s2);
+ assert (m1.opt ()->r ()[1].get () == &m1.one ().o ()[0]);
+
+ p = m1.detach_one ();
+ m.seq ().push_back (XSD_MOVE (p));
+
+ // Detach opt.
+ //
+ p = m.opt ().detach ();
+ assert (!m.opt ());
+ assert (p->_container () == 0);
+ assert (p->r ()[0].get () == &p->o ()[1]);
+ assert (m.seq ()[0].r ()[1].get () == 0);
+
+ m.seq ().push_back (XSD_MOVE (p));
+
+ // Detach seq.
+ //
+ p = m.seq ().detach_back ();
+ assert (p->_container () == 0);
+ assert (p->r ()[0].get () == &p->o ()[1]);
+ assert (m.seq ()[0].r ()[1].get () == 0);
+
+ m.seq ().push_back (XSD_MOVE (p));
+ assert (m.seq ()[0].r ()[1].get () == &m.seq ()[1].o ()[0]);
+
+ m.seq ().detach (m.seq ().begin (), p);
+ assert (p->_container () == 0);
+ assert (p->r ()[0].get () == &p->o ()[1]);
+ assert (m.seq ()[0].r ()[1].get () == 0);
+}
diff --git a/tests/cxx/tree/detach/test.xsd b/xsd-tests/cxx/tree/detach/test.xsd
index b9f5166..b9f5166 100644
--- a/tests/cxx/tree/detach/test.xsd
+++ b/xsd-tests/cxx/tree/detach/test.xsd
diff --git a/xsd-tests/cxx/tree/dom-association/buildfile b/xsd-tests/cxx/tree/dom-association/buildfile
new file mode 100644
index 0000000..85593e5
--- /dev/null
+++ b/xsd-tests/cxx/tree/dom-association/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/dom-association/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
+
+# Define XSD_CXX11 since we include libxsd headers directly.
+#
+cxx.poptions += -DXSD_CXX11
diff --git a/xsd-tests/cxx/tree/dom-association/dom-parse.cxx b/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
new file mode 100644
index 0000000..281eb2c
--- /dev/null
+++ b/xsd-tests/cxx/tree/dom-association/dom-parse.cxx
@@ -0,0 +1,95 @@
+// file : cxx/tree/dom-association/dom-parse.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "dom-parse.hxx"
+
+#include <istream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp> // chLatin_*
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+
+#include <xsd/cxx/xml/sax/std-input-source.hxx>
+#include <xsd/cxx/xml/dom/bits/error-handler-proxy.hxx>
+
+#include <xsd/cxx/tree/exceptions.hxx>
+#include <xsd/cxx/tree/error-handler.hxx>
+
+using namespace xercesc;
+namespace xml = xsd::cxx::xml;
+namespace tree = xsd::cxx::tree;
+
+XSD_DOM_AUTO_PTR<DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate)
+{
+ const XMLCh ls_id [] = {chLatin_L, chLatin_S, chNull};
+
+ // Get an implementation of the Load-Store (LS) interface.
+ //
+ DOMImplementation* impl (
+ DOMImplementationRegistry::getDOMImplementation (ls_id));
+
+ XSD_DOM_AUTO_PTR<DOMLSParser> parser (
+ impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0));
+
+ DOMConfiguration* conf (parser->getDomConfig ());
+
+ // Discard comment nodes in the document.
+ //
+ conf->setParameter (XMLUni::fgDOMComments, false);
+
+ // Enable datatype normalization.
+ //
+ conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);
+
+ // Do not create EntityReference nodes in the DOM tree. No
+ // EntityReference nodes will be created, only the nodes
+ // corresponding to their fully expanded substitution text
+ // will be created.
+ //
+ conf->setParameter (XMLUni::fgDOMEntities, false);
+
+ // Perform namespace processing.
+ //
+ conf->setParameter (XMLUni::fgDOMNamespaces, true);
+
+ // Do not include ignorable whitespace in the DOM tree.
+ //
+ conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);
+
+ // Enable/Disable validation.
+ //
+ conf->setParameter (XMLUni::fgDOMValidate, validate);
+ conf->setParameter (XMLUni::fgXercesSchema, validate);
+ conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);
+
+ // Xerces-C++ 3.1.0 is the first version with working multi import
+ // support.
+ //
+#if _XERCES_VERSION >= 30100
+ conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
+#endif
+
+ // We will release the DOM document ourselves.
+ //
+ conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ // Set error handler.
+ //
+ tree::error_handler<char> eh;
+ xml::dom::bits::error_handler_proxy<char> ehp (eh);
+ conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp);
+
+ // Prepare input stream.
+ //
+ xml::sax::std_input_source isrc (is, id);
+ Wrapper4InputSource wrap (&isrc, false);
+
+ XSD_DOM_AUTO_PTR<DOMDocument> doc (parser->parse (&wrap));
+
+ eh.throw_if_failed<tree::parsing<char> > ();
+
+ return doc;
+}
diff --git a/xsd-tests/cxx/tree/dom-association/dom-parse.hxx b/xsd-tests/cxx/tree/dom-association/dom-parse.hxx
new file mode 100644
index 0000000..f14a53b
--- /dev/null
+++ b/xsd-tests/cxx/tree/dom-association/dom-parse.hxx
@@ -0,0 +1,23 @@
+// file : cxx/tree/dom-association/dom-parse.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef DOM_PARSE
+#define DOM_PARSE
+
+#include <string>
+#include <iosfwd>
+
+#include <xercesc/dom/DOMDocument.hpp>
+
+#include <xsd/cxx/xml/dom/auto-ptr.hxx>
+
+// Parse an XML document from the standard input stream with an
+// optional resource id. Resource id is used in diagnostics as
+// well as to locate schemas referenced from inside the document.
+//
+XSD_DOM_AUTO_PTR<xercesc::DOMDocument>
+parse (std::istream& is,
+ const std::string& id,
+ bool validate);
+
+#endif // DOM_PARSE
diff --git a/xsd-tests/cxx/tree/dom-association/driver.cxx b/xsd-tests/cxx/tree/dom-association/driver.cxx
new file mode 100644
index 0000000..d85e105
--- /dev/null
+++ b/xsd-tests/cxx/tree/dom-association/driver.cxx
@@ -0,0 +1,71 @@
+// file : cxx/tree/dom-association/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test DOM association/ownership.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+
+#include "dom-parse.hxx"
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+using namespace xercesc;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ int r (0);
+
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ ifstream ifs;
+ ifs.exceptions (ifstream::badbit | ifstream::failbit);
+ ifs.open (argv[1]);
+
+ DOMDocument* ptr;
+
+#ifdef XSD_CXX11
+ xml_schema::dom::unique_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
+ ptr = doc.get ();
+ unique_ptr<type> r (
+ root (std::move (doc),
+ xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+#else
+ xml_schema::dom::auto_ptr<DOMDocument> doc (parse (ifs, argv[1], true));
+ ptr = doc.get ();
+ auto_ptr<type> r (
+ root (doc,
+ xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+#endif
+
+ assert (doc.get () == 0);
+ assert (r->_node ()->getOwnerDocument () == ptr);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ r = 1;
+ }
+ catch (const std::ios_base::failure&)
+ {
+ cerr << argv[1] << ": unable to open or read failure" << endl;
+ r = 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+ return r;
+}
diff --git a/tests/cxx/tree/dom-association/output b/xsd-tests/cxx/tree/dom-association/output
index e69de29..e69de29 100644
--- a/tests/cxx/tree/dom-association/output
+++ b/xsd-tests/cxx/tree/dom-association/output
diff --git a/tests/cxx/tree/dom-association/test.xml b/xsd-tests/cxx/tree/dom-association/test.xml
index 624a80c..624a80c 100644
--- a/tests/cxx/tree/dom-association/test.xml
+++ b/xsd-tests/cxx/tree/dom-association/test.xml
diff --git a/tests/cxx/tree/dom-association/test.xsd b/xsd-tests/cxx/tree/dom-association/test.xsd
index 07bebc7..07bebc7 100644
--- a/tests/cxx/tree/dom-association/test.xsd
+++ b/xsd-tests/cxx/tree/dom-association/test.xsd
diff --git a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile
new file mode 100644
index 0000000..bdea527
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/encoding/char/iso-8859-1/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --char-encoding iso8859-1 \
+ --generate-doxygen \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
new file mode 100644
index 0000000..e356815
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/driver.cxx
@@ -0,0 +1,74 @@
+// file : cxx/tree/encoding/char/iso-8859-1/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test ISO-8859-1 encoding.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ try
+ {
+ root (argv[1]);
+ return 1;
+ }
+ catch (xsd::cxx::xml::iso8859_1_unrepresentable const&)
+ {
+ }
+
+ xsd::cxx::xml::char_transcoder::unrep_char ('?');
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ {
+ type::a_sequence const& s (r->a ());
+
+ if (s[0] != "abc" ||
+ s[1] != "\xE6" ||
+ s[2] != "\xA2\xA3\xA4\xA5" ||
+ s[3] != "??")
+ {
+ cerr << "invalid encoding" << endl;
+ return 1;
+ }
+ }
+
+ {
+ type::b_sequence const& s (r->b ());
+
+ if (s[0] != strenum::abc ||
+ s[1] != strenum::a_c ||
+ s[2] != strenum::cxx__bc)
+ {
+ cerr << "invalid encoding" << endl;
+ return 1;
+ }
+ }
+
+ xml_schema::namespace_infomap map;
+ map["t"].name = "test";
+
+ root (std::cout, *r, map, "ISO-8859-1");
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << "xml_schema::exception: " << e.what () << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/test.std b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/output
index cb73faa..cb73faa 100644
--- a/tests/cxx/tree/encoding/char/iso-8859-1/test.std
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/output
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/test.xml b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/test.xml
index cc05f8d..cc05f8d 100644
--- a/tests/cxx/tree/encoding/char/iso-8859-1/test.xml
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/test.xml
diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/test.xsd b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/test.xsd
index 31b8901..31b8901 100644
--- a/tests/cxx/tree/encoding/char/iso-8859-1/test.xsd
+++ b/xsd-tests/cxx/tree/encoding/char/iso-8859-1/test.xsd
diff --git a/xsd-tests/cxx/tree/encoding/char/lcp/buildfile b/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
new file mode 100644
index 0000000..d935b09
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/tree/encoding/char/lcp/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --char-encoding lcp \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx b/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
new file mode 100644
index 0000000..97c0875
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/driver.cxx
@@ -0,0 +1,40 @@
+// file : cxx/tree/encoding/char/lcp/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test local code page encoding (--char-encoding lcp).
+// The test just makes sure it still compiles and works.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ xml_schema::namespace_infomap map;
+ map["t"].name = "test";
+
+ root (std::cout, *r, map);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << "xml_schema::exception: " << e.what () << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/encoding/char/lcp/test.std b/xsd-tests/cxx/tree/encoding/char/lcp/output
index 368826d..368826d 100644
--- a/tests/cxx/tree/encoding/char/lcp/test.std
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/output
diff --git a/tests/cxx/tree/encoding/char/lcp/test.xml b/xsd-tests/cxx/tree/encoding/char/lcp/test.xml
index 772512e..772512e 100644
--- a/tests/cxx/tree/encoding/char/lcp/test.xml
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/test.xml
diff --git a/tests/cxx/tree/encoding/char/lcp/test.xsd b/xsd-tests/cxx/tree/encoding/char/lcp/test.xsd
index 1e264e3..1e264e3 100644
--- a/tests/cxx/tree/encoding/char/lcp/test.xsd
+++ b/xsd-tests/cxx/tree/encoding/char/lcp/test.xsd
diff --git a/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile b/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
new file mode 100644
index 0000000..4d48165
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/tree/encoding/char/utf-8/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-doxygen \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx b/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
new file mode 100644
index 0000000..7892667
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/driver.cxx
@@ -0,0 +1,63 @@
+// file : cxx/tree/encoding/char/utf-8/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test UTF-8 encoding.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ {
+ type::a_sequence const& s (r->a ());
+
+ if (s[0] != "abc" ||
+ s[1] != "\xD5\x95" ||
+ s[2] != "\xEA\xAA\xAA")
+ {
+ cerr << "invalid encoding" << endl;
+ return 1;
+ }
+ }
+
+ {
+ type::b_sequence const& s (r->b ());
+
+ if (s[0] != strenum::abc ||
+ s[1] != strenum::a_c ||
+ s[2] != strenum::cxx_bc)
+ {
+ cerr << "invalid encoding" << endl;
+ return 1;
+ }
+ }
+
+ xml_schema::namespace_infomap map;
+ map["t"].name = "test";
+
+ root (std::cout, *r, map, "ASCII");
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << "xml_schema::exception: " << e.what () << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/encoding/char/utf-8/test.std b/xsd-tests/cxx/tree/encoding/char/utf-8/output
index fdfef4c..fdfef4c 100644
--- a/tests/cxx/tree/encoding/char/utf-8/test.std
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/output
diff --git a/tests/cxx/tree/encoding/char/utf-8/test.xml b/xsd-tests/cxx/tree/encoding/char/utf-8/test.xml
index 0d3e27a..0d3e27a 100644
--- a/tests/cxx/tree/encoding/char/utf-8/test.xml
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/test.xml
diff --git a/tests/cxx/tree/encoding/char/utf-8/test.xsd b/xsd-tests/cxx/tree/encoding/char/utf-8/test.xsd
index d5ee868..d5ee868 100644
--- a/tests/cxx/tree/encoding/char/utf-8/test.xsd
+++ b/xsd-tests/cxx/tree/encoding/char/utf-8/test.xsd
diff --git a/xsd-tests/cxx/tree/encoding/wchar/buildfile b/xsd-tests/cxx/tree/encoding/wchar/buildfile
new file mode 100644
index 0000000..f640976
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/wchar/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/encoding/wchar/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --char-type wchar_t \
+ --generate-doxygen \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/encoding/wchar/driver.cxx b/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
new file mode 100644
index 0000000..dbcbcba
--- /dev/null
+++ b/xsd-tests/cxx/tree/encoding/wchar/driver.cxx
@@ -0,0 +1,55 @@
+// file : cxx/tree/encoding/wchar/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test the wide character mapping.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <fstream>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ // Use dont_validate because we do not have instance's system id (path).
+ //
+ std::ifstream ifs (argv[1]);
+ XSD_AUTO_PTR<type> r (root (ifs, xml_schema::flags::dont_validate));
+
+ {
+ type::b_sequence const& s (r->b ());
+
+ if (s[0] != strenum::abc ||
+ s[1] != strenum::a__c ||
+ s[2] != strenum::cxx__bc ||
+ s[3] != strenum::ab__)
+ {
+ cerr << "invalid encoding" << endl;
+ return 1;
+ }
+ }
+
+ xml_schema::namespace_infomap map;
+ map[L"t"].name = L"test";
+
+ root (std::cout, *r, map, L"ASCII");
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << "xml_schema::exception: " << e.what () << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/encoding/wchar/test.std b/xsd-tests/cxx/tree/encoding/wchar/output
index e0eaef0..e0eaef0 100644
--- a/tests/cxx/tree/encoding/wchar/test.std
+++ b/xsd-tests/cxx/tree/encoding/wchar/output
diff --git a/tests/cxx/tree/encoding/wchar/test.xml b/xsd-tests/cxx/tree/encoding/wchar/test.xml
index 9abb1b6..9abb1b6 100644
--- a/tests/cxx/tree/encoding/wchar/test.xml
+++ b/xsd-tests/cxx/tree/encoding/wchar/test.xml
diff --git a/tests/cxx/tree/encoding/wchar/test.xsd b/xsd-tests/cxx/tree/encoding/wchar/test.xsd
index 0151d2f..0151d2f 100644
--- a/tests/cxx/tree/encoding/wchar/test.xsd
+++ b/xsd-tests/cxx/tree/encoding/wchar/test.xsd
diff --git a/xsd-tests/cxx/tree/enumeration/ctor/buildfile b/xsd-tests/cxx/tree/enumeration/ctor/buildfile
new file mode 100644
index 0000000..96be1ce
--- /dev/null
+++ b/xsd-tests/cxx/tree/enumeration/ctor/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/tree/enumeration/ctor/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --generate-doxygen \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx b/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
new file mode 100644
index 0000000..c5ea1f2
--- /dev/null
+++ b/xsd-tests/cxx/tree/enumeration/ctor/driver.cxx
@@ -0,0 +1,30 @@
+// file : cxx/tree/enumeration/ctor/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test enumeration constructors.
+//
+#include <string>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ // Test ctor(const char*).
+ //
+ {
+ string_enum se ("a");
+ type t ("a", 1);
+ }
+
+ // Test ctor(const std::string&)
+ //
+ {
+ string const s ("c");
+ string_enum se (s);
+ type t (s, 3);
+ }
+}
diff --git a/tests/cxx/tree/enumeration/ctor/test.xsd b/xsd-tests/cxx/tree/enumeration/ctor/test.xsd
index c5d625a..c5d625a 100644
--- a/tests/cxx/tree/enumeration/ctor/test.xsd
+++ b/xsd-tests/cxx/tree/enumeration/ctor/test.xsd
diff --git a/xsd-tests/cxx/tree/enumeration/inheritance/buildfile b/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
new file mode 100644
index 0000000..184c95c
--- /dev/null
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/tree/enumeration/inheritance/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx b/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
new file mode 100644
index 0000000..b517b1f
--- /dev/null
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/driver.cxx
@@ -0,0 +1,53 @@
+// file : cxx/tree/enumeration/inheritance/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Insert test description here.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <cassert>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<top_bottom> r (root (argv[1]));
+
+ switch (*r)
+ {
+ case top_bottom::top:
+ {
+ cout << "top" << endl;
+ break;
+ }
+ case top_bottom::bottom:
+ {
+ cout << "bottom" << endl;
+ break;
+ }
+ default: // Suppress warning.
+ {
+ assert (false);
+ break;
+ }
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/enumeration/inheritance/output b/xsd-tests/cxx/tree/enumeration/inheritance/output
index fef12e2..fef12e2 100644
--- a/tests/cxx/tree/enumeration/inheritance/output
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/output
diff --git a/tests/cxx/tree/enumeration/inheritance/test.xml b/xsd-tests/cxx/tree/enumeration/inheritance/test.xml
index 1de9043..1de9043 100644
--- a/tests/cxx/tree/enumeration/inheritance/test.xml
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/test.xml
diff --git a/tests/cxx/tree/enumeration/inheritance/test.xsd b/xsd-tests/cxx/tree/enumeration/inheritance/test.xsd
index cf2eeb1..cf2eeb1 100644
--- a/tests/cxx/tree/enumeration/inheritance/test.xsd
+++ b/xsd-tests/cxx/tree/enumeration/inheritance/test.xsd
diff --git a/xsd-tests/cxx/tree/float/buildfile b/xsd-tests/cxx/tree/float/buildfile
new file mode 100644
index 0000000..4872a2f
--- /dev/null
+++ b/xsd-tests/cxx/tree/float/buildfile
@@ -0,0 +1,24 @@
+# file : cxx/tree/float/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/float/driver.cxx b/xsd-tests/cxx/tree/float/driver.cxx
new file mode 100644
index 0000000..0f7455f
--- /dev/null
+++ b/xsd-tests/cxx/tree/float/driver.cxx
@@ -0,0 +1,53 @@
+// file : cxx/tree/float/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test floating point (xsd:{float, double, decimal}) type parsing
+// and serialization.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ r->simple ().push_back (12.129456);
+ r->simple ().push_back (123.129456);
+ r->simple ().push_back (1234.129456);
+
+ r->s (12.129456);
+
+ r->complex ().push_back (12.129456);
+ r->complex ().push_back (123.129456);
+ r->complex ().push_back (1234.129456);
+ r->complex ().push_back (-12.12);
+ r->complex ().push_back (-123.12);
+
+ r->s (12.129456);
+
+ xml_schema::namespace_infomap map;
+
+ map["t"].name = "test";
+ root (cout, *r, map);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/float/test.std b/xsd-tests/cxx/tree/float/output
index 399e28c..399e28c 100644
--- a/tests/cxx/tree/float/test.std
+++ b/xsd-tests/cxx/tree/float/output
diff --git a/tests/cxx/tree/float/test.xml b/xsd-tests/cxx/tree/float/test.xml
index e5124a4..e5124a4 100644
--- a/tests/cxx/tree/float/test.xml
+++ b/xsd-tests/cxx/tree/float/test.xml
diff --git a/tests/cxx/tree/float/test.xsd b/xsd-tests/cxx/tree/float/test.xsd
index c02678d..c02678d 100644
--- a/tests/cxx/tree/float/test.xsd
+++ b/xsd-tests/cxx/tree/float/test.xsd
diff --git a/xsd-tests/cxx/tree/list/ctor/buildfile b/xsd-tests/cxx/tree/list/ctor/buildfile
new file mode 100644
index 0000000..2155f95
--- /dev/null
+++ b/xsd-tests/cxx/tree/list/ctor/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/tree/list/ctor/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --generate-doxygen \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/list/ctor/driver.cxx b/xsd-tests/cxx/tree/list/ctor/driver.cxx
new file mode 100644
index 0000000..5673e67
--- /dev/null
+++ b/xsd-tests/cxx/tree/list/ctor/driver.cxx
@@ -0,0 +1,50 @@
+// file : cxx/tree/list/ctor/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test list constructors.
+//
+#include <string>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ // Test ctor()
+ //
+ {
+ string_list sl;
+
+ xml_schema::nmtokens nt;
+ xml_schema::idrefs id;
+ }
+
+ // Test ctor(size_type, const X&)
+ //
+ {
+ string_list sl (10, "abc");
+ size_type st (10, 123);
+
+ xml_schema::nmtokens nt (10, "abc");
+ xml_schema::idrefs id (10, "abc");
+ }
+
+ // Test ctor(const I& begin, const I& end)
+ //
+ {
+ string_list sl1 (10, "abc");
+ string_list sl2 (sl1.begin (), sl1.end ());
+
+ I i1 (10, 123);
+ I i2 (i1.begin (), i1.end ());
+
+ xml_schema::nmtokens nt1 (10, "abc");
+ xml_schema::nmtokens nt2 (nt1.begin (), nt1.end ());
+
+ xml_schema::idrefs id1 (10, "abc");
+ xml_schema::idrefs id2 (id1.begin (), id1.end ());
+ }
+}
diff --git a/tests/cxx/tree/list/ctor/test.xsd b/xsd-tests/cxx/tree/list/ctor/test.xsd
index f090bb8..f090bb8 100644
--- a/tests/cxx/tree/list/ctor/test.xsd
+++ b/xsd-tests/cxx/tree/list/ctor/test.xsd
diff --git a/xsd-tests/cxx/tree/name-clash/inheritance/buildfile b/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
new file mode 100644
index 0000000..530c42f
--- /dev/null
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/tree/name-clash/inheritance/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx b/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
new file mode 100644
index 0000000..634c56a
--- /dev/null
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/driver.cxx
@@ -0,0 +1,35 @@
+// file : cxx/tree/name-clash/inheritance/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test for name clashes across inheritance hierarchy.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<derived> r (root (argv[1]));
+
+ cout << *r << endl;
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/name-clash/inheritance/output b/xsd-tests/cxx/tree/name-clash/inheritance/output
index 54565bb..54565bb 100644
--- a/tests/cxx/tree/name-clash/inheritance/output
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/output
diff --git a/tests/cxx/tree/name-clash/inheritance/test.xml b/xsd-tests/cxx/tree/name-clash/inheritance/test.xml
index 8c17101..8c17101 100644
--- a/tests/cxx/tree/name-clash/inheritance/test.xml
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/test.xml
diff --git a/tests/cxx/tree/name-clash/inheritance/test.xsd b/xsd-tests/cxx/tree/name-clash/inheritance/test.xsd
index b83d7df..b83d7df 100644
--- a/tests/cxx/tree/name-clash/inheritance/test.xsd
+++ b/xsd-tests/cxx/tree/name-clash/inheritance/test.xsd
diff --git a/xsd-tests/cxx/tree/naming/camel/buildfile b/xsd-tests/cxx/tree/naming/camel/buildfile
new file mode 100644
index 0000000..8a8410c
--- /dev/null
+++ b/xsd-tests/cxx/tree/naming/camel/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/naming/camel/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --type-naming ucc \
+ --function-naming lcc \
+ --generate-ostream \
+ --generate-comparison \
+ --generate-wildcard \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/naming/camel/driver.cxx b/xsd-tests/cxx/tree/naming/camel/driver.cxx
new file mode 100644
index 0000000..600b3ff
--- /dev/null
+++ b/xsd-tests/cxx/tree/naming/camel/driver.cxx
@@ -0,0 +1,154 @@
+// file : cxx/tree/naming/camel/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test camel case (upper for types, lower for functions) naming style.
+//
+
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Enum 'value' type.
+ //
+ {
+ Gender::Value v;
+ v = Gender::female;
+ XSD_UNUSED (v);
+ }
+
+ // Anonymous type.
+ //
+ {
+ Foo f ("a", "b");
+
+ if (f.a () != "a" || f.b () != "b")
+ return 1;
+ }
+
+ // Type name and accessors/modifiers.
+ //
+ {
+ Type t ("bar");
+
+ // foo
+ //
+ {
+ Type::FooType* p = 0;
+ XSD_UNUSED (p);
+
+ Type::FooOptional o;
+
+ if (t.foo ().present ())
+ return 1;
+
+ t.foo (o);
+ }
+
+ // bar
+ //
+ {
+ Type::BarType* p = 0;
+ XSD_UNUSED (p);
+
+ if (t.bar () != "bar")
+ return 1;
+
+ t.bar ("barbar");
+ }
+
+ // baz
+ //
+ {
+ Type::BazType* p = 0;
+ XSD_UNUSED (p);
+
+ Type::BazSequence s;
+ Type::BazIterator i (s.begin ());
+ Type::BazConstIterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.baz () != s)
+ return 1;
+
+ t.baz (s);
+ }
+
+ // any
+ //
+ {
+ Type::AnySequence s (t.domDocument ());
+ Type::AnyIterator i (s.begin ());
+ Type::AnyConstIterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.any () != s)
+ return 1;
+
+ t.any (s);
+ }
+
+ // foo
+ //
+ {
+ Type::FoxType x = Type::foxDefaultValue ();
+
+ if (t.fox () != x)
+ return 1;
+
+ t.fox ("fox");
+ }
+
+ // any_attribute
+ //
+ {
+ Type::AnyAttributeSet s (t.domDocument ());
+ Type::AnyAttributeIterator i (s.begin ());
+ Type::AnyAttributeConstIterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.anyAttribute () != s)
+ return 1;
+
+ t.anyAttribute (s);
+ }
+ }
+
+ // Parsing/serialization functions.
+ //
+ {
+ istringstream is ("<t:Root xmlns:t='test'>foo</t:Root>");
+ root (is, xml_schema::Flags::dont_validate);
+ }
+
+ {
+ ostringstream os;
+ xml_schema::NamespaceInfomap m;
+ m["t"].name = "test";
+
+ root (os, "foo", m);
+ }
+ }
+ catch (xml_schema::Exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/naming/camel/test.xsd b/xsd-tests/cxx/tree/naming/camel/test.xsd
index 7d0a745..7d0a745 100644
--- a/tests/cxx/tree/naming/camel/test.xsd
+++ b/xsd-tests/cxx/tree/naming/camel/test.xsd
diff --git a/xsd-tests/cxx/tree/naming/java/buildfile b/xsd-tests/cxx/tree/naming/java/buildfile
new file mode 100644
index 0000000..5d4b447
--- /dev/null
+++ b/xsd-tests/cxx/tree/naming/java/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/naming/java/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --type-naming java \
+ --function-naming java \
+ --generate-ostream \
+ --generate-comparison \
+ --generate-wildcard \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/naming/java/driver.cxx b/xsd-tests/cxx/tree/naming/java/driver.cxx
new file mode 100644
index 0000000..b47ff74
--- /dev/null
+++ b/xsd-tests/cxx/tree/naming/java/driver.cxx
@@ -0,0 +1,153 @@
+// file : cxx/tree/naming/java/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test Java naming style.
+//
+
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Enum 'value' type.
+ //
+ {
+ Gender::Value v;
+ v = Gender::female;
+ XSD_UNUSED (v);
+ }
+
+ // Anonymous type.
+ //
+ {
+ Foo f ("a", "b");
+
+ if (f.getA () != "a" || f.getB () != "b")
+ return 1;
+ }
+
+ // Type name and accessors/modifiers.
+ //
+ {
+ Type t ("bar");
+
+ // foo
+ //
+ {
+ Type::FooType* p = 0;
+ XSD_UNUSED (p);
+ Type::FooOptional o;
+
+ if (t.getFoo ().present ())
+ return 1;
+
+ t.setFoo (o);
+ }
+
+ // bar
+ //
+ {
+ Type::BarType* p = 0;
+ XSD_UNUSED (p);
+
+ if (t.getBar () != "bar")
+ return 1;
+
+ t.setBar ("barbar");
+ }
+
+ // baz
+ //
+ {
+ Type::BazType* p = 0;
+ XSD_UNUSED (p);
+
+ Type::BazSequence s;
+ Type::BazIterator i (s.begin ());
+ Type::BazConstIterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.getBaz () != s)
+ return 1;
+
+ t.setBaz (s);
+ }
+
+ // any
+ //
+ {
+ Type::AnySequence s (t.getDomDocument ());
+ Type::AnyIterator i (s.begin ());
+ Type::AnyConstIterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.getAny () != s)
+ return 1;
+
+ t.setAny (s);
+ }
+
+ // foo
+ //
+ {
+ Type::FoxType x = Type::getFoxDefaultValue ();
+
+ if (t.getFox () != x)
+ return 1;
+
+ t.setFox ("fox");
+ }
+
+ // any_attribute
+ //
+ {
+ Type::AnyAttributeSet s (t.getDomDocument ());
+ Type::AnyAttributeIterator i (s.begin ());
+ Type::AnyAttributeConstIterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.getAnyAttribute () != s)
+ return 1;
+
+ t.setAnyAttribute (s);
+ }
+ }
+
+ // Parsing/serialization functions.
+ //
+ {
+ istringstream is ("<t:root xmlns:t='test'>foo</t:root>");
+ parseRoot (is, xml_schema::Flags::dont_validate);
+ }
+
+ {
+ ostringstream os;
+ xml_schema::NamespaceInfomap m;
+ m["t"].name = "test";
+
+ serializeRoot (os, "foo", m);
+ }
+ }
+ catch (xml_schema::Exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/naming/java/test.xsd b/xsd-tests/cxx/tree/naming/java/test.xsd
index f525534..f525534 100644
--- a/tests/cxx/tree/naming/java/test.xsd
+++ b/xsd-tests/cxx/tree/naming/java/test.xsd
diff --git a/xsd-tests/cxx/tree/naming/knr/buildfile b/xsd-tests/cxx/tree/naming/knr/buildfile
new file mode 100644
index 0000000..c4c2287
--- /dev/null
+++ b/xsd-tests/cxx/tree/naming/knr/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/naming/knr/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --type-naming knr \
+ --function-naming knr \
+ --generate-ostream \
+ --generate-comparison \
+ --generate-wildcard \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/naming/knr/driver.cxx b/xsd-tests/cxx/tree/naming/knr/driver.cxx
new file mode 100644
index 0000000..8c75dd9
--- /dev/null
+++ b/xsd-tests/cxx/tree/naming/knr/driver.cxx
@@ -0,0 +1,154 @@
+// file : cxx/tree/naming/knr/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test K&R naming style.
+//
+
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Enum 'value' type.
+ //
+ {
+ gender::value v;
+ v = gender::female;
+ XSD_UNUSED (v);
+ }
+
+ // Anonymous type.
+ //
+ {
+ foo f ("a", "b");
+
+ if (f.a () != "a" || f.b () != "b")
+ return 1;
+ }
+
+ // Type name and accessors/modifiers.
+ //
+ {
+ type t ("bar");
+
+ // foo
+ //
+ {
+ type::foo_type* p = 0;
+ XSD_UNUSED (p);
+
+ type::foo_optional o;
+
+ if (t.foo ().present ())
+ return 1;
+
+ t.foo (o);
+ }
+
+ // bar
+ //
+ {
+ type::bar_type* p = 0;
+ XSD_UNUSED (p);
+
+ if (t.bar () != "bar")
+ return 1;
+
+ t.bar ("barbar");
+ }
+
+ // baz
+ //
+ {
+ type::baz_type* p = 0;
+ XSD_UNUSED (p);
+
+ type::baz_sequence s;
+ type::baz_iterator i (s.begin ());
+ type::baz_const_iterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.baz () != s)
+ return 1;
+
+ t.baz (s);
+ }
+
+ // any
+ //
+ {
+ type::any_sequence s (t.dom_document ());
+ type::any_iterator i (s.begin ());
+ type::any_const_iterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.any () != s)
+ return 1;
+
+ t.any (s);
+ }
+
+ // foo
+ //
+ {
+ type::fox_type x = type::fox_default_value ();
+
+ if (t.fox () != x)
+ return 1;
+
+ t.fox ("fox");
+ }
+
+ // any_attribute
+ //
+ {
+ type::any_attribute_set s (t.dom_document ());
+ type::any_attribute_iterator i (s.begin ());
+ type::any_attribute_const_iterator ci (s.begin ());
+ XSD_UNUSED (i);
+ XSD_UNUSED (ci);
+
+ if (t.any_attribute () != s)
+ return 1;
+
+ t.any_attribute (s);
+ }
+ }
+
+ // Parsing/serialization functions.
+ //
+ {
+ istringstream is ("<t:root xmlns:t='test'>foo</t:root>");
+ root (is, xml_schema::flags::dont_validate);
+ }
+
+ {
+ ostringstream os;
+ xml_schema::namespace_infomap m;
+ m["t"].name = "test";
+
+ root (os, "foo", m);
+ }
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/naming/knr/test.xsd b/xsd-tests/cxx/tree/naming/knr/test.xsd
index 4361544..4361544 100644
--- a/tests/cxx/tree/naming/knr/test.xsd
+++ b/xsd-tests/cxx/tree/naming/knr/test.xsd
diff --git a/xsd-tests/cxx/tree/order/buildfile b/xsd-tests/cxx/tree/order/buildfile
new file mode 100644
index 0000000..91c3cb7
--- /dev/null
+++ b/xsd-tests/cxx/tree/order/buildfile
@@ -0,0 +1,37 @@
+# file : cxx/tree/order/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-wildcard \
+ --generate-comparison \
+ --ordered-type t1_base \
+ --ordered-type t1_derived \
+ --ordered-type t2_base \
+ --ordered-type t2_derived \
+ --ordered-type t3_type \
+ --ordered-type t4_base \
+ --ordered-type t4_derived \
+ --ordered-type t5_base \
+ --ordered-type t5_derived \
+ --ordered-type t6_base \
+ --ordered-type t6_derived \
+ --ordered-type t7_type \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/order/driver.cxx b/xsd-tests/cxx/tree/order/driver.cxx
new file mode 100644
index 0000000..f1902ba
--- /dev/null
+++ b/xsd-tests/cxx/tree/order/driver.cxx
@@ -0,0 +1,64 @@
+// file : cxx/tree/order/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test ordered type support.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <cassert>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+using namespace xercesc;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ XSD_AUTO_PTR<root> r (root_ (argv[1], xml_schema::flags::dont_initialize));
+
+ root c (*r);
+ assert (c == *r);
+
+ for (root::t1_const_iterator j (r->t1 ().begin ());
+ j != r->t1 ().end (); ++j)
+ {
+ const t1_derived& d (*j);
+
+ for (t1_derived::content_order_const_iterator i (
+ d.content_order ().begin ()); i != d.content_order ().end (); ++i)
+ {
+ cout << i->id << ' ' << i->index << endl;
+ }
+ }
+
+ xml_schema::namespace_infomap map;
+
+ map["t"].name = "test";
+ map["t1"].name = "test1";
+
+ root_ (cout, *r, map, "UTF-8", xml_schema::flags::dont_initialize);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/order/output b/xsd-tests/cxx/tree/order/output
index 73442fe..73442fe 100644
--- a/tests/cxx/tree/order/output
+++ b/xsd-tests/cxx/tree/order/output
diff --git a/tests/cxx/tree/order/test.xml b/xsd-tests/cxx/tree/order/test.xml
index cd82936..cd82936 100644
--- a/tests/cxx/tree/order/test.xml
+++ b/xsd-tests/cxx/tree/order/test.xml
diff --git a/tests/cxx/tree/order/test.xsd b/xsd-tests/cxx/tree/order/test.xsd
index c30c027..c30c027 100644
--- a/tests/cxx/tree/order/test.xsd
+++ b/xsd-tests/cxx/tree/order/test.xsd
diff --git a/xsd-tests/cxx/tree/polymorphism/comparison/buildfile b/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
new file mode 100644
index 0000000..0bb0b77
--- /dev/null
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/polymorphism/comparison/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-polymorphic \
+ --polymorphic-type base \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx b/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
new file mode 100644
index 0000000..cadb225
--- /dev/null
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/driver.cxx
@@ -0,0 +1,85 @@
+// file : cxx/tree/polymorphism/comparison/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test comparison of polymorphic object models.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <sstream>
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ // Equals.
+ //
+ {
+ derived1 d ("a", 1);
+ d.b ("b");
+ type r1 (d);
+
+ assert (*r == r1);
+ }
+
+ // Values are not equal.
+ //
+ {
+ derived1 d ("a", 1);
+ d.b ("c");
+ type r1 (d);
+
+ assert (*r != r1);
+ }
+
+ // Values are not equal.
+ //
+ {
+ derived1 d ("a", 2);
+ d.b ("b");
+ type r1 (d);
+
+ assert (*r != r1);
+ }
+
+ // Different types.
+ //
+ {
+ derived2 d ("a", 1);
+ d.c ().push_back ("c");
+ type r1 (d);
+
+ assert (*r != r1);
+ }
+
+ xml_schema::namespace_infomap map;
+
+ map["t"].name = "test";
+
+ stringstream s;
+ root (s, *r, map);
+
+ XSD_AUTO_PTR<type> c (root (s, xml_schema::flags::dont_validate));
+
+ assert (*r == *c);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/polymorphism/comparison/test.xml b/xsd-tests/cxx/tree/polymorphism/comparison/test.xml
index 0b8c125..0b8c125 100644
--- a/tests/cxx/tree/polymorphism/comparison/test.xml
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/test.xml
diff --git a/tests/cxx/tree/polymorphism/comparison/test.xsd b/xsd-tests/cxx/tree/polymorphism/comparison/test.xsd
index 364d1b3..364d1b3 100644
--- a/tests/cxx/tree/polymorphism/comparison/test.xsd
+++ b/xsd-tests/cxx/tree/polymorphism/comparison/test.xsd
diff --git a/xsd-tests/cxx/tree/polymorphism/ostream/buildfile b/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
new file mode 100644
index 0000000..2237c73
--- /dev/null
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/buildfile
@@ -0,0 +1,26 @@
+# file : cxx/tree/polymorphism/ostream/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-polymorphic \
+ --polymorphic-type-all \
+ --root-element root \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx b/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
new file mode 100644
index 0000000..b030be9
--- /dev/null
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/driver.cxx
@@ -0,0 +1,34 @@
+// file : cxx/tree/polymorphism/ostream/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test printing of polymorphic object models.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+ cout << *r << endl;
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/polymorphism/ostream/output b/xsd-tests/cxx/tree/polymorphism/ostream/output
index e7fbd68..e7fbd68 100644
--- a/tests/cxx/tree/polymorphism/ostream/output
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/output
diff --git a/tests/cxx/tree/polymorphism/ostream/test.xml b/xsd-tests/cxx/tree/polymorphism/ostream/test.xml
index 5409d2a..5409d2a 100644
--- a/tests/cxx/tree/polymorphism/ostream/test.xml
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/test.xml
diff --git a/tests/cxx/tree/polymorphism/ostream/test.xsd b/xsd-tests/cxx/tree/polymorphism/ostream/test.xsd
index 688cd5a..688cd5a 100644
--- a/tests/cxx/tree/polymorphism/ostream/test.xsd
+++ b/xsd-tests/cxx/tree/polymorphism/ostream/test.xsd
diff --git a/xsd-tests/cxx/tree/polymorphism/same-type/buildfile b/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
new file mode 100644
index 0000000..46720d6
--- /dev/null
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/buildfile
@@ -0,0 +1,25 @@
+# file : cxx/tree/polymorphism/same-type/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-polymorphic \
+ --root-element root \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx b/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
new file mode 100644
index 0000000..94f82f5
--- /dev/null
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/driver.cxx
@@ -0,0 +1,35 @@
+// file : cxx/tree/polymorphism/same-type/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test substitution group and xsi:type that don't change the type.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ cout << *r << endl;
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/polymorphism/same-type/output b/xsd-tests/cxx/tree/polymorphism/same-type/output
index 04b5cbf..04b5cbf 100644
--- a/tests/cxx/tree/polymorphism/same-type/output
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/output
diff --git a/tests/cxx/tree/polymorphism/same-type/test.xml b/xsd-tests/cxx/tree/polymorphism/same-type/test.xml
index f8b6d1e..f8b6d1e 100644
--- a/tests/cxx/tree/polymorphism/same-type/test.xml
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/test.xml
diff --git a/tests/cxx/tree/polymorphism/same-type/test.xsd b/xsd-tests/cxx/tree/polymorphism/same-type/test.xsd
index a4157d3..a4157d3 100644
--- a/tests/cxx/tree/polymorphism/same-type/test.xsd
+++ b/xsd-tests/cxx/tree/polymorphism/same-type/test.xsd
diff --git a/xsd-tests/cxx/tree/prefix/.gitignore b/xsd-tests/cxx/tree/prefix/.gitignore
new file mode 100644
index 0000000..2457930
--- /dev/null
+++ b/xsd-tests/cxx/tree/prefix/.gitignore
@@ -0,0 +1,2 @@
+bar.?xx
+foo.?xx
diff --git a/tests/cxx/tree/prefix/bar.xsd b/xsd-tests/cxx/tree/prefix/bar.xsd
index 4e20902..4e20902 100644
--- a/tests/cxx/tree/prefix/bar.xsd
+++ b/xsd-tests/cxx/tree/prefix/bar.xsd
diff --git a/xsd-tests/cxx/tree/prefix/buildfile b/xsd-tests/cxx/tree/prefix/buildfile
new file mode 100644
index 0000000..7ac81de
--- /dev/null
+++ b/xsd-tests/cxx/tree/prefix/buildfile
@@ -0,0 +1,31 @@
+# file : cxx/tree/prefix/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = foo bar test
+
+exe{driver}: {hxx cxx}{* -{$fs}} {hxx ixx cxx}{$fs} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+for f: $fs
+{
+ <{hxx ixx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-polymorphic \
+ --polymorphic-type 'foo#base' \
+ --root-element root \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/prefix/driver.cxx b/xsd-tests/cxx/tree/prefix/driver.cxx
new file mode 100644
index 0000000..bd2e46d
--- /dev/null
+++ b/xsd-tests/cxx/tree/prefix/driver.cxx
@@ -0,0 +1,34 @@
+// file : cxx/tree/prefix/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test automatic prefix assignment.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+ root (std::cout, *r);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/prefix/foo.xsd b/xsd-tests/cxx/tree/prefix/foo.xsd
index 97a35cf..97a35cf 100644
--- a/tests/cxx/tree/prefix/foo.xsd
+++ b/xsd-tests/cxx/tree/prefix/foo.xsd
diff --git a/tests/cxx/tree/prefix/output b/xsd-tests/cxx/tree/prefix/output
index 9801a23..9801a23 100644
--- a/tests/cxx/tree/prefix/output
+++ b/xsd-tests/cxx/tree/prefix/output
diff --git a/tests/cxx/tree/prefix/test.xml b/xsd-tests/cxx/tree/prefix/test.xml
index b6d0dd6..b6d0dd6 100644
--- a/tests/cxx/tree/prefix/test.xml
+++ b/xsd-tests/cxx/tree/prefix/test.xml
diff --git a/tests/cxx/tree/prefix/test.xsd b/xsd-tests/cxx/tree/prefix/test.xsd
index 421fdc0..421fdc0 100644
--- a/tests/cxx/tree/prefix/test.xsd
+++ b/xsd-tests/cxx/tree/prefix/test.xsd
diff --git a/xsd-tests/cxx/tree/test-template/buildfile b/xsd-tests/cxx/tree/test-template/buildfile
new file mode 100644
index 0000000..b50e6c3
--- /dev/null
+++ b/xsd-tests/cxx/tree/test-template/buildfile
@@ -0,0 +1,23 @@
+# file : cxx/tree/test-template/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-ostream \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/test-template/driver.cxx b/xsd-tests/cxx/tree/test-template/driver.cxx
new file mode 100644
index 0000000..5257279
--- /dev/null
+++ b/xsd-tests/cxx/tree/test-template/driver.cxx
@@ -0,0 +1,35 @@
+// file : cxx/tree/test-template/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Insert test description here.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ try
+ {
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+
+ cout << *r << endl;
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+}
diff --git a/tests/cxx/tree/test-template/output b/xsd-tests/cxx/tree/test-template/output
index 2a50681..2a50681 100644
--- a/tests/cxx/tree/test-template/output
+++ b/xsd-tests/cxx/tree/test-template/output
diff --git a/tests/cxx/tree/test-template/test.xml b/xsd-tests/cxx/tree/test-template/test.xml
index 624a80c..624a80c 100644
--- a/tests/cxx/tree/test-template/test.xml
+++ b/xsd-tests/cxx/tree/test-template/test.xml
diff --git a/tests/cxx/tree/test-template/test.xsd b/xsd-tests/cxx/tree/test-template/test.xsd
index 07bebc7..07bebc7 100644
--- a/tests/cxx/tree/test-template/test.xsd
+++ b/xsd-tests/cxx/tree/test-template/test.xsd
diff --git a/xsd-tests/cxx/tree/types-only/buildfile b/xsd-tests/cxx/tree/types-only/buildfile
new file mode 100644
index 0000000..fa02277
--- /dev/null
+++ b/xsd-tests/cxx/tree/types-only/buildfile
@@ -0,0 +1,20 @@
+# file : cxx/tree/types-only/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --suppress-parsing \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/types-only/driver.cxx b/xsd-tests/cxx/tree/types-only/driver.cxx
new file mode 100644
index 0000000..730b807
--- /dev/null
+++ b/xsd-tests/cxx/tree/types-only/driver.cxx
@@ -0,0 +1,30 @@
+// file : cxx/tree/types-only/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test that code generated without parsing and serialization functions
+// still compiles.
+//
+
+#include <iostream>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ color_enum red (color_enum::red);
+ red_blue_enum blue (red_blue_enum::blue);
+
+ long_string_union num ("123");
+
+ string_list list;
+ list.push_back ("Hello");
+ list.push_back ("World");
+
+ complex_type t ("Hello, World!", "foo", color_enum::red);
+
+ anon a ("Hello, World!");
+}
diff --git a/tests/cxx/tree/types-only/test.xsd b/xsd-tests/cxx/tree/types-only/test.xsd
index 9f02240..9f02240 100644
--- a/tests/cxx/tree/types-only/test.xsd
+++ b/xsd-tests/cxx/tree/types-only/test.xsd
diff --git a/xsd-tests/cxx/tree/union/ctor/buildfile b/xsd-tests/cxx/tree/union/ctor/buildfile
new file mode 100644
index 0000000..6715cb6
--- /dev/null
+++ b/xsd-tests/cxx/tree/union/ctor/buildfile
@@ -0,0 +1,22 @@
+# file : cxx/tree/union/ctor/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --generate-doxygen \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/union/ctor/driver.cxx b/xsd-tests/cxx/tree/union/ctor/driver.cxx
new file mode 100644
index 0000000..246eea8
--- /dev/null
+++ b/xsd-tests/cxx/tree/union/ctor/driver.cxx
@@ -0,0 +1,30 @@
+// file : cxx/tree/union/ctor/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test union constructors.
+//
+#include <string>
+
+#include "test.hxx"
+
+using namespace std;
+using namespace test;
+
+int
+main ()
+{
+ // Test ctor(const std::string&)
+ //
+ {
+ string const s ("123");
+ int_string_union u (s);
+ type t (s);
+ }
+
+ // Test ctor(const char*).
+ //
+ {
+ int_string_union u ("123");
+ type t ("123");
+ }
+}
diff --git a/tests/cxx/tree/union/ctor/test.xsd b/xsd-tests/cxx/tree/union/ctor/test.xsd
index 9601093..9601093 100644
--- a/tests/cxx/tree/union/ctor/test.xsd
+++ b/xsd-tests/cxx/tree/union/ctor/test.xsd
diff --git a/xsd-tests/cxx/tree/wildcard/buildfile b/xsd-tests/cxx/tree/wildcard/buildfile
new file mode 100644
index 0000000..67edcdc
--- /dev/null
+++ b/xsd-tests/cxx/tree/wildcard/buildfile
@@ -0,0 +1,27 @@
+# file : cxx/tree/wildcard/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx ixx cxx}{test} $libs
+
+exe{driver}: xml{test}: test.input = true
+exe{driver}: file{output}: test.stdout = true
+
+<{hxx ixx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --generate-inline \
+ --generate-serialization \
+ --generate-wildcard \
+ --generate-default-ctor \
+ --generate-from-base-ctor \
+ --generate-comparison \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/cxx/tree/wildcard/driver.cxx b/xsd-tests/cxx/tree/wildcard/driver.cxx
new file mode 100644
index 0000000..e3040c7
--- /dev/null
+++ b/xsd-tests/cxx/tree/wildcard/driver.cxx
@@ -0,0 +1,203 @@
+// file : cxx/tree/wildcard/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+// Test wildcard (any & anyAttribute) mapping.
+//
+
+#include <memory> // std::auto_ptr/unique_ptr
+#include <sstream>
+#include <iostream>
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include "test.hxx" // Get XSD_CXX11 defined.
+
+#include <xsd/cxx/xml/string.hxx>
+
+using namespace std;
+using namespace test;
+using namespace xercesc;
+
+namespace xml = xsd::cxx::xml;
+
+void
+print (type& t)
+{
+ if (t.att ())
+ cout << *t.att () << endl;
+
+ type::any_attribute_set& as (t.any_attribute ());
+
+ for (type::any_attribute_iterator i (as.begin ()); i != as.end (); ++i)
+ {
+ cout << xml::transcode<char> (i->getTextContent ()) << endl;
+ }
+
+ cout << xml::transcode<char> (t.any ().getTextContent ()) << endl
+ << t.foo () << endl;
+
+ if (t.any1 ())
+ cout << xml::transcode<char> (t.any1 ()->getTextContent ()) << endl;
+
+ cout << t.bar () << endl;
+
+ type::any2_sequence& es (t.any2 ());
+
+ for (type::any2_iterator i (es.begin ()); i != es.end (); ++i)
+ {
+ cout << xml::transcode<char> (i->getTextContent ()) << endl;
+ }
+
+ cout << endl;
+}
+
+int
+main (int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ cerr << "usage: " << argv[0] << " test.xml" << endl;
+ return 1;
+ }
+
+ XMLPlatformUtils::Initialize ();
+
+ try
+ {
+ // Test accessors/modifiers for various cardinalities.
+ //
+ type t;
+
+ DOMDocument& doc (t.dom_document ());
+
+ // one
+ //
+ {
+ DOMElement* e (doc.createElement (xml::string ("a").c_str ()));
+ t.any (*e);
+ e->release ();
+ assert (xml::transcode<char> (t.any ().getTagName ()) == "a");
+
+ t.any (doc.createElement (xml::string ("b").c_str ()));
+ assert (xml::transcode<char> (t.any ().getTagName ()) == "b");
+ }
+
+ // optional
+ //
+ {
+ assert (!t.any1 ().present ());
+
+ DOMElement* e (doc.createElement (xml::string ("a").c_str ()));
+ t.any1 (*e);
+ e->release ();
+ assert (t.any1 ().present ());
+ assert (xml::transcode<char> (t.any1 ().get ().getTagName ()) == "a");
+
+ t.any1 (doc.createElement (xml::string ("b").c_str ()));
+ assert (xml::transcode<char> (t.any1 ()->getTagName ()) == "b");
+
+ type::any1_optional c (
+ doc.createElement (xml::string ("c").c_str ()), doc);
+ t.any1 (c);
+ assert (xml::transcode<char> (t.any1 ()->getTagName ()) == "c");
+ }
+
+
+ // sequence
+ //
+ {
+ type::any2_sequence& s (t.any2 ());
+
+ DOMElement* e (doc.createElement (xml::string ("a").c_str ()));
+ s.push_back (*e);
+ e->release ();
+ s.push_back (doc.createElement (xml::string ("b").c_str ()));
+ assert (s.size () == 2);
+
+ for (type::any2_iterator i (s.begin ()); i != s.end (); ++i)
+ {
+ if (i == s.begin ())
+ assert (xml::transcode<char> (i->getTagName ()) == "a");
+ else
+ assert (xml::transcode<char> ((*i).getTagName ()) == "b");
+ }
+
+ // copy c-tor
+ type::any2_sequence cs (s, doc);
+ assert (cs.size () == 2);
+ assert (xml::transcode<char> (cs[0].getTagName ()) == "a");
+ assert (xml::transcode<char> (cs[1].getTagName ()) == "b");
+
+ // assignment
+ t.any2 (cs);
+ assert (s.size () == 2);
+ assert (xml::transcode<char> (s[0].getTagName ()) == "a");
+ assert (xml::transcode<char> (s[1].getTagName ()) == "b");
+ }
+
+ // anyAttribute
+ //
+ {
+ type::any_attribute_set& s (t.any_attribute ());
+
+ DOMAttr* a (doc.createAttribute (xml::string ("a").c_str ()));
+ s.insert (*a);
+ a->release ();
+ s.insert (doc.createAttribute (xml::string ("b").c_str ()));
+ assert (s.size () == 2);
+
+ assert (s.find ("a") != s.end ());
+ assert (s.find ("b") != s.end ());
+
+ for (type::any_attribute_iterator i (s.begin ()); i != s.end (); ++i)
+ {
+ assert (xml::transcode<char> (i->getName ()) == "a" ||
+ xml::transcode<char> ((*i).getName ()) == "b");
+ }
+
+ // copy c-tor
+ type::any_attribute_set cs (s, doc);
+ assert (cs.size () == 2);
+ assert (cs.count ("a"));
+ assert (cs.count ("b"));
+
+ // assignment
+ t.any_attribute (cs);
+ assert (s.size () == 2);
+ assert (s.count ("a"));
+ assert (s.count ("b"));
+ }
+
+ // Test parsing
+ //
+ XSD_AUTO_PTR<type> r (root (argv[1]));
+ print (*r);
+
+ // Test serialization.
+ //
+ xml_schema::namespace_infomap map;
+
+ map["t"].name = "test";
+ map["t"].schema = "test.xsd";
+ map["o"].name = "other";
+
+ stringstream iostr;
+ root (iostr, *r, map);
+
+ // cout << iostr.str () << endl
+ // << endl;
+
+ XSD_AUTO_PTR<type> copy (root (iostr, argv[1]));
+ assert (*copy == *r);
+
+ print (*copy);
+ }
+ catch (xml_schema::exception const& e)
+ {
+ cerr << e << endl;
+ return 1;
+ }
+
+ XMLPlatformUtils::Terminate ();
+}
diff --git a/tests/cxx/tree/wildcard/output b/xsd-tests/cxx/tree/wildcard/output
index b23b488..b23b488 100644
--- a/tests/cxx/tree/wildcard/output
+++ b/xsd-tests/cxx/tree/wildcard/output
diff --git a/tests/cxx/tree/wildcard/test.xml b/xsd-tests/cxx/tree/wildcard/test.xml
index b0c3267..b0c3267 100644
--- a/tests/cxx/tree/wildcard/test.xml
+++ b/xsd-tests/cxx/tree/wildcard/test.xml
diff --git a/tests/cxx/tree/wildcard/test.xsd b/xsd-tests/cxx/tree/wildcard/test.xsd
index 6c7b308..6c7b308 100644
--- a/tests/cxx/tree/wildcard/test.xsd
+++ b/xsd-tests/cxx/tree/wildcard/test.xsd
diff --git a/xsd-tests/failed/.gitignore b/xsd-tests/failed/.gitignore
new file mode 100644
index 0000000..f691ede
--- /dev/null
+++ b/xsd-tests/failed/.gitignore
@@ -0,0 +1 @@
+test-*.?xx
diff --git a/xsd-tests/failed/buildfile b/xsd-tests/failed/buildfile
new file mode 100644
index 0000000..8739001
--- /dev/null
+++ b/xsd-tests/failed/buildfile
@@ -0,0 +1,27 @@
+# file : failed/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = test-00
+
+exe{driver}: {hxx cxx}{* -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/failed/driver.cxx b/xsd-tests/failed/driver.cxx
new file mode 100644
index 0000000..a84b24c
--- /dev/null
+++ b/xsd-tests/failed/driver.cxx
@@ -0,0 +1,9 @@
+// file : failed/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test-00.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/failed/test-00.xsd b/xsd-tests/failed/test-00.xsd
index 5223f82..5223f82 100644
--- a/tests/failed/test-00.xsd
+++ b/xsd-tests/failed/test-00.xsd
diff --git a/xsd-tests/manifest b/xsd-tests/manifest
new file mode 100644
index 0000000..7e2e893
--- /dev/null
+++ b/xsd-tests/manifest
@@ -0,0 +1,15 @@
+: 1
+name: xsd-tests
+version: 4.2.0-b.1.z
+project: xsd
+summary: XML Schema to C++ data binding compiler tests
+license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
+description-file: README
+url: https://www.codesynthesis.com/projects/xsd/
+doc-url: https://www.codesynthesis.com/projects/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd-tests/
+email: xsd-users@codesynthesis.com ; Mailing list
+depends: * build2 >= 0.13.0
+depends: * bpkg >= 0.13.0
+depends: libxsd == $
+depends: libxerces-c ^3.0.0
diff --git a/xsd-tests/morphing/anonymous/attribute-group/buildfile b/xsd-tests/morphing/anonymous/attribute-group/buildfile
new file mode 100644
index 0000000..3df24fc
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/attribute-group/buildfile
@@ -0,0 +1,22 @@
+# file : morphing/anonymous/attribute-group/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/morphing/anonymous/attribute-group/driver.cxx b/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
new file mode 100644
index 0000000..1632d7d
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/attribute-group/driver.cxx
@@ -0,0 +1,9 @@
+// file : morphing/anonymous/attribute-group/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/morphing/anonymous/attribute-group/test.xsd b/xsd-tests/morphing/anonymous/attribute-group/test.xsd
index 657be8a..657be8a 100644
--- a/tests/morphing/anonymous/attribute-group/test.xsd
+++ b/xsd-tests/morphing/anonymous/attribute-group/test.xsd
diff --git a/xsd-tests/morphing/anonymous/basic/buildfile b/xsd-tests/morphing/anonymous/basic/buildfile
new file mode 100644
index 0000000..e2573e7
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/basic/buildfile
@@ -0,0 +1,22 @@
+# file : morphing/anonymous/basic/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/morphing/anonymous/basic/driver.cxx b/xsd-tests/morphing/anonymous/basic/driver.cxx
new file mode 100644
index 0000000..fc289eb
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/basic/driver.cxx
@@ -0,0 +1,9 @@
+// file : morphing/anonymous/basic/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/morphing/anonymous/test-000.xsd b/xsd-tests/morphing/anonymous/basic/test.xsd
index ce930d8..ce930d8 100644
--- a/tests/morphing/anonymous/test-000.xsd
+++ b/xsd-tests/morphing/anonymous/basic/test.xsd
diff --git a/xsd-tests/morphing/anonymous/cyclic-inclusion/.gitignore b/xsd-tests/morphing/anonymous/cyclic-inclusion/.gitignore
new file mode 100644
index 0000000..b27b7d8
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/.gitignore
@@ -0,0 +1,2 @@
+includee.?xx
+includer.?xx
diff --git a/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile b/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
new file mode 100644
index 0000000..d25143a
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/buildfile
@@ -0,0 +1,27 @@
+# file : morphing/anonymous/cyclic-inclusion/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = includee includer
+
+exe{driver}: {hxx cxx}{* -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx b/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
new file mode 100644
index 0000000..9046ee4
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/driver.cxx
@@ -0,0 +1,10 @@
+// file : morphing/anonymous/cyclic-inclusion/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "includee.hxx"
+#include "includer.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/morphing/anonymous/cyclic-inclusion/includee.xsd b/xsd-tests/morphing/anonymous/cyclic-inclusion/includee.xsd
index 51f7916..51f7916 100644
--- a/tests/morphing/anonymous/cyclic-inclusion/includee.xsd
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/includee.xsd
diff --git a/tests/morphing/anonymous/cyclic-inclusion/includer.xsd b/xsd-tests/morphing/anonymous/cyclic-inclusion/includer.xsd
index 54e6b69..54e6b69 100644
--- a/tests/morphing/anonymous/cyclic-inclusion/includer.xsd
+++ b/xsd-tests/morphing/anonymous/cyclic-inclusion/includer.xsd
diff --git a/xsd-tests/morphing/anonymous/group/buildfile b/xsd-tests/morphing/anonymous/group/buildfile
new file mode 100644
index 0000000..9cedf39
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/group/buildfile
@@ -0,0 +1,22 @@
+# file : morphing/anonymous/group/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/morphing/anonymous/group/driver.cxx b/xsd-tests/morphing/anonymous/group/driver.cxx
new file mode 100644
index 0000000..2a76396
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/group/driver.cxx
@@ -0,0 +1,9 @@
+// file : morphing/anonymous/group/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/morphing/anonymous/group/test.xsd b/xsd-tests/morphing/anonymous/group/test.xsd
index 73e07af..73e07af 100644
--- a/tests/morphing/anonymous/group/test.xsd
+++ b/xsd-tests/morphing/anonymous/group/test.xsd
diff --git a/xsd-tests/morphing/anonymous/unstable/.gitignore b/xsd-tests/morphing/anonymous/unstable/.gitignore
new file mode 100644
index 0000000..c1b04fd
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/unstable/.gitignore
@@ -0,0 +1 @@
+includee-*.?xx
diff --git a/xsd-tests/morphing/anonymous/unstable/buildfile b/xsd-tests/morphing/anonymous/unstable/buildfile
new file mode 100644
index 0000000..e83cee7
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/unstable/buildfile
@@ -0,0 +1,31 @@
+# file : morphing/anonymous/unstable/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+fs = includee-1 includee-2
+
+./: {hxx cxx}{$fs}
+
+# Make sure that the schema files are compilable.
+#
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+# Test that the invalid schema files compilation expectedly fails.
+#
+./: testscript xsd{** -{$fs}} $xsd
+
+testscript{*}:
+{
+ test = $xsd
+ test.arguments = cxx-tree --std c++11
+}
diff --git a/tests/morphing/anonymous/unstable/includee-1.xsd b/xsd-tests/morphing/anonymous/unstable/includee-1.xsd
index 916816f..916816f 100644
--- a/tests/morphing/anonymous/unstable/includee-1.xsd
+++ b/xsd-tests/morphing/anonymous/unstable/includee-1.xsd
diff --git a/xsd-tests/morphing/anonymous/unstable/includee-2.xsd b/xsd-tests/morphing/anonymous/unstable/includee-2.xsd
new file mode 100644
index 0000000..c0eda26
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/unstable/includee-2.xsd
@@ -0,0 +1,14 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test">
+
+ <xsd:element name="base">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/tests/morphing/anonymous/unstable/includer.xsd b/xsd-tests/morphing/anonymous/unstable/includer.xsd
index 4593b5f..4593b5f 100644
--- a/tests/morphing/anonymous/unstable/includer.xsd
+++ b/xsd-tests/morphing/anonymous/unstable/includer.xsd
diff --git a/xsd-tests/morphing/anonymous/unstable/testscript b/xsd-tests/morphing/anonymous/unstable/testscript
new file mode 100644
index 0000000..a9057e1
--- /dev/null
+++ b/xsd-tests/morphing/anonymous/unstable/testscript
@@ -0,0 +1,11 @@
+# file : morphing/anonymous/unstable/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: unstable-conflict
+:
+$* --output-dir $~ $src_base/includer.xsd 2>>/"EOE" != 0
+ $src_base/includee-2.xsd:8:28: error: element name 'base' creates an unstable conflict when used as a type name
+ $src_base/includee-1.xsd:8:31: info: conflicting type is defined here
+ $src_base/includee-2.xsd:8:28: info: use --anonymous-regex to resolve this conflict
+ $src_base/includee-2.xsd:8:28: info: and don't forget to pass the same option when translating 'includee-2.xsd' and all the schemas that refer to it
+ EOE
diff --git a/xsd-tests/processing/inheritance/.gitignore b/xsd-tests/processing/inheritance/.gitignore
new file mode 100644
index 0000000..2c7adec
--- /dev/null
+++ b/xsd-tests/processing/inheritance/.gitignore
@@ -0,0 +1,3 @@
+driver-???
+driver-???.?xx
+test-*.?xx
diff --git a/xsd-tests/processing/inheritance/buildfile b/xsd-tests/processing/inheritance/buildfile
new file mode 100644
index 0000000..09e64a4
--- /dev/null
+++ b/xsd-tests/processing/inheritance/buildfile
@@ -0,0 +1,36 @@
+# file : processing/inheritance/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+for nm: 000 001
+{
+ dr = "driver-$nm"
+ sc = "test-$nm"
+
+ ./: exe{$dr}: cxx{$dr} {hxx cxx}{$sc} $libs
+
+ cxx{$dr}: in{driver}
+ {
+ # Note: we can't use $nm$ in driver.cxx.in since it will be substituted by
+ # the latest $nm value.
+ #
+ num = $nm
+ }
+
+ <{hxx cxx}{$sc}>: xsd{$sc} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/processing/inheritance/driver.cxx.in b/xsd-tests/processing/inheritance/driver.cxx.in
new file mode 100644
index 0000000..df18427
--- /dev/null
+++ b/xsd-tests/processing/inheritance/driver.cxx.in
@@ -0,0 +1,9 @@
+// file : processing/inheritance/driver.cxx.in
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test-$num$.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/processing/inheritance/test-000.xsd b/xsd-tests/processing/inheritance/test-000.xsd
index ef1ef71..ef1ef71 100644
--- a/tests/processing/inheritance/test-000.xsd
+++ b/xsd-tests/processing/inheritance/test-000.xsd
diff --git a/tests/processing/inheritance/test-001.xsd b/xsd-tests/processing/inheritance/test-001.xsd
index 5afc997..5afc997 100644
--- a/tests/processing/inheritance/test-001.xsd
+++ b/xsd-tests/processing/inheritance/test-001.xsd
diff --git a/xsd-tests/schema/anonymous/buildfile b/xsd-tests/schema/anonymous/buildfile
new file mode 100644
index 0000000..cc01697
--- /dev/null
+++ b/xsd-tests/schema/anonymous/buildfile
@@ -0,0 +1,22 @@
+# file : schema/anonymous/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/anonymous/driver.cxx b/xsd-tests/schema/anonymous/driver.cxx
new file mode 100644
index 0000000..f902fdb
--- /dev/null
+++ b/xsd-tests/schema/anonymous/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/anonymous/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/anonymous/test.xsd b/xsd-tests/schema/anonymous/test.xsd
index cba3300..cba3300 100644
--- a/tests/schema/anonymous/test.xsd
+++ b/xsd-tests/schema/anonymous/test.xsd
diff --git a/xsd-tests/schema/any-attribute/buildfile b/xsd-tests/schema/any-attribute/buildfile
new file mode 100644
index 0000000..e4275a4
--- /dev/null
+++ b/xsd-tests/schema/any-attribute/buildfile
@@ -0,0 +1,12 @@
+# file : schema/any-attribute/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Test that the invalid schema files compilation expectedly fails.
+#
+./: testscript xsd{*} $xsd
+
+testscript{*}:
+{
+ test = $xsd
+ test.arguments = cxx-tree --std c++11
+}
diff --git a/tests/schema/any-attribute/test.xsd b/xsd-tests/schema/any-attribute/test.xsd
index 55419c4..55419c4 100644
--- a/tests/schema/any-attribute/test.xsd
+++ b/xsd-tests/schema/any-attribute/test.xsd
diff --git a/xsd-tests/schema/any-attribute/testscript b/xsd-tests/schema/any-attribute/testscript
new file mode 100644
index 0000000..d9da7c1
--- /dev/null
+++ b/xsd-tests/schema/any-attribute/testscript
@@ -0,0 +1,8 @@
+# file : schema/any-attribute/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: decl-after-any-attribute
+:
+$* --output-dir $~ $src_base/test.xsd 2>>/"EOE" != 0
+ $src_base/test.xsd:12:44: error: anyAttribute must not be followed by other declarations
+ EOE
diff --git a/xsd-tests/schema/any-type/buildfile b/xsd-tests/schema/any-type/buildfile
new file mode 100644
index 0000000..e575562
--- /dev/null
+++ b/xsd-tests/schema/any-type/buildfile
@@ -0,0 +1,24 @@
+# file : schema/any-type/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0]) 2>>?~%EOE%
+ %.+(warning F00\d|info):.+%.+
+ EOE
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/any-type/driver.cxx b/xsd-tests/schema/any-type/driver.cxx
new file mode 100644
index 0000000..a94f099
--- /dev/null
+++ b/xsd-tests/schema/any-type/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/any-type/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/any-type/test.xsd b/xsd-tests/schema/any-type/test.xsd
index 9e3ff79..9e3ff79 100644
--- a/tests/schema/any-type/test.xsd
+++ b/xsd-tests/schema/any-type/test.xsd
diff --git a/xsd-tests/schema/any/.gitignore b/xsd-tests/schema/any/.gitignore
new file mode 100644
index 0000000..fca6147
--- /dev/null
+++ b/xsd-tests/schema/any/.gitignore
@@ -0,0 +1,5 @@
+driver-test
+driver-fail
+driver-test.?xx
+driver-fail.?xx
+fail.?xx
diff --git a/xsd-tests/schema/any/buildfile b/xsd-tests/schema/any/buildfile
new file mode 100644
index 0000000..6b76348
--- /dev/null
+++ b/xsd-tests/schema/any/buildfile
@@ -0,0 +1,47 @@
+# file : schema/any/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+for sc: test fail
+{
+ dr = "driver-$sc"
+
+ ./: exe{$dr}: cxx{$dr} {hxx cxx}{$sc} $libs
+
+ cxx{$dr}: in{driver}
+ {
+ # Note: we can't use $sc$ in driver.cxx.in since it will be substituted by
+ # the latest $sc value.
+ #
+ sch = $sc
+ }
+}
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+<{hxx cxx}{fail}>: xsd{fail} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0]) 2>>?~%EOE%
+ %.+(warning T001:|info:).+%{9}
+ EOE
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/any/driver.cxx.in b/xsd-tests/schema/any/driver.cxx.in
new file mode 100644
index 0000000..9c36761
--- /dev/null
+++ b/xsd-tests/schema/any/driver.cxx.in
@@ -0,0 +1,9 @@
+// file : schema/any/driver.cxx.in
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "$sch$.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/any/fail.xsd b/xsd-tests/schema/any/fail.xsd
index 2eb9513..2eb9513 100644
--- a/tests/schema/any/fail.xsd
+++ b/xsd-tests/schema/any/fail.xsd
diff --git a/tests/schema/any/test.xsd b/xsd-tests/schema/any/test.xsd
index ff896fd..ff896fd 100644
--- a/tests/schema/any/test.xsd
+++ b/xsd-tests/schema/any/test.xsd
diff --git a/xsd-tests/schema/attribute-group/.gitignore b/xsd-tests/schema/attribute-group/.gitignore
new file mode 100644
index 0000000..a935c30
--- /dev/null
+++ b/xsd-tests/schema/attribute-group/.gitignore
@@ -0,0 +1 @@
+global.?xx
diff --git a/xsd-tests/schema/attribute-group/buildfile b/xsd-tests/schema/attribute-group/buildfile
new file mode 100644
index 0000000..b9ca83b
--- /dev/null
+++ b/xsd-tests/schema/attribute-group/buildfile
@@ -0,0 +1,22 @@
+# file : schema/attribute-group/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -global} {hxx cxx}{global} $libs
+
+<{hxx cxx}{global}>: xsd{global} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/attribute-group/driver.cxx b/xsd-tests/schema/attribute-group/driver.cxx
new file mode 100644
index 0000000..328cef4
--- /dev/null
+++ b/xsd-tests/schema/attribute-group/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/attribute-group/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "global.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/attribute-group/global.xsd b/xsd-tests/schema/attribute-group/global.xsd
index 6ee0539..6ee0539 100644
--- a/tests/schema/attribute-group/global.xsd
+++ b/xsd-tests/schema/attribute-group/global.xsd
diff --git a/xsd-tests/schema/attribute/.gitignore b/xsd-tests/schema/attribute/.gitignore
new file mode 100644
index 0000000..88cd012
--- /dev/null
+++ b/xsd-tests/schema/attribute/.gitignore
@@ -0,0 +1,3 @@
+global.?xx
+local.?xx
+ref.?xx
diff --git a/xsd-tests/schema/attribute/buildfile b/xsd-tests/schema/attribute/buildfile
new file mode 100644
index 0000000..00e5410
--- /dev/null
+++ b/xsd-tests/schema/attribute/buildfile
@@ -0,0 +1,27 @@
+# file : schema/attribute/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = global local ref
+
+exe{driver}: {hxx cxx}{* -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/attribute/driver.cxx b/xsd-tests/schema/attribute/driver.cxx
new file mode 100644
index 0000000..3d29b36
--- /dev/null
+++ b/xsd-tests/schema/attribute/driver.cxx
@@ -0,0 +1,11 @@
+// file : schema/attribute/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "ref.hxx"
+#include "global.hxx"
+#include "local.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/attribute/global.xsd b/xsd-tests/schema/attribute/global.xsd
index e2dcc93..e2dcc93 100644
--- a/tests/schema/attribute/global.xsd
+++ b/xsd-tests/schema/attribute/global.xsd
diff --git a/tests/schema/attribute/local.xsd b/xsd-tests/schema/attribute/local.xsd
index 7a7a480..7a7a480 100644
--- a/tests/schema/attribute/local.xsd
+++ b/xsd-tests/schema/attribute/local.xsd
diff --git a/xsd-tests/schema/attribute/ref.xsd b/xsd-tests/schema/attribute/ref.xsd
new file mode 100644
index 0000000..d806ff3
--- /dev/null
+++ b/xsd-tests/schema/attribute/ref.xsd
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns="http://www.codesynthesis.com/xmlns/test"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test">
+
+
+ <!-- Easy case. -->
+
+ <xsd:attribute name="foo" type="xsd:string"/>
+
+ <xsd:complexType name="Foo2">
+ <xsd:attribute ref="foo"/>
+ </xsd:complexType>
+
+
+
+ <!-- Forward reference to a yet undeclared attribute. -->
+
+ <xsd:complexType name="Bar3">
+ <xsd:attribute ref="bar"/>
+ </xsd:complexType>
+
+ <xsd:attribute name="bar" type="xsd:string"/>
+
+
+
+ <!-- Reference to an attribute with a forward reference to a yet
+ undeclared type. -->
+
+ <xsd:attribute name="baz" type="Baz2"/>
+
+ <xsd:complexType name="Baz3">
+ <xsd:attribute ref="baz"/>
+ </xsd:complexType>
+
+ <xsd:simpleType name="Baz2">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+</xsd:schema>
diff --git a/xsd-tests/schema/cardinality/buildfile b/xsd-tests/schema/cardinality/buildfile
new file mode 100644
index 0000000..cfbb732
--- /dev/null
+++ b/xsd-tests/schema/cardinality/buildfile
@@ -0,0 +1,22 @@
+# file : schema/cardinality/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/cardinality/driver.cxx b/xsd-tests/schema/cardinality/driver.cxx
new file mode 100644
index 0000000..d8b218e
--- /dev/null
+++ b/xsd-tests/schema/cardinality/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/cardinality/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/cardinality/test.xsd b/xsd-tests/schema/cardinality/test.xsd
index b27f923..b27f923 100644
--- a/tests/schema/cardinality/test.xsd
+++ b/xsd-tests/schema/cardinality/test.xsd
diff --git a/xsd-tests/schema/chameleon/.gitignore b/xsd-tests/schema/chameleon/.gitignore
new file mode 100644
index 0000000..4ec7484
--- /dev/null
+++ b/xsd-tests/schema/chameleon/.gitignore
@@ -0,0 +1 @@
+includer.?xx
diff --git a/xsd-tests/schema/chameleon/buildfile b/xsd-tests/schema/chameleon/buildfile
new file mode 100644
index 0000000..0143422
--- /dev/null
+++ b/xsd-tests/schema/chameleon/buildfile
@@ -0,0 +1,27 @@
+# file : schema/chameleon/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = includer schemas/includee
+
+exe{driver}: {hxx cxx}{** -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $directory($path($>[0])) \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/chameleon/driver.cxx b/xsd-tests/schema/chameleon/driver.cxx
new file mode 100644
index 0000000..7b408ef
--- /dev/null
+++ b/xsd-tests/schema/chameleon/driver.cxx
@@ -0,0 +1,10 @@
+// file : schema/chameleon/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "includer.hxx"
+#include "schemas/includee.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/chameleon/includer.xsd b/xsd-tests/schema/chameleon/includer.xsd
index c93ea18..c93ea18 100644
--- a/tests/schema/chameleon/includer.xsd
+++ b/xsd-tests/schema/chameleon/includer.xsd
diff --git a/xsd-tests/schema/chameleon/schemas/.gitignore b/xsd-tests/schema/chameleon/schemas/.gitignore
new file mode 100644
index 0000000..dcf4bb9
--- /dev/null
+++ b/xsd-tests/schema/chameleon/schemas/.gitignore
@@ -0,0 +1 @@
+includee.?xx
diff --git a/tests/schema/chameleon/schemas/includee.xsd b/xsd-tests/schema/chameleon/schemas/includee.xsd
index d89b9c4..d89b9c4 100644
--- a/tests/schema/chameleon/schemas/includee.xsd
+++ b/xsd-tests/schema/chameleon/schemas/includee.xsd
diff --git a/xsd-tests/schema/enumeration/buildfile b/xsd-tests/schema/enumeration/buildfile
new file mode 100644
index 0000000..efb6b9e
--- /dev/null
+++ b/xsd-tests/schema/enumeration/buildfile
@@ -0,0 +1,22 @@
+# file : schema/enumeration/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/enumeration/driver.cxx b/xsd-tests/schema/enumeration/driver.cxx
new file mode 100644
index 0000000..406c8ab
--- /dev/null
+++ b/xsd-tests/schema/enumeration/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/enumeration/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/enumeration/test.xsd b/xsd-tests/schema/enumeration/test.xsd
index b8253d9..b8253d9 100644
--- a/tests/schema/enumeration/test.xsd
+++ b/xsd-tests/schema/enumeration/test.xsd
diff --git a/xsd-tests/schema/forward/buildfile b/xsd-tests/schema/forward/buildfile
new file mode 100644
index 0000000..969f99f
--- /dev/null
+++ b/xsd-tests/schema/forward/buildfile
@@ -0,0 +1,22 @@
+# file : schema/forward/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/forward/driver.cxx b/xsd-tests/schema/forward/driver.cxx
new file mode 100644
index 0000000..ee6519e
--- /dev/null
+++ b/xsd-tests/schema/forward/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/forward/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/forward/test.xsd b/xsd-tests/schema/forward/test.xsd
index c7cc24e..c7cc24e 100644
--- a/tests/schema/forward/test.xsd
+++ b/xsd-tests/schema/forward/test.xsd
diff --git a/xsd-tests/schema/group/.gitignore b/xsd-tests/schema/group/.gitignore
new file mode 100644
index 0000000..a935c30
--- /dev/null
+++ b/xsd-tests/schema/group/.gitignore
@@ -0,0 +1 @@
+global.?xx
diff --git a/xsd-tests/schema/group/buildfile b/xsd-tests/schema/group/buildfile
new file mode 100644
index 0000000..dd926dd
--- /dev/null
+++ b/xsd-tests/schema/group/buildfile
@@ -0,0 +1,27 @@
+# file : schema/group/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = test global
+
+exe{driver}: {hxx cxx}{* -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/group/driver.cxx b/xsd-tests/schema/group/driver.cxx
new file mode 100644
index 0000000..e754194
--- /dev/null
+++ b/xsd-tests/schema/group/driver.cxx
@@ -0,0 +1,10 @@
+// file : schema/group/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+#include "global.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/group/global.xsd b/xsd-tests/schema/group/global.xsd
index 27ccadf..27ccadf 100644
--- a/tests/schema/group/global.xsd
+++ b/xsd-tests/schema/group/global.xsd
diff --git a/tests/schema/group/test.xsd b/xsd-tests/schema/group/test.xsd
index 7527cbb..7527cbb 100644
--- a/tests/schema/group/test.xsd
+++ b/xsd-tests/schema/group/test.xsd
diff --git a/xsd-tests/schema/import/.gitignore b/xsd-tests/schema/import/.gitignore
new file mode 100644
index 0000000..6cdf6db
--- /dev/null
+++ b/xsd-tests/schema/import/.gitignore
@@ -0,0 +1 @@
+importer.?xx
diff --git a/xsd-tests/schema/import/buildfile b/xsd-tests/schema/import/buildfile
new file mode 100644
index 0000000..9e6aec5
--- /dev/null
+++ b/xsd-tests/schema/import/buildfile
@@ -0,0 +1,27 @@
+# file : schema/import/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = importer schemas/importee
+
+exe{driver}: {hxx cxx}{** -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $directory($path($>[0])) \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/import/driver.cxx b/xsd-tests/schema/import/driver.cxx
new file mode 100644
index 0000000..a94b2f3
--- /dev/null
+++ b/xsd-tests/schema/import/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/import/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "importer.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/import/importer.xsd b/xsd-tests/schema/import/importer.xsd
index 82fc33c..82fc33c 100644
--- a/tests/schema/import/importer.xsd
+++ b/xsd-tests/schema/import/importer.xsd
diff --git a/xsd-tests/schema/import/schemas/.gitignore b/xsd-tests/schema/import/schemas/.gitignore
new file mode 100644
index 0000000..945fcfc
--- /dev/null
+++ b/xsd-tests/schema/import/schemas/.gitignore
@@ -0,0 +1 @@
+importee.?xx
diff --git a/tests/schema/import/schemas/importee.xsd b/xsd-tests/schema/import/schemas/importee.xsd
index 9b03315..9b03315 100644
--- a/tests/schema/import/schemas/importee.xsd
+++ b/xsd-tests/schema/import/schemas/importee.xsd
diff --git a/xsd-tests/schema/include/.gitignore b/xsd-tests/schema/include/.gitignore
new file mode 100644
index 0000000..4ec7484
--- /dev/null
+++ b/xsd-tests/schema/include/.gitignore
@@ -0,0 +1 @@
+includer.?xx
diff --git a/xsd-tests/schema/include/buildfile b/xsd-tests/schema/include/buildfile
new file mode 100644
index 0000000..904e819
--- /dev/null
+++ b/xsd-tests/schema/include/buildfile
@@ -0,0 +1,27 @@
+# file : schema/include/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+fs = includer schemas/includee
+
+exe{driver}: {hxx cxx}{** -{$fs}} {hxx cxx}{$fs} $libs
+
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $directory($path($>[0])) \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/include/driver.cxx b/xsd-tests/schema/include/driver.cxx
new file mode 100644
index 0000000..779d9d6
--- /dev/null
+++ b/xsd-tests/schema/include/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/include/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "includer.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/include/includer.xsd b/xsd-tests/schema/include/includer.xsd
index c93ea18..c93ea18 100644
--- a/tests/schema/include/includer.xsd
+++ b/xsd-tests/schema/include/includer.xsd
diff --git a/xsd-tests/schema/include/schemas/.gitignore b/xsd-tests/schema/include/schemas/.gitignore
new file mode 100644
index 0000000..dcf4bb9
--- /dev/null
+++ b/xsd-tests/schema/include/schemas/.gitignore
@@ -0,0 +1 @@
+includee.?xx
diff --git a/tests/schema/include/schemas/includee.xsd b/xsd-tests/schema/include/schemas/includee.xsd
index 0a928f5..0a928f5 100644
--- a/tests/schema/include/schemas/includee.xsd
+++ b/xsd-tests/schema/include/schemas/includee.xsd
diff --git a/xsd-tests/schema/inheritance/.gitignore b/xsd-tests/schema/inheritance/.gitignore
new file mode 100644
index 0000000..9891c35
--- /dev/null
+++ b/xsd-tests/schema/inheritance/.gitignore
@@ -0,0 +1 @@
+cycle.?xx
diff --git a/xsd-tests/schema/inheritance/buildfile b/xsd-tests/schema/inheritance/buildfile
new file mode 100644
index 0000000..48c6dde
--- /dev/null
+++ b/xsd-tests/schema/inheritance/buildfile
@@ -0,0 +1,30 @@
+# file : schema/inheritance/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+fs = cycle sourced-forward/includer
+
+./: {hxx cxx}{$fs}
+
+# Make sure that the schema files are compilable.
+#
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --output-dir $directory($path($>[0])) \
+ $path($<[0])
+ }}
+}
+
+# Test that the invalid schema files compilation expectedly fails.
+#
+./: testscript xsd{** -{$fs}} $xsd
+
+testscript{*}:
+{
+ test = $xsd
+ test.arguments = cxx-tree --std c++11
+}
diff --git a/tests/schema/inheritance/cycle.xsd b/xsd-tests/schema/inheritance/cycle.xsd
index c705311..c705311 100644
--- a/tests/schema/inheritance/cycle.xsd
+++ b/xsd-tests/schema/inheritance/cycle.xsd
diff --git a/xsd-tests/schema/inheritance/sourced-forward/.gitignore b/xsd-tests/schema/inheritance/sourced-forward/.gitignore
new file mode 100644
index 0000000..4ec7484
--- /dev/null
+++ b/xsd-tests/schema/inheritance/sourced-forward/.gitignore
@@ -0,0 +1 @@
+includer.?xx
diff --git a/tests/schema/inheritance/sourced-forward/includee.xsd b/xsd-tests/schema/inheritance/sourced-forward/includee.xsd
index 531027d..531027d 100644
--- a/tests/schema/inheritance/sourced-forward/includee.xsd
+++ b/xsd-tests/schema/inheritance/sourced-forward/includee.xsd
diff --git a/tests/schema/inheritance/sourced-forward/includer.xsd b/xsd-tests/schema/inheritance/sourced-forward/includer.xsd
index 7d18efc..7d18efc 100644
--- a/tests/schema/inheritance/sourced-forward/includer.xsd
+++ b/xsd-tests/schema/inheritance/sourced-forward/includer.xsd
diff --git a/xsd-tests/schema/inheritance/testscript b/xsd-tests/schema/inheritance/testscript
new file mode 100644
index 0000000..5cc649d
--- /dev/null
+++ b/xsd-tests/schema/inheritance/testscript
@@ -0,0 +1,8 @@
+# file : schema/inheritance/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: base-not-found
+:
+$* --output-dir $~ $src_base/sourced-forward/includee.xsd 2>>/"EOE" != 0
+ $src_base/sourced-forward/includee.xsd:7:35: error: base type 'Base' not found in 'Derived' definition
+ EOE
diff --git a/tests/schema/list/anonymous/test.xsd b/xsd-tests/schema/list/anonymous/test.xsd
index 7db39ba..7db39ba 100644
--- a/tests/schema/list/anonymous/test.xsd
+++ b/xsd-tests/schema/list/anonymous/test.xsd
diff --git a/tests/schema/list/any-simple-type/test.xsd b/xsd-tests/schema/list/any-simple-type/test.xsd
index 29fe95c..29fe95c 100644
--- a/tests/schema/list/any-simple-type/test.xsd
+++ b/xsd-tests/schema/list/any-simple-type/test.xsd
diff --git a/xsd-tests/schema/list/buildfile b/xsd-tests/schema/list/buildfile
new file mode 100644
index 0000000..5d8f7fc
--- /dev/null
+++ b/xsd-tests/schema/list/buildfile
@@ -0,0 +1,31 @@
+# file : schema/list/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+fs = test anonymous/test
+
+./: {hxx cxx}{$fs}
+
+# Make sure that the schema files are compilable.
+#
+for f: $fs
+{
+ <{hxx cxx}{$f}>: xsd{$f} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $directory($path($>[0])) \
+ $path($<[0])
+ }}
+}
+
+# Test that the invalid schema files compilation expectedly fails.
+#
+./: testscript xsd{** -{$fs}} $xsd
+
+testscript{*}:
+{
+ test = $xsd
+ test.arguments = cxx-tree --std c++11
+}
diff --git a/tests/schema/list/test.xsd b/xsd-tests/schema/list/test.xsd
index e16a58d..e16a58d 100644
--- a/tests/schema/list/test.xsd
+++ b/xsd-tests/schema/list/test.xsd
diff --git a/xsd-tests/schema/list/testscript b/xsd-tests/schema/list/testscript
new file mode 100644
index 0000000..0916be0
--- /dev/null
+++ b/xsd-tests/schema/list/testscript
@@ -0,0 +1,8 @@
+# file : schema/list/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: invalid-definition
+:
+$* --output-dir $~ $src_base/any-simple-type/test.xsd 2>>/"EOE" != 0
+ $src_base/any-simple-type/test.xsd:9:45: error: item type definition must have variety of atomic or union where all member types must be atomic
+ EOE
diff --git a/xsd-tests/schema/no-namespace/buildfile b/xsd-tests/schema/no-namespace/buildfile
new file mode 100644
index 0000000..e407218
--- /dev/null
+++ b/xsd-tests/schema/no-namespace/buildfile
@@ -0,0 +1,22 @@
+# file : schema/no-namespace/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/no-namespace/driver.cxx b/xsd-tests/schema/no-namespace/driver.cxx
new file mode 100644
index 0000000..ef62942
--- /dev/null
+++ b/xsd-tests/schema/no-namespace/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/no-namespace/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/no-namespace/test.xsd b/xsd-tests/schema/no-namespace/test.xsd
index b426e8a..b426e8a 100644
--- a/tests/schema/no-namespace/test.xsd
+++ b/xsd-tests/schema/no-namespace/test.xsd
diff --git a/xsd-tests/schema/recursive/buildfile b/xsd-tests/schema/recursive/buildfile
new file mode 100644
index 0000000..34542c6
--- /dev/null
+++ b/xsd-tests/schema/recursive/buildfile
@@ -0,0 +1,22 @@
+# file : schema/recursive/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/recursive/driver.cxx b/xsd-tests/schema/recursive/driver.cxx
new file mode 100644
index 0000000..55c33cd
--- /dev/null
+++ b/xsd-tests/schema/recursive/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/recursive/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/recursive/test.xsd b/xsd-tests/schema/recursive/test.xsd
index 6efc7d2..6efc7d2 100644
--- a/tests/schema/recursive/test.xsd
+++ b/xsd-tests/schema/recursive/test.xsd
diff --git a/xsd-tests/schema/ref-type/invalid/buildfile b/xsd-tests/schema/ref-type/invalid/buildfile
new file mode 100644
index 0000000..42c7bfb
--- /dev/null
+++ b/xsd-tests/schema/ref-type/invalid/buildfile
@@ -0,0 +1,12 @@
+# file : schema/ref-type/invalid/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Test that the invalid schema files compilation expectedly fails.
+#
+./: testscript xsd{*} $xsd
+
+testscript{*}:
+{
+ test = $xsd
+ test.arguments = cxx-tree --std c++11
+}
diff --git a/tests/schema/ref-type/invalid-0.xsd b/xsd-tests/schema/ref-type/invalid/invalid-0.xsd
index 7ce82ed..7ce82ed 100644
--- a/tests/schema/ref-type/invalid-0.xsd
+++ b/xsd-tests/schema/ref-type/invalid/invalid-0.xsd
diff --git a/tests/schema/ref-type/invalid-1.xsd b/xsd-tests/schema/ref-type/invalid/invalid-1.xsd
index d989065..d989065 100644
--- a/tests/schema/ref-type/invalid-1.xsd
+++ b/xsd-tests/schema/ref-type/invalid/invalid-1.xsd
diff --git a/xsd-tests/schema/ref-type/invalid/testscript b/xsd-tests/schema/ref-type/invalid/testscript
new file mode 100644
index 0000000..ce2e049
--- /dev/null
+++ b/xsd-tests/schema/ref-type/invalid/testscript
@@ -0,0 +1,16 @@
+# file : schema/ref-type/invalid/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: unresolvable-namespace-prefix
+:
+$* --output-dir $~ $src_base/invalid-0.xsd 2>>~%EOE%d != 0
+ %\.+invalid-0.xsd:10:75: error: unable to resolve namespace ''%
+ %\.+invalid-0.xsd:11:77: error: unable to resolve namespace prefix 't' in 't:author'%
+ %\.+invalid-0.xsd:15:81: error: unable to resolve namespace 'http://www.codesynthesis.com/xmlns/phony'%
+ EOE
+
+: unresolvable-type
+:
+$* --output-dir $~ $src_base/invalid-1.xsd 2>>~%EOE%d != 0
+ %\.+invalid-1.xsd:9:79: error: unable to resolve type 'author' in namespace 'http://www.codesynthesis.com/xmlns/test'%
+ EOE
diff --git a/xsd-tests/schema/ref-type/valid/.gitignore b/xsd-tests/schema/ref-type/valid/.gitignore
new file mode 100644
index 0000000..fd203ec
--- /dev/null
+++ b/xsd-tests/schema/ref-type/valid/.gitignore
@@ -0,0 +1,6 @@
+driver-idref
+driver-idrefs
+driver-idref.?xx
+driver-idrefs.?xx
+idref.?xx
+idrefs.?xx
diff --git a/xsd-tests/schema/ref-type/valid/buildfile b/xsd-tests/schema/ref-type/valid/buildfile
new file mode 100644
index 0000000..0534fce
--- /dev/null
+++ b/xsd-tests/schema/ref-type/valid/buildfile
@@ -0,0 +1,35 @@
+# file : schema/ref-type/valid/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+for sc: idref idrefs
+{
+ dr = "driver-$sc"
+
+ ./: exe{$dr}: cxx{$dr} {hxx cxx}{$sc} $libs
+
+ cxx{$dr}: in{driver}
+ {
+ # Note: we can't use $sc$ in driver.cxx.in since it will be substituted by
+ # the latest $sc value.
+ #
+ sch = $sc
+ }
+
+ <{hxx cxx}{$sc}>: xsd{$sc} $xsd
+ {{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+ }}
+}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/ref-type/valid/driver.cxx.in b/xsd-tests/schema/ref-type/valid/driver.cxx.in
new file mode 100644
index 0000000..434aa40
--- /dev/null
+++ b/xsd-tests/schema/ref-type/valid/driver.cxx.in
@@ -0,0 +1,9 @@
+// file : schema/ref-type/valid/driver.cxx.in
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "$sch$.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/ref-type/idref.xsd b/xsd-tests/schema/ref-type/valid/idref.xsd
index 49ebe40..49ebe40 100644
--- a/tests/schema/ref-type/idref.xsd
+++ b/xsd-tests/schema/ref-type/valid/idref.xsd
diff --git a/tests/schema/ref-type/idrefs.xsd b/xsd-tests/schema/ref-type/valid/idrefs.xsd
index b68ed03..b68ed03 100644
--- a/tests/schema/ref-type/idrefs.xsd
+++ b/xsd-tests/schema/ref-type/valid/idrefs.xsd
diff --git a/xsd-tests/schema/restriction/buildfile b/xsd-tests/schema/restriction/buildfile
new file mode 100644
index 0000000..c05718a
--- /dev/null
+++ b/xsd-tests/schema/restriction/buildfile
@@ -0,0 +1,22 @@
+# file : schema/restriction/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/restriction/driver.cxx b/xsd-tests/schema/restriction/driver.cxx
new file mode 100644
index 0000000..2ffeb74
--- /dev/null
+++ b/xsd-tests/schema/restriction/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/restriction/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/restriction/test.xsd b/xsd-tests/schema/restriction/test.xsd
index 331ba78..331ba78 100644
--- a/tests/schema/restriction/test.xsd
+++ b/xsd-tests/schema/restriction/test.xsd
diff --git a/xsd-tests/schema/union/buildfile b/xsd-tests/schema/union/buildfile
new file mode 100644
index 0000000..00d0a83
--- /dev/null
+++ b/xsd-tests/schema/union/buildfile
@@ -0,0 +1,22 @@
+# file : schema/union/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Just make sure that the schema files and the xsd-generated C++ mappings are
+# compilable.
+#
+import libs = libxsd%lib{xsd}
+import libs += libxerces-c%lib{xerces-c}
+
+exe{driver}: {hxx cxx}{* -test} {hxx cxx}{test} $libs
+
+<{hxx cxx}{test}>: xsd{test} $xsd
+{{
+ diag xsd ($<[0]) # @@ TMP
+
+ $xsd cxx-tree --std c++11 \
+ --root-element-all \
+ --output-dir $out_base \
+ $path($<[0])
+}}
+
+cxx.poptions =+ "-I$out_base"
diff --git a/xsd-tests/schema/union/driver.cxx b/xsd-tests/schema/union/driver.cxx
new file mode 100644
index 0000000..45f290f
--- /dev/null
+++ b/xsd-tests/schema/union/driver.cxx
@@ -0,0 +1,9 @@
+// file : schema/union/driver.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include "test.hxx"
+
+int
+main (int, char*[])
+{
+}
diff --git a/tests/schema/union/test.xsd b/xsd-tests/schema/union/test.xsd
index 706f6f2..706f6f2 100644
--- a/tests/schema/union/test.xsd
+++ b/xsd-tests/schema/union/test.xsd
diff --git a/xsd/.gitignore b/xsd/.gitignore
new file mode 100644
index 0000000..cece09c
--- /dev/null
+++ b/xsd/.gitignore
@@ -0,0 +1,19 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.ii
+*.o
+*.obj
+*.so
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
diff --git a/xsd/FLOSSE b/xsd/FLOSSE
new file mode 120000
index 0000000..be6df3d
--- /dev/null
+++ b/xsd/FLOSSE
@@ -0,0 +1 @@
+../FLOSSE \ No newline at end of file
diff --git a/xsd/GPLv2 b/xsd/GPLv2
new file mode 120000
index 0000000..08e5586
--- /dev/null
+++ b/xsd/GPLv2
@@ -0,0 +1 @@
+../GPLv2 \ No newline at end of file
diff --git a/xsd/INSTALL b/xsd/INSTALL
new file mode 100644
index 0000000..3402df2
--- /dev/null
+++ b/xsd/INSTALL
@@ -0,0 +1,6 @@
+The easiest way to build this package is with the bpkg package manager:
+
+$ bpkg build xsd
+
+But if you don't want to use the package manager, then you can also build it
+manually using the standard build2 build system.
diff --git a/xsd/LICENSE b/xsd/LICENSE
new file mode 120000
index 0000000..ea5b606
--- /dev/null
+++ b/xsd/LICENSE
@@ -0,0 +1 @@
+../LICENSE \ No newline at end of file
diff --git a/NEWS b/xsd/NEWS
index 03f5942..03f5942 100644
--- a/NEWS
+++ b/xsd/NEWS
diff --git a/README b/xsd/README
index 80d707f..80d707f 100644
--- a/README
+++ b/xsd/README
diff --git a/xsd/build/.gitignore b/xsd/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/xsd/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/xsd/build/bootstrap.build b/xsd/build/bootstrap.build
new file mode 100644
index 0000000..aaf60f8
--- /dev/null
+++ b/xsd/build/bootstrap.build
@@ -0,0 +1,9 @@
+# file : build/bootstrap.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+project = xsd
+
+using version
+using config
+using dist
+using install
diff --git a/xsd/build/export.build b/xsd/build/export.build
new file mode 100644
index 0000000..68ffad0
--- /dev/null
+++ b/xsd/build/export.build
@@ -0,0 +1,9 @@
+# file : build/export.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+$out_root/
+{
+ include xsd/
+}
+
+export $out_root/xsd/exe{xsd}
diff --git a/xsd/build/root.build b/xsd/build/root.build
new file mode 100644
index 0000000..ace0237
--- /dev/null
+++ b/xsd/build/root.build
@@ -0,0 +1,37 @@
+# file : build/root.build
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+using in
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800 /wd4819
+
+cxx.poptions =+ "-I$out_root" "-I$src_root"
+
+# Load the cli module but only if it's available. This way a distribution
+# that includes pre-generated files can be built without installing cli.
+# This is also the reason why we need to explicitly spell out individual
+# source file prerequisites instead of using the cli.cxx{} group (it won't
+# be there unless the module is configured).
+#
+using? cli
+
+# Extract the copyright notice from the LICENSE file.
+#
+# Note that cat is a builtin which means this is both portable and fast.
+#
+copyright = $process.run_regex(cat $src_root/LICENSE, \
+ 'Copyright \(c\) (.+)\.', \
+ '\1')
diff --git a/xsd/buildfile b/xsd/buildfile
new file mode 100644
index 0000000..298d3ce
--- /dev/null
+++ b/xsd/buildfile
@@ -0,0 +1,8 @@
+# file : buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+./: {*/ -build/} doc{INSTALL NEWS README} legal{GPLv2 LICENSE FLOSSE} manifest
+
+# Don't install the INSTALL file.
+#
+doc{INSTALL}@./: install = false
diff --git a/xsd/cxx/elements.cxx b/xsd/cxx/elements.cxx
deleted file mode 100644
index 5ead15f..0000000
--- a/xsd/cxx/elements.cxx
+++ /dev/null
@@ -1,1319 +0,0 @@
-// file : xsd/cxx/elements.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/elements.hxx>
-
-#include <cctype> // std::toupper
-#include <memory>
-#include <sstream>
-#include <fstream>
-#include <cassert>
-#include <iostream>
-
-using std::wcerr;
-using std::endl;
-
-namespace CXX
-{
- //
- //
- wchar_t
- upcase (wchar_t c)
- {
- return std::toupper (c);
- }
-
- namespace
- {
- wchar_t const* keywords[] = {
- L"NULL",
- L"and",
- L"asm",
- L"auto",
- L"bitand",
- L"bitor",
- L"bool",
- L"break",
- L"case",
- L"catch",
- L"char",
- L"class",
- L"compl",
- L"const",
- L"const_cast",
- L"continue",
- L"default",
- L"delete",
- L"do",
- L"double",
- L"dynamic_cast",
- L"else",
- L"end_eq",
- L"enum",
- L"explicit",
- L"export",
- L"extern",
- L"false",
- L"float",
- L"for",
- L"friend",
- L"goto",
- L"if",
- L"inline",
- L"int",
- L"long",
- L"mutable",
- L"namespace",
- L"new",
- L"not",
- L"not_eq",
- L"operator",
- L"or",
- L"or_eq",
- L"private",
- L"protected",
- L"public",
- L"register",
- L"reinterpret_cast",
- L"return",
- L"short",
- L"signed",
- L"sizeof",
- L"static",
- L"static_cast",
- L"struct",
- L"switch",
- L"template",
- L"this",
- L"throw",
- L"true",
- L"try",
- L"typedef",
- L"typeid",
- L"typename",
- L"union",
- L"unsigned",
- L"using",
- L"virtual",
- L"void",
- L"volatile",
- L"wchar_t",
- L"while",
- L"xor",
- L"xor_eq"
- };
- }
-
- // Context
- //
-
- Context::
- Context (std::wostream& o,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- options_type const& ops,
- StringLiteralMap const* string_literal_map_)
- : os (o),
- schema_root (root),
- schema_path (schema_path_),
- options (ops),
- std (ops.std ()),
- char_type (char_type_),
- char_encoding (char_encoding_),
- L (L_),
- string_type (string_type_),
- auto_ptr (auto_ptr_),
- string_literal_map (string_literal_map_),
- type_exp (type_exp_),
- inst_exp (inst_exp_),
- inl (inl_),
- ns_mapping_cache (ns_mapping_cache_),
- schema_path_ (path),
- xs_ns_ (0),
- char_type_ (ops.char_type ()),
- char_encoding_ (ops.char_encoding ()),
- L_ (char_type == L"wchar_t" ? L"L" : L""),
- inl_ (ops.generate_inline () ? L"inline\n" : L""),
- cxx_id_expr_ (L"^(::)?([a-zA-Z_]\\w*)(::[a-zA-Z_]\\w*)*$"),
- cxx_id_expr (cxx_id_expr_),
- urn_mapping_ (L"#^urn.*:([a-zA-Z_].*)$#$1#"),
- urn_mapping (urn_mapping_),
- nsr_mapping (nsr_mapping_),
- nsm_mapping (nsm_mapping_),
- include_mapping (include_mapping_),
- reserved_name_map (reserved_name_map_),
- keyword_set (keyword_set_)
- {
- // Export symbol.
- //
- {
- String es (ops.export_symbol ());
- type_exp_ = es ? es + L" " : es;
- inst_exp_ = es ? es + L"\n" : es;
- }
-
- // Resolve and cache XML Schema namespace.
- //
- {
- SemanticGraph::Nameable* n;
-
- if (schema_root.names_begin ()->name () ==
- L"http://www.w3.org/2001/XMLSchema")
- {
- // schema_root is the XML Schema itself.
- //
- n = &schema_root.names_begin ()->named ();
- }
- else
- {
- // Otherwise, the first used schema is implied XML Schema.
- //
- SemanticGraph::Uses& u = *schema_root.uses_begin ();
- assert (u.is_a<SemanticGraph::Implies> ());
- n = &u.schema ().names_begin ()->named ();
- }
-
- xs_ns_ = dynamic_cast<SemanticGraph::Namespace*> (n);
- }
-
- // String type.
- //
- if (char_type == L"char")
- string_type_ = L"::std::string";
- else if (char_type == L"wchar_t")
- string_type_ = L"::std::wstring";
- else
- string_type_ = L"::std::basic_string< " + char_type + L" >";
-
- // Automatic pointer type.
- //
- auto_ptr_ = std >= cxx_version::cxx11
- ? "::std::unique_ptr"
- : "::std::auto_ptr";
-
- // Default encoding.
- //
- if (!char_encoding)
- {
- if (char_type == L"char")
- char_encoding = L"utf8";
- else
- char_encoding = L"auto";
- }
-
- // Default mapping.
- //
- nsr_mapping_.push_back (
- Regex (L"#^.* (.*?/)??" L"(([a-zA-Z_]\\w*)(/[a-zA-Z_]\\w*)*)/?$#$2#"));
- nsr_mapping_.push_back (
- Regex (L"#^.* http://www\\.w3\\.org/2001/XMLSchema$#xml_schema#"));
-
- // Custom regex mapping.
- //
- for (NarrowStrings::const_iterator i (ops.namespace_regex ().begin ()),
- e (ops.namespace_regex ().end ()); i != e; ++i)
- {
- nsr_mapping_.push_back (Regex (String (*i)));
- }
-
- // Custom direct mapping.
- //
- for (NarrowStrings::const_iterator i (ops.namespace_map ().begin ()),
- e (ops.namespace_map ().end ()); i != e; ++i)
- {
- String s (*i);
-
- // Split the string in two parts at the last '='.
- //
- size_t pos (s.rfind ('='));
-
- if (pos == String::npos)
- throw InvalidNamespaceMapping (s, "delimiter ('=') not found");
-
- // Empty xml_ns designates the no-namespace case.
- //
- String xml_ns (s, 0, pos);
- String cxx_ns (s, pos + 1);
-
- if (!cxx_ns.empty () && !cxx_id_expr.match (cxx_ns))
- throw InvalidNamespaceMapping (s, "invalid C++ identifier");
-
- nsm_mapping_[xml_ns] = cxx_ns;
- }
-
- // Include path regex
- //
- for (NarrowStrings::const_iterator i (ops.include_regex ().begin ()),
- e (ops.include_regex ().end ()); i != e; ++i)
- {
- include_mapping_.push_back (Regex (String (*i)));
- }
-
- // Reserved names.
- //
- for (NarrowStrings::const_iterator i (ops.reserved_name ().begin ()),
- e (ops.reserved_name ().end ()); i != e; ++i)
- {
- String s (*i);
-
- // Split the string in two parts at '='.
- //
- size_t pos (s.find ('='));
-
- if (pos == String::npos)
- reserved_name_map_[s] = L"";
- else
- reserved_name_map_[String (s, 0, pos)] = String (s, pos + 1);
- }
-
- // Populate the keyword set.
- //
- for (size_t i (0); i < sizeof (keywords) / sizeof (char*); ++i)
- keyword_set_.insert (keywords[i]);
- }
-
- String Context::
- ns_name (SemanticGraph::Namespace& ns)
- {
- using SemanticGraph::Schema;
- using SemanticGraph::Includes;
- using SemanticGraph::Imports;
- using SemanticGraph::Implies;
- using SemanticGraph::Sources;
-
- String tmp;
- MapMapping::const_iterator i (nsm_mapping.find (ns.name ()));
-
- if (i != nsm_mapping.end ())
- {
- tmp = i->second;
- }
- else
- {
- SemanticGraph::Path path;
- Schema& schema (dynamic_cast<Schema&> (ns.scope ()));
-
- if (schema.used_p ())
- {
- // Here we need to detect a special multi-schema compilation
- // case where the root schemas are imported into a special
- // schema that doesn't have a namespace.
- //
- SemanticGraph::Uses& u (*schema.used_begin ());
- SemanticGraph::Schema& s (u.user ());
-
- if (s.names_begin () != s.names_end ())
- path = u.path ();
- }
- else
- path = schema_path;
-
- String pair;
-
- if (!path.empty ())
- {
- path.normalize ();
-
- // Try to use the portable representation of the path. If that
- // fails, fall back to the native representation.
- //
- try
- {
- pair = path.posix_string ();
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- pair = path.string ();
- }
- }
-
- pair += L' ' + ns.name ();
-
- // Check cache first
- //
- MappingCache::const_iterator i (ns_mapping_cache.find (pair));
-
- if (i != ns_mapping_cache.end ())
- {
- tmp = i->second;
- }
- else
- {
- bool trace (options.namespace_regex_trace ());
-
- if (trace)
- wcerr << "namespace: '" << pair << "'" << endl;
-
- bool found (false);
- Regex colon (L"#/#::#");
-
- for (RegexMapping::const_reverse_iterator e (nsr_mapping.rbegin ());
- e != nsr_mapping.rend (); ++e)
- {
- if (trace)
- wcerr << "try: '" << e->regex () << "' : ";
-
- if (e->match (pair))
- {
- tmp = e->replace (pair);
- tmp = colon.replace (tmp); // replace `/' with `::'
-
- // Check the result.
- //
- found = cxx_id_expr.match (tmp);
-
- if (trace)
- wcerr << "'" << tmp << "' : ";
- }
-
- if (trace)
- wcerr << (found ? '+' : '-') << endl;
-
- if (found)
- break;
- }
-
- if (!found)
- {
- String const& n (ns.name ());
-
- // Check if the name is valid by itself.
- //
- if (n.empty ())
- {
- // Empty name denotes a no-namespace case.
- //
- tmp = n;
- }
- else
- {
- tmp = colon.replace (n); // replace `/' with `::'
-
- if (!cxx_id_expr.match (tmp))
- {
- // See if this is a urn-style namespace.
- //
- if (urn_mapping.match (n))
- {
- Regex filter (L"#[.:-]#_#");
- tmp = urn_mapping.replace (n);
- tmp = filter.replace (tmp);
-
- if (!cxx_id_expr.match (tmp))
- throw NoNamespaceMapping (
- ns.file (), ns.line (), ns.column (), ns.name ());
- }
- else
- throw NoNamespaceMapping (
- ns.file (), ns.line (), ns.column (), ns.name ());
- }
- }
- }
-
- // Add the mapping to the cache.
- //
- ns_mapping_cache[pair] = tmp;
- }
- }
-
-
- // Parse resulting namespace string and id() each name.
- //
- String r;
- String::size_type b (0), e;
-
- do
- {
- e = tmp.find (L"::", b);
-
- String name (tmp, b, e == tmp.npos ? e : e - b);
-
- if (!name.empty ())
- r += L"::" + escape (name);
-
- b = e;
-
- if (b == tmp.npos)
- break;
-
- b += 2;
-
- } while (true);
-
- return r;
- }
-
- SemanticGraph::Namespace& Context::
- xs_ns ()
- {
- return *xs_ns_;
- }
-
- String Context::
- xs_ns_name ()
- {
- return ns_name (*xs_ns_);
- }
-
- SemanticGraph::Namespace& Context::
- namespace_ (SemanticGraph::Nameable& n)
- {
- // The basic idea goes like this: go up Names edges until you
- // reach Namespace. There are, however, anonymous types which
- // need special handling. In the case of an anonymous type we
- // will go up the first Belongs edge (because the first edge
- // is where the type was defined.
- //
-
- if (n.named_p ())
- {
- SemanticGraph::Scope& s (n.scope ());
-
- SemanticGraph::Namespace* ns (
- dynamic_cast<SemanticGraph::Namespace*> (&n));
-
- return ns ? *ns : namespace_ (s);
- }
- else
- {
- SemanticGraph::Type& t (dynamic_cast<SemanticGraph::Type&> (n));
-
- SemanticGraph::Belongs& b (*t.classifies_begin ());
-
- return namespace_ (b.instance ());
- }
- }
-
- String Context::
- xml_ns_name (SemanticGraph::Nameable& n)
- {
- return namespace_ (n).name ();
- }
-
- String Context::
- fq_name (SemanticGraph::Nameable& n, char const* name_key)
- {
- using namespace SemanticGraph;
-
- String r;
-
- if (dynamic_cast<Schema*> (&n))
- {
- return L""; // Map to global namespace.
- }
- else if (SemanticGraph::Namespace* ns =
- dynamic_cast<SemanticGraph::Namespace*> (&n))
- {
- r = ns_name (*ns);
- }
- else
- {
- r = fq_name (n.scope ());
- r += L"::";
- r += n.context ().get<String> (name_key);
- }
-
- return r;
- }
-
- SemanticGraph::Type& Context::
- ultimate_base (SemanticGraph::Complex& c)
- {
- using namespace SemanticGraph;
-
- Type* b (&c.inherits ().base ());
-
- while (true)
- {
- Complex* cb (dynamic_cast<Complex*> (b));
-
- if (cb != 0 && cb->inherits_p ())
- {
- b = &cb->inherits ().base ();
- continue;
- }
-
- break;
- }
-
- return *b;
- }
-
- String Context::
- escape (String const& name)
- {
- String r;
- size_t n (name.size ());
-
- // In most common cases we will have that many chars.
- //
- r.reserve (n);
-
- for (size_t i (0); i < n; ++i)
- {
- bool first (i == 0);
-
- unsigned int u (unicode_char (name, i)); // May advance i.
-
- if (first)
- {
- if (!((u >= 'a' && u <= 'z') ||
- (u >= 'A' && u <= 'Z') ||
- u == '_'))
- r = (u >= '0' && u <= '9') ? L"cxx_" : L"cxx";
- }
-
- if (!((u >= 'a' && u <= 'z') ||
- (u >= 'A' && u <= 'Z') ||
- (u >= '0' && u <= '9') ||
- u == '_'))
- r.push_back ('_');
- else
- r.push_back (static_cast<wchar_t> (u));
- }
-
- if (r.empty ())
- r = L"cxx";
-
- // Custom reserved words.
- //
- ReservedNameMap::const_iterator i (reserved_name_map.find (r));
-
- if (i != reserved_name_map.end ())
- {
- if (i->second)
- return i->second;
- else
- r += L'_';
- }
-
- // Keywords
- //
- if (keyword_set.find (r) != keyword_set.end ())
- {
- r += L'_';
-
- // Re-run custom words.
- //
- i = reserved_name_map.find (r);
-
- if (i != reserved_name_map.end ())
- {
- if (i->second)
- return i->second;
- else
- r += L'_';
- }
- }
-
- return r;
- }
-
- // String escaping.
- //
-
- String
- charlit (unsigned int u)
- {
- String r ("\\x");
- bool lead (true);
-
- for (int i (7); i >= 0; --i)
- {
- unsigned int x ((u >> (i * 4)) & 0x0F);
-
- if (lead)
- {
- if (x == 0)
- continue;
-
- lead = false;
- }
-
- r += x < 10 ? ('0' + x) : ('A' + x - 10);
- }
-
- return r;
- }
-
- String
- strlit_ascii (String const& str)
- {
- String r;
- size_t n (str.size ());
-
- // In most common cases we will have that many chars.
- //
- r.reserve (n + 2);
-
- r += '"';
-
- bool escape (false);
-
- for (size_t i (0); i < n; ++i)
- {
- unsigned int u (Context::unicode_char (str, i)); // May advance i.
-
- // [128 - ] - unrepresentable
- // 127 - \x7F
- // [32 - 126] - as is
- // [0 - 31] - \X or \xXX
- //
-
- if (u < 32 || u == 127)
- {
- switch (u)
- {
- case L'\n':
- {
- r += L"\\n";
- break;
- }
- case L'\t':
- {
- r += L"\\t";
- break;
- }
- case L'\v':
- {
- r += L"\\v";
- break;
- }
- case L'\b':
- {
- r += L"\\b";
- break;
- }
- case L'\r':
- {
- r += L"\\r";
- break;
- }
- case L'\f':
- {
- r += L"\\f";
- break;
- }
- case L'\a':
- {
- r += L"\\a";
- break;
- }
- default:
- {
- r += charlit (u);
- escape = true;
- break;
- }
- }
- }
- else if (u < 127)
- {
- if (escape)
- {
- // Close and open the string so there are no clashes.
- //
- r += '"';
- r += '"';
-
- escape = false;
- }
-
- switch (u)
- {
- case L'"':
- {
- r += L"\\\"";
- break;
- }
- case L'\\':
- {
- r += L"\\\\";
- break;
- }
- default:
- {
- r += static_cast<wchar_t> (u);
- break;
- }
- }
- }
- else
- {
- // Unrepresentable character.
- //
- throw UnrepresentableCharacter (str, i + 1);
- }
- }
-
- r += '"';
-
- return r;
- }
-
- const unsigned int utf8_first_char_mask[5] =
- {
- 0x00, 0x00, 0xC0, 0xE0, 0xF0
- };
-
- String
- strlit_utf8 (String const& str)
- {
- String r;
- size_t n (str.size ());
-
- // In most common cases we will have that many chars.
- //
- r.reserve (n + 2);
-
- r += '"';
-
- bool escape (false);
-
- for (size_t i (0); i < n; ++i)
- {
- unsigned int u (Context::unicode_char (str, i)); // May advance i.
-
- // [128 - ] - UTF-8
- // 127 - \x7F
- // [32 - 126] - as is
- // [0 - 31] - \X or \xXX
- //
-
- if (u < 32 || u == 127)
- {
- switch (u)
- {
- case L'\n':
- {
- r += L"\\n";
- break;
- }
- case L'\t':
- {
- r += L"\\t";
- break;
- }
- case L'\v':
- {
- r += L"\\v";
- break;
- }
- case L'\b':
- {
- r += L"\\b";
- break;
- }
- case L'\r':
- {
- r += L"\\r";
- break;
- }
- case L'\f':
- {
- r += L"\\f";
- break;
- }
- case L'\a':
- {
- r += L"\\a";
- break;
- }
- default:
- {
- r += charlit (u);
- escape = true;
- break;
- }
- }
- }
- else if (u < 127)
- {
- if (escape)
- {
- // Close and open the string so there are no clashes.
- //
- r += '"';
- r += '"';
-
- escape = false;
- }
-
- switch (u)
- {
- case L'"':
- {
- r += L"\\\"";
- break;
- }
- case L'\\':
- {
- r += L"\\\\";
- break;
- }
- default:
- {
- r += static_cast<wchar_t> (u);
- break;
- }
- }
- }
- else
- {
- unsigned int count (0);
- unsigned int tmp[4];
-
- if (u < 0x800)
- count = 2;
- else if (u < 0x10000)
- count = 3;
- else if (u < 0x110000)
- count = 4;
-
- switch (count)
- {
- case 4:
- {
- tmp[3] = (u | 0x80UL) & 0xBFUL;
- u >>= 6;
- }
- case 3:
- {
- tmp[2] = (u | 0x80UL) & 0xBFUL;
- u >>= 6;
- }
- case 2:
- {
- tmp[1] = (u | 0x80UL) & 0xBFUL;
- u >>= 6;
- }
- case 1:
- {
- tmp[0] = u | utf8_first_char_mask[count];
- break;
- }
- default:
- assert (false);
- }
-
- for (unsigned int j (0); j < count; ++j)
- r += charlit (tmp[j]);
-
- escape = true;
- }
- }
-
- r += '"';
-
- return r;
- }
-
- String
- strlit_iso8859_1 (String const& str)
- {
- String r;
- size_t n (str.size ());
-
- // In most common cases we will have that many chars.
- //
- r.reserve (n + 2);
-
- r += '"';
-
- bool escape (false);
-
- for (size_t i (0); i < n; ++i)
- {
- unsigned int u (Context::unicode_char (str, i)); // May advance i.
-
- // [256 - ] - unrepresentable
- // [127 - 255] - \xXX
- // [32 - 126] - as is
- // [0 - 31] - \X or \xXX
- //
-
- if (u < 32)
- {
- switch (u)
- {
- case L'\n':
- {
- r += L"\\n";
- break;
- }
- case L'\t':
- {
- r += L"\\t";
- break;
- }
- case L'\v':
- {
- r += L"\\v";
- break;
- }
- case L'\b':
- {
- r += L"\\b";
- break;
- }
- case L'\r':
- {
- r += L"\\r";
- break;
- }
- case L'\f':
- {
- r += L"\\f";
- break;
- }
- case L'\a':
- {
- r += L"\\a";
- break;
- }
- default:
- {
- r += charlit (u);
- escape = true;
- break;
- }
- }
- }
- else if (u < 127)
- {
- if (escape)
- {
- // Close and open the string so there are no clashes.
- //
- r += '"';
- r += '"';
-
- escape = false;
- }
-
- switch (u)
- {
- case L'"':
- {
- r += L"\\\"";
- break;
- }
- case L'\\':
- {
- r += L"\\\\";
- break;
- }
- default:
- {
- r += static_cast<wchar_t> (u);
- break;
- }
- }
- }
- else if (u < 256)
- {
- r += charlit (u);
- escape = true;
- }
- else
- {
- // Unrepresentable character.
- //
- throw UnrepresentableCharacter (str, i + 1);
- }
- }
-
- r += '"';
-
- return r;
- }
-
- String
- strlit_utf32 (String const& str)
- {
- String r;
- size_t n (str.size ());
-
- // In most common cases we will have that many chars.
- //
- r.reserve (n + 3);
-
- r += L"L\"";
-
- bool escape (false);
-
- for (size_t i (0); i < n; ++i)
- {
- unsigned int u (Context::unicode_char (str, i)); // May advance i.
-
- // [128 - ] - \xUUUUUUUU
- // 127 - \x7F
- // [32 - 126] - as is
- // [0 - 31] - \X or \xXX
- //
-
- if (u < 32 || u == 127)
- {
- switch (u)
- {
- case L'\n':
- {
- r += L"\\n";
- break;
- }
- case L'\t':
- {
- r += L"\\t";
- break;
- }
- case L'\v':
- {
- r += L"\\v";
- break;
- }
- case L'\b':
- {
- r += L"\\b";
- break;
- }
- case L'\r':
- {
- r += L"\\r";
- break;
- }
- case L'\f':
- {
- r += L"\\f";
- break;
- }
- case L'\a':
- {
- r += L"\\a";
- break;
- }
- default:
- {
- r += charlit (u);
- escape = true;
- break;
- }
- }
- }
- else if (u < 127)
- {
- if (escape)
- {
- // Close and open the string so there are no clashes. C++11
- // requires a space between " and L.
- //
- r += L"\" L\"";
- escape = false;
- }
-
- switch (u)
- {
- case L'"':
- {
- r += L"\\\"";
- break;
- }
- case L'\\':
- {
- r += L"\\\\";
- break;
- }
- default:
- {
- r += static_cast<wchar_t> (u);
- break;
- }
- }
- }
- else
- {
- r += charlit (u);
- escape = true;
- }
- }
-
- r += '"';
-
- return r;
- }
-
- String Context::
- strlit (String const& str)
- {
- // First see if we have a custom mapping.
- //
- assert (string_literal_map != 0);
- StringLiteralMap::const_iterator i (string_literal_map->find (str));
-
- if (i != string_literal_map->end ())
- return i->second;
-
- if (char_type == L"char")
- {
- if (char_encoding == L"utf8")
- return strlit_utf8 (str);
- else if (char_encoding == L"iso8859-1")
- return strlit_iso8859_1 (str);
- else
- {
- // For LCP, custom, and other unknown encodings, use ASCII.
- //
- return strlit_ascii (str);
- }
- }
- else
- return strlit_utf32 (str);
- }
-
- String Context::
- comment (String const& str)
- {
- String r;
-
- wchar_t const* s (str.c_str ());
- size_t size (str.size ());
-
- // In most common cases we will have that many chars.
- //
- r.reserve (size);
-
- for (wchar_t const* p (s); p < s + size; ++p)
- {
- unsigned int u (unicode_char (p)); // May advance p.
-
- // We are going to treat \v, \f and \n as unrepresentable
- // here even though they can be present in C++ source code.
- //
- if (u > 127 || (u < 32 && u != '\t'))
- r += L'?';
- else
- r += static_cast<wchar_t> (u);
- }
-
- return r;
- }
-
- String Context::
- process_include_path (String const& name) const
- {
- String path (String (options.include_prefix ()) + name);
- bool trace (options.include_regex_trace ());
-
- if (trace)
- wcerr << "include: '" << path << "'" << endl;
-
- String r;
- bool found (false);
-
- for (RegexMapping::const_reverse_iterator e (include_mapping.rbegin ());
- e != include_mapping.rend (); ++e)
- {
- if (trace)
- wcerr << "try: '" << e->regex () << "' : ";
-
- if (e->match (path))
- {
- r = e->replace (path);
- found = true;
-
- if (trace)
- wcerr << "'" << r << "' : ";
- }
-
- if (trace)
- wcerr << (found ? '+' : '-') << endl;
-
- if (found)
- break;
- }
-
- if (!found)
- r = path;
-
- if (!r.empty () && r[0] != L'"' && r[0] != L'<')
- {
- wchar_t op (options.include_with_brackets () ? L'<' : L'"');
- wchar_t cl (options.include_with_brackets () ? L'>' : L'"');
- r = op + r + cl;
- }
-
- return r;
- }
-
- // Namespace
- //
-
- void Namespace::
- pre (Type& n)
- {
- String ns (ctx_.ns_name (n));
-
- String::size_type b (0), e;
-
- if (st_)
- st_->enter (n, L"", ns ? false : true);
-
- do
- {
- e = ns.find (L"::", b);
-
- String name (ns, b, e == ns.npos ? e : e - b);
-
- if (!name.empty ())
- {
- if (st_)
- st_->enter (n, name, e == ns.npos);
-
- ctx_.os << "namespace " << name << "{";
- }
-
- b = e;
-
- if (b == ns.npos)
- break;
-
- b += 2;
-
- } while (true);
- }
-
- void Namespace::
- post (Type& n)
- {
- String ns (ctx_.ns_name (n));
-
- String::size_type b (0), e;
-
- do
- {
- e = ns.find (L"::", b);
-
- String name (ns, b, e == ns.npos ? e : e - b);
-
- if (!name.empty ())
- {
- ctx_.os << "}";
-
- if (st_)
- st_->leave ();
- }
-
-
- b = e;
-
- if (b == ns.npos)
- break;
-
- b += 2;
-
- }
- while (true);
-
- if (st_)
- st_->leave ();
- }
-}
diff --git a/xsd/cxx/elements.hxx b/xsd/cxx/elements.hxx
deleted file mode 100644
index a316a0c..0000000
--- a/xsd/cxx/elements.hxx
+++ /dev/null
@@ -1,626 +0,0 @@
-// file : xsd/cxx/elements.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_ELEMENTS_HXX
-#define CXX_ELEMENTS_HXX
-
-#include <set>
-#include <map>
-#include <vector>
-#include <ostream>
-
-#include <cutl/re.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <types.hxx>
-#include <elements.hxx>
-
-#include <cxx/options.hxx>
-#include <cxx/literal-map.hxx>
-
-namespace CXX
-{
- using std::endl;
-
- // On some platforms std::toupper can be something other than a
- // function with C++ linkage.
- //
- wchar_t
- upcase (wchar_t c);
-
-
- // Exceptions.
- //
-
- struct UnrepresentableCharacter
- {
- UnrepresentableCharacter (String const& str, size_t pos)
- : str_ (str), pos_ (pos)
- {
- }
-
- String const&
- string () const
- {
- return str_;
- }
-
- size_t
- position () const
- {
- return pos_;
- }
-
- private:
- String str_;
- size_t pos_;
- };
-
- struct NoNamespaceMapping
- {
- NoNamespaceMapping (SemanticGraph::Path const& file,
- size_t line,
- size_t column,
- String const& ns)
- : file_ (file),
- line_ (line),
- column_ (column),
- ns_ (ns)
- {
- }
-
-
- SemanticGraph::Path const&
- file () const
- {
- return file_;
- }
-
- size_t
- line () const
- {
- return line_;
- }
-
- size_t
- column () const
- {
- return column_;
- }
-
- String const&
- ns () const
- {
- return ns_;
- }
-
- private:
- SemanticGraph::Path file_;
- size_t line_;
- size_t column_;
- String ns_;
- };
-
- struct InvalidNamespaceMapping
- {
- InvalidNamespaceMapping (String const& mapping,
- String const& reason)
- : mapping_ (mapping), reason_ (reason)
- {
- }
-
- String const&
- mapping () const
- {
- return mapping_;
- }
-
- String const&
- reason () const
- {
- return reason_;
- }
-
- private:
- String mapping_;
- String reason_;
- };
-
- //
- //
- class Context
- {
- public:
- typedef cutl::re::wregex RegexPat;
- typedef cutl::re::wregexsub Regex;
- typedef std::vector<Regex> RegexMapping;
- typedef std::map<String, String> MapMapping;
- typedef std::map<String, String> MappingCache;
-
- typedef std::map<String, String> ReservedNameMap;
- typedef std::set<String> KeywordSet;
-
- typedef CXX::options options_type;
-
- public:
- Context (std::wostream& o,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- options_type const& ops,
- StringLiteralMap const* custom_literals_map);
-
- protected:
- Context (Context& c)
- : os (c.os),
- schema_root (c.schema_root),
- schema_path (c.schema_path),
- options (c.options),
- std (c.std),
- char_type (c.char_type),
- char_encoding (c.char_encoding),
- L (c.L),
- string_type (c.string_type),
- auto_ptr (c.auto_ptr),
- string_literal_map (c.string_literal_map),
- type_exp (c.type_exp),
- inst_exp (c.inst_exp),
- inl (c.inl),
- ns_mapping_cache (c.ns_mapping_cache),
- xs_ns_ (c.xs_ns_),
- cxx_id_expr (c.cxx_id_expr),
- urn_mapping (c.urn_mapping),
- nsr_mapping (c.nsr_mapping),
- nsm_mapping (c.nsm_mapping),
- include_mapping (c.include_mapping),
- reserved_name_map (c.reserved_name_map),
- keyword_set (c.keyword_set)
- {
- }
-
- Context (Context& c, std::wostream& o)
- : os (o),
- schema_root (c.schema_root),
- schema_path (c.schema_path),
- options (c.options),
- std (c.std),
- char_type (c.char_type),
- char_encoding (c.char_encoding),
- L (c.L),
- string_type (c.string_type),
- auto_ptr (c.auto_ptr),
- string_literal_map (c.string_literal_map),
- type_exp (c.type_exp),
- inst_exp (c.inst_exp),
- inl (c.inl),
- ns_mapping_cache (c.ns_mapping_cache),
- xs_ns_ (c.xs_ns_),
- cxx_id_expr (c.cxx_id_expr),
- urn_mapping (c.urn_mapping),
- nsr_mapping (c.nsr_mapping),
- nsm_mapping (c.nsm_mapping),
- include_mapping (c.include_mapping),
- reserved_name_map (c.reserved_name_map),
- keyword_set (c.keyword_set)
- {
- }
-
- public:
- static String
- unclash (String const& name, String const& new_name)
- {
- return name == new_name ? (new_name + L'_') : new_name;
- }
-
- public:
- // Return UTF-32 character starting at this position. Position is
- // advanced by 1 if this Unicode character takes more than one
- // underlying character.
- //
- static unsigned int
- unicode_char (String const& str, size_t& pos);
-
- static unsigned int
- unicode_char (wchar_t const*& p);
-
- // Escape C++ keywords and illegal characters.
- //
- String
- escape (String const&);
-
- // Create a string literal so that it can be used in C++ source
- // code. It includes "".
- //
- String
- strlit (String const&);
-
- // Escape the string so that it can be used in C++ comment.
- //
- String
- comment (String const&);
-
- // Translate XML namespace name to a C++ identifier.
- //
- String
- ns_name (SemanticGraph::Namespace&);
-
- // XML Schema namespace.
- //
- SemanticGraph::Namespace&
- xs_ns ();
-
- // C++ namespace for XML Schema.
- //
- String
- xs_ns_name ();
-
- //
- //
- SemanticGraph::Namespace&
- namespace_ (SemanticGraph::Nameable& n);
-
- // Original XML namespace name.
- //
- String
- xml_ns_name (SemanticGraph::Nameable& ns);
-
-
- // Fully-qualified C++ name.
- //
- String
- fq_name (SemanticGraph::Nameable& n, char const* name_key = "name");
-
- public:
- static SemanticGraph::Type&
- ultimate_base (SemanticGraph::Complex&);
-
- public:
- String
- process_include_path (String const&) const;
-
- public:
- static bool
- skip (SemanticGraph::Member& m)
- {
- // "Subsequent" local element.
- //
- return !m.scope ().is_a<SemanticGraph::Namespace> () &&
- m.context ().count ("min") == 0;
- }
-
- static size_t
- min (SemanticGraph::Member const& m)
- {
- return m.context ().get<size_t> ("min");
- }
-
- static size_t
- min (SemanticGraph::Any const& a)
- {
- return a.context ().get<size_t> ("min");
- }
-
- static size_t
- max (SemanticGraph::Member const& m)
- {
- return m.context ().get<size_t> ("max");
- }
-
- static size_t
- max (SemanticGraph::Any const& a)
- {
- return a.context ().get<size_t> ("max");
- }
-
- public:
- // Get escaped name.
- //
- static String const&
- ename (SemanticGraph::Nameable const& n)
- {
- return n.context ().get<String> ("name");
- }
-
- public:
- std::wostream& os;
-
- SemanticGraph::Schema& schema_root;
- SemanticGraph::Path const& schema_path;
-
- options_type const& options;
-
- cxx_version std;
-
- String& char_type;
- String& char_encoding;
- String& L; // string literal prefix
- String& string_type;
- String& auto_ptr;
-
- StringLiteralMap const* string_literal_map;
-
- String& type_exp;
- String& inst_exp;
- String& inl;
-
- public:
- MappingCache& ns_mapping_cache;
-
- private:
- SemanticGraph::Path const schema_path_;
-
- SemanticGraph::Namespace* xs_ns_;
-
- String char_type_;
- String char_encoding_;
- String L_;
- String string_type_;
- String auto_ptr_;
-
- String type_exp_;
- String inst_exp_;
- String inl_;
-
- private:
- RegexPat const cxx_id_expr_;
- RegexPat const& cxx_id_expr;
- Regex urn_mapping_;
- RegexMapping nsr_mapping_;
- MapMapping nsm_mapping_;
- Regex const& urn_mapping;
- RegexMapping const& nsr_mapping;
- MapMapping const& nsm_mapping;
- MappingCache ns_mapping_cache_;
-
- RegexMapping include_mapping_;
- RegexMapping const& include_mapping;
-
- ReservedNameMap const& reserved_name_map;
- ReservedNameMap reserved_name_map_;
-
- KeywordSet const& keyword_set;
- KeywordSet keyword_set_;
- };
-
- inline unsigned int Context::
- unicode_char (String const& str, size_t& pos)
- {
- if (sizeof (wchar_t) == 4)
- {
- return str[pos];
- }
- else if (sizeof (wchar_t) == 2)
- {
- wchar_t x (str[pos]);
-
- if (x < 0xD800 || x > 0xDBFF)
- return x;
- else
- return ((x - 0xD800) << 10) + (str[++pos] - 0xDC00) + 0x10000;
- }
- else
- return 0;
- }
-
- inline unsigned int Context::
- unicode_char (wchar_t const*& p)
- {
- if (sizeof (wchar_t) == 4)
- {
- return *p;
- }
- else if (sizeof (wchar_t) == 2)
- {
- wchar_t x (*p);
-
- if (x < 0xD800 || x > 0xDBFF)
- return x;
- else
- return ((x - 0xD800) << 10) + (*(++p) - 0xDC00) + 0x10000;
- }
- else
- return 0;
- }
-
- // Sources traverser that goes into each schema only once.
- //
- struct Sources: Traversal::Sources
- {
- virtual void
- traverse (SemanticGraph::Sources& s)
- {
- if (schemas_.insert (&s.schema ()).second)
- Traversal::Sources::traverse (s);
- }
-
- private:
- std::set<SemanticGraph::Schema*> schemas_;
- };
-
- // Usual namespace mapping.
- //
- struct Namespace: Traversal::Namespace
- {
- struct ScopeTracker
- {
- // First scope name if always empty (global scope). The last flag
- // signals the last scope.
- //
- virtual void
- enter (Type&, String const& name, bool last) = 0;
-
- virtual void
- leave () = 0;
- };
-
-
- Namespace (Context& c)
- : ctx_ (c), st_ (0)
- {
- }
-
- Namespace (Context& c, ScopeTracker& st)
- : ctx_ (c), st_ (&st)
- {
- }
-
- virtual void
- pre (Type&);
-
- virtual void
- post (Type&);
-
- private:
- Context& ctx_;
- ScopeTracker* st_;
- };
-
- //
- //
- template <typename X>
- struct Has : X
- {
- Has (bool& result)
- : result_ (result)
- {
- }
-
- virtual void
- traverse (typename X::Type&)
- {
- result_ = true;
- }
-
- private:
- bool& result_;
- };
-
- // Checks if scope 'Y' names any of 'X'
- //
- template <typename X, typename Y>
- bool
- has (Y& y)
- {
- using SemanticGraph::Scope;
-
- bool result (false);
- Has<X> t (result);
-
- for (Scope::NamesIterator i (y.names_begin ()), e (y.names_end ());
- !result && i != e; ++i)
- t.dispatch (i->named ());
-
- return result;
- }
-
- // Checks if the compositor has any particle of 'X'
- //
- template <typename X>
- bool
- has_particle (SemanticGraph::Compositor& y)
- {
- using SemanticGraph::Compositor;
-
- bool result (false);
- Has<X> t (result);
-
- for (Compositor::ContainsIterator i (y.contains_begin ()),
- e (y.contains_end ()); !result && i != e; ++i)
- {
- SemanticGraph::Particle& p (i->particle ());
-
- t.dispatch (p);
-
- if (!result && p.is_a<Compositor> ())
- result = has_particle<X> (dynamic_cast<Compositor&> (p));
- }
-
- return result;
- }
-
- // Specialization for Complex
- //
- template <typename X>
- bool
- has_particle (SemanticGraph::Complex& c)
- {
- return c.contains_compositor_p () &&
- has_particle<X> (c.contains_compositor ().compositor ());
- }
-
- // Fundamental type mapping helper.
- //
- struct Fundamental: Traversal::Fundamental::Type,
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef
- {
- virtual void
- fundamental_type (SemanticGraph::Fundamental::Type& t) = 0;
-
- virtual void
- fundamental_template (SemanticGraph::Fundamental::Type& t) = 0;
-
- virtual void
- traverse (SemanticGraph::Fundamental::Type& t)
- {
- fundamental_type (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- fundamental_template (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- fundamental_template (t);
- }
- };
-}
-
-#endif // CXX_TREE_ELEMENTS_HXX
diff --git a/xsd/cxx/literal-map.cxx b/xsd/cxx/literal-map.cxx
deleted file mode 100644
index f2515fe..0000000
--- a/xsd/cxx/literal-map.cxx
+++ /dev/null
@@ -1,261 +0,0 @@
-// file : xsd/cxx/literal-map.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <memory> // std::auto_ptr
-#include <cstddef> // std::size_t
-#include <fstream>
-#include <iostream>
-
-#include <xercesc/util/XMLUni.hpp>
-
-#include <xercesc/framework/LocalFileInputSource.hpp>
-
-#include <xercesc/sax/Locator.hpp>
-#include <xercesc/sax/SAXParseException.hpp>
-#include <xercesc/sax2/DefaultHandler.hpp>
-#include <xercesc/sax2/SAX2XMLReader.hpp>
-#include <xercesc/sax2/XMLReaderFactory.hpp>
-
-#include <xsd-frontend/xml.hxx>
-
-#include <cxx/literal-map.hxx>
-
-using namespace std;
-using namespace xercesc;
-namespace XML = XSDFrontend::XML;
-
-namespace CXX
-{
- class Handler: public DefaultHandler
- {
- public:
- struct Failed {};
-
- Handler (String const& file, StringLiteralMap& map)
- : state_ (s_init), file_ (file), map_ (map)
- {
- }
-
- virtual void
- setDocumentLocator (const Locator* const l)
- {
- locator_ = l;
- }
-
- virtual void
- startElement (const XMLCh* const,
- const XMLCh* const lname,
- const XMLCh* const,
- const xercesc::Attributes&)
- {
- String n (XML::transcode (lname));
-
- if (n == L"string-literal-map" && state_ == s_init)
- state_ = s_map;
- else if (n == L"entry" && state_ == s_map)
- {
- str_seen_ = false;
- lit_seen_ = false;
- state_ = s_entry;
- }
- else if (n == L"string" && state_ == s_entry)
- {
- str_seen_ = true;
- str_.clear ();
- state_ = s_string;
- }
- else if (n == L"literal" && state_ == s_entry)
- {
- lit_seen_ = true;
- lit_.clear ();
- state_ = s_literal;
- }
- else
- {
- wcerr << file_ << ":" << line () << ":" << col () << ": error: "
- << "unexpected element '" << n << "'" << endl;
- throw Failed ();
- }
- }
-
- virtual void
- endElement (const XMLCh* const,
- const XMLCh* const lname,
- const XMLCh* const)
- {
- String n (XML::transcode (lname));
-
- if (n == L"string-literal-map")
- state_ = s_init;
- else if (n == L"entry")
- {
- if (!str_seen_)
- {
- wcerr << file_ << ":" << line () << ":" << col () << ": error: "
- << "expected 'string' element" << endl;
- throw Failed ();
- }
-
- if (!lit_seen_)
- {
- wcerr << file_ << ":" << line () << ":" << col () << ": error: "
- << "expected 'literal' element" << endl;
- throw Failed ();
- }
-
- map_[str_] = lit_;
- state_ = s_map;
- }
- else if (n == L"string")
- state_ = s_entry;
- else if (n == L"literal")
- state_ = s_entry;
- }
-
- virtual void
- characters (const XMLCh* const s, const XMLSize_t length)
- {
- String str (XML::transcode (s, length));
-
- if (state_ == s_string)
- str_ += str;
- else if (state_ == s_literal)
- lit_ += str;
- else
- {
- for (size_t i (0); i < str.size (); ++i)
- {
- wchar_t c (str[i]);
-
- if (c != 0x20 && c != 0x0A && c != 0x0D && c != 0x09)
- {
- wcerr << file_ << ":" << line () << ":" << col () << ": error: "
- << "unexpected character data" << endl;
- throw Failed ();
- }
- }
- }
- }
-
- // Error hanlding.
- //
- enum Severity {s_warning, s_error, s_fatal};
-
- virtual void
- warning (const SAXParseException& e)
- {
- handle (e, s_warning);
- }
-
- virtual void
- error (const SAXParseException& e)
- {
- handle (e, s_error);
- }
-
- virtual void
- fatalError (const SAXParseException& e)
- {
- handle (e, s_fatal);
- }
-
- virtual void
- resetErrors ()
- {
- }
-
- void
- handle (const SAXParseException& e, Severity s)
- {
- String msg (XML::transcode (e.getMessage ()));
-
- wcerr << file_ << ":"
- << e.getLineNumber () << ":" << e.getColumnNumber () << ": "
- << (s == s_warning ? "warning: " : "error: ") << msg << endl;
-
- if (s != s_warning)
- throw Failed ();
- }
-
- size_t
- line () const
- {
- return locator_ != 0
- ? static_cast<size_t> (locator_->getLineNumber ())
- : 0;
- }
-
- size_t
- col () const
- {
- return locator_ != 0
- ? static_cast<size_t> (locator_->getColumnNumber ())
- : 0;
- }
-
- private:
- const Locator* locator_;
-
- enum
- {
- s_init,
- s_map,
- s_entry,
- s_string,
- s_literal
- } state_;
-
- String file_;
- StringLiteralMap& map_;
-
- bool str_seen_;
- bool lit_seen_;
-
- String str_;
- String lit_;
- };
-
- bool
- read_literal_map (NarrowString const& file, StringLiteralMap& map)
- {
- try
- {
- // Try to open the file with fstream. This way we get to
- // report the error in a consistent manner.
- //
- {
- ifstream ifs (file.c_str ());
- if (!ifs.is_open ())
- {
- wcerr << file.c_str () << ": unable to open in read mode" << endl;
- return false;
- }
- }
-
- String wfile (file);
-
- LocalFileInputSource is (XML::XMLChString (wfile).c_str ());
- Handler h (wfile, map);
-
- auto_ptr<SAX2XMLReader> parser (
- XMLReaderFactory::createXMLReader ());
-
- parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
- parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
- parser->setFeature (XMLUni::fgSAX2CoreValidation, false);
- parser->setFeature (XMLUni::fgXercesSchema, false);
- parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
-
- parser->setErrorHandler (&h);
- parser->setContentHandler (&h);
-
- parser->parse (is);
- }
- catch (Handler::Failed const&)
- {
- return false;
- }
-
- return true;
- }
-}
diff --git a/xsd/cxx/literal-map.hxx b/xsd/cxx/literal-map.hxx
deleted file mode 100644
index cce9bf5..0000000
--- a/xsd/cxx/literal-map.hxx
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : xsd/cxx/literal-map.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_LITERAL_MAP_HXX
-#define CXX_LITERAL_MAP_HXX
-
-#include <map>
-
-#include <types.hxx>
-
-namespace CXX
-{
- typedef std::map<String, String> StringLiteralMap;
-
- bool
- read_literal_map (NarrowString const& file, StringLiteralMap& map);
-}
-
-#endif // CXX_LITERAL_MAP_HXX
diff --git a/xsd/cxx/option-types.cxx b/xsd/cxx/option-types.cxx
deleted file mode 100644
index ec49d29..0000000
--- a/xsd/cxx/option-types.cxx
+++ /dev/null
@@ -1,47 +0,0 @@
-// file : xsd/cxx/option-types.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <istream>
-#include <ostream>
-
-#include <cxx/option-types.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- //
- // cxx_version
- //
-
- static const char* cxx_version_[] =
- {
- "c++98",
- "c++11"
- };
-
- string cxx_version::
- string () const
- {
- return cxx_version_[v_];
- }
-
- istream&
- operator>> (istream& is, cxx_version& v)
- {
- string s;
- is >> s;
-
- if (!is.fail ())
- {
- if (s == "c++98")
- v = cxx_version::cxx98;
- else if (s == "c++11")
- v = cxx_version::cxx11;
- else
- is.setstate (istream::failbit);
- }
-
- return is;
- }
-}
diff --git a/xsd/cxx/option-types.hxx b/xsd/cxx/option-types.hxx
deleted file mode 100644
index f36a6ca..0000000
--- a/xsd/cxx/option-types.hxx
+++ /dev/null
@@ -1,34 +0,0 @@
-// file : xsd/cxx/option-types.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef XSD_OPTION_TYPES_HXX
-#define XSD_OPTION_TYPES_HXX
-
-#include <iosfwd>
-#include <string>
-
-namespace CXX
-{
- struct cxx_version
- {
- enum value
- {
- cxx98,
- cxx11
- };
-
- cxx_version (value v = value (0)) : v_ (v) {}
- operator value () const {return v_;}
-
- std::string
- string () const;
-
- private:
- value v_;
- };
-
- std::istream&
- operator>> (std::istream&, cxx_version&);
-}
-
-#endif // XSD_OPTION_TYPES_HXX
diff --git a/xsd/cxx/options.cli b/xsd/cxx/options.cli
deleted file mode 100644
index 6e25949..0000000
--- a/xsd/cxx/options.cli
+++ /dev/null
@@ -1,550 +0,0 @@
-// file : xsd/cxx/options.cli
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include <cstddef>; // std::size_t
-
-include <types.hxx>; // NarrowString, NarrowStrings
-
-include <cxx/option-types.hxx>;
-
-include <options.cli>;
-
-namespace CXX
-{
- class options: ::options = 0
- {
- // Language.
- //
- cxx_version --std = cxx_version::cxx98
- {
- "<version>",
- "Specify the C++ standard that the generated code should conform to.
- Valid values are \cb{c++98} (default) and \cb{c++11}.
-
- The C++ standard affects various aspects of the generated code that
- are discussed in more detail in various mapping-specific
- documentation. Overall, when C++11 is selected, the generated
- code relies on the move semantics and uses \cb{std::unique_ptr}
- instead of deprecated \cb{std::auto_ptr}.
-
- When the C++11 mode is selected, you normally don't need to
- perform any extra steps other than enable C++11 in your C++
- compiler, if required. The XSD compiler will automatically
- add the necessary macro defines to the generated header files
- that will switch the header-only XSD runtime library (\cb{libxsd})
- to the C++11 mode. However, if you include any of the XSD runtime
- headers directly in your application (normally you just include
- the generated headers), then you will need to define the
- \cb{XSD_CXX11} macro for your entire project."
- };
-
- // Character type and encoding.
- //
- NarrowString --char-type = "char"
- {
- "<type>",
- "Generate code using the provided character <type> instead of the
- default \cb{char}. Valid values are \cb{char} and \cb{wchar_t}."
- };
-
- NarrowString --char-encoding
- {
- "<enc>",
- "Specify the character encoding that should be used in the generated
- code. Valid values for the \cb{char} character type are \cb{utf8}
- (default), \cb{iso8859-1}, \cb{lcp} (Xerces-C++ local code page),
- and \cb{custom}. If you pass \cb{custom} as the value then you will
- need to include the transcoder implementation header for your
- encoding at the beginning of the generated header files (see the
- \cb{--hxx-prologue} option).
-
- For the \cb{wchar_t} character type the only valid value is \cb{auto}
- and the encoding is automatically selected between UTF-16 and
- UTF-32/UCS-4, depending on the \cb{wchar_t} type size."
- };
-
- // Output options.
- //
- NarrowString --output-dir
- {
- "<dir>",
- "Write generated files to <dir> instead of the current directory."
- };
-
- bool --generate-inline
- {
- "Generate simple functions inline. This option triggers creation of
- the inline file."
- };
-
- // Extern XML Schema.
- //
- bool --generate-xml-schema
- {
- "Generate a C++ header file as if the schema being compiled defines the
- XML Schema namespace. For the C++/Tree mapping, the resulting file will
- contain definitions for all XML Schema built-in types. For the
- C++/Parser mapping, the resulting file will contain definitions for
- all the parser skeletons and implementations corresponding to the
- XML Schema built-in types.
-
- The schema file provided to the compiler need not exist and is only
- used to derive the name of the resulting header file. Use the
- \cb{--extern-xml-schema} option to include this file in the
- generated files for other schemas."
- };
-
- NarrowString --extern-xml-schema
- {
- "<file>",
- "Include a header file derived from <file> instead of generating the
- XML Schema namespace mapping inline. The provided file need not
- exist and is only used to derive the name of the included header
- file. Use the \cb{--generate-xml-schema} option to generate this
- header file."
- };
-
- // Namespace mapping.
- //
- NarrowStrings --namespace-map
- {
- "<xns>=<cns>",
- "Map XML Schema namespace <xns> to C++ namespace <cns>. Repeat
- this option to specify mapping for more than one XML Schema namespace.
- For example, the following option:
-
- \cb{--namespace-map http://example.com/foo/bar=foo::bar}
-
- Will map the \cb{http://example.com/foo/bar} XML Schema namespace to
- the \cb{foo::bar} C++ namespace."
- };
-
- NarrowStrings --namespace-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate XML
- Schema namespace names to C++ namespace names. <regex> is a Perl-like
- regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can be
- used as a delimiter instead of '\cb{/}'. Escaping of the delimiter
- character in \ci{pattern} or \ci{replacement} is not supported.
-
- All the regular expressions are pushed into a stack with the last
- specified expression considered first. The first match that
- succeeds is used. Regular expressions are applied to a string in
- the form
-
- \c{\i{filename} \i{namespace}}
-
- For example, if you have file \cb{hello.xsd} with namespace
- \cb{http://example.com/hello} and you run \cb{xsd} on this file,
- then the string in question will be:
-
- \cb{hello.xsd. http://example.com/hello}
-
- For the built-in XML Schema namespace the string is:
-
- \cb{XMLSchema.xsd http://www.w3.org/2001/XMLSchema}
-
- The following three steps are performed for each regular expression
- until the match is found:
-
- 1. The expression is applied and if the result is empty the next
- expression is considered.
-
- 2. All '\cb{/}' are replaced with '\cb{::}'.
-
- 3. The result is verified to be a valid C++ scope name (e.g.,
- \cb{foo::bar}). If this test succeeds, the result is used as a
- C++ namespace name.
-
- As an example, the following expression maps XML Schema namespaces
- in the form \cb{http://example.com/foo/bar} to C++ namespaces in the
- form \cb{foo::bar}:
-
- \cb{%.* http://example.com/(.+)%$1%}
-
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- bool --namespace-regex-trace
- {
- "Trace the process of applying regular expressions specified with the
- \cb{--namespace-regex} option. Use this option to find out why your
- regular expressions don't do what you expected them to do."
- };
-
- // Reserved names.
- //
- NarrowStrings --reserved-name
- {
- "<n>[=<r>]",
- "Add name <n> to the list of names that should not be used as
- identifiers. The name can optionally be followed by \cb{=} and the
- replacement name <r> that should be used instead. All the C++ keywords
- are already in this list."
- };
-
- // Include options.
- //
- bool --include-with-brackets
- {
- "Use angle brackets (<>) instead of quotes (\"\") in generated
- \cb{#include} directives."
- };
-
- NarrowString --include-prefix
- {
- "<prefix>",
- "Add <prefix> to generated \cb{#include} directive paths.
-
- For example, if you had the following import element in your schema
-
- \cb{<import namespace=\"...\" schemaLocation=\"base.xsd\"/>}
-
- and compiled this fragment with \cb{--include-prefix schemas/}, then
- the include directive in the generated code would be:
-
- \cb{#include \"schemas/base.hxx\"}"
- };
-
- NarrowStrings --include-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to transform
- \cb{#include} directive paths. <regex> is a Perl-like regular
- expression in the form \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}.
- Any character can be used as a delimiter instead of '\cb{/}'. Escaping
- of the delimiter character in \ci{pattern} or \ci{replacement} is not
- supported.
-
- All the regular expressions are pushed into a stack with the last
- specified expression considered first. The first match that succeeds
- is used.
-
- As an example, the following expression transforms paths in the form
- \cb{schemas/foo/bar} to paths in the form \cb{generated/foo/bar}:
-
- \cb{%schemas/(.+)%generated/$1%}
-
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- bool --include-regex-trace
- {
- "Trace the process of applying regular expressions specified with the
- \cb{--include-regex} option. Use this option to find out why your
- regular expressions don't do what you expected them to do."
- };
-
- NarrowString --guard-prefix
- {
- "<prefix>",
- "Add <prefix> to generated header inclusion guards. The prefix is
- transformed to upper case and characters that are illegal in a
- preprocessor macro name are replaced with underscores. If this
- option is not specified then the directory part of the input schema
- file is used as a prefix."
- };
-
- // File suffixes.
- //
- NarrowString --hxx-suffix = ".hxx"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{.hxx} to
- construct the name of the header file. Note that this suffix is also
- used to construct names of header files corresponding to
- included/imported schemas."
- };
-
- NarrowString --ixx-suffix = ".ixx"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{.ixx} to
- construct the name of the inline file."
- };
-
- NarrowString --cxx-suffix = ".cxx"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{.cxx} to
- construct the name of the source file."
- };
-
- NarrowString --fwd-suffix = "-fwd.hxx"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{-fwd.hxx} to
- construct the name of the forward declaration file."
- };
-
- NarrowString --hxx-regex
- {
- "<regex>",
- "Use the provided expression to construct the name of the header file.
- <regex> is a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}.
- Note that this expression is also used to construct names of header
- files corresponding to included/imported schemas. See also the REGEX
- AND SHELL QUOTING section below."
- };
-
- NarrowString --ixx-regex
- {
- "<regex>",
- "Use the provided expression to construct the name of the inline file.
- <regex> is a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX AND
- SHELL QUOTING section below."
- };
-
- NarrowString --cxx-regex
- {
- "<regex>",
- "Use the provided expression to construct the name of the source file.
- <regex> is a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX AND
- SHELL QUOTING section below."
- };
-
- NarrowString --fwd-regex
- {
- "<regex>",
- "Use the provided expression to construct the name of the forward
- declaration file. <regex> is a Perl-like regular expression in the
- form \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX
- AND SHELL QUOTING section below."
- };
-
- // Prologues/epilogues.
- //
- NarrowStrings --hxx-prologue
- {
- "<text>",
- "Insert <text> at the beginning of the header file."
- };
-
- NarrowStrings --ixx-prologue
- {
- "<text>",
- "Insert <text> at the beginning of the inline file."
- };
-
- NarrowStrings --cxx-prologue
- {
- "<text>",
- "Insert <text> at the beginning of the source file."
- };
-
- NarrowStrings --fwd-prologue
- {
- "<text>",
- "Insert <text> at the beginning of the forward declaration file."
- };
-
- NarrowStrings --prologue
- {
- "<text>",
- "Insert <text> at the beginning of each generated file for which
- there is no file-specific prologue."
- };
-
- NarrowStrings --hxx-epilogue
- {
- "<text>",
- "Insert <text> at the end of the header file."
- };
-
- NarrowStrings --ixx-epilogue
- {
- "<text>",
- "Insert <text> at the end of the inline file."
- };
-
- NarrowStrings --cxx-epilogue
- {
- "<text>",
- "Insert <text> at the end of the source file."
- };
-
- NarrowStrings --fwd-epilogue
- {
- "<text>",
- "Insert <text> at the end of the forward declaration file."
- };
-
- NarrowStrings --epilogue
- {
- "<text>",
- "Insert <text> at the end of each generated file for which there
- is no file-specific epilogue."
- };
-
- NarrowString --hxx-prologue-file
- {
- "<file>",
- "Insert the content of the <file> at the beginning of the header file."
- };
-
- NarrowString --ixx-prologue-file
- {
- "<file>",
- "Insert the content of the <file> at the beginning of the inline file."
- };
-
- NarrowString --cxx-prologue-file
- {
- "<file>",
- "Insert the content of the <file> at the beginning of the source file."
- };
-
- NarrowString --fwd-prologue-file
- {
- "<file>",
- "Insert the content of the <file> at the beginning of the forward
- declaration file."
- };
-
- NarrowString --prologue-file
- {
- "<file>",
- "Insert the content of the <file> at the beginning of each generated
- file for which there is no file-specific prologue file."
- };
-
- NarrowString --hxx-epilogue-file
- {
- "<file>",
- "Insert the content of the <file> at the end of the header file."
- };
-
- NarrowString --ixx-epilogue-file
- {
- "<file>",
- "Insert the content of the <file> at the end of the inline file."
- };
-
- NarrowString --cxx-epilogue-file
- {
- "<file>",
- "Insert the content of the <file> at the end of the source file."
- };
-
- NarrowString --fwd-epilogue-file
- {
- "<file>",
- "Insert the content of the <file> at the end of the forward declaration
- file."
- };
-
- NarrowString --epilogue-file
- {
- "<file>",
- "Insert the content of the <file> at the end of each generated file
- for which there is no file-specific epilogue file."
- };
-
- // Export options.
- //
- NarrowString --export-symbol
- {
- "<symbol>",
- "Insert <symbol> in places where DLL export/import control statements
- (\cb{__declspec(dllexport/dllimport)}) are necessary."
- };
-
- bool --export-xml-schema
- {
- "Export/import types in the XML Schema namespace using the export
- symbol provided with the \cb{--export-symbol} option. The
- \cb{XSD_NO_EXPORT} macro can be used to omit this code during C++
- compilation, which may be useful if you would like to use the same
- generated code across multiple platforms."
- };
-
- bool --export-maps
- {
- "Export polymorphism support maps from a Win32 DLL into which this
- generated code is placed. This is necessary when your type hierarchy
- is split across several DLLs since otherwise each DLL will have its
- own set of maps. In this situation the generated code for the DLL
- which contains base types and/or substitution group heads should be
- compiled with this option and the generated code for all other DLLs
- should be compiled with \cb{--import-maps}. This option is only valid
- together with \cb{--generate-polymorphic}. The \cb{XSD_NO_EXPORT}
- macro can be used to omit this code during C++ compilation, which may
- be useful if you would like to use the same generated code across
- multiple platforms."
- };
-
- bool --import-maps
- {
- "Import polymorphism support maps to a Win32 DLL or executable into
- which this generated code is linked. See the \cb{--export-maps}
- option documentation for details. This options is only valid together
- with \cb{--generate-polymorphic}. The \cb{XSD_NO_EXPORT} macro can be
- used to omit this code during C++ compilation, which may be useful if
- you would like to use the same generated code across multiple
- platforms."
- };
-
- // Make dependency generation.
- //
- bool --generate-dep
- {
- "Generate \cb{make} dependency information. This option triggers the
- creation of the \cb{.d} file containing the dependencies of the
- generated files on the main schema file as well as all the schema
- files that it includes/imports, transitively. This dependency file
- is then normally included into the main \cb{makefile} to implement
- automatic dependency tracking.
-
- Note also that automatic dependency generation is not supported in
- the file-per-type mode (\cb{--file-per-type}). In this case, all
- the generated files are produced with a single compiler invocation
- and depend on all the schemas. As a result, it is easier to establish
- such a dependency manually, perhaps with the help of the
- \cb{--file-list*} options."
- };
-
- bool --generate-dep-only
- {
- "Generate \cb{make} dependency information only."
- };
-
- bool --dep-phony
- {
- "Generate phony targets for included/imported schema files, causing
- each to depend on nothing. Such dummy rules work around \cb{make}
- errors caused by the removal of schema files without also updating
- the dependency file to match."
- };
-
- NarrowStrings --dep-target
- {
- "<target>",
- "Change the target of the dependency rule. By default it contains
- all the generated C++ files as well as the dependency file itself,
- without any directory prefixes. If you require multiple targets,
- then you can specify them as a single, space-separated argument or
- you can repeat this option multiple times."
- };
-
- NarrowString --dep-suffix = ".d"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{.d} to
- construct the name of the dependency file."
- };
-
- NarrowString --dep-regex
- {
- "<regex>",
- "Use the provided expression to construct the name of the dependency
- file. <regex> is a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX
- AND SHELL QUOTING section below."
- };
- };
-}
diff --git a/xsd/cxx/parser/attribute-validation-source.cxx b/xsd/cxx/parser/attribute-validation-source.cxx
deleted file mode 100644
index 76a3923..0000000
--- a/xsd/cxx/parser/attribute-validation-source.cxx
+++ /dev/null
@@ -1,412 +0,0 @@
-// file : xsd/cxx/parser/attribute-validation-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/attribute-validation-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- struct Test: Traversal::Attribute,
- Traversal::AnyAttribute,
- Context
- {
- Test (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- String const& name (a.name ());
-
- if (a.qualified_p () && a.namespace_ ().name ())
- {
- String const& ns (a.namespace_ ().name ());
-
- os << "n == " << strlit (name) << " &&" << endl
- << "ns == " << strlit (ns);
- }
- else
- os << "n == " << strlit (name) << " && ns.empty ()";
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& ns (a.definition_namespace ().name ());
-
- for (SemanticGraph::AnyAttribute::NamespaceIterator
- i (a.namespace_begin ()), e (a.namespace_end ()); i != e;)
- {
- if (*i == L"##any")
- {
- os << "!n.empty ()";
- }
- else if (*i == L"##other")
- {
- if (ns)
- {
- // Note that here I assume that ##other does not include
- // unqualified names in a schema with target namespace.
- // This is not what the spec says but that seems to be
- // the consensus.
- //
- os << "(!ns.empty () && ns != " << strlit (ns) << ")";
- }
- else
- os << "!ns.empty ()";
- }
- else if (*i == L"##local")
- {
- os << "(ns.empty () && !n.empty ())";
- }
- else if (*i == L"##targetNamespace")
- {
- os << "ns == " << strlit (ns);
- }
- else
- {
- os << "ns == " << strlit (*i);
- }
-
- if (++i != e)
- os << " ||" << endl;
- }
- }
- };
-
- //
- //
- struct PhaseOne: Traversal::Attribute, Context
- {
- PhaseOne (Context& c)
- : Context (c), test_ (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& name (ename (a));
- String const& inst (emember (a));
-
- SemanticGraph::Type& type (a.type ());
- String const& post (post_name (type));
- String const& ret (ret_type (type));
-
- os << "if (";
-
- test_.traverse (a);
-
- os << ")"
- << "{"
- << "if (this->" << inst << ")"
- << "{"
- << "this->" << inst << "->pre ();"
- << "this->" << inst << "->_pre_impl ();"
- << "this->" << inst << "->_characters (s);"
- << "this->" << inst << "->_post_impl ();";
-
- if (ret == L"void")
- os << "this->" << inst << "->" << post << " ();"
- << "this->" << name << " ();";
- else
- {
- // Don't create an lvalue in C++11 (think std::unique_ptr).
- // In C++98 we do it for compatibility with older/broken
- // compilers (e.g., IBM xlC that needs an lvalue to pass
- // std::auto_ptr).
- //
- if (std == cxx_version::cxx98)
- os << arg_type (type) << " tmp (this->" << inst << "->" <<
- post << " ());"
- << "this->" << name << " (tmp);";
- else
- os << "this->" << name << " (this->" << inst << "->" <<
- post << " ());";
- }
-
- os << "}";
-
- if (!a.optional_p ())
- os << "static_cast< v_state_attr_* > (" <<
- "this->v_state_attr_stack_.top ())->" << name << " = true;";
-
- os << "return true;"
- << "}";
- }
-
- private:
- Test test_;
- };
-
-
- //
- //
- struct PhaseTwo: Traversal::AnyAttribute, Context
- {
- PhaseTwo (Context& c)
- : Context (c), test_ (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- os << "if (";
-
- test_.traverse (a);
-
- os << ")" << endl
- << "{"
- << "this->_any_attribute (ns, n, s);"
- << "return true;"
- << "}";
- }
-
- private:
- Test test_;
- };
-
-
- //
- //
- struct AttributeStateInit: Traversal::Attribute, Context
- {
- AttributeStateInit (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- if (!a.optional_p ())
- os << "as." << ename (a) << " = false;";
- }
- };
-
-
- //
- //
- struct AttributeStateCheck: Traversal::Attribute, Context
- {
- AttributeStateCheck (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- if (!a.optional_p ())
- {
- String ns (a.qualified_p () ? a.namespace_ ().name () : String ());
-
- os << "if (!as." << ename (a) << ")" << endl
- << "this->_expected_attribute (" << endl
- << strlit (ns) << ", " << strlit (a.name ()) << ");";
- }
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- phase_one_ (c),
- phase_two_ (c),
- attribute_state_init_ (c),
- attribute_state_check_ (c)
- {
- names_phase_one_ >> phase_one_;
- names_phase_two_ >> phase_two_;
-
- names_attribute_state_init_ >> attribute_state_init_;
- names_attribute_state_check_ >> attribute_state_check_;
- }
-
- virtual void
- traverse (Type& c)
- {
- bool has_att (has<Traversal::Attribute> (c));
- bool has_any (has<Traversal::AnyAttribute> (c));
-
- if (!has_att && !has_any)
- return;
-
- bool has_req_att (false);
- if (has_att)
- {
- RequiredAttributeTest test (has_req_att);
- Traversal::Names names_test (test);
- names (c, names_test);
- }
-
- String const& name (ename (c));
-
- os <<"// Attribute validation and dispatch functions for " <<
- name << "." << endl
- <<"//" << endl;
-
- if (has_att)
- {
- // _attribute_impl_phase_one
- //
- os << "bool " << name << "::" << endl
- << "_attribute_impl_phase_one (const " << string_type <<
- "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "& s)" << endl
- << "{";
-
- names (c, names_phase_one_);
-
- // Nothing matched - call our base (extension) or return false
- // if there is no base (or restriction (even from anyType)).
- //
- os << "return ";
-
- if (c.inherits_p () &&
- !c.inherits ().is_a<SemanticGraph::Restricts> ())
- {
- os << "this->" << fq_name (c.inherits ().base ()) <<
- "::_attribute_impl_phase_one (ns, n, s);";
- }
- else
- os << "false;";
-
- os << "}";
- }
-
-
- if (has_any)
- {
- // _attribute_impl_phase_two
- //
- os << "bool " << name << "::" << endl
- << "_attribute_impl_phase_two (const " << string_type <<
- "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "& s)"
- << "{";
-
- names (c, names_phase_two_);
-
- // Nothing matched - call our base (extension) or return false
- // if there is no base (or restriction (even from anyType)).
- //
- os << "return ";
-
- if (c.inherits_p () &&
- !c.inherits ().is_a<SemanticGraph::Restricts> ())
- {
- os << "this->" << fq_name (c.inherits ().base ()) <<
- "::_attribute_impl_phase_two (ns, n, s);";
- }
- else
- os << "false;";
-
- os << "}";
- }
-
- if (has_req_att)
- {
- // _pre_a_validate
- //
- os << "void " << name << "::" << endl
- << "_pre_a_validate ()"
- << "{"
- << "this->v_state_attr_stack_.push ();"
- << "v_state_attr_& as = *static_cast< v_state_attr_* > (" <<
- "this->v_state_attr_stack_.top ());"
- << endl;
-
- names (c, names_attribute_state_init_);
-
- // Call our base (extension) last.
- //
- if (c.inherits_p () &&
- !c.inherits ().is_a<SemanticGraph::Restricts> ())
- {
- os << "this->" << fq_name (c.inherits ().base ()) <<
- "::_pre_a_validate ();";
- }
-
- os << "}";
-
-
- // _post_a_validate
- //
- os << "void " << name << "::" << endl
- << "_post_a_validate ()"
- << "{";
-
- // Call our base (extension) first.
- //
- if (c.inherits_p () &&
- !c.inherits ().is_a<SemanticGraph::Restricts> ())
- {
- os << "this->" << fq_name (c.inherits ().base ()) <<
- "::_post_a_validate ();"
- << endl;
- }
-
- os << "v_state_attr_& as = *static_cast< v_state_attr_* > (" <<
- "this->v_state_attr_stack_.top ());"
- << endl;
-
- names (c, names_attribute_state_check_);
-
- os << endl
- << "this->v_state_attr_stack_.pop ();"
- << "}";
- }
- }
-
- private:
- PhaseOne phase_one_;
- Traversal::Names names_phase_one_;
-
- PhaseTwo phase_two_;
- Traversal::Names names_phase_two_;
-
- AttributeStateInit attribute_state_init_;
- Traversal::Names names_attribute_state_init_;
-
- AttributeStateCheck attribute_state_check_;
- Traversal::Names names_attribute_state_check_;
- };
- }
-
- void
- generate_attribute_validation_source (Context& ctx)
- {
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- Complex complex (ctx);
-
- names >> complex;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/attribute-validation-source.hxx b/xsd/cxx/parser/attribute-validation-source.hxx
deleted file mode 100644
index 25d7d96..0000000
--- a/xsd/cxx/parser/attribute-validation-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/attribute-validation-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_ATTRIBUTE_VALIDATION_SOURCE_HXX
-#define CXX_PARSER_ATTRIBUTE_VALIDATION_SOURCE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_attribute_validation_source (Context&);
- }
-}
-
-#endif // CXX_PARSER_ATTRIBUTE_VALIDATION_SOURCE_HXX
diff --git a/xsd/cxx/parser/characters-validation-source.cxx b/xsd/cxx/parser/characters-validation-source.cxx
deleted file mode 100644
index 3f3e88c..0000000
--- a/xsd/cxx/parser/characters-validation-source.cxx
+++ /dev/null
@@ -1,73 +0,0 @@
-// file : xsd/cxx/parser/characters-validation-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/characters-validation-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- if (!c.mixed_p ())
- return;
-
- String const& name (ename (c));
-
- os <<"// Character validation functions for " << name << "." << endl
- <<"//" << endl;
-
- // _characters_impl
- //
- os << "bool " << name << "::" << endl
- << "_characters_impl (const " << string_type << "& s)"
- << "{"
- << "this->_any_characters (s);"
- << "return true;"
- << "}";
- }
- };
- }
-
- void
- generate_characters_validation_source (Context& ctx)
- {
- //@@ Most of the time there is no mixed content type so
- // we generate an empty namespace which looks ugly. Will
- // need to implement smart namespace to handle this at
- // some point.
- //
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- Complex complex (ctx);
-
- names >> complex;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/characters-validation-source.hxx b/xsd/cxx/parser/characters-validation-source.hxx
deleted file mode 100644
index d0c73c4..0000000
--- a/xsd/cxx/parser/characters-validation-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/characters-validation-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_CHARACTERS_VALIDATION_SOURCE_HXX
-#define CXX_PARSER_CHARACTERS_VALIDATION_SOURCE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_characters_validation_source (Context&);
- }
-}
-
-#endif // CXX_PARSER_CHARACTERS_VALIDATION_SOURCE_HXX
diff --git a/xsd/cxx/parser/driver-source.cxx b/xsd/cxx/parser/driver-source.cxx
deleted file mode 100644
index 48775eb..0000000
--- a/xsd/cxx/parser/driver-source.cxx
+++ /dev/null
@@ -1,775 +0,0 @@
-// file : xsd/cxx/parser/driver-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-#include <map>
-#include <sstream>
-
-#include <cxx/parser/driver-source.hxx>
-#include <cxx/parser/print-impl-common.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- typedef map<SemanticGraph::Type*, String> TypeInstanceMap;
- typedef set<String> InstanceSet;
-
- // For base types we only want member's types, but not the
- // base itself.
- //
- struct BaseType: Traversal::Complex,
- Traversal::List,
- Context
- {
- BaseType (Context& c, Traversal::NodeBase& def)
- : Context (c), def_ (def)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c);
-
- if (!restriction_p (c))
- names (c);
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- def_.dispatch (l.argumented ().type ());
- }
-
- private:
- Traversal::NodeBase& def_;
- };
-
- struct ParserDef: Traversal::Type,
- Traversal::List,
- Traversal::Complex,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities,
-
- Context
- {
- ParserDef (Context& c, TypeInstanceMap& map, InstanceSet& set)
- : Context (c), map_ (map), set_ (set), base_ (c, *this)
- {
- *this >> inherits_ >> base_ >> inherits_;
-
- *this >> names_;
- base_ >> names_;
-
- names_ >> member_ >> belongs_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- if (map_.find (&t) == map_.end ())
- {
- String inst (find_instance_name (t));
- map_[&t] = inst;
-
- os << fq_name (t, "impl") << " " << inst << ";";
- }
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- if (map_.find (&l) == map_.end ())
- {
- String inst (find_instance_name (l));
- map_[&l] = inst;
-
- os << fq_name (l, "impl") << " " << inst << ";";
-
- dispatch (l.argumented ().type ());
- }
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- if (map_.find (&c) == map_.end ())
- {
- String inst (find_instance_name (c));
- map_[&c] = inst;
-
- os << fq_name (c, "impl") << " " << inst << ";";
-
- inherits (c);
-
- if (!restriction_p (c))
- names (c);
- }
- }
-
- // anyType & anySimpleType.
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- fund_type (t, "any_type");
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- fund_type (t, "any_simple_type");
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- fund_type (t, "boolean");
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- fund_type (t, "byte");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- fund_type (t, "unsigned_byte");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- fund_type (t, "short");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- fund_type (t, "unsigned_short");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- fund_type (t, "int");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- fund_type (t, "unsigned_int");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- fund_type (t, "long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- fund_type (t, "unsigned_long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- fund_type (t, "integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- fund_type (t, "non_positive_integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- fund_type (t, "non_negative_integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- fund_type (t, "positive_integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- fund_type (t, "negative_integer");
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- fund_type (t, "float");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- fund_type (t, "double");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- fund_type (t, "decimal");
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- fund_type (t, "string");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- fund_type (t, "normalized_string");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- fund_type (t, "token");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- fund_type (t, "nmtoken");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- fund_type (t, "nmtokens");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- fund_type (t, "name");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- fund_type (t, "ncname");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- fund_type (t, "language");
- }
-
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- fund_type (t, "qname");
- }
-
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- fund_type (t, "id");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- fund_type (t, "idref");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- fund_type (t, "idrefs");
- }
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- fund_type (t, "uri");
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- fund_type (t, "base64_binary");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- fund_type (t, "hex_binary");
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- fund_type (t, "date");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- fund_type (t, "date_time");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- fund_type (t, "duration");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- fund_type (t, "day");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- fund_type (t, "month");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- fund_type (t, "month_day");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- fund_type (t, "year");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- fund_type (t, "year_month");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- fund_type (t, "time");
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity& t)
- {
- fund_type (t, "entity");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities& t)
- {
- fund_type (t, "entities");
- }
-
- private:
- virtual void
- fund_type (SemanticGraph::Type& t, String const& name)
- {
- if (map_.find (&t) == map_.end ())
- {
- String inst (find_instance_name (name));
- map_[&t] = inst;
-
- os << fq_name (t, "impl") << " " << inst << ";";
- }
- }
-
- String
- find_instance_name (String const& raw_name)
- {
- String base_name (escape (raw_name + L"_p"));
- String name (base_name);
-
- for (size_t i (1); set_.find (name) != set_.end (); ++i)
- {
- std::wostringstream os;
- os << i;
- name = base_name + os.str ();
- }
-
- set_.insert (name);
- return name;
- }
-
- String
- find_instance_name (SemanticGraph::Type& t)
- {
- return find_instance_name (t.name ());
- }
-
- TypeInstanceMap& map_;
- InstanceSet& set_;
-
- BaseType base_;
- Traversal::Inherits inherits_;
-
- Traversal::Names names_;
- Traversal::Member member_;
- Traversal::Belongs belongs_;
- };
-
- struct ArgList: Traversal::Complex,
- Traversal::List,
- Traversal::Member,
- Context
- {
- ArgList (Context& c, TypeInstanceMap& map)
- : Context (c), map_ (map), first_ (true)
- {
- inherits_ >> *this;
- names_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c, inherits_);
-
- if (!restriction_p (c))
- names (c, names_);
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- if (!first_)
- os << "," << endl;
- else
- first_ = false;
-
- os << map_[&l.argumented ().type ()];
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- if (skip (m))
- return;
-
- if (!first_)
- os << "," << endl;
- else
- first_ = false;
-
- os << map_[&m.type ()];
- }
-
- private:
- TypeInstanceMap& map_;
-
- Traversal::Inherits inherits_;
- Traversal::Names names_;
-
- bool first_;
- };
-
- struct ParserConnect: Traversal::List,
- Traversal::Complex,
- Context
- {
- ParserConnect (Context& c, TypeInstanceMap& map)
- : Context (c), map_ (map), base_ (c, *this)
- {
- *this >> inherits_ >> base_ >> inherits_;
-
- *this >> names_;
- base_ >> names_;
-
- names_ >> member_ >> belongs_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- if (type_set_.find (&l) == type_set_.end ())
- {
- os << map_[&l] << ".parsers (" <<
- map_[&l.argumented ().type ()] << ");"
- << endl;
-
- type_set_.insert (&l);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- if (type_set_.find (&c) == type_set_.end ())
- {
- if (has_members (c))
- {
- os << map_[&c] << ".parsers (";
-
- ArgList args (*this, map_);
- args.dispatch (c);
-
- os << ");"
- << endl;
- }
-
- type_set_.insert (&c);
-
- inherits (c);
-
- if (!restriction_p (c))
- names (c);
- }
- }
-
- private:
- bool
- has_members (SemanticGraph::Complex& c)
- {
- using SemanticGraph::Complex;
-
- if (has<Traversal::Member> (c))
- return true;
-
- if (c.inherits_p ())
- {
- SemanticGraph::Type& b (c.inherits ().base ());
-
- if (Complex* cb = dynamic_cast<Complex*> (&b))
- return has_members (*cb);
-
- return b.is_a<SemanticGraph::List> ();
- }
-
- return false;
- }
-
- private:
- TypeInstanceMap& map_;
- set<SemanticGraph::Type*> type_set_;
-
- BaseType base_;
- Traversal::Inherits inherits_;
-
- Traversal::Names names_;
- Traversal::Member member_;
- Traversal::Belongs belongs_;
- };
- }
-
- void
- generate_driver_source (Context& ctx)
- {
- // Figure out the root element. Validator should have made sure
- // it is unique.
- //
- SemanticGraph::Element* root (0);
- {
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- RootElement root_element (ctx.options, root);
-
- schema >> schema_names >> ns >> ns_names >> root_element;
-
- schema.dispatch (ctx.schema_root);
- }
-
- std::wostream& os (ctx.os);
- String const& L (ctx.L);
- String const& cerr (ctx.cerr_inst);
-
- InstanceSet set;
- TypeInstanceMap map;
- SemanticGraph::Type& root_type (root->type ());
-
- set.insert ("doc_p");
-
- os << "#include <iostream>" << endl
- << endl
- << "int" << endl
- << "main (int argc, char* argv[])"
- << "{"
- << "if (argc != 2)"
- << "{"
- << cerr << " << " << L << "\"usage: \" << argv[0] << " <<
- L << "\" file.xml\" << std::endl;"
- << "return 1;"
- << "}"
- << "try"
- << "{"
- << "// Instantiate individual parsers." << endl
- << "//" << endl;
-
- {
- ParserDef def (ctx, map, set);
- def.dispatch (root_type);
- }
-
- os << endl
- << "// Connect the parsers together." << endl
- << "//" << endl;
-
- {
- ParserConnect connect (ctx, map);
- connect.dispatch (root_type);
- }
-
- String const& root_p (map[&root_type]);
-
- os << "// Parse the XML document." << endl
- << "//" << endl;
-
- if (root->namespace_().name ())
- os << ctx.xs_ns_name () << "::document doc_p (" << endl
- << root_p << "," << endl
- << ctx.strlit (root->namespace_().name ()) << "," << endl
- << ctx.strlit (root->name ()) << ");"
- << endl;
- else
- os << ctx.xs_ns_name () << "::document doc_p (" << root_p << ", " <<
- ctx.strlit (root->name ()) << ");"
- << endl;
-
- os << root_p << ".pre ();"
- << "doc_p.parse (argv[1]);";
-
- String const& ret (Context::ret_type (root_type));
- String const& post (Context::post_name (root_type));
-
- if (ret == L"void")
- os << root_p << "." << post << " ();";
- else
- {
- os << Context::arg_type (root_type) << " v (" <<
- root_p << "." << post << " ());"
- << endl;
-
- if (ctx.options.generate_print_impl ())
- {
- PrintCall t (ctx, root->name (), "v");
- t.dispatch (root_type);
- }
- else
- os << "// TODO" << endl
- << "//" << endl;
- }
-
- os << "}" // try
- << "catch (const " << ctx.xs_ns_name () << "::exception& e)"
- << "{"
- << cerr << " << e << std::endl;"
- << "return 1;"
- << "}"
- << "catch (const std::ios_base::failure&)"
- << "{"
- << cerr << " << argv[1] << " <<
- L << "\": error: io failure\" << std::endl;"
- << "return 1;"
- << "}"
- << "}";
- }
- }
-}
diff --git a/xsd/cxx/parser/driver-source.hxx b/xsd/cxx/parser/driver-source.hxx
deleted file mode 100644
index d1c7f91..0000000
--- a/xsd/cxx/parser/driver-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/driver-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_DRIVER_SOURCE_HXX
-#define CXX_PARSER_DRIVER_SOURCE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_driver_source (Context&);
- }
-}
-
-#endif // CXX_PARSER_DRIVER_SOURCE_HXX
diff --git a/xsd/cxx/parser/element-validation-source.cxx b/xsd/cxx/parser/element-validation-source.cxx
deleted file mode 100644
index b34b3dd..0000000
--- a/xsd/cxx/parser/element-validation-source.cxx
+++ /dev/null
@@ -1,1600 +0,0 @@
-// file : xsd/cxx/parser/element-validation-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <vector>
-
-#include <cxx/parser/element-validation-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- typedef vector<SemanticGraph::Particle*> Particles;
-
- //
- //
- struct ParticleTest: Traversal::Compositor,
- Traversal::Element,
- Traversal::Any,
- Context
- {
- ParticleTest (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- String const& name (e.name ());
-
- if (polymorphic && e.global_p ())
- os << "(";
-
- if (e.qualified_p () && e.namespace_ ().name ())
- {
- String const& ns (e.namespace_ ().name ());
-
- os << "n == " << strlit (name) << " &&" << endl
- << "ns == " << strlit (ns);
- }
- else
- os << "n == " << strlit (name) << " && ns.empty ()";
-
-
- // Only a globally-defined element can be a subst-group root.
- //
- if (polymorphic && e.global_p ())
- {
- os << ") ||" << endl
- << "::xsd::cxx::parser::substitution_map_instance< " <<
- char_type << " > ().check (" << endl
- << "ns, n, " << strlit (e.namespace_ ().name ()) <<
- ", " << strlit (name) << ", t)";
- }
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& ns (a.definition_namespace ().name ());
-
- // Note that we need to make sure the "flush" element (both name
- // and namespace are empty) does not match any compositor.
- //
- for (SemanticGraph::Any::NamespaceIterator i (a.namespace_begin ()),
- e (a.namespace_end ()); i != e;)
- {
- if (*i == L"##any")
- {
- os << "!n.empty ()";
- }
- else if (*i == L"##other")
- {
- if (ns)
- {
- // Note that here I assume that ##other does not include
- // unqualified names in a schema with target namespace.
- // This is not what the spec says but that seems to be
- // the consensus.
- //
- os << "(!ns.empty () && ns != " << strlit (ns) << ")";
- }
- else
- os << "!ns.empty ()";
- }
- else if (*i == L"##local")
- {
- os << "(ns.empty () && !n.empty ())";
- }
- else if (*i == L"##targetNamespace")
- {
- os << "ns == " << strlit (ns);
- }
- else
- {
- os << "ns == " << strlit (*i);
- }
-
- if (++i != e)
- os << " ||" << endl;
- }
- }
-
- virtual void
- traverse (SemanticGraph::Compositor& c)
- {
- // This compositor should already have been tested for
- // triviality (empty).
- //
- Particles const& p (c.context ().get<Particles> ("prefixes"));
-
- bool paren (p.size () != 1);
-
- for (Particles::const_iterator i (p.begin ()), e (p.end ());
- i != e;)
- {
- if (paren)
- os << "(";
-
- dispatch (**i);
-
- if (paren)
- os << ")";
-
- if (++i != e)
- os << " ||" << endl;
- }
- }
- };
-
-
- // Generates particle namespace-name pair. Used to generate
- // the _expected_element call.
- //
- struct ParticleName: Traversal::Compositor,
- Traversal::Element,
- Traversal::Any,
- Context
- {
- ParticleName (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- String ns (e.qualified_p () ? e.namespace_ ().name () : String ());
- os << strlit (ns) << ", " << strlit (e.name ());
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& ns (*a.namespace_begin ());
- os << strlit (ns) << ", " << L << "\"*\"";
- }
-
- virtual void
- traverse (SemanticGraph::Compositor& c)
- {
- Particles const& p (c.context ().get<Particles> ("prefixes"));
-
- dispatch (**p.begin ());
- }
- };
-
-
- // Common base for the ParticleIn{All, Choice, Sequence} treversers.
- //
- struct ParticleInCompositor: Context
- {
- protected:
- ParticleInCompositor (Context& c, SemanticGraph::Complex& type)
- : Context (c), type_ (type), particle_test_ (c)
- {
- }
-
-
- // Generate sub-parser setup code as well as the pre/post calls.
- //
- void
- pre_post_calls (SemanticGraph::Particle& p)
- {
- using SemanticGraph::Element;
- using SemanticGraph::Complex;
-
- if (Element* e = dynamic_cast<Element*> (&p))
- {
- SemanticGraph::Type& type (e->type ());
- String const& fq_type (fq_name (type));
- bool poly (polymorphic && !anonymous (type));
-
- String name, inst, def_parser, map;
-
- if (e->context ().count("name"))
- {
- name = ename (*e);
-
- if (poly)
- {
- def_parser = emember (*e);
- map = emember_map (*e);
- inst = "p";
- }
- else
- inst = L"this->" + emember (*e);
- }
- else
- {
- // This is the subsequent mentioning of this element in the
- // content. We need to find the first one in order to get
- // to the escaped names.
- //
- Complex::NamesIteratorPair ip (type_.find (e->name ()));
- assert (ip.first != ip.second);
- Element& fe (dynamic_cast<Element&>(ip.first->named ()));
-
- name = ename (fe);
-
- if (poly)
- {
- def_parser = emember (fe);
- map = emember_map (fe);
- inst = "p";
- }
- else
- inst = L"this->" + emember (fe);
- }
-
- if (poly)
- {
- // For pre-computing length.
- //
- String type_id (type.name ());
-
- if (String type_ns = xml_ns_name (type))
- {
- type_id += L' ';
- type_id += type_ns;
- }
-
- os << fq_type << "* p = 0;"
- << endl
- << "if (t == 0 && this->" << def_parser << " != 0)" << endl
- << inst << " = this->" << def_parser << ";"
- << "else"
- << "{"
- << string_type << " ts (" << fq_name (type) <<
- "::_static_type (), " << type_id.size () << "UL);"
- << endl
- << "if (t == 0)" << endl
- << "t = &ts;"
- << endl
- << "if (this->" << def_parser << " != 0 && *t == ts)" << endl
- << inst << " = this->" << def_parser << ";"
- << "else"
- << "{";
-
- // Check that the types are related by inheritance.
- //
- os << "if (t != &ts &&" << endl
- << "!::xsd::cxx::parser::validating::" <<
- "inheritance_map_instance< " << char_type <<
- " > ().check (" << endl
- << "t->data (), ts))" << endl
- << "throw ::xsd::cxx::parser::dynamic_type< " << char_type <<
- " > (*t);"
- << endl
- << "if (this->" << map << " != 0)" << endl
- << inst << " = dynamic_cast< " << fq_type << "* > (" << endl
- << "this->" << map << "->find (*t));"
- << "}"
- << "}";
- }
-
- os << "this->" << complex_base << "::context_.top ()." <<
- "parser_ = " << inst << ";"
- << endl
- << "if (" << inst << ")" << endl
- << inst << "->pre ();"
- << "}"
- << "else" // start
- << "{";
-
- if (poly)
- os << fq_type << "* p =" << endl
- << "dynamic_cast< " << fq_type << "* > (" << endl
- << "this->" << complex_base << "::context_.top ().parser_);"
- << endl;
-
- os << "if (" << inst << ")"
- << "{";
-
- String const& ret (ret_type (type));
- String const& post (post_name (type));
-
- if (ret == L"void")
- os << inst << "->" << post << " ();"
- << "this->" << name << " ();";
- else
- {
- // Don't create an lvalue in C++11 (think std::unique_ptr).
- // In C++98 we do it for compatibility with older/broken
- // compilers (e.g., IBM xlC that needs an lvalue to pass
- // std::auto_ptr).
- //
- if (std == cxx_version::cxx98)
- os << arg_type (type) << " tmp (" << inst << "->" <<
- post << " ());"
- << "this->" << name << " (tmp);";
- else
- os << "this->" << name << " (" << inst << "->" <<
- post << " ());";
- }
-
- os << "}";
- }
- else
- {
- os << "this->_start_any_element (ns, n, t);"
- << "this->" << complex_base << "::context_.top ().any_ = true;"
- << "}"
- << "else" // start
- << "{"
- << "this->" << complex_base << "::context_.top ().any_ = false;"
- << "this->_end_any_element (ns, n);";
- }
- }
-
- protected:
- SemanticGraph::Complex& type_;
- ParticleTest particle_test_;
- };
-
-
-
- // The 'all' compositor can only contain elements with min={0,1}, max=1.
- //
- struct ParticleInAll: Traversal::Element,
- ParticleInCompositor
- {
- ParticleInAll (Context& c, SemanticGraph::Complex& type)
- : ParticleInCompositor (c, type)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- size_t state (e.context ().get<size_t> ("state"));
-
- if (state != 0)
- os << "else ";
-
- os << "if (";
-
- particle_test_.traverse (e);
-
- os << ")"
- << "{"
- << "if (count[" << state << "UL] == 0)"
- << "{"
- << "if (start)"
- << "{";
-
- pre_post_calls (e);
-
- os << "count[" << state << "UL] = 1;"
- << "}"
- << "}"
- << "else" // count != 0
- << "{"
- << "assert (start);" // Assuming well-formed XML.
-
- // Since there is never more content after 'all', we could have
- // as well thrown here. But instead we will let the code in
- // start_element handle this along with other unexpected
- // elements.
- //
- << "state = ~0UL;"
- << "}"
- << "}";
- }
- };
-
-
- //
- //
- struct ParticleInChoice: Traversal::Particle,
- Traversal::Compositor,
- ParticleInCompositor
- {
- ParticleInChoice (Context& c, SemanticGraph::Complex& type)
- : ParticleInCompositor (c, type), particle_name_ (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Particle& p)
- {
- using SemanticGraph::Element;
-
- size_t state (p.context ().get<size_t> ("state"));
-
- size_t min (p.min ()), max (p.max ());
-
- os << "case " << state << "UL:" << endl
- << "{";
-
- if (max != 1) // We don't need the test if max == 1.
- {
- os << "if (";
-
- particle_test_.dispatch (p);
-
- os << ")"
- << "{";
- }
-
- os << "if (start)"
- << "{";
-
- pre_post_calls (p);
-
- switch (max)
- {
- case 0:
- {
- os << "count++;";
- break;
- }
- case 1:
- {
- // We do not need to increment count because min <= max and
- // we do not generate min check for min <= 1 (see below).
- //
- os << "state = ~0UL;";
- break;
- }
- default:
- {
- os << "if (++count == " << max << "UL)" << endl
- << "state = ~0UL;";
- }
- };
-
- os << "}"; // start
-
- // We've already moved to the final state if max == 1.
- //
- if (max != 1)
- {
- os << "}"
- << "else"
- << "{"
- << "assert (start);"; // Assuming well-formed XML
-
- // Check if min cardinality requirements have been met. Since
- // count is always >= 1, don't generate dead code if min <= 1.
- //
- if (min > 1)
- {
- os << "if (count < " << min << "UL)" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (p);
-
- os << "," << endl
- << "ns, n);";
- }
-
-
- os << "state = ~0UL;"
- << "}";
- }
-
- os << "break;"
- << "}"; // case
- }
-
- virtual void
- traverse (SemanticGraph::Compositor& c)
- {
- using SemanticGraph::Compositor;
-
- size_t max (c.max ());
- size_t min (c.context ().get<size_t> ("effective-min"));
- size_t n (c.context ().get<size_t> ("comp-number"));
- size_t state (c.context ().get<size_t> ("state"));
-
- String func (c.is_a<SemanticGraph::Choice> () ?
- "choice_" : "sequence_");
-
- os << "case " << state << "UL:" << endl
- << "{"
- << "unsigned long s (~0UL);"
- << endl;
-
- bool first (true);
-
- for (Compositor::ContainsIterator ci (c.contains_begin ());
- ci != c.contains_end (); ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<Compositor> () && !c.context ().count ("comp-number"))
- continue; // Empty compositor.
-
- if (!p.context ().count ("prefix"))
- break;
-
- size_t state (p.context ().get<size_t> ("state"));
-
- if (first)
- first = false;
- else
- os << "else ";
-
- os << "if (";
-
- particle_test_.dispatch (p);
-
- os << ")" << endl
- << "s = " << state << "UL;";
- }
-
- // This compositor.
- //
- os << endl
- << "if (s != ~0UL)"
- << "{"
- << "assert (start);"; // End is handled by the sub-machine.
-
- switch (max)
- {
- case 0:
- {
- os << "count++;";
- break;
- }
- case 1:
- {
- // We do not need to increment count because min <= max and
- // we do not generate min check for min <= 1 (see below).
- //
- os << "state = ~0UL;";
- break;
- }
- default:
- {
- os << "if (++count == " << max << "UL)" << endl
- << "state = ~0UL;";
- }
- };
-
- // Delegate to the sub-machine.
- //
-
- os << endl
- << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_& vd = vs.data[vs.size++];" // push
- << endl
- << "vd.func = &" << ename (type_) << "::" << func << n << ";"
- << "vd.state = s;"
- << "vd.count = 0;"
- << endl
- << "this->" << func << n << " (vd.state, vd.count, ns, n, t, true);"
- << "}";
-
-
- // Not this compositor. We've elready moved to the final state
- // if max == 1.
- //
- if (max != 1)
- {
- os << "else"
- << "{"
- << "assert (start);"; // Assuming well-formed XML
-
- // Check if min cardinality requirements have been met. Since
- // count is always >= 1, don't generate dead code if min <= 1.
- //
- if (min > 1)
- {
- os << "if (count < " << min << "UL)" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (c);
-
- os << "," << endl
- << "ns, n);";
- }
-
- os << "state = ~0UL;"
- << "}";
- }
-
- os << "break;"
- << "}"; // case
- }
-
- private:
- ParticleName particle_name_;
- };
-
-
- //
- //
- struct ParticleInSequence: Traversal::Particle,
- Traversal::Compositor,
- ParticleInCompositor
- {
- ParticleInSequence (Context& c,
- size_t state,
- size_t next_state,
- SemanticGraph::Complex& type)
- : ParticleInCompositor (c, type),
- state_ (state), particle_name_ (c)
- {
- // next_state == 0 indicates the terminal state (~0UL).
- //
- if (next_state != 0)
- {
- std::wostringstream ostr;
- ostr << next_state;
- next_state_ = ostr.str ();
- }
- else
- next_state_ = L"~0";
- }
-
- virtual void
- traverse (SemanticGraph::Particle& p)
- {
- size_t min (p.min ()), max (p.max ());
-
- os << "case " << state_ << "UL:" << endl
- << "{"
- << "if (";
-
- particle_test_.dispatch (p);
-
- os << ")"
- << "{";
-
- // This element.
- //
-
- os << "if (start)"
- << "{";
-
- pre_post_calls (p);
-
- switch (max)
- {
- case 0:
- {
- os << "count++;";
- break;
- }
- case 1:
- {
- os << "count = 0;"
- << "state = " << next_state_ << "UL;";
- break;
- }
- default:
- {
- os << "if (++count == " << max << "UL)"
- << "{"
- << "count = 0;"
- << "state = " << next_state_ << "UL;"
- << "}";
- }
- };
-
- os << "}" // start
- << "break;"
- << "}";
-
- // Not this element.
- //
-
- os << "else"
- << "{"
- << "assert (start);"; // Assuming well-formed XML.
-
- // Check if min cardinality requirements have been met. Since
- // count is always >= 0, don't generate dead code if min == 0.
- //
- if (min != 0)
- {
- os << "if (count < " << min << "UL)" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (p);
-
- os << "," << endl
- << "ns, n);";
- }
-
- os << "count = 0;"
- << "state = " << next_state_ << "UL;"
- << "// Fall through." << endl
- << "}" // else
- << "}"; // case
- }
-
- virtual void
- traverse (SemanticGraph::Compositor& c)
- {
- using SemanticGraph::Compositor;
-
- size_t max (c.max ());
- size_t min (c.context ().get<size_t> ("effective-min"));
- size_t n (c.context ().get<size_t> ("comp-number"));
-
- String func (c.is_a<SemanticGraph::Choice> () ?
- "choice_" : "sequence_");
-
- os << "case " << state_ << "UL:" << endl
- << "{"
- << "unsigned long s (~0UL);"
- << endl;
-
- bool first (true);
-
- for (Compositor::ContainsIterator ci (c.contains_begin ());
- ci != c.contains_end (); ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<Compositor> () && !c.context ().count ("comp-number"))
- continue; // Empty compositor.
-
- if (!p.context ().count ("prefix"))
- break;
-
- size_t state (p.context ().get<size_t> ("state"));
-
- if (first)
- first = false;
- else
- os << "else ";
-
- os << "if (";
-
- particle_test_.dispatch (p);
-
- os << ")" << endl
- << "s = " << state << "UL;";
- }
-
- // This element.
- //
-
- os << endl
- << "if (s != ~0UL)"
- << "{"
- << "assert (start);"; // End is handled by the sub-machine.
-
- switch (max)
- {
- case 0:
- {
- os << "count++;"
- << endl;
- break;
- }
- case 1:
- {
- os << "count = 0;"
- << "state = " << next_state_ << "UL;"
- << endl;
- break;
- }
- default:
- {
- os << "if (++count == " << max << "UL)"
- << "{"
- << "count = 0;"
- << "state = " << next_state_ << "UL;"
- << "}";
- }
- };
-
- // Delegate to the sub-machine.
- //
-
- os << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_& vd = vs.data[vs.size++];" // push
- << endl
- << "vd.func = &" << ename (type_) << "::" << func << n << ";"
- << "vd.state = s;"
- << "vd.count = 0;"
- << endl
- << "this->" << func << n << " (vd.state, vd.count, ns, n, t, true);"
- << "break;"
- << "}";
-
- // Not this compositor.
- //
-
- os << "else"
- << "{"
- << "assert (start);"; // Assuming well-formed XML
-
- // Check if min cardinality requirements have been met. Since
- // count is always >= 0, don't generate dead code if min == 0.
- //
- if (min != 0)
- {
- os << "if (count < " << min << "UL)" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (c);
-
- os << "," << endl
- << "ns, n);";
- }
-
- os << "count = 0;"
- << "state = " << next_state_ << "UL;"
- << "// Fall through." << endl
- << "}" // else
- << "}"; // case
- }
-
- private:
- size_t state_;
- String next_state_;
-
- ParticleName particle_name_;
- };
-
-
- //
- //
- struct ParticleFunction: Traversal::All,
- Traversal::Choice,
- Traversal::Sequence,
- Context
- {
- ParticleFunction (Context& c, SemanticGraph::Complex& type)
- : Context (c), type_ (type)
- {
- *this >> contains_particle_ >> *this;
- }
-
-
- virtual void
- traverse (SemanticGraph::All& a)
- {
- if (!a.context().count ("comp-number")) // Empty compositor.
- return;
-
- using SemanticGraph::Element;
- using SemanticGraph::Compositor;
-
-
- os << "void " << ename (type_) << "::" << endl
- << "all_0 (unsigned long& state," << endl
- << "unsigned char* count," << endl
- << "const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t," << endl
- << "bool start)"
- << "{"
- << "XSD_UNUSED (t);"
- << endl;
-
- for (Compositor::ContainsIterator ci (a.contains_begin ()),
- ce (a.contains_end ()); ci != ce; ++ci)
- {
- ParticleInAll t (*this, type_);
- t.dispatch (ci->particle ());
- }
-
- // Handle the flush.
- //
- os << "else if (n.empty () && ns.empty ())"
- << "{";
-
- for (Compositor::ContainsIterator ci (a.contains_begin ()),
- ce (a.contains_end ()); ci != ce; ++ci)
- {
- if (ci->min () == 0)
- continue;
-
- Element& e (dynamic_cast<Element&> (ci->particle ()));
- String ns (e.qualified_p () ? e.namespace_ ().name () : String ());
- size_t state (e.context ().get<size_t> ("state"));
-
- os << "if (count[" << state << "UL] == 0)" << endl
- << "this->_expected_element (" << endl
- << strlit (ns) << ", " <<
- strlit (e.name ()) << ");"
- << endl;
- }
-
- os << "state = ~0UL;"
- << "}"
- << "else" << endl
- << "state = ~0UL;"
- << "}";
- }
-
- virtual void
- traverse (SemanticGraph::Choice& c)
- {
- if (!c.context().count ("comp-number")) // Empty compositor.
- return;
-
- using SemanticGraph::Compositor;
-
- size_t n (c.context ().get<size_t> ("comp-number"));
-
- os << "void " << ename (type_) << "::" << endl
- << "choice_" << n << " (unsigned long& state," << endl
- << "unsigned long& count," << endl
- << "const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t," << endl
- << "bool start)"
- << "{"
- << "XSD_UNUSED (count);"
- << "XSD_UNUSED (ns);"
- << "XSD_UNUSED (n);"
- << "XSD_UNUSED (t);"
- << endl
- << "switch (state)"
- << "{";
-
- for (Compositor::ContainsIterator ci (c.contains_begin ()),
- ce (c.contains_end ()); ci != ce; ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<Compositor> () && !p.context().count ("comp-number"))
- continue; // Empty compositor.
-
- ParticleInChoice t (*this, type_);
- t.dispatch (p);
- }
-
- os << "}" // switch
- << "}";
-
- // Generate nested compositor functions.
- //
- Traversal::Choice::traverse (c);
- }
-
- virtual void
- traverse (SemanticGraph::Sequence& s)
- {
- if (!s.context().count ("comp-number")) // Empty compositor.
- return;
-
- using SemanticGraph::Compositor;
-
- size_t n (s.context ().get<size_t> ("comp-number"));
-
- os << "void " << ename (type_) << "::" << endl
- << "sequence_" << n << " (unsigned long& state," << endl
- << "unsigned long& count," << endl
- << "const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t," << endl
- << "bool start)"
- << "{"
- << "XSD_UNUSED (t);"
- << endl
- << "switch (state)"
- << "{";
-
- size_t state (0);
-
- for (Compositor::ContainsIterator ci (s.contains_begin ()),
- ce (s.contains_end ()); ci != ce;)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<Compositor> () && !p.context().count ("comp-number"))
- {
- // Empty compositor.
- //
- ++ci;
- continue;
- }
-
- // Find the next state.
- //
- do
- ++ci;
- while (ci != ce &&
- ci->particle ().is_a<Compositor> () &&
- !ci->particle ().context().count ("comp-number"));
-
- size_t next (ci == ce ? 0 : state + 1);
-
- ParticleInSequence t (*this, state++, next, type_);
- t.dispatch (p);
- }
-
- os << "case ~0UL:" << endl
- << "break;"
- << "}" // switch
- << "}";
-
- // Generate nested compositor functions.
- //
- Traversal::Sequence::traverse (s);
- }
-
- private:
- SemanticGraph::Complex& type_;
- Traversal::ContainsParticle contains_particle_;
- };
-
-
- //
- //
- struct CompositorPre: Traversal::All,
- Traversal::Compositor,
- Context
- {
- CompositorPre (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::All& a)
- {
- // Clear the counts and push the initial state.
- //
- os << "v_all_count_.push ();"
- << endl;
-
- SemanticGraph::Compositor& c (a);
- traverse (c);
- }
-
- virtual void
- traverse (SemanticGraph::Compositor&) // Choice and sequence.
- {
- os << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_& vd = vs.data[vs.size++];" // push
- << endl
- << "vd.func = 0;"
- << "vd.state = 0;"
- << "vd.count = 0;";
- }
- };
-
-
- //
- //
- struct CompositorStartElement: Traversal::All,
- Traversal::Compositor,
- Context
- {
- CompositorStartElement (Context& c, SemanticGraph::Complex& type)
- : Context (c), type_ (type),
- particle_test_ (c), particle_name_ (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::All&)
- {
- // The 'all' state machine reaches the final state only
- // on an unknown element, in which case we won't get here
- // again (it would be a validation error). Note that 'all'
- // compositor cannot contain nested compositors so we don't
- // need to re-set vd.
- //
- os << "all_0 (vd->state, v_all_count_.top (), ns, n, t, true);"
- << endl
- << "if (vd->state != ~0UL)" << endl
- << "vd->count++;"
- << "else" << endl
- << "return false;" // Let our parent handle this.
- << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Compositor& c) // Choice and sequence.
- {
- using SemanticGraph::Compositor;
-
- size_t max (c.max ());
- size_t min (c.context ().get<size_t> ("effective-min"));
- size_t n (c.context ().get<size_t> ("comp-number"));
-
- String func (c.is_a<SemanticGraph::Choice> () ?
- "choice_" : "sequence_");
-
- // Invoke the current state machine. If it reaches its
- // terminal state, pop it and invoke the next one until
- // we reach the top, which requires special handling.
- //
- os << "while (vd->func != 0)"
- << "{"
- << "(this->*vd->func) (vd->state, vd->count, ns, n, t, true);"
- << endl
- << "vd = vs.data + (vs.size - 1);" // re-acquire
- << endl
- << "if (vd->state == ~0UL)" << endl
- << "vd = vs.data + (--vs.size - 1);" // pop
- << "else" << endl
- << "break;"
- << "}";
-
-
- // Check if we got to the top. This code is pretty much the
- // same as the one found in ParticleInSequence.
- //
- os << "if (vd->func == 0)"
- << "{"
- << "if (vd->state != ~0UL)"
- << "{"
- << "unsigned long s = ~0UL;"
- << endl;
-
- bool first (true);
-
- // Note that we don't need to worry about the compositor
- // being empty - this case is handled by our caller.
- //
- for (Compositor::ContainsIterator ci (c.contains_begin ());
- ci != c.contains_end (); ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<Compositor> () && !c.context ().count ("comp-number"))
- continue; // Empty compositor.
-
- if (!p.context ().count ("prefix"))
- break;
-
- size_t state (p.context ().get<size_t> ("state"));
-
- if (first)
- first = false;
- else
- os << "else ";
-
- os << "if (";
-
- particle_test_.dispatch (p);
-
- os << ")" << endl
- << "s = " << state << "UL;";
- }
-
- os << endl
- << "if (s != ~0UL)"
- << "{";
-
- // This element is a prefix of the root compositor.
- //
-
- switch (max)
- {
- case 0:
- {
- os << "vd->count++;";
- break;
- }
- case 1:
- {
- os << "vd->count++;"
- << "vd->state = ~0UL;";
- break;
- }
- default:
- {
- os << "if (++vd->count == " << max << "UL)" << endl
- << "vd->state = ~0UL;";
- }
- };
-
- // Delegate to the sub-machine.
- //
-
- os << endl
- << "vd = vs.data + vs.size++;" // push
- << "vd->func = &" << ename (type_) << "::" << func << n << ";"
- << "vd->state = s;"
- << "vd->count = 0;"
- << endl
- << "this->" << func << n << " (vd->state, vd->count, ns, n, t, true);"
- << "}";
-
- // This element is not our prefix.
- //
-
- os << "else"
- << "{";
-
- // Check if min cardinality requirements have been met. Since
- // count is always >= 0, don't generate dead code if min == 0.
- //
- if (min != 0)
- {
- os << "if (vd->count < " << min << "UL)" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (c);
-
- os << "," << endl
- << "ns, n);";
- }
-
- // Return false to indicate that we are not handling this element.
- //
- os << "return false;"
- << "}"
- << "}" // if (state != ~0)
- << "else" << endl
- << "return false;"
- << "}"; // if (function == 0)
- }
-
- private:
- SemanticGraph::Complex& type_;
- ParticleTest particle_test_;
- ParticleName particle_name_;
- };
-
-
- //
- //
- struct CompositorEndElement: Traversal::All,
- Traversal::Compositor,
- Context
- {
- CompositorEndElement (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::All&)
- {
- os << "all_0 (vd.state, v_all_count_.top (), " <<
- "ns, n, 0, false);"
- << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Compositor&) // Choice and sequence.
- {
- os << "assert (vd.func != 0);"
- << "(this->*vd.func) (vd.state, vd.count, ns, n, 0, false);"
- << endl
- << "if (vd.state == ~0UL)" << endl
- << "vs.size--;" // pop
- << endl;
- }
- };
-
-
- //
- //
- struct CompositorPost: Traversal::All,
- Traversal::Compositor,
- Context
- {
- CompositorPost (Context& c)
- : Context (c), particle_name_ (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::All& a)
- {
- using SemanticGraph::Element;
-
- os << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_& vd = vs.data[vs.size - 1];"
- << endl;
-
- // Flush the state machine with the empty element name. This
- // allows us to detect missing content.
- //
- os << "if (vd.count != 0)"
- << "{"
- << string_type << " empty;"
- << "all_0 (vd.state, v_all_count_.top (), empty, empty, 0, true);"
- << "}";
-
- if (a.context ().get<size_t> ("effective-min") != 0)
- {
- os << "else" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (a);
-
- os << ");";
- }
-
- os << endl
- << "vs.size--;" // pop
- << "v_all_count_.pop ();";
- }
-
- virtual void
- traverse (SemanticGraph::Compositor& c) // Choice and sequence.
- {
- size_t min (c.context ().get<size_t> ("effective-min"));
-
- os << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_* vd = vs.data + (vs.size - 1);"
- << endl;
-
-
- // Flush unfinished state machines with the empty element name.
- // This allows us to detect missing content. Note that I am
- // not re-setting vd since no new compositors are pushed on
- // flush.
- //
- os << string_type << " empty;"
- << "while (vd->func != 0)"
- << "{"
- << "(this->*vd->func) (vd->state, vd->count, empty, empty, 0, true);"
- << "assert (vd->state == ~0UL);"
- << "vd = vs.data + (--vs.size - 1);" // pop
- << "}";
-
- // Check if min cardinality requirements have been met. Since
- // count is always >= 0, don't generate dead code if min == 0.
- //
- if (min != 0)
- {
- os << "if (vd->count < " << min << "UL)" << endl
- << "this->_expected_element (" << endl;
-
- particle_name_.dispatch (c);
-
- os << ");";
- }
- }
-
- private:
- ParticleName particle_name_;
- };
-
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- // Nothing to generate if we don't have any elements and wildcards.
- //
- if (!has<Traversal::Element> (c) &&
- !has_particle<Traversal::Any> (c))
- return;
-
- using SemanticGraph::Compositor;
-
- String const& name (ename (c));
- Compositor& comp (c.contains_compositor ().compositor ());
-
- // Don't use restriction_p here since we don't want special
- // treatment of anyType.
- //
- bool restriction (
- c.inherits_p () &&
- c.inherits ().is_a<SemanticGraph::Restricts> ());
-
- os <<"// Element validation and dispatch functions for " <<
- name << "." << endl
- <<"//" << endl;
-
- // _start_element_impl
- //
-
- os << "bool " << name << "::" << endl
- << "_start_element_impl (const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t)"
- << "{"
- << "XSD_UNUSED (t);"
- << endl;
-
- os << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_* vd = vs.data + (vs.size - 1);"
- << endl;
-
- //@@ OPT: I don't really need to call parser_base since it always
- // returns false.
- //
- // In case of an inheritance-by-extension, call our base first.
- // We don't need to generate this code for the 'all' compositor
- // because it can only inherit from the empty content model.
- // States of the root machine for sequence and choice:
- //
- // 0 - calling base
- // 1 - base returned false
- // ~0 - terminal state
- //
- if (!restriction && !comp.is_a<SemanticGraph::All> ())
- {
- os << "if (vd->func == 0 && vd->state == 0)"
- << "{"
- << "if (this->";
-
- if (c.inherits_p ())
- os << fq_name (c.inherits ().base ());
- else
- os << complex_base;
-
-
- os << "::_start_element_impl (ns, n, t))" << endl
- << "return true;"
- << "else" << endl
- << "vd->state = 1;"
- << "}";
- }
-
- {
- CompositorStartElement t (*this, c);
- t.dispatch (comp);
- }
-
- os << "return true;"
- << "}";
-
-
- // _end_element_impl
- //
-
- os << "bool " << name << "::" << endl
- << "_end_element_impl (const " << string_type << "& ns," << endl
- << "const " << string_type << "& n)"
- << "{";
-
- os << "v_state_& vs = *static_cast< v_state_* > (" <<
- "this->v_state_stack_.top ());"
- << "v_state_descr_& vd = vs.data[vs.size - 1];"
- << endl;
-
- //@@ OPT: I don't really need to call parser_base since it always
- // returns false.
- //
- // In case of an inheritance-by-extension, call our base first.
- // We don't need to generate this code for the 'all' compositor
- // because it can only inherit from the empty content model.
- //
- if (!restriction && !comp.is_a<SemanticGraph::All> ())
- {
- os << "if (vd.func == 0 && vd.state == 0)"
- << "{"
- << "if (!";
-
- if (c.inherits_p ())
- os << fq_name (c.inherits ().base ());
- else
- os << complex_base;
-
- os << "::_end_element_impl (ns, n))" << endl
- << "assert (false);" // Start and end should match.
- << "return true;"
- << "}";
- }
-
- {
- CompositorEndElement t (*this);
- t.dispatch (comp);
- }
-
- os << "return true;"
- << "}";
-
-
- // _pre_e_validate
- //
- os << "void " << name << "::" << endl
- << "_pre_e_validate ()"
- << "{"
- << "this->v_state_stack_.push ();"
- << "static_cast< v_state_* > (this->v_state_stack_.top ())->" <<
- "size = 0;"
- << endl;
-
- {
- CompositorPre t (*this);
- t.dispatch (comp);
- }
-
- // In case of an inheritance-by-extension, call our base
- // _pre_e_validate. We don't need to generate this code for the
- // 'all' compositor because it can only inherit from the empty
- // content model.
- //
- if (!restriction && !comp.is_a<SemanticGraph::All> ())
- {
- // We don't need to call parser_base's implementation
- // since it does nothing.
- //
- if (c.inherits_p ())
- {
- os << endl
- << fq_name (c.inherits ().base ()) << "::_pre_e_validate ();";
- }
- }
-
- os << "}";
-
-
- // _post_e_validate
- //
- os << "void " << name << "::" << endl
- << "_post_e_validate ()"
- << "{";
-
- // In case of an inheritance-by-extension, call our base
- // _post_e_validate. We don't need to generate this code for
- // the 'all' compositor because it can only inherit from
- // the empty content model.
- //
- if (!restriction && !comp.is_a<SemanticGraph::All> ())
- {
- // We don't need to call parser_base's implementation
- // since it does nothing.
- //
- if (c.inherits_p ())
- {
- os << fq_name (c.inherits ().base ()) << "::_post_e_validate ();"
- << endl;
- }
- }
-
- {
- CompositorPost t (*this);
- t.dispatch (c.contains_compositor ().compositor ());
- }
-
- os << endl
- << "this->v_state_stack_.pop ();"
- << "}";
-
- //
- //
- ParticleFunction t (*this, c);
- t.dispatch (c.contains_compositor ().compositor ());
- }
- };
- }
-
- void
- generate_element_validation_source (Context& ctx)
- {
- ctx.os << "#include <cassert>" << endl
- << endl;
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- Complex complex (ctx);
-
- names >> complex;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/element-validation-source.hxx b/xsd/cxx/parser/element-validation-source.hxx
deleted file mode 100644
index fcdbf88..0000000
--- a/xsd/cxx/parser/element-validation-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/element-validation-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_ELEMENT_VALIDATION_SOURCE_HXX
-#define CXX_PARSER_ELEMENT_VALIDATION_SOURCE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_element_validation_source (Context&);
- }
-}
-
-#endif // CXX_PARSER_ELEMENT_VALIDATION_SOURCE_HXX
diff --git a/xsd/cxx/parser/elements.cxx b/xsd/cxx/parser/elements.cxx
deleted file mode 100644
index 6ab2a4b..0000000
--- a/xsd/cxx/parser/elements.cxx
+++ /dev/null
@@ -1,247 +0,0 @@
-// file : xsd/cxx/parser/elements.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- Context::
- Context (std::wostream& o,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- options_type const& ops,
- StringLiteralMap const* map,
- Regex const* he,
- Regex const* ie,
- Regex const* hie)
- : CXX::Context (o, root, path, ops, map),
- options (ops),
- xml_parser (xml_parser_),
- simple_base (simple_base_),
- complex_base (complex_base_),
- list_base (list_base_),
- cout_inst (cout_inst_),
- cerr_inst (cerr_inst_),
- parser_map (parser_map_),
- std_string_type (std_string_type_),
- validation (validation_),
- polymorphic (polymorphic_),
- hxx_expr (he),
- ixx_expr (ie),
- hxx_impl_expr (hie),
- xml_parser_ (ops.xml_parser ()),
- validation_ ((ops.xml_parser () == "expat" ||
- ops.generate_validation ()) &&
- !ops.suppress_validation ()),
- polymorphic_ (ops.generate_polymorphic ())
- {
- if (char_type == L"char")
- std_string_type = L"::std::string";
- else if (char_type == L"wchar_t")
- std_string_type = L"::std::wstring";
- else
- std_string_type = L"::std::basic_string< " + char_type + L" >";
-
- String xs_ns (xs_ns_name ());
-
- string_type = xs_ns + L"::ro_string";
- simple_base = xs_ns + L"::simple_content";
- complex_base = xs_ns + L"::complex_content";
- list_base = xs_ns + L"::list_base";
-
- cout_inst = (char_type == L"char" ? L"std::cout" : L"std::wcout");
- cerr_inst = (char_type == L"char" ? L"std::cerr" : L"std::wcerr");
-
- if (polymorphic)
- parser_map_ = xs_ns + L"::parser_map";
- }
-
- Context::
- Context (Context& c)
- : CXX::Context (c),
- options (c.options),
- xml_parser (c.xml_parser),
- simple_base (c.simple_base),
- complex_base (c.complex_base),
- list_base (c.list_base),
- cout_inst (c.cout_inst),
- cerr_inst (c.cerr_inst),
- parser_map (c.parser_map),
- std_string_type (c.std_string_type),
- validation (c.validation),
- polymorphic (c.polymorphic),
- hxx_expr (c.hxx_expr),
- ixx_expr (c.ixx_expr),
- hxx_impl_expr (c.hxx_impl_expr)
- {
- }
-
- Context::
- Context (Context& c, std::wostream& o)
- : CXX::Context (c, o),
- options (c.options),
- xml_parser (c.xml_parser),
- simple_base (c.simple_base),
- complex_base (c.complex_base),
- list_base (c.list_base),
- cout_inst (c.cout_inst),
- cerr_inst (c.cerr_inst),
- parser_map (c.parser_map),
- std_string_type (c.std_string_type),
- validation (c.validation),
- polymorphic (c.polymorphic),
- hxx_expr (c.hxx_expr),
- ixx_expr (c.ixx_expr),
- hxx_impl_expr (c.hxx_impl_expr)
- {
- }
-
- Content::Value Context::
- content (SemanticGraph::Complex& c)
- {
- using namespace SemanticGraph;
-
- if (c.mixed_p ())
- return Content::mixed;
-
- if (c.inherits_p ())
- {
- Type& base (c.inherits ().base ());
-
- if (Complex* cb = dynamic_cast<Complex*> (&base))
- return content (*cb);
-
- if (base.is_a<AnyType> ())
- return Content::complex;
-
- // Everyhting else (built-in type and AnySimpleType) is simple
- // content.
- //
- return Content::simple;
- }
- else
- return Content::complex;
- }
-
- bool Context::
- anonymous (SemanticGraph::Type& t)
- {
- return t.context ().count ("anonymous");
- }
-
- String const& Context::
- ret_type (SemanticGraph::Type& t)
- {
- return t.context ().get<String> ("ret-type");
- }
-
- String const& Context::
- arg_type (SemanticGraph::Type& t)
- {
- return t.context ().get<String> ("arg-type");
- }
-
- String const& Context::
- post_name (SemanticGraph::Type& t)
- {
- return t.context ().get<String> ("post");
- }
-
- String const& Context::
- eparser (SemanticGraph::Member& m)
- {
- return m.context ().get<String> ("parser");
- }
-
- String const& Context::
- emember (SemanticGraph::Member& m)
- {
- return m.context ().get<String> ("member");
- }
-
- String const& Context::
- emember_map (SemanticGraph::Member& m)
- {
- return m.context ().get<String> ("member-map");
- }
-
- String const& Context::
- eimpl (SemanticGraph::Type& t)
- {
- return t.context ().get<String> ("impl");
- }
-
- // Includes
- //
- void TypeForward::
- traverse (SemanticGraph::Type& t)
- {
- os << "class " << t.context ().get<String> (name_key_) << ";";
- }
-
- void Includes::
- traverse_ (SemanticGraph::Uses& u)
- {
- // Support for weak (forward) inclusion used in the file-per-type
- // compilation model.
- //
- SemanticGraph::Schema& s (u.schema ());
- bool weak (u.context ().count ("weak"));
-
- if (weak && (type_ == header || type_ == impl_header))
- {
- // Generate forward declarations. We don't really need them
- // in the impl files.
- //
- if (type_ == header)
- schema_.dispatch (s);
-
- return;
- }
-
- if (type_ == source && !weak)
- return;
-
- SemanticGraph::Path path (
- s.context ().count ("renamed")
- ? s.context ().get<SemanticGraph::Path> ("renamed")
- : u.path ());
- path.normalize ();
-
- // Try to use the portable representation of the path. If that
- // fails, fall back to the native representation.
- //
- NarrowString path_str;
- try
- {
- path_str = path.posix_string ();
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- path_str = path.string ();
- }
-
- String inc_path;
-
- switch (type_)
- {
- case header:
- case source:
- {
- inc_path = ctx_.hxx_expr->replace (path_str);
- break;
- }
- case impl_header:
- {
- inc_path = ctx_.hxx_impl_expr->replace (path_str);
- break;
- }
- }
-
- ctx_.os << "#include " << ctx_.process_include_path (inc_path) << endl
- << endl;
- }
- }
-}
diff --git a/xsd/cxx/parser/elements.hxx b/xsd/cxx/parser/elements.hxx
deleted file mode 100644
index 80656c2..0000000
--- a/xsd/cxx/parser/elements.hxx
+++ /dev/null
@@ -1,315 +0,0 @@
-// file : xsd/cxx/parser/elements.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_ELEMENTS_HXX
-#define CXX_PARSER_ELEMENTS_HXX
-
-#include <sstream>
-
-#include <cutl/re.hxx>
-
-#include <types.hxx>
-
-#include <cxx/elements.hxx>
-
-#include <cxx/parser/options.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- struct Content
- {
- enum Value
- {
- simple,
- complex,
- mixed
- };
- };
-
- //
- //
- class Context: public CXX::Context
- {
- public:
- typedef cutl::re::regexsub Regex;
-
- typedef Parser::options options_type;
-
- public:
- Context (std::wostream&,
- SemanticGraph::Schema&,
- SemanticGraph::Path const& path,
- options_type const&,
- StringLiteralMap const*,
- Regex const* hxx_expr,
- Regex const* ixx_expr,
- Regex const* hxx_impl_expr);
-
- protected:
- Context (Context& c);
- Context (Context& c, std::wostream& o);
-
- public:
- bool
- restriction_p (SemanticGraph::Complex& c) const
- {
- if (c.inherits_p () &&
- c.inherits ().is_a<SemanticGraph::Restricts> ())
- {
- // Restriction of anyType is a special case.
- //
- return !c.inherits ().base ().is_a<SemanticGraph::AnyType> ();
- }
-
- return false;
- }
-
- public:
- static Content::Value
- content (SemanticGraph::Complex&);
-
- public:
- static bool
- anonymous (SemanticGraph::Type&);
-
- public:
- static String const&
- ret_type (SemanticGraph::Type&);
-
- static String const&
- arg_type (SemanticGraph::Type&);
-
- static String const&
- post_name (SemanticGraph::Type&);
-
- public:
- static String const&
- eparser (SemanticGraph::Member&);
-
- static String const&
- emember (SemanticGraph::Member&);
-
- static String const&
- emember_map (SemanticGraph::Member&);
-
- public:
- static String const&
- eimpl (SemanticGraph::Type&);
-
- public:
- options_type const& options;
- String& xml_parser;
- String& simple_base;
- String& complex_base;
- String& list_base;
- String& cout_inst;
- String& cerr_inst;
- String& parser_map;
- String& std_string_type;
- bool& validation;
- bool& polymorphic;
-
- Regex const* hxx_expr;
- Regex const* ixx_expr;
- Regex const* hxx_impl_expr;
-
- private:
- String xml_parser_;
- String simple_base_;
- String complex_base_;
- String list_base_;
- String cout_inst_;
- String cerr_inst_;
- String parser_map_;
- String std_string_type_;
- bool validation_;
- bool polymorphic_;
- };
-
- //
- //
- struct RequiredAttributeTest: Traversal::Attribute
- {
- RequiredAttributeTest (bool& result)
- : result_ (result)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- if (!result_ && !a.optional_p ())
- result_ = true;
- }
-
- private:
- bool& result_;
- };
-
- //
- //
- struct ParserParamDecl: Traversal::Complex,
- Traversal::List,
- Traversal::Member,
- Context
- {
- ParserParamDecl (Context& c, bool name_arg)
- : Context (c), first_ (true), name_arg_ (name_arg)
- {
- inherits_ >> *this;
- names_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c, inherits_);
-
- if (!restriction_p (c))
- names (c, names_);
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- if (!first_)
- os << "," << endl;
- else
- first_ = false;
-
- os << fq_name (l.argumented ().type ()) << "&";
-
- if (name_arg_)
- os << " " << ename (l) << "_item";
- else
- os << " /* " << comment (l.name ()) << " item */";
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- if (skip (m)) return;
-
- if (!first_)
- os << "," << endl;
- else
- first_ = false;
-
- os << fq_name (m.type ()) << "&";
-
- if (name_arg_)
- os << " " << ename (m);
- else
- os << " /* " << comment (m.name ()) << " */";
- }
-
- private:
- Traversal::Inherits inherits_;
- Traversal::Names names_;
-
- bool first_;
- bool name_arg_;
- };
-
-
- //
- //
- struct TypeForward: Traversal::Type, Context
- {
- TypeForward (Context& c, char const* name_key)
- : Context (c), name_key_ (name_key)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t);
-
- private:
- char const* name_key_;
- };
-
- struct Includes: Traversal::Imports,
- Traversal::Includes
- {
- enum Type
- {
- header,
- source,
- impl_header
- };
-
- Includes (Context& c, Type t)
- : ctx_ (c),
- type_ (t),
- namespace_ (c),
- type_forward_ (c, t == header ? "name" : "impl")
- {
- schema_ >> schema_names_ >> namespace_ >> names_ >> type_forward_;
- }
-
- virtual void
- traverse (SemanticGraph::Imports& i)
- {
- traverse_ (i);
- }
-
- virtual void
- traverse (SemanticGraph::Includes& i)
- {
- traverse_ (i);
- }
-
- private:
- void
- traverse_ (SemanticGraph::Uses&);
-
- private:
- Context& ctx_;
- Type type_;
-
- Traversal::Schema schema_;
- Traversal::Names schema_names_;
- Namespace namespace_;
- Traversal::Names names_;
- TypeForward type_forward_;
- };
-
- // Find root element for the test driver.
- //
- struct RootElement: Traversal::Element
- {
- typedef Parser::options options_type;
-
- RootElement (options_type const& options,
- SemanticGraph::Element*& element)
- : options_ (options), element_ (element)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (options_.root_element_first ())
- {
- if (element_ == 0)
- element_ = &e;
- }
- else if (String name = options_.root_element ())
- {
- if (e.name () == name)
- element_ = &e;
- }
- else
- element_ = &e; // Cover root-element-last and no option.
- }
-
- private:
- options_type const& options_;
- SemanticGraph::Element*& element_;
- };
- }
-}
-
-#endif // CXX_PARSER_ELEMENTS_HXX
diff --git a/xsd/cxx/parser/generator.cxx b/xsd/cxx/parser/generator.cxx
deleted file mode 100644
index 6c87117..0000000
--- a/xsd/cxx/parser/generator.cxx
+++ /dev/null
@@ -1,1099 +0,0 @@
-// file : xsd/cxx/parser/generator.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <algorithm>
-#include <iostream>
-#include <fstream>
-
-#include <cutl/re.hxx>
-
-#include <cutl/compiler/code-stream.hxx>
-#include <cutl/compiler/cxx-indenter.hxx>
-#include <cutl/compiler/sloc-counter.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-
-#include <type-map/lexer.hxx>
-#include <type-map/parser.hxx>
-#include <type-map/type-map.hxx>
-
-#include <cxx/parser/elements.hxx>
-#include <cxx/parser/generator.hxx>
-
-#include <cxx/parser/validator.hxx>
-#include <cxx/parser/name-processor.hxx>
-#include <cxx/parser/state-processor.hxx>
-#include <cxx/parser/type-processor.hxx>
-
-#include <cxx/parser/parser-header.hxx>
-#include <cxx/parser/parser-inline.hxx>
-#include <cxx/parser/parser-source.hxx>
-#include <cxx/parser/parser-forward.hxx>
-
-#include <cxx/parser/impl-header.hxx>
-#include <cxx/parser/impl-source.hxx>
-#include <cxx/parser/driver-source.hxx>
-
-#include <cxx/parser/element-validation-source.hxx>
-#include <cxx/parser/attribute-validation-source.hxx>
-#include <cxx/parser/characters-validation-source.hxx>
-
-#include <cxx/parser/options.hxx>
-
-#include "../../../libxsd/xsd/cxx/version.hxx"
-
-using std::endl;
-using std::wcerr;
-using std::wcout;
-
-using namespace XSDFrontend::SemanticGraph;
-
-//
-//
-typedef std::wifstream WideInputFileStream;
-typedef std::wofstream WideOutputFileStream;
-typedef std::ifstream NarrowInputFileStream;
-
-namespace CXX
-{
- namespace
- {
- char const copyright_gpl[] =
- "// Copyright (c) 2005-2020 Code Synthesis Tools CC.\n"
- "//\n"
- "// This program was generated by CodeSynthesis XSD, an XML Schema to\n"
- "// C++ data binding compiler.\n"
- "//\n"
- "// This program is free software; you can redistribute it and/or modify\n"
- "// it under the terms of the GNU General Public License version 2 as\n"
- "// published by the Free Software Foundation.\n"
- "//\n"
- "// This program is distributed in the hope that it will be useful,\n"
- "// but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "// GNU General Public License for more details.\n"
- "//\n"
- "// You should have received a copy of the GNU General Public License\n"
- "// along with this program; if not, write to the Free Software\n"
- "// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
- "//\n"
- "// In addition, as a special exception, Code Synthesis Tools CC gives\n"
- "// permission to link this program with the Xerces-C++ library (or with\n"
- "// modified versions of Xerces-C++ that use the same license as Xerces-C++),\n"
- "// and distribute linked combinations including the two. You must obey\n"
- "// the GNU General Public License version 2 in all respects for all of\n"
- "// the code used other than Xerces-C++. If you modify this copy of the\n"
- "// program, you may extend this exception to your version of the program,\n"
- "// but you are not obligated to do so. If you do not wish to do so, delete\n"
- "// this exception statement from your version.\n"
- "//\n"
- "// Furthermore, Code Synthesis Tools CC makes a special exception for\n"
- "// the Free/Libre and Open Source Software (FLOSS) which is described\n"
- "// in the accompanying FLOSSE file.\n"
- "//\n\n";
-
- char const copyright_proprietary[] =
- "// Copyright (c) 2005-2020 Code Synthesis Tools CC.\n"
- "//\n"
- "// This program was generated by CodeSynthesis XSD, an XML Schema\n"
- "// to C++ data binding compiler, in the Proprietary License mode.\n"
- "// You should have received a proprietary license from Code Synthesis\n"
- "// Tools CC prior to generating this code. See the license text for\n"
- "// conditions.\n"
- "//\n\n";
-
- char const copyright_impl[] =
- "// Not copyrighted - public domain.\n"
- "//\n"
- "// This sample parser implementation was generated by CodeSynthesis XSD,\n"
- "// an XML Schema to C++ data binding compiler. You may use it in your\n"
- "// programs without any restrictions.\n"
- "//\n\n";
- }
-
- void Parser::Generator::
- usage ()
- {
- CXX::Parser::options::print_usage (wcout);
- CXX::options::print_usage (wcout);
- }
-
- namespace
- {
- template <typename S>
- void
- open (S& ifs, NarrowString const& path)
- {
- try
- {
- Path fs_path (path);
- ifs.open (fs_path.string ().c_str (),
- std::ios_base::in | std::ios_base::binary);
-
- if (!ifs.is_open ())
- {
- wcerr << path.c_str () << ": error: unable to open in read mode"
- << endl;
-
- throw Parser::Generator::Failed ();
- }
- }
- catch (InvalidPath const&)
- {
- wcerr << "error: '" << path.c_str () << "' is not a valid "
- << "filesystem path" << endl;
-
- throw Parser::Generator::Failed ();
- }
- }
-
- void
- append (WideOutputFileStream& os,
- NarrowString const& path,
- WideInputFileStream& default_is)
- {
- using std::ios_base;
-
- if (path)
- {
- WideInputFileStream is;
- open (is, path);
- os << is.rdbuf ();
- }
- else if (default_is.is_open ())
- {
- os << default_is.rdbuf ();
- default_is.seekg (0, ios_base::beg);
- }
- }
-
- void
- append (WideOutputFileStream& os,
- NarrowStrings const& primary,
- NarrowStrings const& def)
- {
- NarrowStrings const& v (primary.empty () ? def : primary);
-
- for (NarrowStrings::const_iterator i (v.begin ()), e (v.end ());
- i != e; ++i)
- {
- os << i->c_str () << endl;
- }
- }
- }
-
-
- size_t Parser::Generator::
- generate (Parser::options const& ops,
- Schema& schema,
- Path const& file_path,
- bool fpt,
- StringLiteralMap const& string_literal_map,
- bool gen_driver,
- const WarningSet& disabled_warnings,
- FileList& file_list,
- AutoUnlinks& unlinks)
- {
- using std::ios_base;
-
- typedef cutl::re::regexsub Regex;
-
- try
- {
- bool generate_xml_schema (ops.generate_xml_schema ());
-
- // We could be compiling several schemas at once in which case
- // handling of the --generate-xml-schema option gets tricky: we
- // will need to rely on the presence of the --extern-xml-schema
- // to tell us which (fake) schema file corresponds to XML Schema.
- //
- if (generate_xml_schema)
- {
- if (NarrowString name = ops.extern_xml_schema ())
- {
- if (file_path.string () != name)
- generate_xml_schema = false;
- }
- }
-
- bool impl (!generate_xml_schema &&
- (ops.generate_noop_impl () ||
- ops.generate_print_impl ()));
-
- bool driver (gen_driver && !generate_xml_schema &&
- ops.generate_test_driver ());
-
- // Evaluate the graph for possibility of generating something useful.
- //
- {
- Validator validator;
- if (!validator.validate (
- ops, schema, file_path, driver, disabled_warnings))
- throw Failed ();
- }
-
- // Process names.
- //
- {
- NameProcessor proc;
- proc.process (ops, schema, file_path, string_literal_map);
- }
-
- bool validation ((ops.xml_parser () == "expat" ||
- ops.generate_validation ()) &&
- !ops.suppress_validation ());
-
- // Compute state machine info.
- //
- if (validation)
- {
- StateProcessor proc;
- proc.process (schema, file_path);
- }
-
- // Read-in type maps.
- //
- TypeMap::Namespaces type_map;
- {
- using namespace TypeMap;
-
- NarrowStrings const& files (ops.type_map ());
-
- for (NarrowStrings::const_iterator f (files.begin ());
- f != files.end (); ++f )
- {
- NarrowInputFileStream ifs;
- open (ifs, *f);
-
- Lexer l (ifs, *f);
- TypeMap::Parser p (l, *f);
-
- if (!p.parse (type_map))
- throw Failed ();
- }
-
- // Add the built-in mappings at the end.
- //
-
- // String-based types.
- //
- String char_type (ops.char_type ());
- String string_type;
-
- if (char_type == L"char")
- string_type = L"::std::string";
- else if (char_type == L"wchar_t")
- string_type = L"::std::wstring";
- else
- string_type = L"::std::basic_string< " + char_type + L" >";
-
- String xns;
- String auto_ptr;
- {
- Context ctx (std::wcerr, schema, file_path, ops, 0, 0, 0, 0);
- xns = ctx.xs_ns_name ();
- auto_ptr = ctx.auto_ptr;
- }
-
- String buffer (auto_ptr + L"< " + xns + L"::buffer >");
- TypeMap::Namespace xsd ("http://www\\.w3\\.org/2001/XMLSchema");
-
- xsd.types_push_back ("string", string_type);
- xsd.types_push_back ("normalizedString", string_type);
- xsd.types_push_back ("token", string_type);
- xsd.types_push_back ("Name", string_type);
- xsd.types_push_back ("NMTOKEN", string_type);
- xsd.types_push_back ("NMTOKENS", xns + L"::string_sequence");
- xsd.types_push_back ("NCName", string_type);
-
- xsd.types_push_back ("ID", string_type);
- xsd.types_push_back ("IDREF", string_type);
- xsd.types_push_back ("IDREFS", xns + L"::string_sequence");
-
- xsd.types_push_back ("language", string_type);
- xsd.types_push_back ("anyURI", string_type);
- xsd.types_push_back ("QName", xns + L"::qname");
-
- xsd.types_push_back ("base64Binary", buffer, buffer);
- xsd.types_push_back ("hexBinary", buffer, buffer);
-
- xsd.types_push_back ("gDay", xns + L"::gday");
- xsd.types_push_back ("gMonth", xns + L"::gmonth");
- xsd.types_push_back ("gYear", xns + L"::gyear");
- xsd.types_push_back ("gMonthDay", xns + L"::gmonth_day");
- xsd.types_push_back ("gYearMonth", xns + L"::gyear_month");
- xsd.types_push_back ("date", xns + L"::date");
- xsd.types_push_back ("time", xns + L"::time");
- xsd.types_push_back ("dateTime", xns + L"::date_time");
- xsd.types_push_back ("duration", xns + L"::duration");
-
- // Fundamental C++ types.
- //
- xsd.types_push_back ("boolean", "bool", "bool");
-
- xsd.types_push_back ("byte", "signed char", "signed char");
- xsd.types_push_back ("unsignedByte",
- "unsigned char",
- "unsigned char");
-
- xsd.types_push_back ("short", "short", "short");
- xsd.types_push_back ("unsignedShort",
- "unsigned short",
- "unsigned short");
-
- xsd.types_push_back ("int", "int", "int");
- xsd.types_push_back ("unsignedInt", "unsigned int", "unsigned int");
-
- xsd.types_push_back ("long", "long long", "long long");
- xsd.types_push_back ("unsignedLong",
- "unsigned long long",
- "unsigned long long");
-
- xsd.types_push_back ("integer", "long long", "long long");
-
- xsd.types_push_back ("negativeInteger", "long long", "long long");
- xsd.types_push_back ("nonPositiveInteger", "long long", "long long");
-
- xsd.types_push_back ("positiveInteger",
- "unsigned long long",
- "unsigned long long");
- xsd.types_push_back ("nonNegativeInteger",
- "unsigned long long",
- "unsigned long long");
-
- xsd.types_push_back ("float", "float", "float");
- xsd.types_push_back ("double", "double", "double");
- xsd.types_push_back ("decimal", "double", "double");
-
- type_map.push_back (xsd);
-
- // Everything else maps to void.
- //
- TypeMap::Namespace rest (".*");
- rest.types_push_back (".*", "void", "void");
- type_map.push_back (rest);
- }
-
- // Process types.
- //
- {
- TypeProcessor proc;
- proc.process (ops, schema, gen_driver, type_map);
- }
-
- //
- //
- bool inline_ (ops.generate_inline () && !generate_xml_schema);
- bool source (!generate_xml_schema);
-
- // Generate code.
- //
- NarrowString name (file_path.leaf ().string ());
- NarrowString skel_suffix (ops.skel_file_suffix ());
- NarrowString impl_suffix (ops.impl_file_suffix ());
-
- NarrowString hxx_suffix (ops.hxx_suffix ());
- NarrowString ixx_suffix (ops.ixx_suffix ());
- NarrowString cxx_suffix (ops.cxx_suffix ());
-
- Regex hxx_expr (
- ops.hxx_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + hxx_suffix + "#"
- : ops.hxx_regex ());
-
- Regex ixx_expr (
- ops.ixx_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + ixx_suffix + "#"
- : ops.ixx_regex ());
-
- Regex cxx_expr (
- ops.cxx_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + cxx_suffix + "#"
- : ops.cxx_regex ());
-
-
- Regex hxx_impl_expr;
- Regex cxx_impl_expr;
- Regex cxx_driver_expr;
-
- if (impl || driver)
- {
- hxx_impl_expr =
- "#^(.+?)(\\.[^./\\\\]+)?$#$1" + impl_suffix + hxx_suffix + "#";
-
- cxx_impl_expr =
- "#^(.+?)(\\.[^./\\\\]+)?$#$1" + impl_suffix + cxx_suffix + "#";
-
- cxx_driver_expr =
- "#^(.+?)(\\.[^./\\\\]+)?$#$1-driver" + cxx_suffix + "#";
- }
-
- if (!hxx_expr.match (name))
- {
- wcerr << "error: header expression '" <<
- hxx_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (inline_ && !ixx_expr.match (name))
- {
- wcerr << "error: inline expression '" <<
- ixx_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (source && !cxx_expr.match (name))
- {
- wcerr << "error: source expression '" <<
- cxx_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (impl || driver)
- {
- if (!hxx_impl_expr.match (name))
- {
- wcerr << "error: implementation header expression '" <<
- hxx_impl_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (!cxx_impl_expr.match (name))
- {
- wcerr << "error: implementation source expression '" <<
- cxx_impl_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (!cxx_driver_expr.match (name))
- {
- wcerr << "error: driver source expression '" <<
- cxx_driver_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
- }
-
- NarrowString hxx_name (hxx_expr.replace (name));
- NarrowString ixx_name (inline_ ? ixx_expr.replace (name) : NarrowString ());
- NarrowString cxx_name (source ? cxx_expr.replace (name) : NarrowString ());
-
- NarrowString hxx_impl_name;
- NarrowString cxx_impl_name;
- NarrowString cxx_driver_name;
-
- if (impl || driver)
- {
- hxx_impl_name = hxx_impl_expr.replace (name);
- cxx_impl_name = cxx_impl_expr.replace (name);
- cxx_driver_name = cxx_driver_expr.replace (name);
- }
-
- Path hxx_path (hxx_name);
- Path ixx_path (ixx_name);
- Path cxx_path (cxx_name);
-
- Path hxx_impl_path;
- Path cxx_impl_path;
- Path cxx_driver_path;
-
- if (impl || driver)
- {
- hxx_impl_path = Path (hxx_impl_name);
- cxx_impl_path = Path (cxx_impl_name);
- cxx_driver_path = Path (cxx_driver_name);
- }
-
- Path out_dir;
-
- if (NarrowString dir = ops.output_dir ())
- {
- try
- {
- out_dir = Path (dir);
- }
- catch (InvalidPath const&)
- {
- wcerr << dir.c_str () << ": error: invalid path" << endl;
- throw Failed ();
- }
- }
-
- if (fpt && !generate_xml_schema)
- {
- // In the file-per-type mode the schema files are always local
- // unless the user added the directory so that we propagate this
- // to the output files.
- //
- Path fpt_dir (file_path.directory ());
-
- if (!fpt_dir.empty ())
- out_dir /= fpt_dir;
- }
-
- if (!out_dir.empty ())
- {
- hxx_path = out_dir / hxx_path;
- ixx_path = out_dir / ixx_path;
- cxx_path = out_dir / cxx_path;
-
- if (impl || driver)
- {
- hxx_impl_path = out_dir / hxx_impl_path;
- cxx_impl_path = out_dir / cxx_impl_path;
- cxx_driver_path = out_dir /cxx_driver_path;
- }
- }
-
- // Open the impl files first so that if open fails, the skel files
- // are not deleted.
- //
- WideOutputFileStream hxx_impl;
- WideOutputFileStream cxx_impl;
- WideOutputFileStream cxx_driver;
-
- if (impl)
- {
- if (!ops.force_overwrite ())
- {
- WideInputFileStream tmp (
- hxx_impl_path.string ().c_str (), ios_base::in);
-
- if (tmp.is_open ())
- {
- wcerr << hxx_impl_path << ": error: cowardly refusing to " <<
- "overwrite an existing file" << endl;
- throw Failed ();
- }
-
- tmp.close ();
- }
-
- hxx_impl.open (hxx_impl_path.string ().c_str (), ios_base::out);
-
- if (!hxx_impl.is_open ())
- {
- wcerr << hxx_impl_path << ": error: unable to open in write mode"
- << endl;
- throw Failed ();
- }
-
- unlinks.add (hxx_impl_path);
- file_list.push_back (hxx_impl_path.string ());
-
- if (!ops.force_overwrite ())
- {
- WideInputFileStream tmp (
- cxx_impl_path.string ().c_str (), ios_base::in);
-
- if (tmp.is_open ())
- {
- wcerr << cxx_impl_path << ": error: cowardly refusing to " <<
- "overwrite an existing file" << endl;
- throw Failed ();
- }
-
- tmp.close ();
- }
-
- cxx_impl.open (cxx_impl_path.string ().c_str (), ios_base::out);
-
- if (!cxx_impl.is_open ())
- {
- wcerr << cxx_impl_path << ": error: unable to open in write mode"
- << endl;
- throw Failed ();
- }
-
- unlinks.add (cxx_impl_path);
- file_list.push_back (cxx_impl_path.string ());
- }
-
- if (driver)
- {
- if (!ops.force_overwrite ())
- {
- WideInputFileStream tmp (
- cxx_driver_path.string ().c_str (), ios_base::in);
-
- if (tmp.is_open ())
- {
- wcerr << cxx_driver_path << ": error: cowardly refusing to " <<
- "overwrite an existing file" << endl;
- throw Failed ();
- }
-
- tmp.close ();
- }
-
- cxx_driver.open (cxx_driver_path.string ().c_str (), ios_base::out);
-
- if (!cxx_driver.is_open ())
- {
- wcerr << cxx_driver_path << ": error: unable to open in write " <<
- "mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (cxx_driver_path);
- file_list.push_back (cxx_driver_path.string ());
- }
-
- // Open the skel files.
- //
- WideOutputFileStream hxx (hxx_path.string ().c_str (), ios_base::out);
- WideOutputFileStream ixx;
- WideOutputFileStream cxx;
-
- if (!hxx.is_open ())
- {
- wcerr << hxx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (hxx_path);
- file_list.push_back (hxx_path.string ());
-
- if (inline_)
- {
- ixx.open (ixx_path.string ().c_str (), ios_base::out);
-
- if (!ixx.is_open ())
- {
- wcerr << ixx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (ixx_path);
- file_list.push_back (ixx_path.string ());
- }
-
-
- if (source)
- {
- cxx.open (cxx_path.string ().c_str (), ios_base::out);
-
- if (!cxx.is_open ())
- {
- wcerr << cxx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (cxx_path);
- file_list.push_back (cxx_path.string ());
- }
-
- // Print copyright and license.
- //
- char const* copyright (
- ops.proprietary_license () ? copyright_proprietary : copyright_gpl);
-
- hxx << copyright;
-
- if (inline_)
- ixx << copyright;
-
- if (source)
- cxx << copyright;
-
- if (impl)
- {
- hxx_impl << copyright_impl;
- cxx_impl << copyright_impl;
- }
-
- if (driver)
- cxx_driver << copyright_impl;
-
- // Prologue.
- //
- WideInputFileStream prologue;
- {
- NarrowString name (ops.prologue_file ());
-
- if (name)
- open (prologue, name);
- }
-
- // Epilogue.
- //
- WideInputFileStream epilogue;
- {
- NarrowString name (ops.epilogue_file ());
-
- if (name)
- open (epilogue, name);
- }
-
- // SLOC counter.
- //
- size_t sloc_total (0);
- bool show_sloc (ops.show_sloc ());
-
- typedef
- compiler::ostream_filter<compiler::cxx_indenter, wchar_t>
- ind_filter;
-
- typedef
- compiler::ostream_filter<compiler::sloc_counter, wchar_t>
- sloc_filter;
-
- //
- //
- Regex guard_expr ("/([a-z])([A-Z])/$1_$2/"); // Split words.
-
- NarrowString guard_prefix (ops.guard_prefix ());
-
- if (!guard_prefix)
- guard_prefix = file_path.directory ().string ();
-
- if (guard_prefix)
- guard_prefix += '_';
-
- // HXX
- //
- {
- Context ctx (hxx,
- schema,
- file_path,
- ops,
- &string_literal_map,
- &hxx_expr,
- &ixx_expr,
- &hxx_impl_expr);
-
- sloc_filter sloc (hxx);
-
- String guard (guard_expr.replace (guard_prefix + hxx_name));
- guard = ctx.escape (guard); // Make it a C++ id.
- std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
-
- hxx << "#ifndef " << guard << endl
- << "#define " << guard << endl
- << endl;
-
- if (ctx.std >= cxx_version::cxx11)
- {
- hxx << "#ifndef XSD_CXX11" << endl
- << "#define XSD_CXX11" << endl
- << "#endif" << endl
- << endl;
- }
-
- // Copy prologue.
- //
- hxx << "// Begin prologue." << endl
- << "//" << endl;
-
- append (hxx, ops.hxx_prologue (), ops.prologue ());
- append (hxx, ops.hxx_prologue_file (), prologue);
-
- hxx << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- // Version check.
- //
- hxx << "#include <xsd/cxx/config.hxx>" << endl
- << endl
- << "#if (XSD_INT_VERSION != " << XSD_INT_VERSION << "L)" << endl
- << "#error XSD runtime version mismatch" << endl
- << "#endif" << endl
- << endl;
-
- hxx << "#include <xsd/cxx/pre.hxx>" << endl
- << endl;
-
- // Generate.
- //
- {
- ind_filter ind (hxx); // We don't want to indent prologues/epilogues.
-
- if (!generate_xml_schema)
- generate_parser_forward (ctx);
-
- generate_parser_header (ctx, generate_xml_schema);
- }
-
- if (inline_)
- hxx << "#include " << ctx.process_include_path (ixx_name) << endl;
-
- hxx << "#include <xsd/cxx/post.hxx>" << endl
- << endl;
-
- // Copy epilogue.
- //
- hxx << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (hxx, ops.hxx_epilogue_file (), epilogue);
- append (hxx, ops.hxx_epilogue (), ops.epilogue ());
-
- hxx << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- hxx << "#endif // " << guard << endl;
-
- if (show_sloc)
- wcerr << hxx_path << ": " << sloc.stream ().count () << endl;
-
- sloc_total += sloc.stream ().count ();
- }
-
-
- // IXX
- //
- if (inline_)
- {
- Context ctx (ixx,
- schema,
- file_path,
- ops,
- &string_literal_map,
- &hxx_expr,
- &ixx_expr,
- &hxx_impl_expr);
-
- sloc_filter sloc (ixx);
-
- // Copy prologue.
- //
- ixx << "// Begin prologue." << endl
- << "//" << endl;
-
- append (ixx, ops.ixx_prologue (), ops.prologue ());
- append (ixx, ops.ixx_prologue_file (), prologue);
-
- ixx << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- // Generate.
- //
- {
- ind_filter ind (ixx); // We don't want to indent prologues/epilogues.
- generate_parser_inline (ctx);
- }
-
- // Copy epilogue.
- //
- ixx << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (ixx, ops.ixx_epilogue_file (), epilogue);
- append (ixx, ops.ixx_epilogue (), ops.epilogue ());
-
- ixx << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- if (show_sloc)
- wcerr << ixx_path << ": " << sloc.stream ().count () << endl;
-
- sloc_total += sloc.stream ().count ();
- }
-
-
- // CXX
- //
- if (source)
- {
- Context ctx (cxx,
- schema,
- file_path,
- ops,
- &string_literal_map,
- &hxx_expr,
- &ixx_expr,
- &hxx_impl_expr);
-
- sloc_filter sloc (cxx);
-
- // Copy prologue.
- //
- cxx << "// Begin prologue." << endl
- << "//" << endl;
-
- append (cxx, ops.cxx_prologue (), ops.prologue ());
- append (cxx, ops.cxx_prologue_file (), prologue);
-
- cxx << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- cxx << "#include <xsd/cxx/pre.hxx>" << endl
- << endl;
-
- cxx << "#include " << ctx.process_include_path (hxx_name) << endl
- << endl;
-
- // Generate.
- //
- {
- ind_filter ind (cxx); // We don't want to indent prologues/epilogues.
-
- if (!inline_)
- generate_parser_inline (ctx);
-
- generate_parser_source (ctx);
-
- if (validation)
- {
- generate_element_validation_source (ctx);
- generate_attribute_validation_source (ctx);
- generate_characters_validation_source (ctx);
- }
- }
-
- cxx << "#include <xsd/cxx/post.hxx>" << endl
- << endl;
-
- // Copy epilogue.
- //
- cxx << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (cxx, ops.cxx_epilogue_file (), epilogue);
- append (cxx, ops.cxx_epilogue (), ops.epilogue ());
-
- cxx << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- if (show_sloc)
- wcerr << cxx_path << ": " << sloc.stream ().count () << endl;
-
- sloc_total += sloc.stream ().count ();
- }
-
- // HXX impl
- //
- if (impl)
- {
- Context ctx (hxx_impl,
- schema,
- file_path,
- ops,
- &string_literal_map,
- &hxx_expr,
- &ixx_expr,
- &hxx_impl_expr);
-
- String guard (guard_expr.replace (guard_prefix + hxx_impl_name));
- guard = ctx.escape (guard); // Make it a C++ id.
- std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
-
- hxx_impl << "#ifndef " << guard << endl
- << "#define " << guard << endl
- << endl;
-
- hxx_impl << "#include " << ctx.process_include_path (hxx_name)
- << endl << endl;
-
- {
- ind_filter ind (hxx_impl);
- generate_impl_header (ctx);
- }
-
- hxx_impl << "#endif // " << guard << endl;
- }
-
- // CXX impl
- //
- if (impl)
- {
- Context ctx (cxx_impl,
- schema,
- file_path,
- ops,
- &string_literal_map,
- &hxx_expr,
- &ixx_expr,
- &hxx_impl_expr);
-
- cxx_impl << "#include " << ctx.process_include_path (hxx_impl_name)
- << endl << endl;
-
- {
- ind_filter ind (cxx_impl);
- generate_impl_source (ctx);
- }
- }
-
- // CXX driver
- //
- if (driver)
- {
- Context ctx (cxx_driver,
- schema,
- file_path,
- ops,
- &string_literal_map,
- &hxx_expr,
- &ixx_expr,
- &hxx_impl_expr);
-
- cxx_driver << "#include " << ctx.process_include_path (hxx_impl_name)
- << endl << endl;
-
- {
- ind_filter ind (cxx_driver);
- generate_driver_source (ctx);
- }
- }
-
- return sloc_total;
- }
- catch (UnrepresentableCharacter const& e)
- {
- wcerr << "error: character at position " << e.position () << " "
- << "in string '" << e.string () << "' is unrepresentable in "
- << "the target encoding" << endl;
-
- wcerr << "info: use the --custom-literals option to provide custom "
- << "string literals mapping" << endl;
-
- throw Failed ();
- }
- catch (NoNamespaceMapping const& e)
- {
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": error: unable to map XML Schema namespace '" << e.ns ()
- << "' to C++ namespace" << endl;
-
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: use the --namespace-map or --namespace-regex option "
- << "to provide custom mapping" << endl;
-
- throw Failed ();
- }
- catch (InvalidNamespaceMapping const& e)
- {
- wcerr << "error: invalid XML to C++ namespace mapping specified: "
- << "'" << e.mapping () << "': " << e.reason () << endl;
-
- throw Failed ();
- }
- catch (cutl::re::format const& e)
- {
- wcerr << "error: invalid regex: '" <<
- e.regex ().c_str () << "': " <<
- e.description ().c_str () << endl;
-
- throw Failed ();
- }
- catch (cutl::re::wformat const& e)
- {
- wcerr << "error: invalid regex: '" <<
- e.regex () << "': " << e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
-}
diff --git a/xsd/cxx/parser/generator.hxx b/xsd/cxx/parser/generator.hxx
deleted file mode 100644
index 6fd984b..0000000
--- a/xsd/cxx/parser/generator.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-// file : xsd/cxx/parser/generator.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_GENERATOR_HXX
-#define CXX_PARSER_GENERATOR_HXX
-
-#include <xsd-frontend/semantic-graph/elements.hxx> // Path
-#include <xsd-frontend/semantic-graph/schema.hxx>
-
-#include <xsd.hxx>
-#include <types.hxx>
-
-#include <cxx/literal-map.hxx>
-#include <cxx/parser/options.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- class Generator
- {
- public:
- static void
- usage ();
-
- struct Failed {};
-
- static size_t
- generate (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file,
- bool file_per_type,
- StringLiteralMap const&,
- bool gen_driver,
- const WarningSet& disabled_warnings,
- FileList& file_list,
- AutoUnlinks& unlinks);
-
- private:
- Generator ();
- };
- }
-}
-
-#endif // CXX_PARSER_GENERATOR_HXX
diff --git a/xsd/cxx/parser/impl-header.cxx b/xsd/cxx/parser/impl-header.cxx
deleted file mode 100644
index 03106ca..0000000
--- a/xsd/cxx/parser/impl-header.cxx
+++ /dev/null
@@ -1,232 +0,0 @@
-// file : xsd/cxx/parser/impl-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/impl-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String const& name (eimpl (e));
- String const& ret (ret_type (e));
- SemanticGraph::Type& base (e.inherits ().base ());
-
- os << "class " << type_exp << name << ": " <<
- "public virtual " << ename (e) << "," << endl
- << " public " << fq_name (base, "impl")
- << "{"
- << "public:" << endl
- << "virtual void" << endl
- << "pre ();"
- << endl
- << "virtual " << ret << endl
- << post_name (e) << " ();"
- << "};";
- }
- };
-
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String const& name (eimpl (l));
- SemanticGraph::Type& t (l.argumented ().type ());
-
- String item (unclash (ename (l), "item"));
-
- os << "class " << type_exp << name << ": public virtual " <<
- ename (l)
- << "{"
- << "public:" << endl
- << "virtual void" << endl
- << "pre ();"
- << endl;
-
- // item
- //
- String const& arg (arg_type (t));
-
- os << "virtual void" << endl
- << item;
-
- if (arg == L"void")
- os << " ();";
- else
- os << " (" << arg << ");";
-
- os << endl;
-
- // post
- //
- String const& ret (ret_type (l));
-
- os << "virtual " << ret << endl
- << post_name (l) << " ();"
- << "};";
- }
- };
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String const& name (eimpl (u));
- String const& ret (ret_type (u));
-
- os << "class " << type_exp << name << ": public virtual " <<
- ename (u)
- << "{"
- << "public:" << endl
- << "virtual void" << endl
- << "pre ();"
- << endl
- << "virtual void" << endl
- << "_characters (const " << string_type << "&);"
- << endl
- << "virtual " << ret << endl
- << post_name (u) << " ();"
- << "};";
- }
- };
-
-
- //
- //
- struct ParserCallback: Traversal::Member, Context
- {
- ParserCallback (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& arg (arg_type (m.type ()));
-
- os << "virtual void" << endl
- << ename (m);
-
- if (arg == L"void")
- os << " ();";
- else
- os << " (" << arg << ");";
-
- os << endl;
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- parser_callback_ (c)
- {
- names_parser_callback_ >> parser_callback_;
- }
-
- virtual void
- traverse (Type& c)
- {
- String const& name (eimpl (c));
- String const& ret (ret_type (c));
-
- os << "class " << type_exp << name << ": public virtual " <<
- ename (c);
-
- if (c.inherits_p ())
- os << "," << endl
- << " public " << fq_name (c.inherits ().base (), "impl");
-
- os << "{"
- << "public:" << endl
- << "virtual void" << endl
- << "pre ();"
- << endl;
-
- // In case of an inheritance-by-restriction, we don't need to
- // generate parser callbacks, etc. since they are the same as in
- // the base.
- //
- if (!restriction_p (c))
- {
- names (c, names_parser_callback_);
- }
-
- os << "virtual " << ret << endl
- << post_name (c) << " ();"
- << "};";
- }
-
- private:
- //
- //
- ParserCallback parser_callback_;
- Traversal::Names names_parser_callback_;
- };
- }
-
- void
- generate_impl_header (Context& ctx)
- {
- Traversal::Schema schema;
-
- Sources sources;
- Includes includes (ctx, Includes::impl_header);
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> includes;
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/impl-header.hxx b/xsd/cxx/parser/impl-header.hxx
deleted file mode 100644
index f22678a..0000000
--- a/xsd/cxx/parser/impl-header.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/impl-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_IMPL_HEADER_HXX
-#define CXX_PARSER_IMPL_HEADER_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_impl_header (Context&);
- }
-}
-
-#endif // CXX_PARSER_IMPL_HEADER_HXX
diff --git a/xsd/cxx/parser/impl-source.cxx b/xsd/cxx/parser/impl-source.cxx
deleted file mode 100644
index 592c956..0000000
--- a/xsd/cxx/parser/impl-source.cxx
+++ /dev/null
@@ -1,384 +0,0 @@
-// file : xsd/cxx/parser/impl-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/impl-source.hxx>
-#include <cxx/parser/print-impl-common.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String const& name (eimpl (e));
- String const& ret (ret_type (e));
- SemanticGraph::Type& base (e.inherits ().base ());
- String const& base_ret (ret_type (base));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // pre
- //
- os << "void " << name << "::" << endl
- << "pre ()"
- << "{"
- << "}";
-
- // post
- //
- os << ret << " " << name << "::" << endl
- << post_name (e) << " ()"
- << "{";
-
- if (ret == base_ret)
- {
- os << (ret != L"void" ? "return " : "") <<
- post_name (base) << " ();";
- }
- else if (ret == L"void")
- {
- os << arg_type (base) << " v (" << post_name (base) << " ());"
- << endl;
-
- if (options.generate_print_impl ())
- {
- PrintCall t (*this, e.name (), "v");
- t.dispatch (base);
- }
- else
- os << "// TODO" << endl
- << "//" << endl;
- }
- else
- {
- if (base_ret == L"void")
- os << post_name (base) << " ();";
- else
- os << arg_type (base) << " v (" << post_name (base) << " ());"
- << endl
- << "// TODO" << endl
- << "//" << endl
- << "// return ... ;" << endl;
- }
-
- os << "}";
- }
- };
-
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String const& name (eimpl (l));
- SemanticGraph::Type& type (l.argumented ().type ());
-
- String item (unclash (ename (l), "item"));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // pre
- //
- os << "void " << name << "::" << endl
- << "pre ()"
- << "{"
- << "}";
-
- // item
- //
- String const& arg (arg_type (type));
-
- os << "void " << name << "::" << endl
- << item;
-
- if (arg == L"void")
- os << " ()";
- else
- os << " (" << arg << " " << item << ")";
-
- os << "{";
-
- if (arg != L"void")
- {
- if (options.generate_print_impl ())
- {
- PrintCall t (*this, type.name (), item);
- t.dispatch (type);
- }
- else
- os << "// TODO" << endl
- << "//" << endl;
- }
-
- os << "}";
-
- // post
- //
- String const& ret (ret_type (l));
-
- os << ret << " " << name << "::" << endl
- << post_name (l) << " ()"
- << "{";
-
- if (ret != L"void")
- os << "// TODO" << endl
- << "//" << endl
- << "// return ... ;" << endl;
-
- os << "}";
- }
- };
-
- //
- //
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String const& name (eimpl (u));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // pre
- //
- os << "void " << name << "::" << endl
- << "pre ()"
- << "{"
- << "}";
-
- // _characters
- //
- os << "void " << name << "::" << endl
- << "_characters (const " << string_type << "& s)"
- << "{";
-
- if (options.generate_print_impl ())
- os << cout_inst << " << " << strlit (u.name () + L": ") <<
- " << s << std::endl;";
- else
- os << "// TODO" << endl
- << "//" << endl;
-
- os << "}";
-
- // post
- //
- String const& ret (ret_type (u));
-
- os << ret << " " << name << "::" << endl
- << post_name (u) << " ()"
- << "{";
-
- if (ret != L"void")
- os << "// TODO" << endl
- << "//" << endl
- << "// return ... ;" << endl;
-
- os << "}";
- }
- };
-
- //
- //
- struct ParserCallback: Traversal::Member, Context
- {
- ParserCallback (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& name (ename (m));
- String const& arg (arg_type (m.type ()));
-
- os << "void " <<
- eimpl (dynamic_cast<SemanticGraph::Complex&> (m.scope ())) <<
- "::" << endl
- << name;
-
- if (arg == L"void")
- os << " ()";
- else
- os << " (" << arg << " " << name << ")";
-
- os << "{";
-
- if (arg != L"void")
- {
- if (options.generate_print_impl ())
- {
- PrintCall t (*this, m.name (), name);
- t.dispatch (m.type ());
- }
- else
- os << "// TODO" << endl
- << "//" << endl;
- }
-
- os << "}";
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c), parser_callback_ (c)
- {
- names_parser_callback_ >> parser_callback_;
- }
-
- virtual void
- traverse (Type& c)
- {
- String const& name (eimpl (c));
-
- bool restriction (restriction_p (c));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // pre
- //
- os << "void " << name << "::" << endl
- << "pre ()"
- << "{"
- << "}";
-
- // Parser callbacks.
- //
- if (!restriction)
- names (c, names_parser_callback_);
-
- // post
- //
- String const& ret (ret_type (c));
-
- os << ret << " " << name << "::" << endl
- << post_name (c) << " ()"
- << "{";
-
- if (c.inherits_p ())
- {
- SemanticGraph::Type& base (c.inherits ().base ());
- String const& base_ret (ret_type (base));
-
- if (ret == base_ret)
- {
- os << (ret != L"void" ? "return " : "") <<
- post_name (base) << " ();";
- }
- else if (ret == L"void")
- {
- os << arg_type (base) << " v (" << post_name (base) << " ());"
- << endl;
-
- if (options.generate_print_impl ())
- {
- PrintCall t (*this, c.name (), "v");
- t.dispatch (base);
- }
- else
- os << "// TODO" << endl
- << "//" << endl;
- }
- else
- {
- if (base_ret == L"void")
- os << post_name (base) << " ();";
- else
- os << arg_type (base) << " v (" << post_name (base) << " ());"
- << endl
- << "// TODO" << endl
- << "//" << endl
- << "// return ... ;" << endl;
- }
- }
- else
- {
- if (ret != L"void")
- os << "// TODO" << endl
- << "//" << endl
- << "// return ... ;" << endl;
- }
-
- os << "}";
- }
-
- private:
- //
- //
- ParserCallback parser_callback_;
- Traversal::Names names_parser_callback_;
- };
- }
-
- void
- generate_impl_source (Context& ctx)
- {
- if (ctx.options.generate_print_impl ())
- ctx.os << "#include <iostream>" << endl
- << endl;
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names schema_names;
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/impl-source.hxx b/xsd/cxx/parser/impl-source.hxx
deleted file mode 100644
index 2fa5183..0000000
--- a/xsd/cxx/parser/impl-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/impl-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_IMPL_SOURCE_HXX
-#define CXX_PARSER_IMPL_SOURCE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_impl_source (Context&);
- }
-}
-
-#endif // CXX_PARSER_IMPL_SOURCE_HXX
diff --git a/xsd/cxx/parser/name-processor.cxx b/xsd/cxx/parser/name-processor.cxx
deleted file mode 100644
index a06f1e3..0000000
--- a/xsd/cxx/parser/name-processor.cxx
+++ /dev/null
@@ -1,1175 +0,0 @@
-// file : xsd/cxx/parser/name-processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-#include <map>
-#include <sstream>
-#include <iostream>
-
-#include <cxx/parser/name-processor.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- //
- //
- typedef set<String> NameSet;
-
- class Context: public CXX::Context
- {
- public:
- Context (Parser::options const& ops,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- StringLiteralMap const* map)
- : CXX::Context (std::wcerr, root, path, ops, map),
- skel_suffix_ (ops.skel_type_suffix ()),
- impl_suffix_ (ops.impl_type_suffix ()),
- impl (ops.generate_noop_impl () ||
- ops.generate_print_impl () ||
- ops.generate_test_driver ()),
- skel_suffix (skel_suffix_),
- impl_suffix (impl_suffix_),
- global_type_names (global_type_names_),
- polymorphic (ops.generate_polymorphic ())
- {
- }
-
- protected:
- Context (Context& c)
- : CXX::Context (c),
- impl (c.impl),
- skel_suffix (c.skel_suffix),
- impl_suffix (c.impl_suffix),
- global_type_names (c.global_type_names),
- polymorphic (c.polymorphic)
- {
- }
-
- public:
- String
- find_name (String const& n, NameSet& set)
- {
- String base_name (escape (n));
- String name (base_name);
-
- for (size_t i (1); set.find (name) != set.end (); ++i)
- {
- std::wostringstream os;
- os << i;
- name = base_name + os.str ();
- }
-
- set.insert (name);
- return name;
- }
-
- private:
- String const skel_suffix_;
- String const impl_suffix_;
-
- map<String, NameSet> global_type_names_;
-
- public:
- bool const impl;
- String const& skel_suffix;
- String const& impl_suffix;
-
- map<String, NameSet>& global_type_names;
-
- bool polymorphic;
- };
-
-
- //
- //
- struct PrimaryMember: Traversal::Member, Context
- {
- PrimaryMember (Context& c, NameSet& set)
- : Context (c), set_ (set)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (Parser::Context::skip (m))
- return;
-
- m.context ().set ("name", find_name (m.name (), set_));
- }
-
- private:
- NameSet& set_;
- };
-
- struct DerivedMember: Traversal::Member, Context
- {
- DerivedMember (Context& c, NameSet& set)
- : Context (c), set_ (set)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (Parser::Context::skip (m))
- return;
-
- m.context ().set ("parser",
- find_name (m.name () + L"_parser", set_));
-
- String const& base (m.context ().get<String> ("name"));
- m.context ().set ("member", find_name (base + L"_parser_", set_));
-
- if (polymorphic &&
- m.is_a<SemanticGraph::Element> () &&
- !m.type ().context ().count ("anonymous"))
- {
- m.context ().set (
- "member-map", find_name (base + L"_parser_map_", set_));
-
- m.context ().set (
- "member-map-impl",
- find_name (base + L"_parser_map_impl_", set_));
- }
- }
-
- private:
- NameSet& set_;
- };
-
-
- //
- //
- struct MemberInRestrictionBase: Traversal::Member
- {
- protected:
- MemberInRestrictionBase (NameSet& set, SemanticGraph::Complex& base)
- : set_ (set), base_ (base)
- {
- }
-
- struct NotFound {};
-
- Type&
- find_member (SemanticGraph::Complex& c, Type& m)
- {
- using SemanticGraph::Complex;
-
- Complex::NamesIteratorPair r (c.find (m.name ()));
-
- for (; r.first != r.second; ++r.first)
- {
- if (r.first->named ().is_a<Type> ())
- {
- Type& bm (dynamic_cast<Type&> (r.first->named ()));
-
- if (typeid (bm) != typeid (m))
- continue;
-
- if (m.qualified_p ())
- {
- if (bm.qualified_p () &&
- m.name () == bm.name () &&
- m.namespace_ ().name () == bm.namespace_ ().name ())
- return bm;
- }
- else
- {
- if (!bm.qualified_p () && m.name () == bm.name ())
- return bm;
- }
- }
- }
-
- // If we didn't find anything, try our base.
- //
- if (c.inherits_p ())
- {
- SemanticGraph::Type& base (c.inherits ().base ());
-
- if (base.is_a<Complex> ())
- return find_member (dynamic_cast<Complex&> (base), m);
- }
-
- //std::wcerr << "unable to find member " << m.name () << " in "
- // << c.name () << std::endl;
-
- throw NotFound ();
- }
-
- protected:
- NameSet& set_;
- SemanticGraph::Complex& base_;
- };
-
- struct PrimaryMemberInRestriction: MemberInRestrictionBase, Context
- {
- PrimaryMemberInRestriction (Context& c,
- NameSet& set,
- SemanticGraph::Complex& base)
- : MemberInRestrictionBase (set, base), Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (Parser::Context::skip (m))
- return;
-
- String name;
-
- try
- {
- // Try to find corresponding member in one of our bases.
- // This may fail if we use an element that substitutes
- // one in our base.
- //
- Type& bm (find_member (base_, m));
- name = bm.context ().get<String> ("name");
- }
- catch (NotFound const&)
- {
- // Fall back to the standard name assignment.
- //
- name = find_name (m.name (), set_);
- }
-
- m.context ().set ("name", name);
- }
- };
-
- struct DerivedMemberInRestriction: MemberInRestrictionBase, Context
- {
- DerivedMemberInRestriction (Context& c,
- NameSet& set,
- SemanticGraph::Complex& base)
- : MemberInRestrictionBase (set, base), Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (Parser::Context::skip (m))
- return;
-
- bool poly (polymorphic &&
- m.is_a<SemanticGraph::Element> () &&
- !m.type ().context ().count ("anonymous"));
-
- String parser, member, member_map, member_map_impl;
-
- try
- {
- // Try to find corresponding member in one of our bases.
- // This may fail if we use an element that substitutes
- // one in our base.
- //
- Type& bm (find_member (base_, m));
- parser = bm.context ().get<String> ("parser");
- member = bm.context ().get<String> ("member");
-
- if (poly)
- {
- member_map = bm.context ().get<String> ("member-map");
- member_map_impl = bm.context ().get<String> ("member-map-impl");
- }
- }
- catch (NotFound const&)
- {
- // Fall back to the standard name assignment.
- //
- String const& base (m.context ().get<String> ("name"));
-
- parser = find_name (m.name () + L"_parser", set_);
- member = find_name (base + L"_parser_", set_);
-
- if (poly)
- {
- member_map = find_name (base + L"_parser_map_", set_);
- member_map_impl = find_name (base + L"_parser_map_impl_", set_);
- }
- }
-
- m.context ().set ("parser", parser);
- m.context ().set ("member", member);
-
- if (poly)
- {
- m.context ().set ("member-map", member_map);
- m.context ().set ("member-map-impl", member_map_impl);
- }
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- SemanticGraph::Context& cc (c.context ());
-
- // Use processed name.
- //
- String const& name (cc.get<String> ("name"));
-
- // We leave this set around to allow other mappings to use
- // this information.
- //
- cc.set ("cxx-parser-name-processor-member-set", NameSet ());
- NameSet& member_set (
- cc.get<NameSet> ("cxx-parser-name-processor-member-set"));
-
- member_set.insert (name);
-
- // Add our base's members to the initial list unless we are
- // inheriting by restriction in which case we need to have
- // the same names as our base.
- //
- bool restriction (false);
-
- if (c.inherits_p ())
- {
- // @@ What if this types name is the same as one of base's
- // members?
- //
- SemanticGraph::Type& base (c.inherits ().base ());
-
- if (base.is_a<SemanticGraph::Complex> ())
- {
- if (!base.context ().count (
- "cxx-parser-name-processor-member-set"))
- {
- dispatch (base);
- }
-
- NameSet const& base_set (
- base.context ().get<NameSet> (
- "cxx-parser-name-processor-member-set"));
-
- member_set.insert (base_set.begin (), base_set.end ());
-
- // Inheritance by restriction from anyType is a special case.
- //
- restriction = c.inherits ().is_a<SemanticGraph::Restricts> () &&
- !c.inherits ().base ().is_a<SemanticGraph::AnyType> ();
- }
- }
-
- if (restriction)
- {
- // First assign the "primary" names.
- //
- {
- PrimaryMemberInRestriction member (
- *this,
- member_set,
- dynamic_cast<SemanticGraph::Complex&> (
- c.inherits ().base ()));
-
- Traversal::Names names (member);
-
- Complex::names (c, names);
- }
-
- // Assign "derived" names.
- //
- {
- DerivedMemberInRestriction member (
- *this,
- member_set,
- dynamic_cast<SemanticGraph::Complex&> (
- c.inherits ().base ()));
-
- Traversal::Names names (member);
-
- Complex::names (c, names);
- }
- }
- else
- {
- // First assign the "primary" names.
- //
- {
- PrimaryMember member (*this, member_set);
- Traversal::Names names (member);
-
- Complex::names (c, names);
- }
-
- // Assign "derived" names.
- //
- {
- DerivedMember member (*this, member_set);
- Traversal::Names names (member);
-
- Complex::names (c, names);
- }
- }
- }
- };
-
-
- //
- //
- struct GlobalType: Traversal::Type, Context
- {
- GlobalType (Context& c, NameSet& set)
- : Context (c), set_ (set)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- SemanticGraph::Context& c (t.context ());
- String const& n (t.name ());
-
- String name (find_name (n + skel_suffix, set_));
- c.set ("name", name);
-
- // Assign the post_* name.
- //
- c.set ("post", find_post_name (t));
-
- // Note that we do not add this name to the set so that it
- // does not influence other names.
- //
- if (impl)
- c.set ("impl", escape (n + impl_suffix));
- }
-
- private:
- String
- find_post_name (SemanticGraph::Type& t)
- {
- String const& n (t.name ());
-
- // It is possible that our base has the same type name (just
- // in a different namespaces). Avoid name clash in this case.
- //
- using SemanticGraph::Complex;
-
- Complex* c = dynamic_cast<Complex*> (&t);
-
- if (c == 0 || !c->inherits_p ())
- {
- return escape (L"post_" + n);
- }
- else
- {
- NameSet set;
-
- // Collect all base's post_*. In some mutual inclusion cases it
- // is possible that our base won't have the post name assigned
- // yet. In this situation will will have to figure it out
- // ourselves (we can do it since we use the "raw" type name).
- //
- SemanticGraph::Type* b (&c->inherits ().base ());
-
- while (true)
- {
- if (b->context ().count ("post"))
- set.insert (b->context ().get<String> ("post"));
- else
- set.insert (find_post_name (*b));
-
- Complex* cb (dynamic_cast<Complex*> (b));
-
- if (cb != 0 && cb->inherits_p ())
- {
- b = &cb->inherits ().base ();
- continue;
- }
-
- break;
- }
-
- String base_name (escape (L"post_" + n));
- String post (base_name);
-
- for (size_t i (1); set.find (post) != set.end (); ++i)
- {
- std::wostringstream os;
- os << i;
- post = base_name + os.str ();
- }
-
- return post;
- }
- }
-
- private:
- NameSet& set_;
- };
-
-
- struct Namespace: Traversal::Namespace, Context
- {
- Namespace (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& ns)
- {
- NameSet& type_set (global_type_names[ns.name ()]);
-
- GlobalType type (*this, type_set);
- Traversal::Names names (type);
-
- Traversal::Namespace::names (ns, names);
- }
- };
-
-
- struct FundType: Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities,
-
- Context
- {
- FundType (Context& c)
- : Context (c)
- {
- }
-
- // anyType & anySimpleType.
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- t.context ().set ("name", make_skel_name ("any_type"));
- t.context ().set ("impl", make_impl_name ("any_type"));
- t.context ().set ("post", String ("post_any_type"));
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- t.context ().set ("name", make_skel_name ("any_simple_type"));
- t.context ().set ("impl", make_impl_name ("any_simple_type"));
- t.context ().set ("post", String ("post_any_simple_type"));
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- t.context ().set ("name", make_skel_name ("boolean"));
- t.context ().set ("impl", make_impl_name ("boolean"));
- t.context ().set ("post", String ("post_boolean"));
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- t.context ().set ("name", make_skel_name ("byte"));
- t.context ().set ("impl", make_impl_name ("byte"));
- t.context ().set ("post", String ("post_byte"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- t.context ().set ("name", make_skel_name ("unsigned_byte"));
- t.context ().set ("impl", make_impl_name ("unsigned_byte"));
- t.context ().set ("post", String ("post_unsigned_byte"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- t.context ().set ("name", make_skel_name ("short"));
- t.context ().set ("impl", make_impl_name ("short"));
- t.context ().set ("post", String ("post_short"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- t.context ().set ("name", make_skel_name ("unsigned_short"));
- t.context ().set ("impl", make_impl_name ("unsigned_short"));
- t.context ().set ("post", String ("post_unsigned_short"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- t.context ().set ("name", make_skel_name ("int"));
- t.context ().set ("impl", make_impl_name ("int"));
- t.context ().set ("post", String ("post_int"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- t.context ().set ("name", make_skel_name ("unsigned_int"));
- t.context ().set ("impl", make_impl_name ("unsigned_int"));
- t.context ().set ("post", String ("post_unsigned_int"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- t.context ().set ("name", make_skel_name ("long"));
- t.context ().set ("impl", make_impl_name ("long"));
- t.context ().set ("post", String ("post_long"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- t.context ().set ("name", make_skel_name ("unsigned_long"));
- t.context ().set ("impl", make_impl_name ("unsigned_long"));
- t.context ().set ("post", String ("post_unsigned_long"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- t.context ().set ("name", make_skel_name ("integer"));
- t.context ().set ("impl", make_impl_name ("integer"));
- t.context ().set ("post", String ("post_integer"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- t.context ().set ("name", make_skel_name ("non_positive_integer"));
- t.context ().set ("impl", make_impl_name ("non_positive_integer"));
- t.context ().set ("post", String ("post_non_positive_integer"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- t.context ().set ("name", make_skel_name ("non_negative_integer"));
- t.context ().set ("impl", make_impl_name ("non_negative_integer"));
- t.context ().set ("post", String ("post_non_negative_integer"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- t.context ().set ("name", make_skel_name ("positive_integer"));
- t.context ().set ("impl", make_impl_name ("positive_integer"));
- t.context ().set ("post", String ("post_positive_integer"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- t.context ().set ("name", make_skel_name ("negative_integer"));
- t.context ().set ("impl", make_impl_name ("negative_integer"));
- t.context ().set ("post", String ("post_negative_integer"));
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- t.context ().set ("name", make_skel_name ("float"));
- t.context ().set ("impl", make_impl_name ("float"));
- t.context ().set ("post", String ("post_float"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- t.context ().set ("name", make_skel_name ("double"));
- t.context ().set ("impl", make_impl_name ("double"));
- t.context ().set ("post", String ("post_double"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- t.context ().set ("name", make_skel_name ("decimal"));
- t.context ().set ("impl", make_impl_name ("decimal"));
- t.context ().set ("post", String ("post_decimal"));
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- t.context ().set ("name", make_skel_name ("string"));
- t.context ().set ("impl", make_impl_name ("string"));
- t.context ().set ("post", String ("post_string"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- t.context ().set ("name", make_skel_name ("normalized_string"));
- t.context ().set ("impl", make_impl_name ("normalized_string"));
- t.context ().set ("post", String ("post_normalized_string"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- t.context ().set ("name", make_skel_name ("token"));
- t.context ().set ("impl", make_impl_name ("token"));
- t.context ().set ("post", String ("post_token"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- t.context ().set ("name", make_skel_name ("nmtoken"));
- t.context ().set ("impl", make_impl_name ("nmtoken"));
- t.context ().set ("post", String ("post_nmtoken"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- t.context ().set ("name", make_skel_name ("nmtokens"));
- t.context ().set ("impl", make_impl_name ("nmtokens"));
- t.context ().set ("post", String ("post_nmtokens"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- t.context ().set ("name", make_skel_name ("name"));
- t.context ().set ("impl", make_impl_name ("name"));
- t.context ().set ("post", String ("post_name"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- t.context ().set ("name", make_skel_name ("ncname"));
- t.context ().set ("impl", make_impl_name ("ncname"));
- t.context ().set ("post", String ("post_ncname"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- t.context ().set ("name", make_skel_name ("language"));
- t.context ().set ("impl", make_impl_name ("language"));
- t.context ().set ("post", String ("post_language"));
- }
-
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- t.context ().set ("name", make_skel_name ("qname"));
- t.context ().set ("impl", make_impl_name ("qname"));
- t.context ().set ("post", String ("post_qname"));
- }
-
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- t.context ().set ("name", make_skel_name ("id"));
- t.context ().set ("impl", make_impl_name ("id"));
- t.context ().set ("post", String ("post_id"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- t.context ().set ("name", make_skel_name ("idref"));
- t.context ().set ("impl", make_impl_name ("idref"));
- t.context ().set ("post", String ("post_idref"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- t.context ().set ("name", make_skel_name ("idrefs"));
- t.context ().set ("impl", make_impl_name ("idrefs"));
- t.context ().set ("post", String ("post_idrefs"));
- }
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- t.context ().set ("name", make_skel_name ("uri"));
- t.context ().set ("impl", make_impl_name ("uri"));
- t.context ().set ("post", String ("post_uri"));
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- t.context ().set ("name", make_skel_name ("base64_binary"));
- t.context ().set ("impl", make_impl_name ("base64_binary"));
- t.context ().set ("post", String ("post_base64_binary"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- t.context ().set ("name", make_skel_name ("hex_binary"));
- t.context ().set ("impl", make_impl_name ("hex_binary"));
- t.context ().set ("post", String ("post_hex_binary"));
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- t.context ().set ("name", make_skel_name ("date"));
- t.context ().set ("impl", make_impl_name ("date"));
- t.context ().set ("post", String ("post_date"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- t.context ().set ("name", make_skel_name ("date_time"));
- t.context ().set ("impl", make_impl_name ("date_time"));
- t.context ().set ("post", String ("post_date_time"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- t.context ().set ("name", make_skel_name ("duration"));
- t.context ().set ("impl", make_impl_name ("duration"));
- t.context ().set ("post", String ("post_duration"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- t.context ().set ("name", make_skel_name ("gday"));
- t.context ().set ("impl", make_impl_name ("gday"));
- t.context ().set ("post", String ("post_gday"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- t.context ().set ("name", make_skel_name ("gmonth"));
- t.context ().set ("impl", make_impl_name ("gmonth"));
- t.context ().set ("post", String ("post_gmonth"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- t.context ().set ("name", make_skel_name ("gmonth_day"));
- t.context ().set ("impl", make_impl_name ("gmonth_day"));
- t.context ().set ("post", String ("post_gmonth_day"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- t.context ().set ("name", make_skel_name ("gyear"));
- t.context ().set ("impl", make_impl_name ("gyear"));
- t.context ().set ("post", String ("post_gyear"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- t.context ().set ("name", make_skel_name ("gyear_month"));
- t.context ().set ("impl", make_impl_name ("gyear_month"));
- t.context ().set ("post", String ("post_gyear_month"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- t.context ().set ("name", make_skel_name ("time"));
- t.context ().set ("impl", make_impl_name ("time"));
- t.context ().set ("post", String ("post_time"));
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity& t)
- {
- t.context ().set ("name", make_skel_name ("entity"));
- t.context ().set ("impl", make_impl_name ("entity"));
- t.context ().set ("post", String ("post_entity"));
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities& t)
- {
- t.context ().set ("name", make_skel_name ("entities"));
- t.context ().set ("impl", make_impl_name ("entities"));
- t.context ().set ("post", String ("post_entities"));
- }
-
- private:
- String
- make_skel_name (String const& base)
- {
- return escape (base + skel_suffix);
- }
-
- String
- make_impl_name (String const& base)
- {
- return escape (base + impl_suffix);
- }
- };
-
- // Go into sourced/included/imported schemas while making sure
- // we don't process the same stuff more than once.
- //
- struct Uses: Traversal::Sources,
- Traversal::Includes,
- Traversal::Imports
- {
- virtual void
- traverse (SemanticGraph::Sources& sr)
- {
- SemanticGraph::Schema& s (sr.schema ());
-
- if (!s.context ().count ("cxx-parser-name-processor-seen"))
- {
- s.context ().set ("cxx-parser-name-processor-seen", true);
- Traversal::Sources::traverse (sr);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Includes& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count ("cxx-parser-name-processor-seen"))
- {
- s.context ().set ("cxx-parser-name-processor-seen", true);
- Traversal::Includes::traverse (i);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Imports& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count ("cxx-parser-name-processor-seen"))
- {
- s.context ().set ("cxx-parser-name-processor-seen", true);
- Traversal::Imports::traverse (i);
- }
- }
- };
-
- // Go into implied schemas while making sure we don't process
- // the same stuff more than once.
- //
- struct Implies: Traversal::Implies
- {
- virtual void
- traverse (SemanticGraph::Implies& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count ("cxx-parser-name-processor-seen"))
- {
- s.context ().set ("cxx-parser-name-processor-seen", true);
- Traversal::Implies::traverse (i);
- }
- }
- };
-
- void
- process_impl (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& file,
- StringLiteralMap const& map)
- {
- Context ctx (ops, tu, file, &map);
-
- if (tu.names_begin ()->named ().name () ==
- L"http://www.w3.org/2001/XMLSchema")
- {
- // XML Schema namespace.
- //
- Traversal::Schema schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundType fund_type (ctx);
-
- schema >> schema_names >> ns >> ns_names >> fund_type;
-
- schema.dispatch (tu);
- }
- else
- {
-
- // Pass one - assign names to fundamental types.
- //
- {
- Traversal::Schema schema;
- Implies implies;
- Traversal::Schema xs_schema;
-
- schema >> implies >> xs_schema;
-
- Traversal::Names xs_schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundType fund_type (ctx);
-
- xs_schema >> xs_schema_names >> ns >> ns_names >> fund_type;
-
- schema.dispatch (tu);
- }
-
- // Pass two - assign names to global types. This pass cannot
- // be combined with pass three because of possible recursive
- // schema inclusions. Also note that we check first if this
- // schema has already been processed which may happen in the
- // file-per-type compilation mode.
- //
- if (!tu.context ().count ("cxx-parser-name-processor-seen"))
- {
- Traversal::Schema schema;
- Uses uses;
-
- schema >> uses >> schema;
-
- Traversal::Names schema_names;
- Namespace ns (ctx);
-
- schema >> schema_names >> ns;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set ("cxx-parser-name-processor-seen", true);
-
- schema.dispatch (tu);
- }
-
- // Pass three - assign names inside complex types. Here we don't
- // need to go into included/imported schemas.
- //
- {
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
-
- schema >> schema_names >> ns >> ns_names;
-
- Complex complex (ctx);
-
- ns_names >> complex;
-
- schema.dispatch (tu);
- }
- }
- }
- }
-
- void NameProcessor::
- process (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& file,
- StringLiteralMap const& map)
- {
- process_impl (ops, tu, file, map);
- }
- }
-}
diff --git a/xsd/cxx/parser/name-processor.hxx b/xsd/cxx/parser/name-processor.hxx
deleted file mode 100644
index f7f988f..0000000
--- a/xsd/cxx/parser/name-processor.hxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// file : xsd/cxx/parser/name-processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_NAME_PROCESSOR_HXX
-#define CXX_PARSER_NAME_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-
-#include <types.hxx>
-
-#include <cxx/elements.hxx>
-#include <cxx/parser/options.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- class NameProcessor
- {
- public:
- void
- process (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file,
- StringLiteralMap const& map);
- };
- }
-}
-
-#endif // CXX_PARSER_NAME_PROCESSOR_HXX
diff --git a/xsd/cxx/parser/options.cli b/xsd/cxx/parser/options.cli
deleted file mode 100644
index 11312ed..0000000
--- a/xsd/cxx/parser/options.cli
+++ /dev/null
@@ -1,147 +0,0 @@
-// file : xsd/cxx/parser/options.cli
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include <cstddef>; // std::size_t
-
-include <types.hxx>; // NarrowString, NarrowStrings
-
-include <cxx/options.cli>;
-
-namespace CXX
-{
- namespace Parser
- {
- class options: CXX::options
- {
- NarrowStrings --type-map
- {
- "<mapfile>",
- "Read XML Schema to C++ type mapping information from <mapfile>.
- Repeat this option to specify several type maps. Type maps are
- considered in order of appearance and the first match is used. By
- default all user-defined types are mapped to \cb{void}. See the
- TYPE MAP section below for more information."
- };
-
- NarrowString --xml-parser = "xerces"
- {
- "<parser>",
- "Use <parser> as the underlying XML parser. Valid values are
- \cb{xerces} for Xerces-C++ (default) and \cb{expat} for Expat."
- };
-
- // Features.
- //
- bool --generate-validation
- {
- "Generate validation code. The validation code (\"perfect parser\")
- ensures that instance documents conform to the schema. Validation
- code is generated by default when the selected underlying XML parser
- is non-validating (\cb{expat})."
- };
-
- bool --suppress-validation
- {
- "Suppress the generation of validation code. Validation is suppressed
- by default when the selected underlying XML parser is validating
- (\cb{xerces})."
- };
-
- bool --generate-polymorphic
- {
- "Generate polymorphism-aware code. Specify this option if you use
- substitution groups or \cb{xsi:type}."
- };
-
- bool --generate-noop-impl
- {
- "Generate a sample parser implementation that does nothing (no
- operation). The sample implementation can then be filled with
- the application-specific code. For an input file in the form
- \cb{name.xsd} this option triggers the generation of two
- additional C++ files in the form: \cb{name-pimpl.hxx} (parser
- implementation header file) and \cb{name-pimpl.cxx} (parser
- implementation source file)."
- };
-
- bool --generate-print-impl
- {
- "Generate a sample parser implementation that prints the XML data
- to \c{STDOUT}. For an input file in the form \cb{name.xsd} this
- option triggers the generation of two additional C++ files in the
- form: \cb{name-pimpl.hxx} (parser implementation header file) and
- \cb{name-pimpl.cxx} (parser implementation source file)."
- };
-
- bool --generate-test-driver
- {
- "Generate a test driver for the sample parser implementation. For an
- input file in the form \cb{name.xsd} this option triggers the
- generation of an additional C++ file in the form
- \cb{name-driver.cxx}."
- };
-
- bool --force-overwrite
- {
- "Force overwriting of the existing implementation and test driver
- files. Use this option only if you do not mind loosing the changes
- you have made in the sample implementation or test driver files."
- };
-
- // Root element.
- //
- bool --root-element-first
- {
- "Indicate that the first global element is the document root. This
- information is used to generate the test driver for the sample
- implementation."
- };
-
- bool --root-element-last
- {
- "Indicate that the last global element is the document root. This
- information is used to generate the test driver for the sample
- implementation."
- };
-
- NarrowString --root-element
- {
- "<element>",
- "Indicate that <element> is the document root. This information is
- used to generate the test driver for the sample implementation."
- };
-
- // Suffixes.
- //
- NarrowString --skel-type-suffix = "_pskel"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{_pskel} to
- construct the names of the generated parser skeletons."
- };
-
- NarrowString --skel-file-suffix = "-pskel"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{-pskel} to
- construct the names of the generated parser skeleton files."
- };
-
- NarrowString --impl-type-suffix = "_pimpl"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{_pimpl} to
- construct the names of the parser implementations for the built-in
- XML Schema types as well as sample parser implementations."
- };
-
- NarrowString --impl-file-suffix = "-pimpl"
- {
- "<suffix>",
- "Use the provided <suffix> instead of the default \cb{-pimpl} to
- construct the names of the generated sample parser implementation
- files."
- };
- };
- }
-}
diff --git a/xsd/cxx/parser/parser-forward.cxx b/xsd/cxx/parser/parser-forward.cxx
deleted file mode 100644
index 09a055b..0000000
--- a/xsd/cxx/parser/parser-forward.cxx
+++ /dev/null
@@ -1,110 +0,0 @@
-// file : xsd/cxx/parser/parser-forward.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/parser-forward.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- os << "class " << ename (e) << ";";
- }
- };
-
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- os << "class " << ename (l) << ";";
- }
- };
-
- //
- //
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- os << "class " << ename (u) << ";";
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- os << "class " << ename (c) << ";";
- }
- };
- }
-
- void
- generate_parser_forward (Context& ctx)
- {
- ctx.os << "// Forward declarations" << endl
- << "//" << endl;
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
-
- ctx.os << endl;
- }
- }
-}
diff --git a/xsd/cxx/parser/parser-forward.hxx b/xsd/cxx/parser/parser-forward.hxx
deleted file mode 100644
index 7796532..0000000
--- a/xsd/cxx/parser/parser-forward.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/parser-forward.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_PARSER_FORWARD_HXX
-#define CXX_PARSER_PARSER_FORWARD_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_parser_forward (Context&);
- }
-}
-
-#endif // CXX_PARSER_PARSER_FORWARD_HXX
diff --git a/xsd/cxx/parser/parser-header.cxx b/xsd/cxx/parser/parser-header.cxx
deleted file mode 100644
index ad7767a..0000000
--- a/xsd/cxx/parser/parser-header.cxx
+++ /dev/null
@@ -1,1440 +0,0 @@
-// file : xsd/cxx/parser/parser-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-
-#include <cxx/parser/parser-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String const& name (ename (e));
- SemanticGraph::Type& base (e.inherits ().base ());
-
- os << "class " << type_exp << name << ": public virtual " <<
- fq_name (base)
- << "{"
- << "public:" << endl
- << "// Parser callbacks. Override them in your " <<
- "implementation." << endl
- << "//" << endl;
-
- os << "// virtual void" << endl
- << "// pre ();" << endl
- << endl;
-
- String const& ret (ret_type (e));
-
- bool same (ret == ret_type (base));
-
- os << "virtual " << ret << endl
- << post_name (e) << " ()" <<
- (same || ret == L"void" ? ";" : " = 0;");
-
- if (polymorphic)
- {
- os << endl
- << "public:" << endl
- << "static const " << char_type << "*" << endl
- << "_static_type ();"
- << endl
- << "virtual const " << char_type << "*" << endl
- << "_dynamic_type () const;";
- }
-
- os << "};";
- }
- };
-
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String const& name (ename (l));
- SemanticGraph::Type& t (l.argumented ().type ());
-
- String item (unclash (name, "item"));
-
- os << "class " << type_exp << name << ": public " << list_base
- << "{"
- << "public:" << endl
- << "// Parser callbacks. Override them in your " <<
- "implementation." << endl
- << "//" << endl;
-
- // pre
- //
- os << "// virtual void" << endl
- << "// pre ();" << endl
- << endl;
-
- // item
- //
- String const& arg (arg_type (t));
-
- os << "virtual void" << endl
- << item;
-
- if (arg == L"void")
- os << " ();";
- else
- os << " (" << arg << ");";
-
- os << endl;
-
- // post
- //
- String const& ret (ret_type (l));
-
- os << "virtual " << ret << endl
- << post_name (l) << " ()" << (ret == L"void" ? ";" : " = 0;")
- << endl;
-
- //
- //
- os << "// Parser construction API." << endl
- << "//" << endl;
-
- // item_parser
- //
- os << "void" << endl
- << unclash (name, "item_parser") << " (" << fq_name (t) << "&);"
- << endl;
-
- // parsers
- //
- os << "void" << endl
- << "parsers (" << fq_name (t) << "& /* item */);"
- << endl;
-
- // c-tor
- //
- os << "// Constructor." << endl
- << "//" << endl
- << name << " ();"
- << endl;
-
-
- if (polymorphic)
- {
- os << "public:" << endl
- << "static const " << char_type << "*" << endl
- << "_static_type ();"
- << endl
- << "virtual const " << char_type << "*" << endl
- << "_dynamic_type () const;"
- << endl;
- }
-
- //
- //
- os << "// Implementation." << endl
- << "//" << endl
- << "protected:" << endl;
-
- os << "virtual void" << endl
- << "_xsd_parse_item (const " << string_type << "&);"
- << endl;
-
- os << "protected:" << endl
- << fq_name (t) << "* _xsd_" << item << "_;"
- << "};";
- }
- };
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String const& name (ename (u));
-
- os << "class " << type_exp << name << ": public " << simple_base
- << "{"
- << "public:" << endl
- << "// Parser callbacks. Override them in your " <<
- "implementation." << endl
- << "//" << endl;
-
- os << "// virtual void" << endl
- << "// pre ();" << endl
- << "//" << endl
- << "// virtual void" << endl
- << "// _characters (const " << string_type << "&);" << endl
- << endl;
-
- String const& ret (ret_type (u));
-
- os << "virtual " << ret << endl
- << post_name (u) << " ()" << (ret == L"void" ? ";" : " = 0;");
-
- if (polymorphic)
- {
- os << endl
- << "public:" << endl
- << "static const " << char_type << "*" << endl
- << "_static_type ();"
- << endl
- << "virtual const " << char_type << "*" << endl
- << "_dynamic_type () const;";
- }
-
- os << "};";
- }
- };
-
-
- //
- //
- struct ParserCallback: Traversal::Member, Context
- {
- ParserCallback (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m)) return;
-
- String const& arg (arg_type (m.type ()));
-
- os << "virtual void" << endl
- << ename (m);
-
- if (arg == L"void")
- os << " ();";
- else
- os << " (" << arg << ");";
-
- os << endl;
- }
- };
-
-
- //
- //
- struct ParserModifier: Traversal::Member, Context
- {
- ParserModifier (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- os << "void" << endl
- << eparser (m) << " (" << fq_name (m.type ()) << "&);"
- << endl;
-
- if (polymorphic &&
- m.is_a<SemanticGraph::Element> () &&
- !anonymous (m.type ()))
- {
- os << "void" << endl
- << eparser (m) << " (const " << parser_map << "&);"
- << endl;
- }
- }
- };
-
- //
- //
- struct ParserMember: Traversal::Member, Context
- {
- ParserMember (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String type (fq_name (m.type ()));
-
- os << type << "* " << emember (m) << ";";
-
- if (polymorphic &&
- m.is_a<SemanticGraph::Element> () &&
- !anonymous (m.type ()))
- {
- os << "const " << parser_map << "* " << emember_map (m) << ";"
- << endl;
- }
- }
- };
-
- //
- //
- struct Particle: Traversal::All,
- Traversal::Choice,
- Traversal::Sequence,
- Context
- {
- Particle (Context& c)
- : Context (c)
- {
- *this >> contains_particle_ >> *this;
- }
-
-
- virtual void
- traverse (SemanticGraph::All& a)
- {
- if (!a.context().count ("comp-number"))
- return;
-
- size_t state_count (a.context().get<size_t> ("state-count"));
-
- os << "void" << endl
- << "all_0 (unsigned long& state," << endl
- << "unsigned char* count," << endl
- << "const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t," << endl
- << "bool start);"
- << endl
- << "unsigned char v_all_first_[" << state_count << "UL];"
- << "::xsd::cxx::parser::validating::all_stack v_all_count_;"
- << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Choice& c)
- {
- if (!c.context().count ("comp-number"))
- return;
-
- size_t n (c.context ().get<size_t> ("comp-number"));
-
- os << "void" << endl
- << "choice_" << n << " (unsigned long& state," << endl
- << "unsigned long& count," << endl
- << "const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t," << endl
- << "bool start);"
- << endl;
-
- Traversal::Choice::traverse (c);
- }
-
- virtual void
- traverse (SemanticGraph::Sequence& s)
- {
- if (!s.context().count ("comp-number"))
- return;
-
- size_t n (s.context ().get<size_t> ("comp-number"));
-
- os << "void" << endl
- << "sequence_" << n << " (unsigned long& state," << endl
- << "unsigned long& count," << endl
- << "const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t," << endl
- << "bool start);"
- << endl;
-
- Traversal::Sequence::traverse (s);
- }
-
- private:
- Traversal::ContainsParticle contains_particle_;
- };
-
-
- //
- //
- struct AttributeValidationState: Traversal::Attribute, Context
- {
- AttributeValidationState (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- if (!a.optional_p ())
- {
- os << "bool " << ename (a) << ";";
- }
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- parser_callback_ (c),
- parser_member_ (c),
- parser_modifier_ (c),
- attribute_validation_state_ (c)
- {
- names_parser_callback_ >> parser_callback_;
- names_parser_member_ >> parser_member_;
- names_parser_modifier_ >> parser_modifier_;
- names_attribute_validation_state_ >> attribute_validation_state_;
- }
-
- virtual void
- traverse (Type& c)
- {
- String const& name (ename (c));
-
- // In case of an inheritance-by-restriction, we don't need to
- // generate parser callbacks, etc. since they are the same as in
- // the base. We only need the parsing/validation code.
- //
- bool restriction (restriction_p (c));
-
- bool he (has<Traversal::Element> (c));
- bool ha (has<Traversal::Attribute> (c));
-
- bool hae (has_particle<Traversal::Any> (c));
- bool haa (has<Traversal::AnyAttribute> (c));
-
- bool hra (false); // Has required attribute.
- if (ha)
- {
- RequiredAttributeTest test (hra);
- Traversal::Names names_test (test);
- names (c, names_test);
- }
-
-
- //
- //
- os << "class " << type_exp << name << ": public ";
-
- if (c.inherits_p ())
- os << "virtual " << fq_name (c.inherits ().base ());
- else
- os << complex_base;
-
- os << "{"
- << "public:" << endl
- << "// Parser callbacks. Override them in your " <<
- "implementation." << endl
- << "//" << endl;
-
- os << "// virtual void" << endl
- << "// pre ();" << endl
- << endl;
-
-
- if (!restriction && (ha || he))
- {
- names (c, names_parser_callback_);
- }
-
- String const& ret (ret_type (c));
-
- bool same (c.inherits_p () &&
- ret == ret_type (c.inherits ().base ()));
-
- os << "virtual " << ret << endl
- << post_name (c) << " ()" <<
- (same || ret == L"void" ? ";" : " = 0;")
- << endl;
-
- //
- //
- if (!restriction && (he || ha))
- {
- os << "// Parser construction API." << endl
- << "//" << endl;
-
- names (c, names_parser_modifier_);
-
- os << "void" << endl
- << "parsers (";
-
- {
- ParserParamDecl decl (*this, false);
- decl.traverse (c);
- }
-
- os << ");"
- << endl;
- }
-
- // Default c-tor.
- //
- if ((!restriction && (he || ha)) ||
- (validation && (he || hae || hra)))
- {
- os << "// Constructor." << endl
- << "//" << endl
- << name << " ();"
- << endl;
- }
-
- if (polymorphic)
- {
- os << "public:" << endl
- << "static const " << char_type << "*" << endl
- << "_static_type ();"
- << endl
- << "virtual const " << char_type << "*" << endl
- << "_dynamic_type () const;"
- << endl;
- }
-
- // Implementation.
- //
- if (he || ha || (validation && (hae || haa)))
- {
- os << "// Implementation." << endl
- << "//" << endl
- << "protected:" << endl;
- }
-
- // element
- //
- if (he || (validation && hae))
- {
- // _start_element_impl
- //
- os << "virtual bool" << endl
- << "_start_element_impl (const " << string_type << "&," << endl
- << "const " << string_type << "&," << endl
- << "const " << string_type << "*);"
- << endl;
-
- // end_element
- //
- os << "virtual bool" << endl
- << "_end_element_impl (const " << string_type << "&," << endl
- << "const " << string_type << "&);"
- << endl;
- }
-
- // attribute
- //
- if (validation)
- {
- if (ha)
- {
- os << "virtual bool" << endl
- << "_attribute_impl_phase_one (const " << string_type <<
- "&," << endl
- << "const " << string_type << "&," << endl
- << "const " << string_type << "&);" << endl
- << endl;
- }
-
- if (haa)
- {
- os << "virtual bool" << endl
- << "_attribute_impl_phase_two (const " << string_type <<
- "&," << endl
- << "const " << string_type << "&," << endl
- << "const " << string_type << "&);"
- << endl;
- }
- }
- else
- {
- if (ha)
- {
- os << "virtual bool" << endl
- << "_attribute_impl (const " << string_type << "&," << endl
- << "const " << string_type << "&," << endl
- << "const " << string_type << "&);"
- << endl;
- }
- }
-
- // characters
- //
- if (validation && c.mixed_p ())
- {
- os << "virtual bool" << endl
- << "_characters_impl (const " << string_type << "&);"
- << endl;
- }
-
- if (!restriction && (he || ha))
- {
- os << "protected:" << endl;
- names (c, names_parser_member_);
- os << endl;
- }
-
- if (validation && (he || hae))
- {
- size_t depth (c.context ().get<size_t> ("depth"));
-
- os << "protected:" << endl;
-
- os << "struct v_state_descr_"
- << "{"
- << "void (" << fq_name (c) << "::*func) (" << endl
- << "unsigned long&," << endl
- << "unsigned long&," << endl
- << "const " << string_type << "&," << endl
- << "const " << string_type << "&," << endl
- << "const " << string_type << "*," << endl
- << "bool);"
- << "unsigned long state;"
- << "unsigned long count;"
- << "};";
-
- // Allocate one extra slot for the special state.
- //
- os << "struct v_state_"
- << "{"
- << "v_state_descr_ data[" << depth + 1 << "UL];"
- << "unsigned long size;"
- << "};";
-
- os << "v_state_ v_state_first_;"
- << "::xsd::cxx::parser::pod_stack v_state_stack_;"
- << endl;
-
- os << "virtual void" << endl
- << "_pre_e_validate ();"
- << endl;
-
- os << "virtual void" << endl
- << "_post_e_validate ();"
- << endl;
-
- Particle t (*this);
- t.dispatch (c.contains_compositor ().compositor ());
- }
-
- if (validation && hra)
- {
- os << "protected:" << endl;
-
- os << "struct v_state_attr_"
- << "{";
-
- names (c, names_attribute_validation_state_);
-
- os << "};";
-
- os << "v_state_attr_ v_state_attr_first_;"
- << "::xsd::cxx::parser::pod_stack v_state_attr_stack_;"
- << endl;
-
- os << "virtual void" << endl
- << "_pre_a_validate ();"
- << endl;
-
- os << "virtual void" << endl
- << "_post_a_validate ();"
- << endl;
- }
-
- os << "};";
- }
-
- private:
- //
- //
- ParserCallback parser_callback_;
- Traversal::Names names_parser_callback_;
-
- //
- //
- ParserMember parser_member_;
- Traversal::Names names_parser_member_;
-
- //
- //
- ParserModifier parser_modifier_;
- Traversal::Names names_parser_modifier_;
-
- //
- //
- AttributeValidationState attribute_validation_state_;
- Traversal::Names names_attribute_validation_state_;
- };
-
- struct FundType : Context,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities
- {
- FundType (Context& c)
- : Context (c), xs_ns_ (xs_ns_name ())
- {
- impl_ns_ = "::xsd::cxx::parser::";
- impl_ns_ += (validation ? L"validating" : L"non_validating");
-
- if (char_type == L"char")
- string_type_ = L"::std::string";
- else if (char_type == L"wchar_t")
- string_type_ = L"::std::wstring";
- else
- string_type_ = L"::std::basic_string< " + char_type + L" >";
- }
-
- // anyType & anySimpleType.
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- gen_typedef (t, "void", "any_type_pskel", "any_type_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- gen_typedef (t, "void",
- "any_simple_type_pskel", "any_simple_type_pimpl");
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- gen_typedef (t, "bool", "boolean_pskel", "boolean_pimpl");
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- gen_typedef (t, "signed char", "byte_pskel", "byte_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- gen_typedef (t, "unsigned char",
- "unsigned_byte_pskel", "unsigned_byte_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- gen_typedef (t, "short", "short_pskel", "short_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- gen_typedef (t, "unsigned short",
- "unsigned_short_pskel", "unsigned_short_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- gen_typedef (t, "int", "int_pskel", "int_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- gen_typedef (t, "unsigned int",
- "unsigned_int_pskel", "unsigned_int_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- gen_typedef (t, "long long", "long_pskel", "long_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- gen_typedef (t, "unsigned long long",
- "unsigned_long_pskel", "unsigned_long_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- gen_typedef (t, "long long", "integer_pskel", "integer_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- gen_typedef (t, "long long",
- "negative_integer_pskel", "negative_integer_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- gen_typedef (t, "long long",
- "non_positive_integer_pskel",
- "non_positive_integer_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- gen_typedef (t, "unsigned long long",
- "positive_integer_pskel", "positive_integer_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- gen_typedef (t, "unsigned long long",
- "non_negative_integer_pskel",
- "non_negative_integer_pimpl");
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- gen_typedef (t, "float", "float_pskel", "float_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- gen_typedef (t, "double", "double_pskel", "double_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- gen_typedef (t, "double", "decimal_pskel", "decimal_pimpl");
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- gen_typedef (t, string_type_, "string_pskel", "string_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- gen_typedef (t, string_type_,
- "normalized_string_pskel", "normalized_string_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- gen_typedef (t, string_type_, "token_pskel", "token_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- nmtoken_ = gen_typedef (t, string_type_,
- "nmtoken_pskel", "nmtoken_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- // NMTOKENS uses NMTOKEN implementation to parse individual items.
- // As a result, we don't generate NMTOKENS if we didn't generate
- // NMTOKEN. Here we assume NMTOKEN is handled before NMTOKENS.
- //
- if(nmtoken_)
- gen_typedef (t, xs_ns_ + L"::string_sequence",
- "nmtokens_pskel", "nmtokens_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- gen_typedef (t, string_type_, "name_pskel", "name_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- gen_typedef (t, string_type_, "ncname_pskel", "ncname_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- gen_typedef (t, string_type_, "language_pskel", "language_pimpl");
- }
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- gen_typedef (t, xs_ns_ + L"::qname", "qname_pskel", "qname_pimpl");
- }
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- gen_typedef (t, string_type_, "id_pskel", "id_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- idref_ = gen_typedef (t, string_type_, "idref_pskel", "idref_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- // IDREFS uses IDREF implementation to parse individual items.
- // As a result, we don't generate IDREFS if we didn't generate
- // IDREF. Here we assume IDREF is handled before IDREFS.
- //
- if (idref_)
- gen_typedef (t, xs_ns_ + L"::string_sequence",
- "idrefs_pskel", "idrefs_pimpl");
- }
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- gen_typedef (t, string_type_, "uri_pskel", "uri_pimpl");
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- String buffer (auto_ptr + L"< " + xs_ns_ + L"::buffer >");
- gen_typedef (t, buffer,
- "base64_binary_pskel", "base64_binary_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- String buffer (auto_ptr + L"< " + xs_ns_ + L"::buffer >");
- gen_typedef (t, buffer, "hex_binary_pskel", "hex_binary_pimpl");
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- gen_typedef (t, xs_ns_ + L"::date", "date_pskel", "date_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- gen_typedef (t, xs_ns_ + L"::date_time",
- "date_time_pskel", "date_time_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- gen_typedef (t, xs_ns_ + L"::duration",
- "duration_pskel", "duration_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- gen_typedef (t, xs_ns_ + L"::gday", "gday_pskel", "gday_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- gen_typedef (t, xs_ns_ + L"::gmonth",
- "gmonth_pskel", "gmonth_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- gen_typedef (t, xs_ns_ + L"::gmonth_day",
- "gmonth_day_pskel", "gmonth_day_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- gen_typedef (t, xs_ns_ + L"::gyear", "gyear_pskel", "gyear_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- gen_typedef (t, xs_ns_ + L"::gyear_month",
- "gyear_month_pskel", "gyear_month_pimpl");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- gen_typedef (t, xs_ns_ + L"::time", "time_pskel", "time_pimpl");
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity&)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities&)
- {
- }
-
- private:
- bool
- gen_typedef (SemanticGraph::Type& t,
- String const& type,
- String const& pskel,
- String const& pimpl)
- {
- if (ret_type (t) == type)
- {
- os << "typedef " << impl_ns_ << "::" << pskel << "< " <<
- char_type << " > " << ename (t) << ";";
-
- String const& pimpl_name (t.context ().get<String> ("impl"));
-
- os << "typedef " << impl_ns_ << "::" << pimpl << "< " <<
- char_type << " > " << pimpl_name << ";"
- << endl;
-
- return true;
- }
-
- return false;
- }
-
- String xs_ns_;
- String impl_ns_;
- String string_type_;
-
- bool idref_;
- bool nmtoken_;
- };
-
- struct FundNamespace: Namespace, Context
- {
- FundNamespace (Context& c)
- : Namespace (c), Context (c)
- {
- }
-
- void
- traverse (Type& ns)
- {
- pre (ns);
-
- String impl ("::xsd::cxx::parser::");
- impl += (validation ? L"validating" : L"non_validating");
-
- String const c (char_type);
-
- os << "// Built-in XML Schema types mapping." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::string_sequence< " << c <<
- " > string_sequence;"
- << "typedef ::xsd::cxx::parser::qname< " << c << " > qname;"
- << "typedef ::xsd::cxx::parser::buffer buffer;"
- << "typedef ::xsd::cxx::parser::time_zone time_zone;"
- << "typedef ::xsd::cxx::parser::gday gday;"
- << "typedef ::xsd::cxx::parser::gmonth gmonth;"
- << "typedef ::xsd::cxx::parser::gyear gyear;"
- << "typedef ::xsd::cxx::parser::gmonth_day gmonth_day;"
- << "typedef ::xsd::cxx::parser::gyear_month gyear_month;"
- << "typedef ::xsd::cxx::parser::date date;"
- << "typedef ::xsd::cxx::parser::time time;"
- << "typedef ::xsd::cxx::parser::date_time date_time;"
- << "typedef ::xsd::cxx::parser::duration duration;"
- << endl;
-
- os << "// Base parser skeletons." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::parser_base< " << c <<
- " > parser_base;"
- << "typedef " << impl << "::empty_content< " << c <<
- " > empty_content;"
- << "typedef " << impl << "::simple_content< " << c <<
- " > simple_content;"
- << "typedef " << impl << "::complex_content< " << c <<
- " > complex_content;"
- << "typedef " << impl << "::list_base< " << c << " > list_base;"
- << endl;
-
- if (polymorphic)
- {
- os << "// Parser map interface and default implementation." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::parser_map< " << c <<
- " > parser_map;"
- << "typedef ::xsd::cxx::parser::parser_map_impl< " << c <<
- " > parser_map_impl;"
- << endl;
- }
-
- os << "// Parser skeletons and implementations for the XML Schema" << endl
- << "// built-in types." << endl
- << "//" << endl;
-
- names (ns);
-
- os << "// Exceptions. See libxsd/xsd/cxx/parser/exceptions.hxx " <<
- "for details." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::exception< " <<
- char_type << " > exception;"
- << endl
- << "// Parsing diagnostics." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::severity severity;"
- << "typedef ::xsd::cxx::parser::error< " << c << " > error;"
- << "typedef ::xsd::cxx::parser::diagnostics< " << c <<
- " > diagnostics;"
- << "typedef ::xsd::cxx::parser::parsing< " << c << " > parsing;"
- << endl;
-
- os << "// Error handler. See " <<
- "libxsd/xsd/cxx/xml/error-handler.hxx for details." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::xml::error_handler< " << c <<
- " > error_handler;"
- << endl;
-
- os << "// Read-only string." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::ro_string< " << c << " > ro_string;"
- << endl;
-
- if (xml_parser == L"xerces")
- {
- os << "// Parsing flags. See " <<
- "libxsd/xsd/cxx/parser/xerces/elements.hxx" << endl
- << "// for details." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::xerces::flags flags;"
- << endl;
-
- os << "// Parsing properties. See " <<
- "libxsd/xsd/cxx/parser/xerces/elements.hxx" << endl
- << "// for details." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::xerces::properties< " << c <<
- " > properties;"
- << endl;
-
- os << "// Document type. See " <<
- "libxsd/xsd/cxx/parser/xerces/elements.hxx" << endl
- << "// for details." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::xerces::document< " << c <<
- " > document;"
- << endl;
-
- }
- else if (xml_parser == L"expat")
- {
- os << "// Document type. See " <<
- "libxsd/xsd/cxx/parser/expat/elements.hxx" << endl
- << "// for details." << endl
- << "//" << endl
- << "typedef ::xsd::cxx::parser::expat::document< " << c <<
- " > document;"
- << endl;
- }
-
- post (ns);
- }
- };
- }
-
- void
- generate_parser_header (Context& ctx, bool generate_xml_schema)
- {
- String c (ctx.char_type);
-
- //
- //
- if (c == L"char")
- {
- ctx.os << "#ifndef XSD_USE_CHAR" << endl
- << "#define XSD_USE_CHAR" << endl
- << "#endif" << endl
- << endl;
-
- ctx.os << "#ifndef XSD_CXX_PARSER_USE_CHAR" << endl
- << "#define XSD_CXX_PARSER_USE_CHAR" << endl
- << "#endif" << endl
- << endl;
- }
- else if (c == L"wchar_t")
- {
- ctx.os << "#ifndef XSD_USE_WCHAR" << endl
- << "#define XSD_USE_WCHAR" << endl
- << "#endif" << endl
- << endl;
-
- ctx.os << "#ifndef XSD_CXX_PARSER_USE_WCHAR" << endl
- << "#define XSD_CXX_PARSER_USE_WCHAR" << endl
- << "#endif" << endl
- << endl;
- }
-
- //
- //
- NarrowString extern_xml_schema;
-
- if (!generate_xml_schema)
- extern_xml_schema = ctx.options.extern_xml_schema ();
-
- if (extern_xml_schema)
- {
- String name (ctx.hxx_expr->replace (extern_xml_schema));
-
- ctx.os << "#include " << ctx.process_include_path (name) << endl
- << endl;
-
- // Generate includes that came from the type map.
- //
- if (ctx.schema_root.context ().count ("includes"))
- {
- typedef set<String> Includes;
-
- Includes const& is (
- ctx.schema_root.context ().get<Includes> ("includes"));
-
- for (Includes::const_reverse_iterator i (is.rbegin ());
- i != is.rend (); ++i)
- {
- ctx.os << "#include " << *i << endl;
- }
-
- ctx.os << endl;
- }
- }
- else
- {
- if (ctx.char_type == L"char" &&
- ctx.xml_parser == L"xerces" &&
- ctx.char_encoding != L"custom")
- {
- ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding << ".hxx>" << endl;
- }
-
- ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl
- << "#include <xsd/cxx/parser/exceptions.hxx>" << endl
- << "#include <xsd/cxx/parser/elements.hxx>" << endl
- << "#include <xsd/cxx/parser/xml-schema.hxx>" << endl;
-
- if (ctx.polymorphic)
- ctx.os << "#include <xsd/cxx/parser/map.hxx>" << endl;
-
- if (ctx.validation)
- ctx.os << "#include <xsd/cxx/parser/validating/parser.hxx>" << endl
- << "#include <xsd/cxx/parser/validating/exceptions.hxx>" << endl
- << "#include <xsd/cxx/parser/validating/xml-schema-pskel.hxx>" << endl
- << "#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>" << endl;
- else
- ctx.os << "#include <xsd/cxx/parser/non-validating/parser.hxx>" << endl
- << "#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>" << endl
- << "#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>" << endl;
-
- ctx.os << "#include <xsd/cxx/parser/" << ctx.xml_parser <<
- "/elements.hxx>" << endl
- << endl;
-
- // Generate includes that came from the type map.
- //
- if (ctx.schema_root.context ().count ("includes"))
- {
- typedef set<String> Includes;
-
- Includes const& is (
- ctx.schema_root.context ().get<Includes> ("includes"));
-
- for (Includes::const_reverse_iterator i (is.rbegin ());
- i != is.rend (); ++i)
- {
- ctx.os << "#include " << *i << endl;
- }
-
- ctx.os << endl;
- }
-
- // Generate fundamental types.
- //
- if (generate_xml_schema)
- {
- Traversal::Schema schema;
- Traversal::Names names;
- FundNamespace ns (ctx);
-
- schema >> names >> ns;
-
- Traversal::Names ns_names;
- FundType type (ctx);
-
- ns >> ns_names >> type;
-
- schema.dispatch (ctx.schema_root);
- }
- else
- {
- Traversal::Schema schema, xsd;
- Traversal::Implies implies;
- Traversal::Names names;
- FundNamespace ns (ctx);
-
- schema >> implies >> xsd >> names >> ns;
-
- Traversal::Names ns_names;
- FundType type (ctx);
-
- ns >> ns_names >> type;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-
- // Generate user type mapping.
- //
- if (!generate_xml_schema)
- {
- Traversal::Schema schema;
-
- Sources sources;
- Includes includes (ctx, Includes::header);
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> includes;
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
- }
-}
diff --git a/xsd/cxx/parser/parser-header.hxx b/xsd/cxx/parser/parser-header.hxx
deleted file mode 100644
index 2656fff..0000000
--- a/xsd/cxx/parser/parser-header.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/parser-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_PARSER_HEADER_HXX
-#define CXX_PARSER_PARSER_HEADER_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_parser_header (Context&, bool generate_xml_schema);
- }
-}
-
-#endif // CXX_PARSER_PARSER_HEADER_HXX
diff --git a/xsd/cxx/parser/parser-inline.cxx b/xsd/cxx/parser/parser-inline.cxx
deleted file mode 100644
index fb7558e..0000000
--- a/xsd/cxx/parser/parser-inline.cxx
+++ /dev/null
@@ -1,399 +0,0 @@
-// file : xsd/cxx/parser/parser-inline.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/parser-inline.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String const& name (ename (l));
- SemanticGraph::Type& t (l.argumented ().type ());
-
- String item (unclash (name, "item"));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // item_parser
- //
- os << inl
- << "void " << name << "::" << endl
- << unclash (name, "item_parser") << " (" <<
- fq_name (t) << "& " << item << ")"
- << "{"
- << "this->_xsd_" << item << "_ = &" << item << ";"
- << "}";
-
- // parsers
- //
- os << inl
- << "void " << name << "::" << endl
- << "parsers (" << fq_name (t) << "& " << item << ")"
- << "{"
- << "this->_xsd_" << item << "_ = &" << item << ";"
- << "}";
-
- // c-tor
- //
- os << inl
- << name << "::" << endl
- << name << " ()" << endl
- << ": _xsd_" << item << "_ (0)"
- << "{"
- << "}";
- }
- };
-
-
- //
- //
- struct ParserModifier: Traversal::Member, Context
- {
- ParserModifier (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& scope (ename (m.scope ()));
- String const& parser (eparser (m));
-
- bool poly (polymorphic &&
- m.is_a<SemanticGraph::Element> () &&
- !anonymous (m.type ()));
-
- os << inl
- << "void " << scope << "::" << endl
- << parser << " (" << fq_name (m.type ()) << "& p)"
- << "{"
- << "this->" << emember (m) << " = &p;"
- << "}";
-
- if (poly)
- {
- os << inl
- << "void " << scope << "::" << endl
- << parser << " (const " << parser_map << "& m)"
- << "{"
- << "this->" << emember_map (m) << " = &m;"
- << "}";
- }
- }
- };
-
-
- //
- //
- struct ParserMemberSet: Traversal::Member, Context
- {
- ParserMemberSet (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m)) return;
-
- String const& name (ename (m));
-
- os << "this->" << emember (m) << " = &" << name << ";";
- }
- };
-
-
- //
- //
- struct ParserMemberInit: Traversal::Member, Context
- {
- ParserMemberInit (Context& c)
- : Context (c), first_ (true)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m)) return;
-
- if (first_)
- first_ = false;
- else
- os << "," << endl << " ";
-
- os << emember (m) << " (0)";
-
- if (polymorphic &&
- m.is_a<SemanticGraph::Element> () &&
- !anonymous (m.type ()))
- {
- os << "," << endl
- << " " << emember_map (m) << " (0)";
- }
- }
-
- bool
- comma () const
- {
- return !first_;
- }
-
- private:
- bool first_;
- };
-
- struct ParserBaseSet: Traversal::Complex,
- Traversal::List,
- Context
- {
- ParserBaseSet (Context& c)
- : Context (c), member_ (c)
- {
- inherits_ >> *this;
- names_ >> member_;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c, inherits_);
-
- if (!restriction_p (c))
- names (c, names_);
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- String const& name (ename (l));
- String item (unclash (name, "item"));
-
- os << "this->_xsd_" << item << "_ = &" << name << "_item;";
- }
-
- private:
- Traversal::Inherits inherits_;
-
- ParserMemberSet member_;
- Traversal::Names names_;
- };
-
- struct Particle: Traversal::All, Context
- {
- Particle (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::All& a)
- {
- if (!a.context().count ("comp-number"))
- return;
-
- size_t state_count (a.context().get<size_t> ("state-count"));
-
- os << "," << endl
- << " v_all_count_ (" << state_count << "UL, v_all_first_)";
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- parser_modifier_ (c),
- parser_base_set_ (c),
- parser_member_set_ (c),
- particle_ (c)
- {
- names_parser_modifier_ >> parser_modifier_;
- inherits_parser_base_set_ >> parser_base_set_;
- names_parser_member_set_ >> parser_member_set_;
- }
-
- virtual void
- traverse (Type& c)
- {
- bool he (has<Traversal::Element> (c));
- bool ha (has<Traversal::Attribute> (c));
-
- bool hae (has_particle<Traversal::Any> (c));
-
- bool hra (false); // Has required attribute.
- if (ha)
- {
- RequiredAttributeTest test (hra);
- Traversal::Names names_test (test);
- names (c, names_test);
- }
-
- bool restriction (restriction_p (c));
-
- if (!((!restriction && (he || ha)) ||
- (validation && (he || hae || hra))))
- return;
-
- String const& name (ename (c));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- if (!restriction && (he || ha))
- {
- // <name>_parser ()
- //
- names (c, names_parser_modifier_);
-
-
- // parsers ()
- //
-
- os << inl
- << "void " << name << "::" << endl
- << "parsers (";
-
- {
- ParserParamDecl decl (*this, true);
- decl.traverse (c);
- }
-
- os << ")"
- << "{";
-
- inherits (c, inherits_parser_base_set_);
- names (c, names_parser_member_set_);
-
- os << "}";
- }
-
- // Default c-tor.
- //
- os << inl
- << name << "::" << endl
- << name << " ()" << endl
- << ": ";
-
- bool comma (false);
-
- if (!restriction && (he || ha))
- {
- ParserMemberInit member_init (*this);
- Traversal::Names names_member_init (member_init);
-
- names (c, names_member_init);
-
- comma = member_init.comma ();
- }
-
- if (validation && (he || hae))
- {
- if (comma)
- os << "," << endl << " ";
-
- os << "v_state_stack_ (sizeof (v_state_), &v_state_first_)";
-
- particle_.dispatch (c.contains_compositor ().compositor ());
-
- comma = true;
- }
-
- if (validation && (hra))
- {
- if (comma)
- os << "," << endl << " ";
-
- os << "v_state_attr_stack_ (sizeof (v_state_attr_), " <<
- "&v_state_attr_first_)";
- }
-
- os << "{"
- << "}";
- }
-
- private:
- //
- //
- ParserModifier parser_modifier_;
- Traversal::Names names_parser_modifier_;
-
- //
- //
- ParserBaseSet parser_base_set_;
- Traversal::Inherits inherits_parser_base_set_;
-
- //
- //
- ParserMemberSet parser_member_set_;
- Traversal::Names names_parser_member_set_;
-
- //
- //
- Particle particle_;
- };
- }
-
- void
- generate_parser_inline (Context& ctx)
- {
- // Emit "weak" header includes that are used in the file-per-type
- // compilation model.
- //
- if (!ctx.options.generate_inline ())
- {
- Traversal::Schema schema;
- Includes includes (ctx, Includes::source);
-
- schema >> includes;
- schema.dispatch (ctx.schema_root);
- }
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- List list (ctx);
- Complex complex (ctx);
-
- names >> list;
- names >> complex;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/parser-inline.hxx b/xsd/cxx/parser/parser-inline.hxx
deleted file mode 100644
index 7c732fc..0000000
--- a/xsd/cxx/parser/parser-inline.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/parser-inline.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_PARSER_INLINE_HXX
-#define CXX_PARSER_PARSER_INLINE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_parser_inline (Context&);
- }
-}
-
-#endif // CXX_PARSER_PARSER_INLINE_HXX
diff --git a/xsd/cxx/parser/parser-source.cxx b/xsd/cxx/parser/parser-source.cxx
deleted file mode 100644
index 64c0075..0000000
--- a/xsd/cxx/parser/parser-source.cxx
+++ /dev/null
@@ -1,957 +0,0 @@
-// file : xsd/cxx/parser/parser-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/parser/parser-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String const& name (ename (e));
- String const& ret (ret_type (e));
-
- SemanticGraph::Type& base (e.inherits ().base ());
-
- bool same (ret == ret_type (base));
-
- if (same || ret == L"void" || polymorphic)
- {
- os << "// " << name << endl
- << "//" << endl
- << endl;
- }
-
- if (same || ret == L"void")
- {
- os << ret << " " << name << "::" << endl
- << post_name (e) << " ()"
- << "{";
-
- if (same)
- {
- if (ret == L"void")
- os << post_name (base) << " ();";
- else
- os << "return " << post_name (base) << " ();";
- }
-
- os << "}";
- }
-
- if (polymorphic)
- {
- String id (e.name ());
-
- if (String ns = xml_ns_name (e))
- {
- id += L' ';
- id += ns;
- }
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_static_type ()"
- << "{"
- << "return " << strlit (id) << ";"
- << "}";
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_dynamic_type () const"
- << "{"
- << "return _static_type ();"
- << "}";
-
- if (validation)
- {
- bool gen (!anonymous (e));
-
- // We normally don't need to enter anonymous types into
- // the inheritance map. The only exception is when an
- // anonymous types is defined inside an element that
- // is a member of a substitution group.
- //
- if (!gen)
- {
- // The first instance that this anonymous type classifies
- // is the prototype for others if any. If this type does
- // not classify anything (e.g., it is a base), then we
- // don't need to do anything.
- //
- if (e.classifies_begin () != e.classifies_end ())
- {
- SemanticGraph::Instance& i (
- e.classifies_begin ()->instance ());
-
- if (SemanticGraph::Element* e =
- dynamic_cast<SemanticGraph::Element*> (&i))
- {
- if (e->substitutes_p ())
- gen = true;
- }
- }
- }
-
- if (gen)
- {
- os << "static" << endl
- << "const ::xsd::cxx::parser::validating::inheritance_map_entry< " <<
- char_type << " >" << endl
- << "_xsd_" << name << "_inheritance_map_entry_ (" << endl
- << name << "::_static_type ()," << endl
- << fq_name (base) << "::_static_type ());"
- << endl;
- }
- }
- }
- }
- };
-
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String const& name (ename (l));
- SemanticGraph::Type& t (l.argumented ().type ());
-
- String item (unclash (name, "item"));
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // item
- //
- String const& arg (arg_type (t));
-
- os << "void " << name << "::" << endl
- << item;
-
- if (arg == L"void")
- os << " ()";
- else
- os << " (" << arg << ")";
-
- os << "{"
- << "}";
-
- // post
- //
- if (ret_type (l) == L"void")
- os << "void " << name << "::" << endl
- << post_name (l) << " ()"
- << "{"
- << "}";
-
- // parse_item
- //
- String inst (L"_xsd_" + item + L"_");
- String const& post (post_name (t));
-
- os << "void " << name << "::" << endl
- << "_xsd_parse_item (const " << string_type << "& v)"
- << "{"
- << "if (this->" << inst << ")"
- << "{"
- << "this->" << inst << "->pre ();"
- << "this->" << inst << "->_pre_impl ();"
- << "this->" << inst << "->_characters (v);"
- << "this->" << inst << "->_post_impl ();";
-
- if (ret_type (t) == L"void")
- os << "this->" << inst << "->" << post << " ();"
- << "this->" << item << " ();";
- else
- os << "this->" << item << " (this->" << inst << "->" <<
- post << " ());";
-
- os << "}"
- << "}";
-
- //
- //
- if (polymorphic)
- {
- String id (l.name ());
-
- if (String ns = xml_ns_name (l))
- {
- id += L' ';
- id += ns;
- }
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_static_type ()"
- << "{"
- << "return " << strlit (id) << ";"
- << "}";
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_dynamic_type () const"
- << "{"
- << "return _static_type ();"
- << "}";
- }
- }
- };
-
- //
- //
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String const& name (ename (u));
- String const& ret (ret_type (u));
-
- if (ret == L"void" || polymorphic)
- {
- os << "// " << name << endl
- << "//" << endl
- << endl;
- }
-
- if (ret == L"void")
- {
- os << "void " << name << "::" << endl
- << post_name (u) << " ()"
- << "{"
- << "}";
- }
-
- if (polymorphic)
- {
- String id (u.name ());
-
- if (String ns = xml_ns_name (u))
- {
- id += L' ';
- id += ns;
- }
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_static_type ()"
- << "{"
- << "return " << strlit (id) << ";"
- << "}";
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_dynamic_type () const"
- << "{"
- << "return _static_type ();"
- << "}";
- }
- }
- };
-
- //
- //
- struct StartElement: Traversal::Element, Context
- {
- StartElement (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- bool poly (polymorphic && !anonymous (e.type ()));
-
- os << "if (";
-
- if (poly && e.global_p ())
- os << "(";
-
- if (e.qualified_p () && e.namespace_ ().name ())
- {
- os << "n == " << strlit (e.name ()) << " && " <<
- "ns == " << strlit (e.namespace_ ().name ());
- }
- else
- {
- os << "n == " << strlit (e.name ()) << " && ns.empty ()";
- }
-
- // Only a globally-defined element can be a subst-group root.
- //
- if (poly && e.global_p ())
- {
- os << ") ||" << endl
- << "::xsd::cxx::parser::substitution_map_instance< " <<
- char_type << " > ().check (" << endl
- << "ns, n, " << strlit (e.namespace_ ().name ()) <<
- ", " << strlit (e.name ()) << ", t)";
- }
-
- os << ")"
- << "{";
-
- String inst;
-
- if (poly)
- {
- SemanticGraph::Type& t (e.type ());
- inst = "p";
-
- // For pre-computing length.
- //
- String type_id (t.name ());
-
- if (String type_ns = xml_ns_name (t))
- {
- type_id += L' ';
- type_id += type_ns;
- }
-
- String fq_type (fq_name (t));
- String const& member (emember (e));
- String const& member_map (emember_map (e));
-
- os << fq_type << "* p = 0;"
- << endl
- << "if (t == 0 && this->" << member << " != 0)" << endl
- << inst << " = this->" << member << ";"
- << "else"
- << "{"
- << string_type << " ts (" << fq_type <<
- "::_static_type (), " << type_id.size () << "UL);"
- << endl
- << "if (t == 0)" << endl
- << "t = &ts;"
- << endl
- << "if (this->" << member << " != 0 && *t == ts)" << endl
- << inst << " = this->" << member << ";"
- << "else if (this->" << member_map << " != 0)" << endl
- << inst << " = dynamic_cast< " << fq_type <<
- "* > (" << endl
- << "this->" << member_map << "->find (*t));"
- << "}";
- }
- else
- inst = L"this->" + emember (e);
-
- os << "this->" << complex_base << "::context_.top ().parser_ = " <<
- inst << ";"
- << endl
- << "if (" << inst << ")" << endl
- << inst << "->pre ();" // _start_element calls _pre
- << endl
- << "return true;"
- << "}";
- }
- };
-
-
- //
- //
- struct EndElement: Traversal::Element, Context
- {
- EndElement (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- bool poly (polymorphic && !anonymous (e.type ()));
- String const& name (ename (e));
-
- os << "if (";
-
- if (poly && e.global_p ())
- os << "(";
-
- if (e.qualified_p () && e.namespace_ ().name ())
- {
- os << "n == " << strlit (e.name ()) << " && " <<
- "ns == " << strlit (e.namespace_ ().name ());
- }
- else
- {
- os << "n == " << strlit (e.name ()) << " && ns.empty ()";
- }
-
- // Only a globally-defined element can be a subst-group root.
- //
- if (poly && e.global_p ())
- {
- os << ") ||" << endl
- << "::xsd::cxx::parser::substitution_map_instance< " <<
- char_type << " > ().check (" << endl
- << "ns, n, " << strlit (e.namespace_ ().name ()) <<
- ", " << strlit (e.name ()) << ")";
- }
-
- os << ")"
- << "{";
-
- // _end_element calls post
- //
-
- SemanticGraph::Type& type (e.type ());
- String const& post (post_name (type));
- String inst;
-
- if (poly)
- {
- String const& fq_type (fq_name (type));
- inst = "p";
-
- os << fq_type << "* p =" << endl
- << "dynamic_cast< " << fq_type << "* > (" << endl
- << "this->" << complex_base << "::context_.top ().parser_);"
- << endl;
- }
- else
- inst = L"this->" + emember (e);
-
- os << "if (" << inst << ")";
-
- if (ret_type (type) == L"void")
- os << "{"
- << inst << "->" << post << " ();"
- << "this->" << name << " ();"
- << "}";
- else
- os << endl
- << "this->" << name << " (" << inst << "->" << post << " ());"
- << endl;
-
- os << "return true;"
- << "}";
- }
- };
-
- //
- //
- struct Attribute: Traversal::Attribute, Context
- {
- Attribute (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& name (ename (a));
- String const& inst (emember (a));
-
- if (a.qualified_p () && a.namespace_ ().name ())
- {
- os << "if (n == " << strlit (a.name ()) << " && " <<
- "ns == " << strlit (a.namespace_ ().name ()) << ")"
- << "{";
- }
- else
- {
- os << "if (n == " << strlit (a.name ()) << " && ns.empty ())"
- << "{";
- }
-
- SemanticGraph::Type& type (a.type ());
- String const& post (post_name (type));
- String const& ret (ret_type (type));
-
- os << "if (this->" << inst << ")"
- << "{"
- << "this->" << inst << "->pre ();"
- << "this->" << inst << "->_pre_impl ();"
- << "this->" << inst << "->_characters (v);"
- << "this->" << inst << "->_post_impl ();";
-
- if (ret == L"void")
- os << "this->" << inst << "->" << post << " ();"
- << "this->" << name << " ();";
- else
- os << "this->" << name << " (this->" << inst << "->" <<
- post << " ());";
-
- os << "}"
- << "return true;"
- << "}";
- }
- };
-
- //
- //
- struct ParserCallback: Traversal::Member, Context
- {
- ParserCallback (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& arg (arg_type (m.type ()));
-
- os << "void " << ename (m.scope ()) << "::" << endl
- << ename (m);
-
- if (arg == L"void")
- os << " ()";
- else
- os << " (" << arg << ")";
-
- os << "{"
- << "}";
- }
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- parser_callback_ (c),
- start_element_ (c),
- end_element_ (c),
- attribute_ (c)
- {
- names_parser_callback_ >> parser_callback_;
- names_start_element_ >> start_element_;
- names_end_element_ >> end_element_;
- names_attribute_ >> attribute_;
- }
-
- virtual void
- traverse (Type& c)
- {
- bool he (has<Traversal::Element> (c));
- bool ha (has<Traversal::Attribute> (c));
-
- String const& ret (ret_type (c));
- bool same (c.inherits_p () &&
- ret == ret_type (c.inherits ().base ()));
-
- String const& name (ename (c));
-
- if ((he || ha || same || ret == L"void") || polymorphic)
- {
- os << "// " << name << endl
- << "//" << endl
- << endl;
- }
-
- if (polymorphic)
- {
- String id (c.name ());
-
- if (String ns = xml_ns_name (c))
- {
- id += L' ';
- id += ns;
- }
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_static_type ()"
- << "{"
- << "return " << strlit (id) << ";"
- << "}";
-
- os << "const " << char_type << "* " << name << "::" << endl
- << "_dynamic_type () const"
- << "{"
- << "return _static_type ();"
- << "}";
-
- if (c.inherits_p () && validation)
- {
- bool gen (!anonymous (c));
-
- // We normally don't need to enter anonymous types into
- // the inheritance map. The only exception is when an
- // anonymous types is defined inside an element that
- // is a member of a substitution group.
- //
- if (!gen)
- {
- // The first instance that this anonymous type classifies
- // is the prototype for others if any. If this type does
- // not classify anything (e.g., it is a base), then we
- // don't need to do anything.
- //
- if (c.classifies_begin () != c.classifies_end ())
- {
- SemanticGraph::Instance& i (
- c.classifies_begin ()->instance ());
-
- if (SemanticGraph::Element* e =
- dynamic_cast<SemanticGraph::Element*> (&i))
- {
- if (e->substitutes_p ())
- gen = true;
- }
- }
- }
-
- if (gen)
- {
- SemanticGraph::Type& base (c.inherits ().base ());
-
- os << "static" << endl
- << "const ::xsd::cxx::parser::validating::inheritance_map_entry< " <<
- char_type << " >" << endl
- << "_xsd_" << name << "_inheritance_map_entry_ (" << endl
- << name << "::_static_type ()," << endl
- << fq_name (base) << "::_static_type ());"
- << endl;
- }
- }
- }
-
- if (!(he || ha || same || ret == L"void"))
- return;
-
- // Parser callbacks.
- //
- if (!restriction_p (c))
- names (c, names_parser_callback_);
-
- if (same || ret == L"void")
- {
- os << ret << " " << name << "::" << endl
- << post_name (c) << " ()"
- << "{";
-
- if (same)
- {
- SemanticGraph::Type& base (c.inherits ().base ());
-
- if (ret == L"void")
- os << post_name (base) << " ();";
- else
- os << "return " << post_name (base) << " ();";
- }
-
- os << "}";
- }
-
- // The rest is parsing/validation code which is generated in
- // *-validation-source.cxx.
- //
- if (validation)
- return;
-
- // Don't use restriction_p here since we don't want special
- // treatment of anyType.
- //
- bool restriction (
- c.inherits_p () &&
- c.inherits ().is_a<SemanticGraph::Restricts> ());
-
- // _start_element_impl & _end_element_impl
- //
- if (he)
- {
- os << "bool " << name << "::" << endl
- << "_start_element_impl (const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "* t)"
- << "{"
- << "XSD_UNUSED (t);"
- << endl;
-
- if (!restriction)
- {
- os << "if (this->";
-
- if (c.inherits_p ())
- os << fq_name (c.inherits ().base ());
- else
- os << complex_base;
-
- os << "::_start_element_impl (ns, n, t))" << endl
- << "return true;"
- << endl;
- }
-
- names (c, names_start_element_);
-
- os << "return false;"
- << "}";
-
-
- // _end_element_impl
- //
- os << "bool " << name << "::" << endl
- << "_end_element_impl (const " << string_type << "& ns," << endl
- << "const " << string_type << "& n)"
- << "{";
-
- if (!restriction)
- {
- os << "if (this->";
-
- if (c.inherits_p () && !restriction)
- os << fq_name (c.inherits ().base ());
- else
- os << complex_base;
-
- os << "::_end_element_impl (ns, n))" << endl
- << "return true;"
- << endl;
- }
-
- names (c, names_end_element_);
-
- os << "return false;"
- << "}";
- }
-
-
- if (ha)
- {
- // _attribute_impl
- //
- os << "bool " << name << "::" << endl
- << "_attribute_impl (const " << string_type << "& ns," << endl
- << "const " << string_type << "& n," << endl
- << "const " << string_type << "& v)"
- << "{";
-
- if (!restriction)
- {
- os << "if (this->";
-
- if (c.inherits_p ())
- os << fq_name (c.inherits ().base ());
- else
- os << complex_base;
-
- os << "::_attribute_impl (ns, n, v))" << endl
- << "return true;"
- << endl;
- }
-
- names (c, names_attribute_);
-
- os << "return false;"
- << "}";
- }
- }
-
- private:
- //
- //
- ParserCallback parser_callback_;
- Traversal::Names names_parser_callback_;
-
- //
- //
- StartElement start_element_;
- Traversal::Names names_start_element_;
-
- //
- //
- EndElement end_element_;
- Traversal::Names names_end_element_;
-
- //
- //
- Attribute attribute_;
- Traversal::Names names_attribute_;
- };
-
-
- // Generate substitution group map entries.
- //
- struct GlobalElement: Traversal::Element, Context
- {
- GlobalElement (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (e.substitutes_p ())
- {
- String name (escape (e.name ()));
- Type& r (e.substitutes ().root ());
-
- SemanticGraph::Type& type (e.type ());
-
- os << "// Substitution map entry for " << comment (e.name ()) << "." << endl
- << "//" << endl
- << "static" << endl
- << "const ::xsd::cxx::parser::substitution_map_entry< " <<
- char_type << " >" << endl
- << "_xsd_" << name << "_substitution_map_entry_ (" << endl
- << strlit (e.namespace_ ().name ()) << "," << endl
- << strlit (e.name ()) << "," << endl
- << strlit (r.namespace_ ().name ()) << "," << endl
- << strlit (r.name ()) << "," << endl
- << fq_name (type) << "::_static_type ());"
- << endl;
- }
- }
- };
- }
-
- void
- generate_parser_source (Context& ctx)
- {
- if (ctx.polymorphic)
- {
- ctx.os << "#include <xsd/cxx/parser/substitution-map.hxx>" << endl;
-
- if (ctx.validation)
- ctx.os << "#include <xsd/cxx/parser/validating/inheritance-map.hxx>" << endl
- << endl;
- else
- ctx.os << endl;
-
- bool import_maps (ctx.options.import_maps ());
- bool export_maps (ctx.options.export_maps ());
-
- if (import_maps || export_maps)
- {
- ctx.os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{"
- << "namespace parser"
- << "{"
- << "#ifdef _MSC_VER" << endl;
-
- if (export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "substitution_map_init< " << ctx.char_type << " >;";
-
- if (import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "substitution_map_init< " << ctx.char_type << " >;";
-
- if (ctx.validation && export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "inheritance_map_init< " << ctx.char_type << " >;";
-
- if (ctx.validation && import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "inheritance_map_init< " << ctx.char_type << " >;";
-
- ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
- << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "substitution_map_init< " << ctx.char_type << " >;";
-
- if (ctx.validation)
- ctx.os << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "inheritance_map_init< " << ctx.char_type << " >;";
-
- ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
- << "template struct XSD_MAP_VISIBILITY " <<
- "substitution_map_init< " << ctx.char_type << " >;";
-
- if (ctx.validation)
- ctx.os << "template struct XSD_MAP_VISIBILITY " <<
- "inheritance_map_init< " << ctx.char_type << " >;";
-
- ctx.os << "#endif" << endl
- << "}" // parser
- << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
- }
-
- ctx.os << "static" << endl
- << "const ::xsd::cxx::parser::substitution_map_init< " <<
- ctx.char_type << " >" << endl
- << "_xsd_substitution_map_init_;"
- << endl;
-
- if (ctx.validation)
- {
- ctx.os << "static" << endl
- << "const ::xsd::cxx::parser::validating::inheritance_map_init< " <<
- ctx.char_type << " >" << endl
- << "_xsd_inheritance_map_init_;"
- << endl;
- }
- }
-
- // Emit "weak" header includes that are used in the file-per-type
- // compilation model.
- //
- if (ctx.options.generate_inline ())
- {
- Traversal::Schema schema;
- Includes includes (ctx, Includes::source);
-
- schema >> includes;
- schema.dispatch (ctx.schema_root);
- }
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names schema_names;
-
- Namespace ns (ctx);
- Traversal::Names names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> names;
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
- GlobalElement global_element (ctx);
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- if (ctx.polymorphic)
- names >> global_element;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/parser/parser-source.hxx b/xsd/cxx/parser/parser-source.hxx
deleted file mode 100644
index 0f8f57e..0000000
--- a/xsd/cxx/parser/parser-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/parser/parser-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_PARSER_SOURCE_HXX
-#define CXX_PARSER_PARSER_SOURCE_HXX
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- void
- generate_parser_source (Context&);
- }
-}
-
-#endif // CXX_PARSER_PARSER_SOURCE_HXX
diff --git a/xsd/cxx/parser/print-impl-common.hxx b/xsd/cxx/parser/print-impl-common.hxx
deleted file mode 100644
index 66379f0..0000000
--- a/xsd/cxx/parser/print-impl-common.hxx
+++ /dev/null
@@ -1,641 +0,0 @@
-// file : xsd/cxx/parser/print-impl-common.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_PRINT_IMPL_COMMON_HXX
-#define CXX_PARSER_PRINT_IMPL_COMMON_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/parser/elements.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- struct PrintCall: Traversal::Type,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Context
- {
- PrintCall (Context& c, String const& tag, String const& arg)
- : Context (c), tag_ (tag), arg_ (arg)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type&)
- {
- gen_user_type ();
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- if (default_type (t, "bool"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- if (default_type (t, "signed char"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") <<
- " << static_cast<short> (" << arg_ << ") << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- if (default_type (t, "unsigned char"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") <<
- " << static_cast<unsigned short> (" << arg_ << ") << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- if (default_type (t, "short"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- if (default_type (t, "unsigned short"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- if (default_type (t, "int"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- if (default_type (t, "unsigned int"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- if (default_type (t, "long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- if (default_type (t, "unsigned long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- if (default_type (t, "long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- if (default_type (t, "long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- if (default_type (t, "long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- if (default_type (t, "unsigned long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- if (default_type (t, "unsigned long long"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- if (default_type (t, "float"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- if (default_type (t, "double"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- if (default_type (t, "double"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- gen_string (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- gen_string (t);
- }
-
- // String sequences.
- //
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- gen_sequence (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- gen_sequence (t);
- }
-
- // QName
- //
-
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- if (default_type (t, xs_ns_name () + L"::qname"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << ";"
- << endl
- << "if (" << arg_ << ".prefix ().empty ())" << endl
- << cout_inst << " << " << arg_ << ".name ();"
- << "else" << endl
- << cout_inst << " << " << arg_ << ".prefix () << " << L <<
- "':' << " << arg_ << ".name ();"
- << endl
- << cout_inst << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- gen_buffer (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- gen_buffer (t);
- }
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- if (default_type (t, xs_ns_name () + L"::date"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << endl
- << " << " << arg_ << ".year () << '-'" << endl
- << " << " << arg_ << ".month () << '-'" << endl
- << " << " << arg_ << ".day ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- if (default_type (t, xs_ns_name () + L"::date_time"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << endl
- << " << " << arg_ << ".year () << '-'" << endl
- << " << " << arg_ << ".month () << '-'" << endl
- << " << " << arg_ << ".day () << 'T'" << endl
- << " << " << arg_ << ".hours () << ':'" << endl
- << " << " << arg_ << ".minutes () << ':'" << endl
- << " << " << arg_ << ".seconds ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- if (default_type (t, xs_ns_name () + L"::duration"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << ";"
- << endl
- << "if (" << arg_ << ".negative ())" << endl
- << cout_inst << " << '-';"
- << endl
- << cout_inst << " << 'P'" << endl
- << " << " << arg_ << ".years () << 'Y'" << endl
- << " << " << arg_ << ".months () << 'M'" << endl
- << " << " << arg_ << ".days () << " << L << "\"DT\"" << endl
- << " << " << arg_ << ".hours () << 'H'" << endl
- << " << " << arg_ << ".minutes () << 'M'" << endl
- << " << " << arg_ << ".seconds () << 'S'"
- << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- if (default_type (t, xs_ns_name () + L"::gday"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ---") <<
- " << " << arg_ << ".day ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- if (default_type (t, xs_ns_name () + L"::gmonth"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": --") <<
- " << " << arg_ << ".month ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- if (default_type (t, xs_ns_name () + L"::gmonth_day"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": --") << endl
- << " << " << arg_ << ".month () << '-'" << endl
- << " << " << arg_ << ".day ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- if (default_type (t, xs_ns_name () + L"::gyear"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << ".year ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- if (default_type (t, xs_ns_name () + L"::gyear_month"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << endl
- << " << " << arg_ << ".year () << '-'" << endl
- << " << " << arg_ << ".month ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- if (default_type (t, xs_ns_name () + L"::time"))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << endl
- << " << " << arg_ << ".hours () << ':'" << endl
- << " << " << arg_ << ".minutes () << ':'" << endl
- << " << " << arg_ << ".seconds ();";
-
- gen_time_zone ();
- }
- else
- gen_user_type ();
- }
-
- private:
- bool
- default_type (SemanticGraph::Type& t, String const& def_type)
- {
- return ret_type (t) == def_type;
- }
-
- void
- gen_user_type ()
- {
- os << "// TODO" << endl
- << "//" << endl;
- }
-
- void
- gen_string (SemanticGraph::Type& t)
- {
- if ((char_type == L"char" && default_type (t, "::std::string")) ||
- (char_type == L"wchar_t" && default_type (t, "::std::wstring")))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
- arg_ << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- void
- gen_sequence (SemanticGraph::Type& t)
- {
- String type (xs_ns_name () + L"::string_sequence");
-
- if (default_type (t, type))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << ";"
- << endl;
-
- os << "for (" << type << "::const_iterator i (" << arg_ <<
- ".begin ()), e (" << arg_ << ".end ());" << endl
- << "i != e;)"
- << "{"
- << cout_inst << " << *i++;"
- << "if (i != e)" << endl
- << cout_inst << " << ' ';"
- << "}"
- << cout_inst << " << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- void
- gen_buffer (SemanticGraph::Type& t)
- {
- String type (auto_ptr + L"< " + xs_ns_name () + L"::buffer >");
-
- if (default_type (t, type))
- {
- os << cout_inst << " << " << strlit (tag_ + L": ") << " << "
- << arg_ << "->size () << " << L << "\" bytes\" << std::endl;";
- }
- else
- gen_user_type ();
- }
-
- void
- gen_time_zone ()
- {
- os << endl
- << "if (" << arg_ << ".zone_present ())"
- << "{"
- << "if (" << arg_ << ".zone_hours () < 0)" << endl
- << cout_inst << " << " << arg_ << ".zone_hours () << ':' << -" <<
- arg_ << ".zone_minutes ();"
- << "else" << endl
- << cout_inst << " << '+' << " << arg_ << ".zone_hours () << " <<
- "':' << " << arg_ << ".zone_minutes ();";
-
- os << "}"
- << cout_inst << " << std::endl;";
- }
-
- private:
- String tag_;
- String arg_;
- };
- }
-}
-
-#endif // CXX_PARSER_PRINT_IMPL_COMMON_HXX
diff --git a/xsd/cxx/parser/state-processor.cxx b/xsd/cxx/parser/state-processor.cxx
deleted file mode 100644
index 423d0d8..0000000
--- a/xsd/cxx/parser/state-processor.cxx
+++ /dev/null
@@ -1,319 +0,0 @@
-// file : xsd/cxx/parser/state-processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <vector>
-#include <iostream>
-
-#include <cxx/parser/state-processor.hxx>
-
-#include <cxx/parser/elements.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- typedef vector<SemanticGraph::Particle*> Particles;
-
- /*
- void
- print (Particles const& p)
- {
- using std::wcerr;
- using std::endl;
-
- wcerr << "prefixes: " << endl;
-
- for (Particles::const_iterator i (p.begin ()); i != p.end (); ++i)
- {
- if (SemanticGraph::Element* e =
- dynamic_cast<SemanticGraph::Element*> (*i))
- {
- wcerr << e->name () << endl;
- }
- else
- {
- wcerr << "<any>" << endl;
- }
- }
-
- wcerr << endl;
- }
- */
-
- //
- //
- struct Particle: Traversal::All,
- Traversal::Choice,
- Traversal::Sequence
- {
- Particle (size_t& all,
- size_t& choice,
- size_t& sequence,
- size_t& depth)
- : all_ (all),
- choice_ (choice),
- sequence_ (sequence),
- depth_ (depth)
- {
- }
-
- virtual void
- traverse (SemanticGraph::All& a)
- {
- using SemanticGraph::Compositor;
-
- // Go over particles, collecting "prefix" particles in prefixes_,
- // assigning state numbers and calculating effective minOccurs.
- // If all prefixes of this compositor have minOccurs = 0, then
- // the compositor itself effectively has minOccurs = 0 regardless
- // of the actual value specified in the schema.
- //
- // Note that we don't need to care about depth since the 'all'
- // compositor cannot contain any nested compositors.
- //
-
- size_t state (0);
- size_t min (0);
-
- for (Compositor::ContainsIterator ci (a.contains_begin ());
- ci != a.contains_end (); ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- // The 'all' compositor can only include elements.
- //
- prefixes_.push_back (&p);
-
- if (min == 0 && ci->min () != 0)
- min = 1;
-
- p.context ().set ("prefix", true);
- p.context ().set ("state", state++);
- }
-
- if (!prefixes_.empty ())
- {
- a.context ().set ("comp-number", choice_++);
- a.context ().set ("prefixes", prefixes_);
- a.context ().set ("state-count", size_t (prefixes_.size ()));
-
- // effective-min = min * actual-min
- //
- if (min == 1)
- min = a.min ();
-
- a.context ().set ("effective-min", min);
-
- // print (prefixes_);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Choice& c)
- {
- using SemanticGraph::Compositor;
-
- // Go over particles, collecting "prefix" particles in prefixes_,
- // assigning state numbers and calculating effective minOccurs.
- // If any prefix of this compositor have minOccurs = 0, then the
- // compositor itself effectively has minOccurs = 0 regardless of
- // the actual value specified in the schema.
- //
-
- size_t state (0);
- size_t min (1);
-
- for (Compositor::ContainsIterator ci (c.contains_begin ());
- ci != c.contains_end (); ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<SemanticGraph::Element> () ||
- p.is_a<SemanticGraph::Any> ())
- {
- prefixes_.push_back (&p);
-
- if (min == 1 && ci->min () == 0)
- min = 0;
- }
- else
- {
- size_t depth (0);
- Particle t (all_, choice_, sequence_, depth);
- t.dispatch (p);
-
- if (t.prefixes_.empty ())
- continue; // Skip empty compositors.
-
- if (++depth > depth_) // One for this compositor.
- depth_ = depth;
-
- prefixes_.insert (prefixes_.end (),
- t.prefixes_.begin ().base (),
- t.prefixes_.end ().base ());
-
- if (min == 1 &&
- p.context ().get<size_t> ("effective-min") == 0)
- min = 0;
- }
-
- p.context ().set ("prefix", true);
- p.context ().set ("state", state++);
- }
-
- if (!prefixes_.empty ())
- {
- c.context ().set ("comp-number", choice_++);
- c.context ().set ("prefixes", prefixes_);
-
- // effective-min = min * actual-min
- //
- if (min == 1)
- min = c.min ();
-
- c.context ().set ("effective-min", min);
-
- // print (prefixes_);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Sequence& s)
- {
- using SemanticGraph::Compositor;
-
- // Go over particles, collecting "prefix" particles in prefixes_,
- // assigning state numbers and calculating effective minOccurs.
- // If all prefixes of this compositor have minOccurs = 0, then
- // the compositor itself effectively has minOccurs = 0 regardless
- // of the actual value specified in the schema.
- //
-
- bool prefix (true);
- size_t state (0);
- size_t min (0);
-
- for (Compositor::ContainsIterator ci (s.contains_begin ());
- ci != s.contains_end (); ++ci)
- {
- SemanticGraph::Particle& p (ci->particle ());
-
- if (p.is_a<SemanticGraph::Element> () ||
- p.is_a<SemanticGraph::Any> ())
- {
- if (prefix)
- {
- prefixes_.push_back (&p);
-
- if (ci->min () != 0)
- min = 1;
- }
- }
- else
- {
- size_t depth (0);
- Particle t (all_, choice_, sequence_, depth);
- t.dispatch (p);
-
- if (t.prefixes_.empty ())
- continue; // Skip empty compositors.
-
- if (++depth > depth_) // One for this compositor.
- depth_ = depth;
-
- if (prefix)
- {
- prefixes_.insert (prefixes_.end (),
- t.prefixes_.begin ().base (),
- t.prefixes_.end ().base ());
-
- if (p.context ().get<size_t> ("effective-min") != 0)
- min = 1;
- }
- }
-
- p.context ().set ("state", state++);
-
- if (prefix)
- p.context ().set ("prefix", true);
-
- if (prefix && min != 0)
- prefix = false;
- }
-
- if (!prefixes_.empty ())
- {
- s.context ().set ("comp-number", sequence_++);
- s.context ().set ("prefixes", prefixes_);
-
- // effective-min = min * actual-min
- //
- if (min == 1)
- min = s.min ();
-
- s.context ().set ("effective-min", min);
-
- // print (prefixes_);
- }
- }
-
- private:
- Particles prefixes_;
-
- size_t& all_;
- size_t& choice_;
- size_t& sequence_;
-
- size_t& depth_;
- };
-
-
- //
- //
- struct Complex: Traversal::Complex
- {
- virtual void
- traverse (Type& c)
- {
- if (c.contains_compositor_p ())
- {
- size_t all (0), choice (0), sequence (0), depth (0);
- Particle t (all, choice, sequence, depth);
- t.dispatch (c.contains_compositor ().compositor ());
-
- // Set the maximum stack depth for this type. Used to
- // allocate fixed-size state stack.
- //
- c.context ().set ("depth", depth + 1);
- }
- }
- };
- }
-
- void StateProcessor::
- process (SemanticGraph::Schema& tu, SemanticGraph::Path const&)
- {
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
-
- schema >> sources >> schema;
- schema >> schema_names >> ns >> ns_names;
-
- Complex complex_type;
-
- ns_names >> complex_type;
-
- schema.dispatch (tu);
- }
- }
-}
diff --git a/xsd/cxx/parser/state-processor.hxx b/xsd/cxx/parser/state-processor.hxx
deleted file mode 100644
index e5559b4..0000000
--- a/xsd/cxx/parser/state-processor.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// file : xsd/cxx/parser/state-processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_STATE_PROCESSOR_HXX
-#define CXX_PARSER_STATE_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-
-#include <types.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- class StateProcessor
- {
- public:
- void
- process (XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file);
- };
- }
-}
-
-#endif // CXX_PARSER_STATE_PROCESSOR_HXX
diff --git a/xsd/cxx/parser/type-processor.cxx b/xsd/cxx/parser/type-processor.cxx
deleted file mode 100644
index d1b2e68..0000000
--- a/xsd/cxx/parser/type-processor.cxx
+++ /dev/null
@@ -1,347 +0,0 @@
-// file : xsd/cxx/parser/type-processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-
-#include <cxx/parser/elements.hxx>
-#include <cxx/parser/type-processor.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- //
- //
- struct Type: Traversal::Type
- {
- Type (SemanticGraph::Schema& schema,
- TypeMap::Namespaces& type_map,
- bool add_includes)
- : schema_ (schema),
- type_map_ (type_map),
- add_includes_ (add_includes)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& type)
- {
- using TypeMap::Namespace;
- using TypeMap::Namespaces;
-
- SemanticGraph::Context& tc (type.context ());
-
- // There are two situations where we may try to process the
- // same type more than once. The first is when the type is
- // used in several element declarations in the same schema.
- // The second situation only occurs when we are in the file-
- // per-type mode. In this case the type was processed as part
- // of another root schema. In the second case, while the ret
- // and arg types are assumed to be the same, we need to re-
- // match the type in order to add include directives to the
- // new root schema.
- //
- bool set (true);
-
- if (tc.count ("ret-type"))
- {
- SemanticGraph::Schema* s (
- tc.get<SemanticGraph::Schema*> ("root-schema"));
-
- if (&schema_ == s)
- return;
-
- set = false;
- }
-
- SemanticGraph::Namespace& ns (
- dynamic_cast<SemanticGraph::Namespace&> (type.scope ()));
-
- String ns_name (ns.name ());
- String t_name (type.name ());
-
- //std::wcerr << "traversing: " << ns_name << "#" << t_name << endl;
-
- for (Namespaces::const_iterator n (type_map_.begin ());
- n != type_map_.end (); ++n)
- {
- // Check if the namespace matches.
- //
- bool ns_match;
-
- if (!n->xsd_name ().empty ())
- {
- ns_match = n->xsd_name ().match (ns_name);
- }
- else
- ns_match = ns_name.empty ();
-
- //std::wcerr << "considering ns expr: " << n->xsd_name ()
- // << " for " << ns_name
- // << ": " << (ns_match ? "+" : "-") << endl;
-
- if (ns_match)
- {
- // Namespace matched. See if there is a type that matches.
- //
- for (Namespace::TypesIterator t (n->types_begin ());
- t != n->types_end (); ++t)
- {
- if (t->xsd_name ().match (t_name))
- {
- if (set)
- {
- // Got a match. See if the namespace has the C++
- // namespace mapping.
- //
- String cxx_ns;
-
- if (n->has_cxx_name ())
- {
- if (!n->xsd_name ().empty ())
- {
- cxx_ns = n->xsd_name ().replace (
- ns_name, n->cxx_name (), true);
- }
- else
- cxx_ns = n->cxx_name ();
-
- cxx_ns += L"::";
- }
-
- // Figure out ret and arg type names.
- //
- String ret_type (cxx_ns);
-
- ret_type += t->xsd_name ().replace (
- t_name, t->cxx_ret_name (), true);
-
- String arg_type;
-
- if (t->cxx_arg_name ())
- {
- arg_type = cxx_ns;
- arg_type += t->xsd_name ().replace (
- t_name, t->cxx_arg_name (), true);
- }
- else
- {
- if (ret_type == L"void")
- arg_type = ret_type;
- else
- {
- wchar_t last (ret_type[ret_type.size () - 1]);
-
- // If it is already a pointer or reference then use
- // it as is.
- //
- if (last == L'*' || last == L'&')
- arg_type = ret_type;
- else
- arg_type = L"const " + ret_type + L"&";
- }
- }
-
- tc.set ("ret-type", ret_type);
- tc.set ("arg-type", arg_type);
-
- //std::wcerr << t_name << " -> " << ret_type << endl;
- }
-
- tc.set ("root-schema", &schema_);
-
- // See of we need to add any includes to the translations
- // unit.
- //
- if (add_includes_)
- {
- if (n->includes_begin () != n->includes_end ())
- {
- typedef std::set<String> Includes;
-
- if (!schema_.context ().count ("includes"))
- schema_.context ().set ("includes", Includes ());
-
- Includes& is (
- schema_.context ().get<Includes> ("includes"));
-
- for (Namespace::IncludesIterator i (n->includes_begin ());
- i != n->includes_end (); ++i)
- {
- is.insert (*i);
- }
- }
- }
-
- return;
- }
- }
- }
- }
- }
-
- private:
- SemanticGraph::Schema& schema_;
- TypeMap::Namespaces& type_map_;
- bool add_includes_;
- };
-
-
- //
- //
- struct GlobalType: Traversal::Type,
- Traversal::List,
- Traversal::Complex,
- Traversal::Enumeration
- {
- GlobalType (SemanticGraph::Schema& schema,
- TypeMap::Namespaces& type_map,
- bool add_includes)
- : type_ (schema, type_map, add_includes)
- {
- inherits_ >> type_;
- names_ >> instance_ >> belongs_ >> type_;
- argumented_ >> type_;
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- type_.traverse (t);
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- type_.traverse (l);
- Traversal::List::argumented (l, argumented_);
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- type_.traverse (c);
- Complex::inherits (c, inherits_);
- Complex::names (c, names_);
- }
-
- virtual void
- traverse (SemanticGraph::Enumeration& e)
- {
- type_.traverse (e);
- Complex::inherits (e, inherits_);
- }
-
- private:
- Parser::Type type_;
- Traversal::Names names_;
- Traversal::Instance instance_;
- Traversal::Inherits inherits_;
- Traversal::Belongs belongs_;
- Traversal::Argumented argumented_;
- };
-
- void
- process_impl (options const& ops,
- XSDFrontend::SemanticGraph::Schema& tu,
- bool gen_driver,
- TypeMap::Namespaces& type_map)
- {
- if (tu.names_begin ()->named ().name () ==
- L"http://www.w3.org/2001/XMLSchema")
- {
- // XML Schema namespace.
- //
- Traversal::Schema schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- GlobalType global_type (tu, type_map, true);
-
- schema >> schema_names >> ns >> ns_names >> global_type;
-
- schema.dispatch (tu);
- }
- else
- {
- // If --extern-xml-schema is specified, then we don't want
- // includes from the XML Schema type map.
- //
- bool extern_xml_schema (ops.extern_xml_schema ());
-
- //
- //
- Traversal::Schema schema;
- Traversal::Schema xs_schema;
- Sources sources;
- Traversal::Implies implies;
-
- schema >> sources >> schema;
- schema >> implies >> xs_schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- GlobalType global_type (tu, type_map, true);
-
- schema >> schema_names >> ns >> ns_names >> global_type;
-
- Traversal::Names xs_schema_names;
- Traversal::Namespace xs_ns;
- Traversal::Names xs_ns_names;
- GlobalType xs_global_type (tu, type_map, !extern_xml_schema);
-
- xs_schema >> xs_schema_names >> xs_ns >> xs_ns_names >>
- xs_global_type;
-
- schema.dispatch (tu);
-
- // If we are generating the test driver, make sure the root
- // element type is processed.
- //
- if (gen_driver && ops.generate_test_driver ())
- {
- // Figure out the root element. Validator should have made sure
- // it is unique.
- //
- SemanticGraph::Element* root (0);
- {
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- RootElement root_element (ops, root);
-
- schema >> schema_names >> ns >> ns_names >> root_element;
-
- schema.dispatch (tu);
- }
-
- global_type.dispatch (root->type ());
- }
- }
- }
- }
-
- void TypeProcessor::
- process (options const& ops,
- XSDFrontend::SemanticGraph::Schema& s,
- bool gen_driver,
- TypeMap::Namespaces& tm)
- {
- process_impl (ops, s, gen_driver, tm);
- }
- }
-}
diff --git a/xsd/cxx/parser/type-processor.hxx b/xsd/cxx/parser/type-processor.hxx
deleted file mode 100644
index 53fd970..0000000
--- a/xsd/cxx/parser/type-processor.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-// file : xsd/cxx/parser/type-processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_TYPE_PROCESSOR_HXX
-#define CXX_PARSER_TYPE_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-
-#include <types.hxx>
-
-#include <type-map/type-map.hxx>
-
-#include <cxx/parser/options.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- class TypeProcessor
- {
- public:
- void
- process (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- bool gen_driver,
- TypeMap::Namespaces&);
- };
- }
-}
-
-#endif // CXX_PARSER_TYPE_PROCESSOR_HXX
diff --git a/xsd/cxx/parser/validator.cxx b/xsd/cxx/parser/validator.cxx
deleted file mode 100644
index 6bf5b48..0000000
--- a/xsd/cxx/parser/validator.cxx
+++ /dev/null
@@ -1,718 +0,0 @@
-// file : xsd/cxx/parser/validator.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-#include <iostream>
-
-#include <cxx/parser/validator.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/parser/elements.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Parser
- {
- namespace
- {
- class ValidationContext: public Context
- {
- public:
- ValidationContext (SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- Parser::options const& ops,
- const WarningSet& disabled_warnings,
- bool& valid_)
- : Context (std::wcerr, root, path, ops, 0, 0, 0, 0),
- disabled_warnings_ (disabled_warnings),
- disabled_warnings_all_ (false),
- valid (valid_),
- subst_group_warning_issued (subst_group_warning_issued_),
- subst_group_warning_issued_ (false)
- {
- }
-
- public:
- bool
- is_disabled (char const* w)
- {
- return disabled_warnings_all_ ||
- disabled_warnings_.find (w) != disabled_warnings_.end ();
- }
-
- public:
- String
- xpath (SemanticGraph::Nameable& n)
- {
- if (n.is_a<SemanticGraph::Namespace> ())
- return L"<namespace-level>"; // There is a bug if you see this.
-
- assert (n.named_p ());
-
- SemanticGraph::Scope& scope (n.scope ());
-
- if (scope.is_a<SemanticGraph::Namespace> ())
- return n.name ();
-
- return xpath (scope) + L"/" + n.name ();
- }
-
- protected:
- ValidationContext (ValidationContext& c)
- : Context (c),
- disabled_warnings_ (c.disabled_warnings_),
- disabled_warnings_all_ (c.disabled_warnings_all_),
- valid (c.valid),
- subst_group_warning_issued (c.subst_group_warning_issued)
- {
- }
-
- protected:
- const WarningSet& disabled_warnings_;
- bool disabled_warnings_all_;
- bool& valid;
- bool& subst_group_warning_issued;
- bool subst_group_warning_issued_;
- };
-
- //
- //
- struct Any: Traversal::Any, ValidationContext
- {
- Any (ValidationContext& c)
- : ValidationContext (c)
- {
- }
-
- struct Element: Traversal::Element, ValidationContext
- {
- Element (ValidationContext& c, SemanticGraph::Any& any)
- : ValidationContext (c),
- any_ (any),
- ns_ (any.definition_namespace ().name ())
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e)) return;
-
- using SemanticGraph::Any;
-
- bool q (e.qualified_p ());
- String ns (q ? e.namespace_ ().name () : "");
-
- for (Any::NamespaceIterator i (any_.namespace_begin ());
- i != any_.namespace_end (); ++i)
- {
- bool failed (false);
-
- if (*i == L"##any")
- {
- failed = true;
- }
- else if (*i == L"##other")
- {
- if (ns_)
- {
- // Note that here I assume that ##other does not
- // include names without target namespace. This
- // is not what the spec says but that seems to be
- // the consensus.
- //
- failed = q && ns != ns_;
- }
- else
- {
- // No target namespace.
- //
- failed = q && ns != L"";
- }
- }
- else if (*i == L"##local")
- {
- failed = !q || ns == L"";
- }
- else if (*i == L"##targetNamespace")
- {
- failed = (q && ns_ == ns) || (!q && ns_ == L"");
- }
- else
- {
- failed = q && *i == ns;
- }
-
- if (failed)
- {
- Any& a (any_);
-
- os << a.file () << ":" << a.line () << ":" << a.column ()
- << ": warning P001: namespace '" << *i << "' allows for "
- << "element '" << e.name () << "'" << endl;
-
- os << a.file () << ":" << a.line () << ":" << a.column ()
- << ": warning P001: generated code may not associate element '"
- << e.name () << "' correctly if it appears in place of "
- << "this wildcard" << endl;
-
- os << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: element '" << e.name () << "' is defined "
- << "here" << endl;
-
- os << a.file () << ":" << a.line () << ":" << a.column ()
- << ": info: turn on validation to ensure correct "
- << "association" << endl;
- }
- }
- }
-
- private:
- SemanticGraph::Any& any_;
- String ns_;
- };
-
- struct Complex: Traversal::Complex
- {
- Complex ()
- : up_ (true), down_ (true)
- {
- }
-
- virtual void
- post (Type& c)
- {
- // Go down the inheritance hierarchy.
- //
- if (down_)
- {
- bool up = up_;
- up_ = false;
-
- if (c.inherits_p ())
- dispatch (c.inherits ().base ());
-
- up_ = up;
- }
-
- // Go up the inheritance hierarchy.
- //
- if (up_)
- {
- bool down = down_;
- down_ = false;
-
- for (Type::BegetsIterator i (c.begets_begin ());
- i != c.begets_end (); ++i)
- {
- dispatch (i->derived ());
- }
-
- down_ = down;
- }
- }
-
- private:
- bool up_, down_;
- };
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- using SemanticGraph::Compositor;
-
- // Find our complex type.
- //
- Compositor* c (&a.contained_particle ().compositor ());
-
- while(!c->contained_compositor_p ())
- c = &c->contained_particle ().compositor ();
-
- SemanticGraph::Complex& type (
- dynamic_cast<SemanticGraph::Complex&> (
- c->contained_compositor ().container ()));
-
- Complex complex;
- Traversal::Names names;
- Element element (*this, a);
-
- complex >> names >> element;
-
- complex.dispatch (type);
- }
- };
-
-
- //
- //
- struct Traverser: Traversal::Schema,
- Traversal::Complex,
- Traversal::Type,
- Traversal::Element,
- ValidationContext
- {
- Traverser (ValidationContext& c)
- : ValidationContext (c),
- any_ (c)
- {
- *this >> sources_ >> *this;
- *this >> schema_names_ >> ns_ >> names_ >> *this;
-
- // Any
- //
- if (!validation && !is_disabled ("P001"))
- {
- *this >> contains_compositor_ >> compositor_ >> contains_particle_;
- contains_particle_ >> compositor_;
- contains_particle_ >> any_;
- }
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- using SemanticGraph::Schema;
-
- traverse (static_cast<SemanticGraph::Type&> (c));
-
- if (c.inherits_p ())
- {
- SemanticGraph::Type& t (c.inherits ().base ());
-
- if (t.named_p () &&
- types_.find (
- t.scope ().name () + L"#" + t.name ()) == types_.end ())
- {
- // Don't worry about types that are in included/imported
- // schemas.
- //
- Schema& s (dynamic_cast<Schema&> (t.scope ().scope ()));
-
- if (&s == &schema_root || sources_p (schema_root, s))
- {
- valid = false;
-
- wcerr << c.file () << ":" << c.line () << ":" << c.column ()
- << ": error: type '" << xpath (c) << "' inherits from "
- << "yet undefined type '" << xpath (t) << "'" << endl;
-
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << ": info: '" << xpath (t) << "' is defined here"
- << endl;
-
- wcerr << c.file () << ":" << c.line () << ":" << c.column ()
- << ": info: inheritance from a yet-undefined type is "
- << "not supported" << endl;
-
- wcerr << c.file () << ":" << c.line () << ":" << c.column ()
- << ": info: re-arrange your schema and try again"
- << endl;
- }
- }
- }
-
- Complex::traverse (c);
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- if (t.named_p ())
- {
- types_.insert (t.scope ().name () + L"#" + t.name ());
- }
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (is_disabled ("P002"))
- return;
-
- if (e.substitutes_p () &&
- !options.generate_polymorphic () &&
- !subst_group_warning_issued)
- {
- subst_group_warning_issued = true;
-
- os << e.file () << ":" << e.line () << ":" << e.column ()
- << ": warning P002: substitution groups are used but "
- << "--generate-polymorphic was not specified" << endl;
-
- os << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: generated code may not be able to parse "
- << "some conforming instances" << endl;
- }
- }
-
- // Return true if root sources s.
- //
- bool
- sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
- {
- using SemanticGraph::Schema;
- using SemanticGraph::Sources;
-
- for (Schema::UsesIterator i (root.uses_begin ());
- i != root.uses_end (); ++i)
- {
- if (i->is_a<Sources> ())
- {
- if (&i->schema () == &s || sources_p (i->schema (), s))
- return true;
- }
- }
-
- return false;
- }
-
- private:
- set<String> types_;
-
- Sources sources_;
-
- Traversal::Names schema_names_;
- Traversal::Namespace ns_;
-
- Traversal::Names names_;
-
- // Any.
- //
- Any any_;
- Traversal::Compositor compositor_;
- Traversal::ContainsParticle contains_particle_;
- Traversal::ContainsCompositor contains_compositor_;
- };
-
-
- struct AnonymousType: Traversal::Schema,
- Traversal::Complex,
- Traversal::Element,
- Traversal::Attribute,
- ValidationContext
- {
- AnonymousType (ValidationContext& c)
- : ValidationContext (c),
- anonymous_error_issued_ (false)
- {
- *this >> sources_ >> *this;
- *this >> schema_names_ >> ns_ >> names_ >> *this;
- *this >> names_;
- }
-
- bool
- traverse_common (SemanticGraph::Member& m)
- {
- SemanticGraph::Type& t (m.type ());
-
- if (!t.named_p ()
- && !t.is_a<SemanticGraph::Fundamental::IdRef> ()
- && !t.is_a<SemanticGraph::Fundamental::IdRefs> ())
- {
- if (!anonymous_error_issued_)
- {
- valid = false;
- anonymous_error_issued_ = true;
-
- wcerr << t.file ()
- << ": error: anonymous types detected"
- << endl;
-
- wcerr << t.file ()
- << ": info: "
- << "anonymous types are not supported in this mapping"
- << endl;
-
- wcerr << t.file ()
- << ": info: consider explicitly naming these types or "
- << "remove the --preserve-anonymous option to "
- << "automatically name them"
- << endl;
-
- if (!options.show_anonymous ())
- wcerr << t.file ()
- << ": info: use --show-anonymous option to see these "
- << "types" << endl;
- }
-
- return true;
- }
-
- return false;
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e)) return;
-
- if (traverse_common (e))
- {
- if (options.show_anonymous ())
- {
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": error: element '" << xpath (e) << "' "
- << "is of anonymous type" << endl;
- }
- }
- else
- Traversal::Element::traverse (e);
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- if (traverse_common (a))
- {
- if (options.show_anonymous ())
- {
- wcerr << a.file () << ":" << a.line () << ":" << a.column ()
- << ": error: attribute '" << xpath (a) << "' "
- << "is of anonymous type" << endl;
- }
- }
- else
- Traversal::Attribute::traverse (a);
- }
-
- private:
- bool anonymous_error_issued_;
-
- set<String> types_;
-
- Sources sources_;
-
- Traversal::Names schema_names_;
- Traversal::Namespace ns_;
-
- Traversal::Names names_;
- };
-
- struct GlobalElement: Traversal::Element, ValidationContext
- {
- GlobalElement (ValidationContext& c, SemanticGraph::Element*& element)
- : ValidationContext (c), element_ (element)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (!valid)
- return;
-
- if (options.root_element_first ())
- {
- if (element_ == 0)
- element_ = &e;
- }
- else if (options.root_element_last ())
- {
- element_ = &e;
- }
- else if (String name = options.root_element ())
- {
- if (e.name () == name)
- element_ = &e;
- }
- else
- {
- if (element_ == 0)
- element_ = &e;
- else
- {
- wcerr << schema_root.file () << ": error: unable to generate "
- << "the test driver without a unique document root"
- << endl;
-
- wcerr << schema_root.file () << ": info: use --root-element-* "
- << "options to specify the document root" << endl;
-
- valid = false;
- }
- }
- }
-
- private:
- SemanticGraph::Element*& element_;
- };
-
- }
-
- bool Validator::
- validate (options const& ops,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- bool gen_driver,
- const WarningSet& disabled_warnings)
- {
- bool valid (true);
- ValidationContext ctx (root, path, ops, disabled_warnings, valid);
-
- //
- //
- if (ops.char_type () != "char" &&
- ops.char_type () != "wchar_t" &&
- !ctx.is_disabled ("P003"))
- {
- wcerr << "warning P003: unknown base character type '" <<
- ops.char_type ().c_str () << "'" << endl;
- }
-
- //
- //
- if (ops.xml_parser () != "xerces" &&
- ops.xml_parser () != "expat" &&
- !ctx.is_disabled ("P004"))
- {
- wcerr << "warning P004: unknown underlying XML parser '" <<
- ops.xml_parser ().c_str () << "'" << endl;
- }
-
- //
- //
- if (ops.xml_parser () == "expat" &&
- ops.char_type () == "wchar_t")
- {
- wcerr << "error: using expat with wchar_t is not supported"
- << endl;
-
- return false;
- }
-
- //
- //
- if (ops.xml_parser () == "expat" &&
- !ops.char_encoding ().empty () &&
- ops.char_encoding () != "utf8")
- {
- wcerr << "error: using expat with character encoding other than "
- << "utf8 is not supported"
- << endl;
-
- return false;
- }
-
- //
- //
- if (ops.generate_validation () && ops.suppress_validation ())
- {
- wcerr << "error: mutually exclusive options specified: "
- << "--generate-validation and --suppress-validation"
- << endl;
-
- return false;
- }
-
- //
- //
- if (ops.generate_noop_impl () && ops.generate_print_impl ())
- {
- wcerr << "error: mutually exclusive options specified: "
- << "--generate-noop-impl and --generate-print-impl"
- << endl;
-
- return false;
- }
-
- //
- //
- {
- bool ref (ops.root_element_first ());
- bool rel (ops.root_element_last ());
- bool re (ops.root_element ());
-
- if ((ref && rel) || (ref && re) || (rel && re))
- {
- wcerr << "error: mutually exclusive options specified: "
- << "--root-element-last, --root-element-first, and "
- << "--root-element"
- << endl;
-
- return false;
- }
- }
-
- //
- //
- bool import_maps (ops.import_maps ());
- bool export_maps (ops.export_maps ());
-
- if (import_maps && export_maps)
- {
- wcerr << "error: --import-maps and --export-maps are "
- << "mutually exclusive" << endl;
-
- return false;
- }
-
- if (import_maps && !ctx.polymorphic)
- {
- wcerr << "error: --import-maps can only be specified together with "
- << "--generate-polymorphic" << endl;
-
- return false;
- }
-
- if (export_maps && !ctx.polymorphic)
- {
- wcerr << "error: --export-maps can only be specified together with "
- << "--generate-polymorphic" << endl;
-
- return false;
- }
-
- // Test for anonymout types.
- //
- {
- AnonymousType traverser (ctx);
- traverser.dispatch (root);
- }
-
-
- // Test the rest.
- //
- if (valid)
- {
- Traverser traverser (ctx);
- traverser.dispatch (root);
- }
-
- // Test that the document root is unique.
- //
- if (valid && gen_driver)
- {
- SemanticGraph::Element* element (0);
-
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- GlobalElement global_element (ctx, element);
-
- schema >> schema_names >> ns >> ns_names >> global_element;
-
- schema.dispatch (root);
-
- if (valid && element == 0)
- {
- wcerr << root.file () << ": error: unable to generate the "
- << "test driver without a global element (document root)"
- << endl;
-
- valid = false;
- }
- }
-
- return valid;
- }
- }
-}
diff --git a/xsd/cxx/parser/validator.hxx b/xsd/cxx/parser/validator.hxx
deleted file mode 100644
index 5f10526..0000000
--- a/xsd/cxx/parser/validator.hxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// file : xsd/cxx/parser/validator.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_PARSER_VALIDATOR_HXX
-#define CXX_PARSER_VALIDATOR_HXX
-
-#include <xsd.hxx>
-#include <types.hxx>
-
-#include <cxx/parser/elements.hxx>
-#include <cxx/parser/options.hxx>
-
-namespace CXX
-{
- namespace Parser
- {
- class Validator
- {
- public:
- bool
- validate (options const&,
- SemanticGraph::Schema&,
- SemanticGraph::Path const& tu,
- bool gen_driver,
- const WarningSet& disabled_warnings);
- };
- }
-}
-
-#endif // CXX_PARSER_VALIDATOR_HXX
diff --git a/xsd/cxx/tree/counter.cxx b/xsd/cxx/tree/counter.cxx
deleted file mode 100644
index a5bdbb3..0000000
--- a/xsd/cxx/tree/counter.cxx
+++ /dev/null
@@ -1,260 +0,0 @@
-// file : xsd/cxx/tree/counter.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/counter.hxx>
-
-#include <iostream>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct Member: Traversal::Member
- {
- Member (size_t& complexity)
- : complexity_ (complexity)
- {
- }
-
- virtual void
- traverse (Type&)
- {
- complexity_++;
- }
-
- size_t& complexity_;
- };
-
- struct Any: Traversal::Any, Traversal::AnyAttribute
- {
- Any (size_t& complexity)
- : complexity_ (complexity)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any&)
- {
- complexity_++;
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute&)
- {
- complexity_++;
- }
-
- size_t& complexity_;
- };
-
- struct TypeBase: Traversal::List,
- Traversal::Union,
- Traversal::Enumeration,
- Traversal::Complex,
- Context
- {
- TypeBase (Context& c, size_t& complexity)
- : Context (c), complexity_ (complexity)
- {
- }
-
- virtual void
- traverse (SemanticGraph::List&)
- {
- complexity_++;
- }
-
- virtual void
- traverse (SemanticGraph::Union&)
- {
- complexity_++;
- }
-
- virtual void
- traverse (SemanticGraph::Enumeration& e)
- {
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- complexity_ += (string_based ? 1 : 2);
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- complexity_++; // One for the type itself.
-
- // Plus some for each member.
- //
- Any any (complexity_);
- Member member (complexity_);
- Traversal::Names names;
-
- names >> member;
-
- if (options.generate_wildcard ())
- names >> any;
-
- Complex::names (c, names);
- }
-
- private:
- size_t& complexity_;
- };
-
-
- //
- //
- struct GlobalType: Traversal::Type, Context
-
- {
- GlobalType (Context& c, Counts& counts)
- : Context (c), counts_ (counts)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- counts_.global_types++;
-
- size_t complexity (0);
- TypeBase type (*this, complexity);
- type.dispatch (t);
-
- counts_.complexity_total += complexity;
- counts_.complexity.push_back (complexity);
- }
-
- private:
- Counts& counts_;
- };
-
- //
- //
- struct GlobalElement: Traversal::Element,
- GlobalElementBase,
- Context
- {
- GlobalElement (Context& c, Counts& counts)
- : GlobalElementBase (c),
- Context (c),
- counts_ (counts),
- last_ (0)
- {
- }
-
- ~GlobalElement ()
- {
- if (last_ != 0)
- {
- last_->context ().set ("last", true);
- count_last ();
- }
- }
-
- virtual void
- traverse (Type& e)
- {
- // Check if the previous element we saw needs to be generated.
- //
- if (last_ != 0)
- count_last ();
-
- last_ = &e;
-
- if (counts_.global_elements == 0)
- e.context ().set ("first", true);
-
- counts_.global_elements++;
- }
-
- private:
- void
- count_last ()
- {
- if (generate_p (*last_))
- {
- counts_.generated_global_elements++;
-
- size_t complexity (0);
-
- if (doc_root_p (*last_))
- {
- if (options.generate_element_type ())
- {
- complexity += 1; // For c-tors and d-tor.
-
- if (!options.suppress_parsing ())
- complexity += 1;
-
- if (options.generate_serialization ())
- complexity += 1;
- }
- else
- {
- if (!options.suppress_parsing ())
- complexity += 6; // 13 parsing functions.
-
- if (options.generate_serialization ())
- complexity += 4; // 8 serialization functions.
- }
- }
-
- if (complexity == 0)
- {
- // This element must be a substitution group members. For
- // such elements we are only generating an entry in a map.
- // We will assign it a complexity of 1 so that we don't
- // end up with the total complexity that is less than the
- // number of elements and types.
- //
- complexity = 1;
- }
-
- counts_.complexity_total += complexity;
- counts_.complexity.push_back (complexity);
- }
- }
-
- private:
- Counts& counts_;
- SemanticGraph::Element* last_;
- };
- }
-
- Counts Counter::
- count (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& path)
- {
- Counts counts;
- Context ctx (std::wcerr, tu, path, ops, counts, false, 0, 0, 0, 0);
-
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- GlobalType global_type (ctx, counts);
- GlobalElement global_element (ctx, counts);
-
- schema >> schema_names >> ns >> ns_names;
-
- ns_names >> global_element;
- ns_names >> global_type;
-
- schema.dispatch (tu);
-
- return counts;
- }
- }
-}
diff --git a/xsd/cxx/tree/counter.hxx b/xsd/cxx/tree/counter.hxx
deleted file mode 100644
index 28dccf2..0000000
--- a/xsd/cxx/tree/counter.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// file : xsd/cxx/tree/counter.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_COUNTER_HXX
-#define CXX_TREE_COUNTER_HXX
-
-#include <cxx/tree/elements.hxx>
-#include <cxx/tree/options.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- class Counter
- {
- public:
- Counts
- count (options const&,
- SemanticGraph::Schema&,
- SemanticGraph::Path const&);
- };
- }
-}
-
-#endif // CXX_TREE_COUNTER_HXX
diff --git a/xsd/cxx/tree/default-value.cxx b/xsd/cxx/tree/default-value.cxx
deleted file mode 100644
index 24ec454..0000000
--- a/xsd/cxx/tree/default-value.cxx
+++ /dev/null
@@ -1,1273 +0,0 @@
-// file : xsd/cxx/tree/default-value.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/default-value.hxx>
-
-using std::hex;
-using std::dec;
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- void
- normalize (String& s)
- {
- size_t n (s.size ());
-
- for (size_t i (0); i < n; ++i)
- {
- wchar_t& c (s[i]);
-
- if (c == 0x0D || // carriage return
- c == 0x09 || // tab
- c == 0x0A)
- c = 0x20;
- }
- }
-
- void
- collapse (String& s)
- {
- size_t n (s.size ()), j (0);
- bool subs (false), trim (true);
-
- for (size_t i (0); i < n; ++i)
- {
- wchar_t c (s[i]);
-
- if (c == 0x20 || c == 0x09 || c == 0x0A)
- subs = true;
- else
- {
- if (subs)
- {
- subs = false;
-
- if (!trim)
- s[j++] = 0x20;
- }
-
- if (trim)
- trim = false;
-
- s[j++] = c;
- }
- }
-
- s.resize (j);
- }
-
- void
- strip_zeros (String& s)
- {
- size_t n (s.size ()), i (0);
-
- if (n > 0 && (s[i] == '-' || s[i] == '+'))
- i++;
-
- size_t j (i);
-
- bool strip (true);
-
- for (; i < n; ++i)
- {
- wchar_t c (s[i]);
-
- if (c == '0')
- {
- if (!strip)
- s[j++] = c;
- }
- else
- {
- s[j++] = c;
-
- if (strip)
- strip = false;
- }
- }
-
- if (strip && j < n)
- s[j++] = '0'; // There was nothing except zeros so add one back.
-
- s.resize (j);
- }
-
- void
- make_float (String& s)
- {
- if (s.find ('.') == String::npos &&
- s.find ('e') == String::npos &&
- s.find ('E') == String::npos)
- s += L".0";
- }
- }
-
- //
- // IsLiteralValue
- //
-
- IsLiteralValue::
- IsLiteralValue (bool& r)
- : IsFundamentalType (r)
- {
- *this >> inherits_ >> *this;
- }
-
- void IsLiteralValue::
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c);
- }
-
- //
- // LiteralValue
- //
-
- LiteralValue::
- LiteralValue (Context& c)
- : Context (c)
- {
- *this >> inherits_ >> *this;
- }
-
- String LiteralValue::
- dispatch (SemanticGraph::Node& type, String const& value)
- {
- literal_.clear ();
- value_ = value;
- Traversal::NodeBase::dispatch (type);
- return literal_;
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c);
- }
-
- // Boolean.
- //
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Boolean&)
- {
- collapse (value_);
- literal_ = (value_ == L"true" || value_ == L"1") ? L"true" : L"false";
- }
-
- // Integral types.
- //
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Byte&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_;
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::UnsignedByte&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"U";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Short&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_;
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::UnsignedShort&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"U";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Int&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_;
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::UnsignedInt&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"U";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Long&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_;
- literal_ += L"LL";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::UnsignedLong&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_;
- literal_ += L"ULL";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Integer&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"LL";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::NonPositiveInteger&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"LL";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::NonNegativeInteger&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"ULL";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::PositiveInteger&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"ULL";
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::NegativeInteger&)
- {
- collapse (value_);
- strip_zeros (value_);
- literal_ = value_ + L"LL";
- }
-
- // Floats.
- //
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- collapse (value_);
-
- if (value_ == L"NaN")
- {
- literal_ = L"::std::numeric_limits< " + fq_name (t) +
- L" >::quiet_NaN ()";
- }
- else if (value_ == L"INF")
- {
- literal_ = L"::std::numeric_limits< " + fq_name (t) +
- L" >::infinity ()";
- }
- else if (value_ == L"-INF")
- {
- literal_ = L"- ::std::numeric_limits< " + fq_name (t) +
- L" >::infinity ()";
- }
- else
- {
- strip_zeros (value_);
- make_float (value_);
- literal_ = value_ + L"F";
- }
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- collapse (value_);
-
- if (value_ == L"NaN")
- {
- literal_ = L"::std::numeric_limits< " + fq_name (t) +
- L" >::quiet_NaN ()";
- }
- else if (value_ == L"INF")
- {
- literal_ = L"::std::numeric_limits< " + fq_name (t) +
- L" >::infinity ()";
- }
- else if (value_ == L"-INF")
- {
- literal_ = L"- ::std::numeric_limits< " + fq_name (t) +
- L" >::infinity ()";
- }
- else
- {
- strip_zeros (value_);
- make_float (value_);
- literal_ = value_;
- }
- }
-
- void LiteralValue::
- traverse (SemanticGraph::Fundamental::Decimal&)
- {
- collapse (value_);
- strip_zeros (value_);
- make_float (value_);
- literal_ = value_;
- }
-
- //
- // InitKind
- //
-
- InitKind::
- InitKind (Kind& r)
- : r_ (r)
- {
- *this >> inherits_ >> *this;
- }
-
- void InitKind::
- traverse (SemanticGraph::List&)
- {
- r_ = function;
- }
-
- void InitKind::
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c);
- }
-
- void InitKind::
- traverse (SemanticGraph::Fundamental::Base64Binary&)
- {
- r_ = data;
- }
-
- void InitKind::
- traverse (SemanticGraph::Fundamental::HexBinary&)
- {
- r_ = data;
- }
-
- void InitKind::
- traverse (SemanticGraph::Fundamental::NameTokens&)
- {
- r_ = function;
- }
-
- void InitKind::
- traverse (SemanticGraph::Fundamental::IdRefs&)
- {
- r_ = function;
- }
-
- void InitKind::
- traverse (SemanticGraph::Fundamental::Entities&)
- {
- r_ = function;
- }
-
- //
- // InitValue
- //
-
- InitValue::
- InitValue (Context& c)
- : Context (c), type_name_ (c), literal_value_ (c)
- {
- }
-
- void InitValue::
- dispatch (SemanticGraph::Node& type, String const& value)
- {
- value_ = value;
- Traversal::NodeBase::dispatch (type);
- }
-
- void InitValue::
- traverse (SemanticGraph::List& l)
- {
- collapse (value_);
-
- if (!value_)
- return;
-
- SemanticGraph::Type& t (l.argumented ().type ());
-
- String ov (value_);
- size_t b (0);
-
- for (size_t e (ov.find (' ')); ; e = ov.find (' ', b))
- {
- String v (ov, b, e != String::npos ? e - b : e);
-
- os << "{";
- type_name_.dispatch (t);
- os << " tmp (";
-
- String lit (literal_value_.dispatch (t, v));
-
- if (lit)
- os << lit;
- else
- {
- value_ = v;
- Traversal::NodeBase::dispatch (t);
- }
-
- os << ");"
- << "r.push_back (tmp);"
- << "}";
-
- if (e == String::npos)
- break;
-
- b = e + 1;
- }
-
- value_ = ov;
- }
-
- void InitValue::
- traverse (SemanticGraph::Union&)
- {
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Complex& c)
- {
- Traversal::NodeBase::dispatch (ultimate_base (c));
- }
-
- // anyType & anySimpleType.
- //
- void InitValue::
- traverse (SemanticGraph::AnyType& t)
- {
- os << fq_name (t) << " (" << strlit (value_) << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::AnySimpleType& t)
- {
- os << fq_name (t) << " (" << strlit (value_) << ")";
- }
-
- // Strings.
- //
- void InitValue::
- traverse (SemanticGraph::Fundamental::String&)
- {
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::NormalizedString&)
- {
- normalize (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Token&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::NameToken&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::NameTokens&)
- {
- string_sequence_type (
- dynamic_cast<SemanticGraph::Type&> (
- xs_ns ().find ("NMTOKEN").first->named ()));
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Name&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::NCName&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Language&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- // Qualified name.
- //
- void InitValue::
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- size_t p (value_.rfind ('#'));
-
- if (p != String::npos)
- {
- String ns (value_, 0, p);
- String qname (value_, p + 1, String::npos);
-
- collapse (ns);
- collapse (qname);
-
- p = qname.find (':');
-
- String name;
- if (p != String::npos)
- name.assign (qname, p + 1, String::npos);
- else
- name = qname;
-
- os << fq_name (t) << " (" << strlit (ns) << ", " <<
- strlit (name) << ")";
- }
- else
- {
- // Unqualified name.
- //
- collapse (value_);
- os << fq_name (t) << " (" << strlit (value_) << ")";
- }
- }
-
- // ID/IDREF.
- //
- void InitValue::
- traverse (SemanticGraph::Fundamental::Id&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::IdRef&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::IdRefs&)
- {
- string_sequence_type (
- dynamic_cast<SemanticGraph::Type&> (
- xs_ns ().find ("IDREF").first->named ()));
- }
-
- // URI.
- //
- void InitValue::
- traverse (SemanticGraph::Fundamental::AnyURI&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- // Binary.
- //
- static unsigned char
- base64_decode (unsigned char c)
- {
- unsigned char r = 0xFF;
-
- if (c >= 'A' && c <= 'Z')
- r = static_cast<unsigned char> (c - 'A');
- else if (c >= 'a' && c <= 'z')
- r = static_cast<unsigned char> (c - 'a' + 26);
- else if (c >= '0' && c <= '9')
- r = static_cast<unsigned char> (c - '0' + 52);
- else if (c == '+')
- r = 62;
- else if (c == '/')
- r = 63;
-
- return r;
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- collapse (value_);
-
- if (dispatch_count_++ == 0)
- {
- if (value_)
- {
- os << "unsigned char " << data_ << "[] = {";
-
- // Decode.
- //
- size_t size (value_.size ());
-
- // Remove all whitespaces.
- //
- {
- size_t j (0);
- bool subs (false);
-
- for (size_t i (0); i < size; ++i)
- {
- wchar_t c (value_[i]);
-
- if (c == 0x20 || c == 0x0A || c == 0x0D || c == 0x09)
- subs = true;
- else
- {
- if (subs)
- subs = false;
-
- value_[j++] = c;
- }
- }
-
- size = j;
- value_.resize (size, '\0');
- }
-
- // Our length should be a multiple of four.
- //
- size_t quad_count (size / 4);
-
- // Source and destination indexes.
- //
- size_t si (0), di (0);
-
- // Process all quads except the last one.
- //
- unsigned short v;
- unsigned char b1, b2, b3, b4;
-
- wchar_t prev_fill (os.fill ('0'));
-
- for (size_t q (0); q < quad_count - 1; ++q)
- {
- b1 = base64_decode (value_[si++]);
- b2 = base64_decode (value_[si++]);
- b3 = base64_decode (value_[si++]);
- b4 = base64_decode (value_[si++]);
-
- if (q != 0)
- os << ", ";
-
- if (di % 9 == 0)
- os << endl;
-
- os << hex;
-
- v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
- os.width (2);
- os << "0x" << v;
-
- v = static_cast<unsigned char> ((b2 << 4) | (b3 >> 2));
- os.width (2);
- os << ", 0x" << v;
-
- v = static_cast<unsigned char> ((b3 << 6) | b4);
- os.width (2);
- os << ", 0x" << v;
-
- os << dec;
-
- di += 3;
- }
-
- // Process the last quad. The first two octets are always there.
- //
- b1 = base64_decode (value_[si++]);
- b2 = base64_decode (value_[si++]);
-
- wchar_t e3 (value_[si++]), e4 (value_[si++]);
-
- if (quad_count != 1)
- os << ", ";
-
- if (di % 9 == 0)
- os << endl;
-
- if (e4 == '=')
- {
- if (e3 == '=')
- {
- // Two pads. Last 4 bits in b2 should be zero.
- //
- v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
- os << "0x" << hex << v << dec;
- di++;
- }
- else
- {
- // One pad. Last 2 bits in b3 should be zero.
- //
- b3 = base64_decode (e3);
-
- os << hex;
-
- v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
- os.width (2);
- os << "0x" << v;
-
- v = static_cast<unsigned char> ((b2 << 4) | (b3 >> 2));
- os.width (2);
- os << ", 0x" << v;
-
- os << dec;
-
- di += 2;
- }
- }
- else
- {
- // No pads.
- //
- b3 = base64_decode (e3);
- b4 = base64_decode (e4);
-
- os << hex;
-
- v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
- os.width (2);
- os << "0x" << v;
-
- v = static_cast<unsigned char> ((b2 << 4) | (b3 >> 2));
- os.width (2);
- os << ", 0x" << v;
-
- v = static_cast<unsigned char> ((b3 << 6) | b4);
- os.width (2);
- os << ", 0x" << v;
-
- os << dec;
-
- di += 3;
- }
-
- os.fill (prev_fill);
-
- os << "};";
- }
- }
- else
- {
- os << fq_name (t) << " (";
-
- if (value_)
- os << data_ << "," << endl
- << "sizeof (" << data_ << ")," << endl
- << "sizeof (" << data_ << ")," << endl
- << "false";
- else
- os << "0";
-
-
- os << ")";
- }
- }
-
- static unsigned char
- hex_decode (unsigned char c)
- {
- unsigned char r = 0xFF;
-
- if (c >= '0' && c <= '9')
- r = static_cast<unsigned char> (c - '0');
- else if (c >= 'A' && c <= 'F')
- r = static_cast<unsigned char> (10 + (c - 'A'));
- else if (c >= 'a' && c <= 'f')
- r = static_cast<unsigned char> (10 + (c - 'a'));
-
- return r;
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- collapse (value_);
-
- if (dispatch_count_++ == 0)
- {
- if (value_)
- {
- os << "unsigned char " << data_ << "[] = {";
-
- // Decode.
- //
- size_t n (value_.size () / 2);
- wchar_t prev_fill (os.fill ('0'));
-
- for (size_t i (0); i < n; ++i)
- {
- unsigned char h (hex_decode (value_[2 * i]));
- unsigned char l (hex_decode (value_[2 * i + 1]));
-
- if (h == 0xFF || l == 0xFF)
- break;
-
- if (i != 0)
- os << ", ";
-
- if (i % 9 == 0)
- os << endl;
-
- unsigned short v = static_cast<unsigned char> ((h << 4) | l);
- os.width (2);
- os << "0x" << hex << v << dec;
- }
-
- os.fill (prev_fill);
-
- os << "};";
- }
- }
- else
- {
- os << fq_name (t) << " (";
-
- if (value_)
- os << data_ << "," << endl
- << "sizeof (" << data_ << ")," << endl
- << "sizeof (" << data_ << ")," << endl
- << "false";
- else
- os << "0";
-
-
- os << ")";
- }
- }
-
- // Date/time.
- //
- void InitValue::
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- // date := [-]CCYY[N]*-MM-DD[Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- size_t b (0);
- size_t e (value_.find ('-', value_[0] == '-' ? 5 : 4));
- String year (value_, 0, e);
-
- b = e + 1;
- String month (value_, b, 2);
-
- b += 3;
- String day (value_, b, 2);
-
- strip_zeros (year);
- strip_zeros (month);
- strip_zeros (day);
-
- os << fq_name (t) << " (" << year << ", " << month << ", " << day;
- time_zone (b + 2);
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- // date_time := [-]CCYY[N]*-MM-DDTHH:MM:SS[.S+][Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- size_t b (0);
- size_t e (value_.find ('-', value_[0] == '-' ? 5 : 4));
- String year (value_, 0, e);
- b = e + 1;
-
- String month (value_, b, 2);
- b += 3;
-
- String day (value_, b, 2);
- b += 3;
-
- String hours (value_, b, 2);
- b += 3;
-
- String minutes (value_, b, 2);
- b += 3;
-
- e = b + 2;
- for (; e < value_.size (); ++e)
- {
- wchar_t c (value_[e]);
-
- if (c == 'Z' || c == '+' || c == '-')
- break;
- }
-
- String seconds (value_, b, e - b);
-
- strip_zeros (year);
- strip_zeros (month);
- strip_zeros (day);
- strip_zeros (hours);
- strip_zeros (minutes);
- strip_zeros (seconds);
- make_float (seconds);
-
- os << fq_name (t) << " ("
- << year << ", " << month << ", " << day << ", "
- << hours << ", " << minutes << ", " << seconds;
- time_zone (e);
- os << ")";
- }
-
- namespace
- {
- size_t
- find_delim (String const& s, size_t pos)
- {
- for (; pos < s.size (); ++pos)
- {
- wchar_t c (s[pos]);
-
- if (c == 'Y' || c == 'D' || c == 'M' || c == 'H' ||
- c == 'M' || c == 'S' || c == 'T')
- break;
- }
-
- return pos;
- }
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- // duration := [-]P[nY][nM][nD][TnHnMn[.n+]S]
- //
- collapse (value_);
-
- size_t b (1), e, n (value_.size ());
-
- os << fq_name (t) << " (";
-
- if (value_[0] == '-')
- {
- os << "true, ";
- b++;
- }
- else
- os << "false, ";
-
- e = find_delim (value_, b);
-
- if (e < n && value_[e] == 'Y')
- {
- String v (value_, b, e - b);
- strip_zeros (v);
- os << v << ", ";
-
- b = e + 1;
- e = find_delim (value_, b);
- }
- else
- os << "0, ";
-
- if (e < n && value_[e] == 'M')
- {
- String v (value_, b, e - b);
- strip_zeros (v);
- os << v << ", ";
-
- b = e + 1;
- e = find_delim (value_, b);
- }
- else
- os << "0, ";
-
- if (e < n && value_[e] == 'D')
- {
- String v (value_, b, e - b);
- strip_zeros (v);
- os << v << ", ";
-
- b = e + 1;
- e = find_delim (value_, b);
- }
- else
- os << "0, ";
-
- if (e < n && value_[e] == 'T')
- {
- b = e + 1;
- e = find_delim (value_, b);
- }
-
- if (e < n && value_[e] == 'H')
- {
- String v (value_, b, e - b);
- strip_zeros (v);
- os << v << ", ";
-
- b = e + 1;
- e = find_delim (value_, b);
- }
- else
- os << "0, ";
-
- if (e < n && value_[e] == 'M')
- {
- String v (value_, b, e - b);
- strip_zeros (v);
- os << v << ", ";
-
- b = e + 1;
- e = find_delim (value_, b);
- }
- else
- os << "0, ";
-
- if (e < n && value_[e] == 'S')
- {
- String v (value_, b, e - b);
- strip_zeros (v);
- make_float (v);
- os << v;
-
- b = e + 1;
- e = find_delim (value_, b);
- }
- else
- os << "0.0";
-
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- // gday := ---DD[Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- String day (value_, 3, 2);
- strip_zeros (day);
-
- os << fq_name (t) << " (" << day;
- time_zone (5);
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- // gmonth := --MM[Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- String month (value_, 2, 2);
- strip_zeros (month);
-
- os << fq_name (t) << " (" << month;
- time_zone (4);
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- // gmonth_day := --MM-DD[Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- String month (value_, 2, 2);
- String day (value_, 5, 2);
-
- strip_zeros (month);
- strip_zeros (day);
-
- os << fq_name (t) << " (" << month << ", " << day;
- time_zone (7);
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- // gyear := [-]CCYY[N]*[Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- size_t pos (value_[0] == '-' ? 5 : 4);
- for (; pos < value_.size (); ++pos)
- {
- wchar_t c (value_[pos]);
-
- if (c == 'Z' || c == '+' || c == '-')
- break;
- }
-
- String year (value_, 0, pos);
- strip_zeros (year);
-
- os << fq_name (t) << " (" << year;
- time_zone (pos);
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- // gyear_month := [-]CCYY[N]*-MM[Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- size_t pos (value_.find ('-', value_[0] == '-' ? 5 : 4));
-
- String year (value_, 0, pos);
- String month (value_, pos + 1, 2);
-
- strip_zeros (year);
- strip_zeros (month);
-
- os << fq_name (t) << " (" << year << ", " << month;
- time_zone (pos + 3);
- os << ")";
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- // time := HH:MM:SS[.S+][Z|(+|-)HH:MM]
- //
- collapse (value_);
-
- String hours (value_, 0, 2);
- String minutes (value_, 3, 2);
-
- size_t e (8);
- for (; e < value_.size (); ++e)
- {
- wchar_t c (value_[e]);
-
- if (c == 'Z' || c == '+' || c == '-')
- break;
- }
-
- String seconds (value_, 6, e - 6);
-
- strip_zeros (hours);
- strip_zeros (minutes);
- strip_zeros (seconds);
- make_float (seconds);
-
- os << fq_name (t) << " (" << hours << ", " << minutes << ", " << seconds;
- time_zone (e);
- os << ")";
- }
-
- void InitValue::
- time_zone (size_t pos)
- {
- // time_zone := Z|(+|-)HH:MM
- //
- if (pos < value_.size ())
- {
- String h, m;
-
- if (value_[pos] == 'Z')
- {
- h = "0";
- m = "0";
- }
- else
- {
- if (value_[pos] == '-')
- {
- h = "-";
- m = "-";
- }
-
- h.append (value_, pos + 1, 2);
- m.append (value_, pos + 4, 2);
-
- strip_zeros (h);
- strip_zeros (m);
- }
-
- os << ", " << h << ", " << m;
- }
- }
-
- // Entity.
- //
- void InitValue::
- traverse (SemanticGraph::Fundamental::Entity&)
- {
- collapse (value_);
- os << strlit (value_);
- }
-
- void InitValue::
- traverse (SemanticGraph::Fundamental::Entities&)
- {
- string_sequence_type (
- dynamic_cast<SemanticGraph::Type&> (
- xs_ns ().find ("ENTITY").first->named ()));
- }
-
- void InitValue::
- string_sequence_type (SemanticGraph::Type& t)
- {
- collapse (value_);
-
- if (!value_)
- return;
-
- size_t b (0);
-
- for (size_t e (value_.find (' ')); ; e = value_.find (' ', b))
- {
- String v (value_, b, e != String::npos ? e - b : e);
-
- os << "{";
- type_name_.dispatch (t);
- os << " tmp (" << strlit (v) << ");"
- << "r.push_back (tmp);"
- << "}";
-
- if (e == String::npos)
- break;
-
- b = e + 1;
- }
- }
- }
-}
diff --git a/xsd/cxx/tree/default-value.hxx b/xsd/cxx/tree/default-value.hxx
deleted file mode 100644
index 3937d3a..0000000
--- a/xsd/cxx/tree/default-value.hxx
+++ /dev/null
@@ -1,355 +0,0 @@
-// file : xsd/cxx/tree/default-value.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_DEFAULT_VALUE_HXX
-#define CXX_TREE_DEFAULT_VALUE_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- struct IsLiteralValue: IsFundamentalType, Traversal::Complex
- {
- IsLiteralValue (bool& r);
-
- virtual void
- traverse (SemanticGraph::Complex&);
-
- private:
- Traversal::Inherits inherits_;
- };
-
- struct LiteralValue: Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Complex,
-
- Context
- {
- LiteralValue (Context&);
-
- String
- dispatch (SemanticGraph::Node& type, String const& value);
-
- // Handle inheritance.
- //
- virtual void
- traverse (SemanticGraph::Complex&);
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean&);
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger&);
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal&);
-
- private:
- String value_;
- String literal_;
-
- Traversal::Inherits inherits_;
- };
-
- // Some initialization (e.g., list) need a function body while others
- // (e.g., *binary) require extra data.
- //
- struct InitKind: Traversal::List,
- Traversal::Complex,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::IdRefs,
- Traversal::Fundamental::Entities
- {
- enum Kind
- {
- simple,
- data,
- function
- };
-
- // Should be simple initially.
- //
- InitKind (Kind& r);
-
- virtual void
- traverse (SemanticGraph::List&);
-
- virtual void
- traverse (SemanticGraph::Complex&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities&);
-
- private:
- Kind& r_;
- Traversal::Inherits inherits_;
- };
-
- struct InitValue: Traversal::List,
- Traversal::Union,
- Traversal::Complex,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities,
-
- Context
- {
- InitValue (Context&);
-
- void
- data (String const& data)
- {
- data_ = data;
- dispatch_count_ = 0;
- }
-
- void
- dispatch (SemanticGraph::Node& type, String const& value);
-
- virtual void
- traverse (SemanticGraph::List&);
-
- virtual void
- traverse (SemanticGraph::Union&);
-
- virtual void
- traverse (SemanticGraph::Complex&);
-
- // anyType & anySimpleType.
- //
- virtual void
- traverse (SemanticGraph::AnyType&);
-
- virtual void
- traverse (SemanticGraph::AnySimpleType&);
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language&);
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName&);
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs&);
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI&);
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary&);
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time&);
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity&);
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities&);
-
- private:
- void
- string_sequence_type (SemanticGraph::Type& element_type);
-
- void
- time_zone (size_t pos);
-
- private:
- String value_;
- String data_;
- size_t dispatch_count_;
- MemberTypeName type_name_;
- LiteralValue literal_value_;
- };
- }
-}
-
-#endif // CXX_TREE_DEFAULT_VALUE_HXX
diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx
deleted file mode 100644
index 78281cd..0000000
--- a/xsd/cxx/tree/elements.cxx
+++ /dev/null
@@ -1,1409 +0,0 @@
-// file : xsd/cxx/tree/elements.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- // Context
- //
- Context::
- Context (std::wostream& o,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- options_type const& ops,
- Counts const& counts_,
- bool generate_xml_schema__,
- StringLiteralMap const* map,
- Regex const* fe,
- Regex const* he,
- Regex const* ie)
- : CXX::Context (o, root, path, ops, map),
- options (ops),
- counts (counts_),
- any_type (any_type_),
- any_simple_type (any_simple_type_),
- element_type (element_type_),
- container (container_),
- flags_type (flags_type_),
- qname_type (qname_type_),
- xs_string_type (xs_string_type_),
- properties_type (properties_type_),
- error_handler_type (error_handler_type_),
- list_stream_type (list_stream_type_),
- namespace_infomap_type (namespace_infomap_type_),
- parser_type (parser_type_),
- std_ostream_type (std_ostream_type_),
- ostream_type (ostream_type_),
- istream_type (istream_type_),
- xerces_ns (xerces_ns_),
- dom_auto_ptr (dom_auto_ptr_),
- dom_node_key (dom_node_key_),
- as_double_type (as_double_type_),
- as_decimal_type (as_decimal_type_),
- generate_xml_schema (generate_xml_schema_),
- doxygen (doxygen_),
- polymorphic (ops.generate_polymorphic ()),
- polymorphic_all (ops.polymorphic_type_all ()),
- poly_plate (ops.polymorphic_plate ()),
- detach (ops.generate_detach ()),
- fwd_expr (fe),
- hxx_expr (he),
- ixx_expr (ie),
- ns_scope (ns_scope_),
- regex_custom_type_map (regex_custom_type_map_),
- direct_custom_type_map (direct_custom_type_map_),
- qname_type_ (L"::xsd::cxx::xml::qualified_name< " + char_type + L" >"),
- parser_type_ (L"::xsd::cxx::xml::dom::parser< " + char_type + L" >"),
- generate_xml_schema_ (generate_xml_schema__),
- doxygen_ (ops.generate_doxygen ()),
- ns_scope_stack (ns_scope_stack_),
- cxx_uq_id_expr_ (L"^[a-zA-Z_]\\w*$"),
- cxx_uq_id_expr (cxx_uq_id_expr_)
- {
- SemanticGraph::Namespace& xs (xs_ns ());
- SemanticGraph::Context& xsc (xs.context ());
-
- // Cache some often-used names from the XML Schema namespace
- // if names have already been processed.
- //
- if (xsc.count ("container"))
- {
- String xs_name (ns_name (xs));
-
- any_type = fq_name (xs.find ("anyType").first->named ());
- any_simple_type = fq_name (xs.find ("anySimpleType").first->named ());
- xs_string_type = fq_name (xs.find ("string").first->named ());
-
- container = xs_name + L"::" + xsc.get<String> ("container");
- flags_type = xs_name + L"::" + xsc.get<String> ("flags");
-
- if (ops.generate_element_type ())
- element_type = xs_name + L"::" + xsc.get<String> ("element-type");
-
- properties_type = xs_name + L"::" + xsc.get<String> ("properties");
-
- if (!ops.suppress_parsing () || ops.generate_serialization ())
- {
- error_handler_type = xs_name + L"::" +
- xsc.get<String> ("error-handler");
- }
-
- dom_auto_ptr_ = xs_name + (std >= cxx_version::cxx11
- ? L"::dom::unique_ptr"
- : L"::dom::auto_ptr");
-
- dom_node_key_ = xs_name + L"::dom::" +
- xsc.get<String> ("tree-node-key");
-
- if (ops.generate_serialization ())
- {
- as_double_type_ = xs_name + L"::" +
- xsc.get<String> ("as-double");
-
- as_decimal_type_ = xs_name + L"::" +
- xsc.get<String> ("as-decimal");
-
- list_stream_type = xs_name + L"::" +
- xsc.get<String> ("list-stream");
-
- namespace_infomap_type = xs_name + L"::" +
- xsc.get<String> ("namespace-infomap");
- }
-
- // istream and ostream are templates and for now use the same
- // names regardless of the naming convention.
- //
- if (!ops.generate_extraction ().empty ())
- istream_type = xs_name + L"::istream";
-
- if (!ops.generate_insertion ().empty ())
- ostream_type = xs_name + L"::ostream";
- }
-
- // Xerces-C++ namespace. IntelliSense for some reason does not like
- // it fully-qualified (maybe because it's a namespace alias).
- //
- if (ops.generate_intellisense ())
- xerces_ns = "xercesc";
- else
- xerces_ns = "::xercesc";
-
- //
- //
- if (char_type == L"char")
- std_ostream_type_ = L"::std::ostream";
- else if (char_type == L"wchar_t")
- std_ostream_type_ = L"::std::wostream";
- else
- std_ostream_type_ = L"::std::basic_ostream< " + char_type + L" >";
-
- // Custom type mapping.
- //
-
- // Direct custom type mapping.
- //
- {
- NarrowStrings const& v (ops.custom_type ());
-
- for (NarrowStrings::const_iterator i (v.begin ()),
- e (v.end ()); i != e; ++i)
- {
- String s (*i);
-
- if (s.empty ())
- throw InvalidCustomTypeMapping (s, "mapping string is empty");
-
- // Split the string in two parts at the last '='.
- //
- size_t pos (s.rfind ('='));
-
- // If no delimiter found then both type and base are empty.
- //
- if (pos == String::npos)
- {
- direct_custom_type_map[s].type.clear ();
- direct_custom_type_map[s].base.clear ();
- continue;
- }
-
- String name (s, 0, pos);
- String rest (s, pos + 1);
-
- // See if we've got the base part after '/'.
- //
- pos = rest.rfind ('/');
-
- String type, base;
-
- if (pos != String::npos)
- {
- type.assign (rest, 0, pos);
- base.assign (rest, pos + 1, String::npos);
- }
- else
- type = rest;
-
- // type can be a potentially-qualified template-id. base is
- // an unqualified C++ name.
- //
-
- if (!base.empty () && !cxx_uq_id_expr.match (base))
- throw InvalidCustomTypeMapping (s, "invalid C++ identifier");
-
- direct_custom_type_map[name].type = type;
- direct_custom_type_map[name].base = base;
- }
- }
-
- // Regex custom type mapping.
- //
- {
- NarrowStrings const& v (ops.custom_type_regex ());
-
- for (NarrowStrings::const_iterator i (v.begin ()),
- e (v.end ()); i != e; ++i)
- {
- String s (*i);
-
- if (s.empty ())
- throw InvalidCustomTypeMapping (s, "mapping string is empty");
-
- wchar_t delimiter (s[0]);
-
- // First get pattern.
- //
- size_t pos (s.find (delimiter, 1));
-
- if (pos == String::npos)
- throw InvalidCustomTypeMapping (
- s, "missing pattern-substitution separator");
-
- String pat (s, 1, pos - 1);
- String rest (s, pos + 1);
-
- String type, base;
-
- // See if we've got type and base.
- //
- if (!rest.empty ())
- {
- pos = rest.find (delimiter);
-
- if (pos == String::npos)
- throw InvalidCustomTypeMapping (
- s, "missing pattern-substitution separator");
-
- type.assign (rest, 0, pos);
- rest = String (rest, pos + 1);
-
- if (!rest.empty ())
- {
- pos = rest.find (delimiter);
-
- if (pos == String::npos)
- throw InvalidCustomTypeMapping (
- s, "missing pattern-substitution separator");
-
- base.assign (rest, 0, pos);
- rest = String (rest, pos + 1);
-
- if (!rest.empty ())
- throw InvalidCustomTypeMapping (s, "invalid format");
- }
- }
-
- regex_custom_type_map.push_back (
- RegexCustomTypeMapInfo (WideRegexPat (pat), type, base));
- }
- }
- }
-
- Context::
- Context (Context& c)
- : CXX::Context (c),
- options (c.options),
- counts (c.counts),
- any_type (c.any_type),
- any_simple_type (c.any_simple_type),
- element_type (c.element_type),
- container (c.container),
- flags_type (c.flags_type),
- qname_type (c.qname_type),
- xs_string_type (c.xs_string_type),
- properties_type (c.properties_type),
- error_handler_type (c.error_handler_type),
- list_stream_type (c.list_stream_type),
- namespace_infomap_type (c.namespace_infomap_type),
- parser_type (c.parser_type),
- std_ostream_type (c.std_ostream_type),
- ostream_type (c.ostream_type),
- istream_type (c.istream_type),
- xerces_ns (c.xerces_ns),
- dom_auto_ptr (c.dom_auto_ptr),
- dom_node_key (c.dom_node_key),
- as_double_type (c.as_double_type),
- as_decimal_type (c.as_decimal_type),
- generate_xml_schema (c.generate_xml_schema),
- doxygen (c.doxygen),
- polymorphic (c.polymorphic),
- polymorphic_all (c.polymorphic_all),
- poly_plate (c.poly_plate),
- detach (c.detach),
- fwd_expr (c.fwd_expr),
- hxx_expr (c.hxx_expr),
- ixx_expr (c.ixx_expr),
- ns_scope (c.ns_scope),
- regex_custom_type_map (c.regex_custom_type_map),
- direct_custom_type_map (c.direct_custom_type_map),
- ns_scope_stack (c.ns_scope_stack),
- cxx_uq_id_expr (c.cxx_uq_id_expr)
- {
- }
-
- Context::
- Context (Context& c, std::wostream& o)
- : CXX::Context (c, o),
- options (c.options),
- counts (c.counts),
- any_type (c.any_type),
- any_simple_type (c.any_simple_type),
- element_type (c.element_type),
- container (c.container),
- flags_type (c.flags_type),
- qname_type (c.qname_type),
- xs_string_type (c.xs_string_type),
- properties_type (c.properties_type),
- error_handler_type (c.error_handler_type),
- list_stream_type (c.list_stream_type),
- namespace_infomap_type (c.namespace_infomap_type),
- parser_type (c.parser_type),
- std_ostream_type (c.std_ostream_type),
- ostream_type (c.ostream_type),
- istream_type (c.istream_type),
- xerces_ns (c.xerces_ns),
- dom_auto_ptr (c.dom_auto_ptr),
- dom_node_key (c.dom_node_key),
- as_double_type (c.as_double_type),
- as_decimal_type (c.as_decimal_type),
- generate_xml_schema (c.generate_xml_schema),
- doxygen (c.doxygen),
- polymorphic (c.polymorphic),
- polymorphic_all (c.polymorphic_all),
- poly_plate (c.poly_plate),
- detach (c.detach),
- fwd_expr (c.fwd_expr),
- hxx_expr (c.hxx_expr),
- ixx_expr (c.ixx_expr),
- ns_scope (c.ns_scope),
- regex_custom_type_map (c.regex_custom_type_map),
- direct_custom_type_map (c.direct_custom_type_map),
- ns_scope_stack (c.ns_scope_stack),
- cxx_uq_id_expr (c.cxx_uq_id_expr)
- {
- }
-
- void Context::
- update_ns_scope ()
- {
- ns_scope.clear ();
-
- bool first (true);
-
- for (NamespaceStack::iterator i (ns_scope_stack.begin ());
- i != ns_scope_stack.end ();
- ++i)
- {
- // We only qualify names until the namespace level.
- //
- if (first)
- first = false;
- else
- ns_scope += L"::";
-
- ns_scope += *i;
- }
- }
-
- bool Context::
- custom_type (SemanticGraph::Type const& t, String& r) const
- {
- String const& name (t.name ());
-
- // First search the direct mapping.
- //
- {
- DirectCustomTypeMap::const_iterator i (
- direct_custom_type_map.find (name));
-
- if (i != direct_custom_type_map.end ())
- {
- r = i->second.type;
- return true;
- }
- }
-
-
- // Second search the regex mapping.
- //
- for (RegexCustomTypeMap::const_iterator
- i (regex_custom_type_map.begin ()),
- e (regex_custom_type_map.end ());
- i != e; ++i)
- {
- if (i->pat.match (name))
- {
- // Empty type sub tells us to use the original name.
- //
- if (i->type_sub.empty ())
- {
- r.clear ();
- return true;
- }
-
- r = i->pat.replace (name, i->type_sub);
- return true;
- }
- }
-
- return false;
- }
-
- String Context::
- custom_type (SemanticGraph::Type const& t) const
- {
- String r;
- if (custom_type (t, r))
- {
- // Empty type name tells us to use the original name.
- //
- if (r.empty ())
- r = ename (t);
- }
-
- return r;
- }
-
- bool Context::
- renamed_type (SemanticGraph::Type const& t, String& r) const
- {
- String const& name (t.name ());
-
- // First search the direct mapping.
- //
- {
- DirectCustomTypeMap::const_iterator i (
- direct_custom_type_map.find (name));
-
- if (i != direct_custom_type_map.end ())
- {
- r = i->second.base;
- return true;
- }
- }
-
-
- // Second search the regex mapping.
- //
- for (RegexCustomTypeMap::const_iterator
- i (regex_custom_type_map.begin ()),
- e (regex_custom_type_map.end ());
- i != e; ++i)
- {
- if (i->pat.match (name))
- {
- if (!i->base_sub.empty ())
- {
- r = i->pat.replace (name, i->base_sub);
- }
- else
- r.clear ();
-
- return true;
- }
- }
-
- return false;
- }
-
- void Context::
- write_annotation (SemanticGraph::Annotation& a)
- {
- String const& doc (a.documentation ());
- wchar_t const* s (doc.c_str ());
- size_t size (doc.size ());
-
- // Remove leading and trailing whitespaces.
- //
- while (*s == wchar_t (0x20) || *s == wchar_t (0x0A) ||
- *s == wchar_t (0x0D) || *s == wchar_t (0x09))
- {
- s++;
- size--;
- }
-
- if (size != 0)
- {
- wchar_t const* e (s + size - 1);
-
- while (e > s &&
- (*e == wchar_t (0x20) || *e == wchar_t (0x0A) ||
- *e == wchar_t (0x0D) || *e == wchar_t (0x09)))
- --e;
-
- size = s <= e ? e - s + 1 : 0;
- }
-
- if (size != 0)
- {
- os << " * ";
-
- // Go over the data, forcing newline after 80 chars and adding
- // ' * ' after each new line.
- //
- wchar_t const* last_space (0);
- wchar_t const* b (s);
- wchar_t const* e (s);
- bool after_newline (false);
- bool rogue (false);
-
- for (; e < s + size; ++e)
- {
- unsigned int u (unicode_char (e)); // May advance e.
-
- // We are going to treat \v and \f as rogue here even though
- // they can be present in C++ source code.
- //
- if (u > 127 || (u < 32 && u != '\t' && u != '\n'))
- rogue = true;
-
- if (u == ' ' || u == '\t')
- {
- if (after_newline)
- {
- if (e == b)
- b++; // Skip leading spaces after newline.
-
- continue;
- }
- else
- last_space = e;
- }
- else if (after_newline)
- {
- os << " * ";
- after_newline = false;
- }
-
- if (u == '\n')
- {
- write_rogue_text (b, e - b + 1, rogue);
-
- b = e + 1;
- last_space = 0;
- after_newline = true;
- rogue = false;
- continue;
- }
-
- if (e - b >= 70 && last_space != 0)
- {
- write_rogue_text (b, last_space - b, rogue);
- os << endl;
-
- b = last_space + 1;
- last_space = 0;
- after_newline = true;
- // Cannot reset rogue since we don't output the whole string.
- }
- }
-
- if (e != b)
- write_rogue_text (b, e - b, rogue);
-
- if (!after_newline)
- os << endl;
- }
- }
-
- void Context::
- write_rogue_text (wchar_t const* s, size_t size, bool rogue)
- {
- if (!rogue)
- os.write (s, size);
- else
- {
- for (wchar_t const* p (s); p < s + size; ++p)
- {
- unsigned int u (unicode_char (p)); // May advance p.
-
- // We are going to treat \v and \f as rogue here even though
- // they can be present in C++ source code.
- //
- if (u > 127 || (u < 32 && u != '\t' && u != '\n'))
- os.put ('?');
- else
- os.put (static_cast<wchar_t> (u));
- }
- }
- }
-
- bool Context::
- polymorphic_p (SemanticGraph::Type& t)
- {
- // IDREF templates cannot be polymorphic.
- //
- if (!t.named_p () &&
- (t.is_a<SemanticGraph::Fundamental::IdRef> () ||
- t.is_a<SemanticGraph::Fundamental::IdRefs> ()))
- return false;
-
- if (polymorphic_all)
- {
- bool fund (false);
- IsFundamentalType test (fund);
- test.dispatch (t);
- return !fund;
- }
- else
- return t.context ().get<bool> ("polymorphic");
- }
-
- bool Context::
- anonymous_substitutes_p (SemanticGraph::Type& t)
- {
- // IDREF templates cannot match.
- //
- if (!t.named_p () &&
- (t.is_a<SemanticGraph::Fundamental::IdRef> () ||
- t.is_a<SemanticGraph::Fundamental::IdRefs> ()))
- return false;
-
- // See which elements this type classifies.
- //
- for (SemanticGraph::Type::ClassifiesIterator i (t.classifies_begin ()),
- e (t.classifies_end ()); i != e; ++i)
- {
- if (SemanticGraph::Element* e =
- dynamic_cast<SemanticGraph::Element*> (&i->instance ()))
- {
- if (e->substitutes_p ())
- return true;
- }
- }
-
- return false;
- }
-
- // GenerateDefautCtor
- //
- GenerateDefaultCtor::
- GenerateDefaultCtor (Context& c, bool& generate, bool no_base)
- : Context (c), generate_ (generate), no_base_ (no_base)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- void GenerateDefaultCtor::
- traverse (SemanticGraph::Complex& c)
- {
- // Make sure we figure out if we have any required members before
- // we base our decision on the base type.
- //
- Complex::names (c, names_);
-
- if (!generate_)
- Complex::inherits (c, inherits_);
- }
-
- void GenerateDefaultCtor::
- traverse (SemanticGraph::Type&)
- {
- if (!no_base_)
- generate_ = true;
- }
-
- void GenerateDefaultCtor::
- traverse (SemanticGraph::Enumeration&)
- {
- if (!no_base_)
- generate_ = true;
- }
-
- void GenerateDefaultCtor::
- traverse (SemanticGraph::Element& e)
- {
- if (!skip (e) && min (e) == 1 && max (e) == 1)
- generate_ = true;
- }
-
- void GenerateDefaultCtor::
- traverse (SemanticGraph::Attribute& a)
- {
- if (min (a) == 1 && !a.fixed_p ())
- generate_ = true;
- }
-
- void GenerateDefaultCtor::
- traverse (SemanticGraph::Any& a)
- {
- if (options.generate_wildcard () &&
- min (a) == 1 && max (a) == 1)
- generate_ = true;
- }
-
-
- // GenerateFromBaseCtor
- //
- GenerateFromBaseCtor::
- GenerateFromBaseCtor (Context& c, bool& generate)
- : generate_ (generate),
- custom_ (false),
- traverser_ (c, generate, custom_)
- {
- inherits_ >> traverser_;
- }
-
- void GenerateFromBaseCtor::
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c, inherits_);
-
- if (!generate_ && custom_)
- {
- // We have a customized type in the hierarchy. In this case we
- // want to generate the c-tor unless base and ultimate-base are
- // the same (see CtorArgs).
- //
- SemanticGraph::Type& b (c.inherits ().base ());
- generate_ = b.is_a<SemanticGraph::Complex> () &&
- !b.is_a<SemanticGraph::Enumeration> ();
- }
- }
-
- GenerateFromBaseCtor::Traverser::
- Traverser (Context& c, bool& generate, bool& custom)
- : Context (c), generate_ (generate), custom_ (custom)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- void GenerateFromBaseCtor::Traverser::
- traverse (SemanticGraph::Type& t)
- {
- if (!custom_)
- {
- String tmp;
- custom_ = custom_type (t, tmp);
- }
- }
-
- void GenerateFromBaseCtor::Traverser::
- traverse (SemanticGraph::Complex& c)
- {
- names (c, names_);
-
- if (!generate_)
- inherits (c, inherits_);
-
- if (!generate_)
- traverse (static_cast<SemanticGraph::Type&> (c));
- }
-
- void GenerateFromBaseCtor::Traverser::
- traverse (SemanticGraph::Element& e)
- {
- if (!skip (e) && min (e) == 1 && max (e) == 1)
- generate_ = true;
- }
-
- void GenerateFromBaseCtor::Traverser::
- traverse (SemanticGraph::Attribute& a)
- {
- if (min (a) == 1 && !a.fixed_p ())
- generate_ = true;
- }
-
- void GenerateFromBaseCtor::Traverser::
- traverse (SemanticGraph::Any& a)
- {
- if (options.generate_wildcard () &&
- min (a) == 1 && max (a) == 1)
- generate_ = true;
- }
-
- // HasComplexNonOptArgs
- //
- HasComplexPolyNonOptArgs::
- HasComplexPolyNonOptArgs (Context& c,
- bool base,
- bool& complex,
- bool& poly,
- bool& clash)
- : Context (c),
- complex_ (complex),
- poly_ (poly),
- clash_ (clash)
- {
- if (base)
- *this >> inherits_ >> *this;
-
- *this >> names_ >> *this;
- }
-
- void HasComplexPolyNonOptArgs::
- traverse (SemanticGraph::Complex& c)
- {
- // No optimizations: need to check every arg for clashes.
- //
- inherits (c, inherits_);
- names (c, names_);
- }
-
- void HasComplexPolyNonOptArgs::
- traverse (SemanticGraph::Element& e)
- {
- if (!skip (e) && min (e) == 1 && max (e) == 1)
- {
- bool poly (polymorphic && polymorphic_p (e.type ()));
-
- bool simple (true);
- IsSimpleType t (simple);
- t.dispatch (e.type ());
-
- if (poly)
- poly_ = true;
-
- if (!simple)
- complex_ = true;
-
- if (poly && simple)
- clash_ = false;
- }
- }
-
- // FromBaseCtorArg
- //
- FromBaseCtorArg::
- FromBaseCtorArg (Context& c, CtorArgType at, bool arg)
- : Context (c), arg_type_ (at), arg_ (arg)
- {
- }
-
- void FromBaseCtorArg::
- traverse (SemanticGraph::Any& a)
- {
- if (!options.generate_wildcard ())
- return;
-
- if (min (a) == 1 && max (a) == 1)
- {
- String const& name (ename (a));
-
- os << "," << endl
- << "const " << xerces_ns << "::DOMElement&";
-
- if (arg_)
- os << " " << name;
- }
- }
-
- void FromBaseCtorArg::
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- if (min (e) == 1 && max (e) == 1)
- {
- String const& name (ename (e));
-
- os << "," << endl;
-
- bool ptr (false);
-
- switch (arg_type_)
- {
- case CtorArgType::complex_auto_ptr:
- {
- bool simple (true);
- IsSimpleType t (simple);
- t.dispatch (e.type ());
- ptr = !simple;
- break;
- }
- case CtorArgType::poly_auto_ptr:
- {
- ptr = polymorphic && polymorphic_p (e.type ());
- break;
- }
- case CtorArgType::type:
- break;
- }
-
- if (ptr)
- os << auto_ptr << "< " << etype (e) << " >";
- else
- os << "const " << etype (e) << "&";
-
- if (arg_)
- os << " " << name;
- }
- }
-
- void FromBaseCtorArg::
- traverse (SemanticGraph::Attribute& a)
- {
- // Note that we are not going to include attributes with
- // default or required fixed values here. Instead we are
- // going to default-initialize them.
- //
- if (min (a) == 1 && !a.fixed_p ())
- {
- String const& name (ename (a));
-
- os << "," << endl
- << "const " << etype (a) << "&";
-
- if (arg_)
- os << " " << name;
- }
- }
-
- // CtorArgs
- //
- CtorArgs::
- CtorArgs (Context& c, CtorArgType at)
- : Context (c),
- arg_type_ (at),
- base_arg_ (0),
- first_ (true),
- member_name_ (c)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- CtorArgs::
- CtorArgs (Context& c, CtorArgType at, String& base_arg)
- : Context (c),
- arg_type_ (at),
- base_arg_ (&base_arg),
- first_ (true),
- member_name_ (c)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- void CtorArgs::
- traverse (SemanticGraph::Type& t)
- {
- os << comma () << "const ";
-
- member_name_.dispatch (t);
-
- os << "&";
-
- if (base_arg_ != 0)
- {
- // IDREF templates don't have a name.
- //
- *base_arg_ = t.named_p ()
- ? (L"_xsd_" + ename (t) + L"_base")
- : L"_xsd_base";
-
- os << " " << *base_arg_;
- }
- }
-
- void CtorArgs::
- traverse (SemanticGraph::Enumeration& e)
- {
- os << comma () << "const ";
-
- member_name_.traverse (e);
-
- os << "&";
-
- if (base_arg_ != 0)
- {
- *base_arg_ = L"_xsd_" + ename (e) + L"_base";
-
- os << " " << *base_arg_;
- }
- }
-
- void CtorArgs::
- traverse (SemanticGraph::Any& a)
- {
- if (!options.generate_wildcard ())
- return;
-
- if (min (a) == 1 && max (a) == 1)
- {
- os << comma () << "const " << xerces_ns << "::DOMElement&";
-
- if (base_arg_ != 0)
- os << " " << ename (a);
- }
- }
-
- void CtorArgs::
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- if (min (e) == 1 && max (e) == 1)
- {
- bool ptr (false);
-
- switch (arg_type_)
- {
- case CtorArgType::complex_auto_ptr:
- {
- bool simple (true);
- IsSimpleType t (simple);
- t.dispatch (e.type ());
- ptr = !simple;
- break;
- }
- case CtorArgType::poly_auto_ptr:
- {
- ptr = polymorphic && polymorphic_p (e.type ());
- break;
- }
- case CtorArgType::type:
- break;
- }
-
- if (ptr)
- os << comma () << auto_ptr << "< " << etype (e) << " >";
- else
- os << comma () << "const " << etype (e) << "&";
-
- if (base_arg_ != 0)
- os << " " << ename (e);
- }
- }
-
- void CtorArgs::
- traverse (SemanticGraph::Attribute& a)
- {
- // Note that we are not going to include attributes with
- // default or required fixed values here. Instead we are
- // going to default-initialize them.
- //
- if (min (a) == 1 && !a.fixed_p ())
- {
- os << comma () << "const " << etype (a) << "&";
-
- if (base_arg_ != 0)
- os << " " << ename (a);
- }
- }
-
- String CtorArgs::
- comma ()
- {
- bool tmp (first_);
- first_ = false;
- return tmp ? "" : ",\n";
- }
-
-
- // CtorArgsWithoutBase
- //
- CtorArgsWithoutBase::
- CtorArgsWithoutBase (Context& c, CtorArgType at, bool arg, bool first)
- : Context (c), arg_type_ (at), arg_ (arg), first_ (first)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- void CtorArgsWithoutBase::
- traverse (SemanticGraph::Any& a)
- {
- if (!options.generate_wildcard ())
- return;
-
- if (min (a) == 1 && max (a) == 1)
- {
- os << comma () << "const " << xerces_ns << "::DOMElement&";
-
- if (arg_)
- os << " " << ename (a);
- }
- }
-
- void CtorArgsWithoutBase::
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- if (min (e) == 1 && max (e) == 1)
- {
- bool ptr (false);
-
- switch (arg_type_)
- {
- case CtorArgType::complex_auto_ptr:
- {
- bool simple (true);
- IsSimpleType t (simple);
- t.dispatch (e.type ());
- ptr = !simple;
- break;
- }
- case CtorArgType::poly_auto_ptr:
- {
- ptr = polymorphic && polymorphic_p (e.type ());
- break;
- }
- case CtorArgType::type:
- break;
- }
-
- if (ptr)
- os << comma () << auto_ptr << "< " << etype (e) << " >";
- else
- os << comma () << "const " << etype (e) << "&";
-
- if (arg_)
- os << " " << ename (e);
- }
- }
-
- void CtorArgsWithoutBase::
- traverse (SemanticGraph::Attribute& a)
- {
- // Note that we are not going to include attributes with
- // default or required fixed values here. Instead we are
- // going to default-initialize them.
- //
- if (min (a) == 1 && !a.fixed_p ())
- {
- os << comma () << "const " << etype (a) << "&";
-
- if (arg_)
- os << " " << ename (a);
- }
- }
-
- String CtorArgsWithoutBase::
- comma ()
- {
- bool tmp (first_);
- first_ = false;
- return tmp ? "" : ",\n";
- }
-
- // GlobalElementBase
- //
- bool GlobalElementBase::
- generate_p (SemanticGraph::Element& e)
- {
- if (e.substitutes_p () && ctx_.polymorphic)
- return true;
-
- if (!doc_root_p (e))
- return false;
-
- // If we are not generating element types nor parsing/serialization
- // code then we won't generate anything from it.
- //
- if (!ctx_.options.generate_element_type () &&
- ctx_.options.suppress_parsing () &&
- !ctx_.options.generate_serialization ())
- return false;
-
- return true;
- }
-
- bool GlobalElementBase::
- doc_root_p (SemanticGraph::Element& e)
- {
- if (!ctx_.options.root_element_first () &&
- !ctx_.options.root_element_last () &&
- !ctx_.options.root_element_all () &&
- !ctx_.options.root_element_none () &&
- ctx_.options.root_element ().empty ())
- return true; // By default treat them all.
-
- if (ctx_.options.root_element_none ())
- return false;
-
- if (ctx_.options.root_element_all ())
- return true;
-
- if (ctx_.options.root_element_first () &&
- e.context ().count ("first") != 0)
- return true;
-
- if (ctx_.options.root_element_last () &&
- e.context ().count ("last") != 0)
- return true;
-
- NarrowStrings const& names (ctx_.options.root_element ());
-
- // Hopefully nobody will specify more than a handful of names ;-).
- //
- for (NarrowStrings::const_iterator i (names.begin ());
- i != names.end (); ++i)
- {
- String name (*i);
-
- if (e.name () == name)
- return true;
- }
-
- return false;
- }
-
- // Namespace
- //
- Namespace::
- Namespace (Context& c,
- size_t first,
- size_t last)
- : CXX::Namespace (c, *this),
- GlobalElementBase (c),
- ctx_ (c),
- first_ (first),
- last_ (last),
- count_ (0)
- {
- }
-
- void Namespace::
- traverse (Type& ns)
- {
- using SemanticGraph::Element;
-
- if (first_ > last_)
- CXX::Namespace::traverse (ns);
- else
- {
- bool opened (false);
-
- for (Type::NamesIterator i (ns.names_begin ());
- i != ns.names_end (); ++i)
- {
- SemanticGraph::Nameable& n (i->named ());
-
- if (n.is_a<SemanticGraph::Type> () ||
- (n.is_a<Element> () && generate_p (dynamic_cast<Element&> (n))))
- {
- if (count_ >= first_ && count_ <= last_)
- {
- if (!opened)
- {
- opened = true;
- pre (ns);
- }
-
- edge_traverser ().dispatch (*i);
- }
-
- ++count_;
- }
- }
-
- if (opened)
- post (ns);
- }
- }
-
- void Namespace::
- enter (Type&, String const& name, bool)
- {
- ctx_.enter_ns_scope (name);
- }
-
- void Namespace::
- leave ()
- {
- ctx_.leave_ns_scope ();
- }
-
- // Includes
- //
- void TypeForward::
- traverse (SemanticGraph::Type& t)
- {
- String const& name (ename (t));
-
- if (String custom = custom_type (t))
- {
- String new_name;
- renamed_type (t, new_name);
-
- if (new_name)
- os << "class " << new_name << ";";
-
- if (custom == name)
- os << "class " << name << ";";
- else
- os << "typedef " << custom << " " << name << ";";
- }
- else
- os << "class " << name << ";";
- }
-
- void Includes::
- traverse_ (SemanticGraph::Uses& u)
- {
- // Support for weak (forward) inclusion used in the file-per-type
- // compilation model.
- //
- Type t (type_);
- bool weak (u.context ().count ("weak"));
- SemanticGraph::Schema& s (u.schema ());
-
- if (weak && t == header)
- {
- // Generate forward declarations.
- //
- if (forward_)
- t = forward;
- else
- {
- schema_.dispatch (s);
- return;
- }
- }
-
- if (t == source && !weak)
- {
- if (u.user ().context ().count ("type-schema"))
- {
- // Strong include into a type schema -- this is a base class.
- // We have already included its header in our header so it
- // would seem we don't need to do anything here. There is one
- // subtle issue, however: Our constructors include arguments
- // for base members which we simply pass to the base. The base
- // header has only forward declarations for its members. This
- // is not a problem if we pass references to base members --
- // forward declarations are sufficient for this case. The
- // problematic case is when we pass them as auto/unique_ptr.
- // Because we pass them by value (which is done to support
- // unique_ptr move semantics), the compiler needs to be able
- // to destroy the member, presumably if an exception is thrown.
- // And for that forward declarations are not enough.
- //
- // So what we are going to do here is include all the base
- // member headers (transitively), just like the base's source
- // file does.
- //
- // Note that we only do this for source since in the inline
- // case the necessary files are already pulled via the the
- // .ixx file includes.
- //
- Traversal::Schema schema;
- schema >> *this;
- schema.dispatch (s);
- }
-
- return;
- }
-
- SemanticGraph::Path path (
- s.context ().count ("renamed")
- ? s.context ().get<SemanticGraph::Path> ("renamed")
- : u.path ());
- path.normalize ();
-
- // Try to use the portable representation of the path. If that
- // fails, fall back to the native representation.
- //
- NarrowString path_str;
- try
- {
- path_str = path.posix_string ();
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- path_str = path.string ();
- }
-
- String inc_path;
-
- switch (t)
- {
- case forward:
- {
- inc_path = ctx_.fwd_expr->replace (path_str);
- break;
- }
- case header:
- case source:
- {
- inc_path = ctx_.hxx_expr->replace (path_str);
- break;
- }
- case inline_:
- {
- if (weak)
- {
- inc_path = ctx_.hxx_expr->replace (path_str);
- ctx_.os << "#include " << ctx_.process_include_path (inc_path)
- << endl;
- }
-
- inc_path = ctx_.ixx_expr->replace (path_str);
- break;
- }
- }
-
- ctx_.os << "#include " << ctx_.process_include_path (inc_path) << endl
- << endl;
- }
- }
-}
diff --git a/xsd/cxx/tree/elements.hxx b/xsd/cxx/tree/elements.hxx
deleted file mode 100644
index 57c3075..0000000
--- a/xsd/cxx/tree/elements.hxx
+++ /dev/null
@@ -1,2118 +0,0 @@
-// file : xsd/cxx/tree/elements.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_ELEMENTS_HXX
-#define CXX_TREE_ELEMENTS_HXX
-
-#include <map>
-#include <set>
-#include <deque>
-#include <vector>
-#include <sstream>
-
-#include <cutl/re.hxx>
-
-#include <types.hxx>
-
-#include <cxx/elements.hxx>
-
-#include <cxx/tree/options.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- struct Counts
- {
- Counts ()
- : global_types (0),
- global_elements (0),
- generated_global_elements (0),
- complexity_total (0)
- {
- }
-
- size_t global_types;
- size_t global_elements;
- size_t generated_global_elements;
-
- // Complexity value for each global type and generated global
- // element, in order.
- //
- std::vector<size_t> complexity;
- size_t complexity_total;
- };
-
- struct InvalidCustomTypeMapping
- {
- InvalidCustomTypeMapping (String const& mapping,
- String const& reason)
- : mapping_ (mapping), reason_ (reason)
- {
- }
-
- String const&
- mapping () const
- {
- return mapping_;
- }
-
- String const&
- reason () const
- {
- return reason_;
- }
-
- private:
- String mapping_;
- String reason_;
- };
-
- // A set of potentially qualified XML Schema type names.
- //
- struct TypeNameSet
- {
- template <typename I>
- TypeNameSet (I begin, I end)
- {
- for (; begin != end; ++begin)
- insert (*begin);
- }
-
- void
- insert (String const& name)
- {
- size_t p (name.rfind ('#'));
-
- if (p == String::npos)
- unames_.insert (name);
- else
- qnames_.insert (name);
- }
-
- bool
- find (SemanticGraph::Type& t)
- {
- if (!unames_.empty ())
- {
- if (unames_.find (t.name ()) != unames_.end ())
- return true;
- }
-
- if (!qnames_.empty ())
- {
- if (qnames_.find (t.scope ().name () + L"#" + t.name ()) !=
- qnames_.end ())
- return true;
- }
-
- return false;
- }
-
- private:
- typedef std::set<String> StringSet;
-
- StringSet unames_;
- StringSet qnames_;
- };
-
- //
- //
- class Context: public CXX::Context
- {
- public:
- typedef cutl::re::regexsub Regex;
- typedef cutl::re::wregex WideRegexPat;
-
- typedef Tree::options options_type;
-
- struct DirectCustomTypeMapInfo
- {
- DirectCustomTypeMapInfo (String const& t = L"",
- String const& b = L"")
- : type (t), base (b)
- {
- }
-
- String type;
- String base;
- };
-
- struct RegexCustomTypeMapInfo
- {
- RegexCustomTypeMapInfo (WideRegexPat const& p,
- String const& t,
- String const& b)
- : pat (p), type_sub (t), base_sub (b)
- {
- }
-
- WideRegexPat pat;
- String type_sub;
- String base_sub;
- };
-
- typedef std::vector<RegexCustomTypeMapInfo> RegexCustomTypeMap;
- typedef std::map<String, DirectCustomTypeMapInfo> DirectCustomTypeMap;
-
- public:
- Context (std::wostream& o,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- options_type const& ops,
- Counts const& counts_,
- bool generate_xml_schema,
- StringLiteralMap const*,
- Regex const* fwd_expr,
- Regex const* hxx_expr,
- Regex const* ixx_expr);
-
- protected:
- Context (Context& c);
- Context (Context& c, std::wostream& o);
-
- // Custom type mapping.
- //
- public:
- // Returns empty string if custom mapping is not required.
- //
- String
- custom_type (SemanticGraph::Type const&) const;
-
- // Returns true if custom mapping is required. name is
- // populated with the custom type name or empty if the
- // original name should be used.
- //
- bool
- custom_type (SemanticGraph::Type const&, String& name) const;
-
- // Returns true if this type has been renamed as part of the
- // customization process. If the function returns true, the
- // name string is populated with the new name or empty if
- // the type should not be generated at all.
- //
- bool
- renamed_type (SemanticGraph::Type const&, String& name) const;
-
- public:
- // Performs a number of processing steps, including forcing a new
- // line after 80 characters as well as "commentizing" the text by
- // adding '* ' after each newline.
- //
- void
- write_annotation (SemanticGraph::Annotation&);
-
- //
- //
- public:
- static bool
- ordered_p (SemanticGraph::Type const& t)
- {
- return t.context ().count ("ordered") &&
- t.context ().get<bool> ("ordered");
- }
-
- // Check if we are generating mixed support for this type. We only
- // do it for ordered types.
- //
- static bool
- mixed_p (SemanticGraph::Complex const& c)
- {
- return c.mixed_p () && ordered_p (c);
- }
-
- bool
- polymorphic_p (SemanticGraph::Type&);
-
- bool
- anonymous_p (SemanticGraph::Type const& t)
- {
- return t.context ().count ("anonymous");
- }
-
- // Return true if this anonymous type is defined in an element
- // that belongs to a substitution group.
- //
- bool
- anonymous_substitutes_p (SemanticGraph::Type&);
-
- // Escaped names.
- //
- public:
- // Accessor name.
- //
- static String const&
- eaname (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("aname");
- }
-
- static String const&
- eaname (SemanticGraph::Any const& a)
- {
- return a.context ().get<String> ("aname");
- }
-
- static String const&
- eaname (SemanticGraph::AnyAttribute const& a)
- {
- return a.context ().get<String> ("aname");
- }
-
- // Modifier name.
- //
- static String const&
- emname (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("mname");
- }
-
- static String const&
- emname (SemanticGraph::Any const& a)
- {
- return a.context ().get<String> ("mname");
- }
-
- static String const&
- emname (SemanticGraph::AnyAttribute const& a)
- {
- return a.context ().get<String> ("mname");
- }
-
- // Detach name.
- //
- static String const&
- edname (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("dname");
- }
-
- //
- //
- static String const&
- etype (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("type");
- }
-
- static String const&
- etraits (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("traits");
- }
-
- static String const&
- econtainer (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("container");
- }
-
- static String const&
- econtainer (SemanticGraph::Any const& a)
- {
- return a.context ().get<String> ("container");
- }
-
- static String const&
- econtainer (SemanticGraph::AnyAttribute const& a)
- {
- return a.context ().get<String> ("container");
- }
-
- static String const&
- eiterator (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("iterator");
- }
-
- static String const&
- eiterator (SemanticGraph::Any const& a)
- {
- return a.context ().get<String> ("iterator");
- }
-
- static String const&
- eiterator (SemanticGraph::AnyAttribute const& a)
- {
- return a.context ().get<String> ("iterator");
- }
-
- static String const&
- econst_iterator (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("const-iterator");
- }
-
- static String const&
- econst_iterator (SemanticGraph::Any const& a)
- {
- return a.context ().get<String> ("const-iterator");
- }
-
- static String const&
- econst_iterator (SemanticGraph::AnyAttribute const& a)
- {
- return a.context ().get<String> ("const-iterator");
- }
-
- static String const&
- emember (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("member");
- }
-
- static String const&
- emember (SemanticGraph::Any const& a)
- {
- return a.context ().get<String> ("member");
- }
-
- static String const&
- emember (SemanticGraph::AnyAttribute const& a)
- {
- return a.context ().get<String> ("member");
- }
-
- static String const&
- edefault_value (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("default-value");
- }
-
- static String const&
- edefault_value_member (SemanticGraph::Member const& m)
- {
- return m.context ().get<String> ("default-value-member");
- }
-
- // Underlying enum value type.
- //
- static String const&
- evalue (SemanticGraph::Enumeration const& e)
- {
- return e.context ().get<String> ("value");
- }
-
- // dom_document
- //
- static bool
- edom_document_p (SemanticGraph::Complex const& c)
- {
- return c.context ().count ("dom-document");
- }
-
- static String const&
- edom_document (SemanticGraph::Complex const& c)
- {
- return c.context ().get<String> ("dom-document");
- }
-
- static bool
- edom_document_member_p (SemanticGraph::Complex const& c)
- {
- return c.context ().count ("dom-document-member");
- }
-
- static String const&
- edom_document_member (SemanticGraph::Complex const& c)
- {
- return c.context ().get<String> ("dom-document-member");
- }
-
- // Parsing and serialization function names.
- //
- static String const&
- eparser (SemanticGraph::Element const& e)
- {
- return e.context ().get<String> ("parser");
- }
-
- static String const&
- eserializer (SemanticGraph::Element const& e)
- {
- return e.context ().get<String> ("serializer");
- }
-
- public:
- void
- enter_ns_scope (String const& name)
- {
- ns_scope_stack.push_back (name);
- update_ns_scope ();
- }
-
- void
- leave_ns_scope ()
- {
- ns_scope_stack.pop_back ();
- update_ns_scope ();
- }
-
- private:
- void
- update_ns_scope ();
-
- private:
- // Write text that may contain characters that we will have
- // to escape (indicated by the rogue flag).
- //
- void
- write_rogue_text (wchar_t const* s, size_t size, bool rogue);
-
- public:
- options_type const& options;
- Counts const& counts;
- String& any_type;
- String& any_simple_type;
- String& element_type;
- String& container;
- String& flags_type;
- String& qname_type;
- String& xs_string_type;
- String& properties_type;
- String& error_handler_type;
- String& list_stream_type;
- String& namespace_infomap_type;
- String& parser_type;
- String& std_ostream_type;
- String& ostream_type;
- String& istream_type;
- String& xerces_ns;
- String& dom_auto_ptr;
- String& dom_node_key;
- String& as_double_type;
- String& as_decimal_type;
-
- bool& generate_xml_schema;
- bool& doxygen;
- bool polymorphic;
- bool polymorphic_all;
- unsigned long poly_plate;
- bool detach;
-
- Regex const* fwd_expr;
- Regex const* hxx_expr;
- Regex const* ixx_expr;
-
- String& ns_scope;
-
- RegexCustomTypeMap& regex_custom_type_map;
- DirectCustomTypeMap& direct_custom_type_map;
-
- private:
- String any_type_;
- String any_simple_type_;
- String element_type_;
- String container_;
- String flags_type_;
- String qname_type_;
- String xs_string_type_;
- String properties_type_;
- String error_handler_type_;
- String list_stream_type_;
- String namespace_infomap_type_;
- String parser_type_;
- String std_ostream_type_;
- String ostream_type_;
- String istream_type_;
- String xerces_ns_;
- String dom_auto_ptr_;
- String dom_node_key_;
- String as_double_type_;
- String as_decimal_type_;
-
- bool generate_xml_schema_;
- bool doxygen_;
-
- typedef std::deque<String> NamespaceStack;
- typedef std::deque<String> ScopeStack;
-
- String ns_scope_;
-
- NamespaceStack& ns_scope_stack;
- NamespaceStack ns_scope_stack_;
-
- RegexCustomTypeMap regex_custom_type_map_;
- DirectCustomTypeMap direct_custom_type_map_;
-
- private:
- WideRegexPat const cxx_uq_id_expr_;
- WideRegexPat const& cxx_uq_id_expr;
- };
-
- // Check whether this Schema type maps to a fundamental C++ type.
- //
- struct IsFundamentalType: Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal
-
- {
- IsFundamentalType (bool& r)
- : r_ (r)
- {
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger&)
- {
- r_ = true;
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean&)
- {
- r_ = true;
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal&)
- {
- r_ = true;
- }
-
- private:
- bool& r_;
- };
-
- // Check whether this is a string-based type.
- //
- struct IsStringBasedType: Traversal::Complex,
- Traversal::Union,
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language
- {
- IsStringBasedType (bool& r)
- : r_ (r)
- {
- *this >> inherits_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c, inherits_);
- }
-
- virtual void
- traverse (SemanticGraph::Union&)
- {
- // Current mapping of union is string-based.
- //
- r_ = true;
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName&)
- {
- r_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language&)
- {
- r_ = true;
- }
-
- private:
- bool& r_;
- Traversal::Inherits inherits_;
- };
-
-
- // Check whether this is a enumeration-based type.
- //
- struct IsEnumBasedType: Traversal::Complex
- {
- IsEnumBasedType (SemanticGraph::Enumeration*& e)
- : enum_ (e)
- {
- *this >> inherits_;
-
- inherits_ >> *this;
- inherits_ >> enum_;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- inherits (c, inherits_);
- }
-
- private:
- struct Enumeration: Traversal::Enumeration
- {
- Enumeration (SemanticGraph::Enumeration*& e)
- : e_ (e)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (e_ == 0)
- e_ = &e;
- }
-
- private:
- SemanticGraph::Enumeration*& e_;
- };
-
-
- private:
- Enumeration enum_;
- Traversal::Inherits inherits_;
- };
-
-
- //
- //
- struct MemberTypeName : Context,
- Traversal::Type,
- Traversal::List,
- Traversal::Union,
- Traversal::Complex,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities
-
- {
- MemberTypeName (Context& c)
- : Context (c)
- {
- }
-
- MemberTypeName (Context& c, std::wostream& o)
- : Context (c, o)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type&)
- {
- abort ();
- }
-
- virtual void
- traverse (SemanticGraph::List& l)
- {
- os << fq_name (l);
- }
-
- virtual void
- traverse (SemanticGraph::Union& u)
- {
- os << fq_name (u);
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- os << fq_name (c);
- }
-
- // anyType & anySimpleType.
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- os << fq_name (t);
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- os << fq_name (t);
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- os << fq_name (t);
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- os << fq_name (t);
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- os << fq_name (t);
- }
-
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- os << fq_name (t);
- }
-
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- if (t.named_p ())
- {
- // IDREF<anyType>
- //
- os << fq_name (t);
- }
- else
- {
- SemanticGraph::Nameable& ncname (
- xs_ns ().find ("NCName").first->named ());
-
- os << "::xsd::cxx::tree::idref< " << char_type << ", " <<
- fq_name (ncname) << ", " <<
- type_name (t.argumented ().type ()) << " >";
- }
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- if (t.named_p ())
- {
- // IDREFS<anyType>
- //
- os << fq_name (t);
- }
- else
- {
- SemanticGraph::Nameable& ncname (
- xs_ns ().find ("NCName").first->named ());
-
- os << "::xsd::cxx::tree::idrefs< " << char_type << ", " <<
- any_simple_type << ", ::xsd::cxx::tree::idref< " <<
- char_type << ", " << fq_name (ncname) << ", " <<
- type_name (t.argumented ().type ()) << " > >";
- }
- }
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- os << fq_name (t);
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- os << fq_name (t);
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- os << fq_name (t);
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity& t)
- {
- os << fq_name (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities& t)
- {
- os << fq_name (t);
- }
-
- private:
- // For idref/idrefs
- //
- String
- type_name (SemanticGraph::Type& t)
- {
- // This type is always named.
- //
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- //
- //
- struct BaseTypeName : MemberTypeName
- {
- BaseTypeName (Context& c)
- : MemberTypeName (c)
- {
- }
-
- BaseTypeName (Context& c, std::wostream& o)
- : MemberTypeName (c, o)
- {
- }
-
- virtual void
- fundamental_base (SemanticGraph::Type& t)
- {
- os << "::xsd::cxx::tree::fundamental_base< " <<
- fq_name (t) << ", " << char_type << ", " <<
- any_simple_type << " >";
- }
-
- // Integrals.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- fundamental_base (t);
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- fundamental_base (t);
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- fundamental_base (t);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- os << "::xsd::cxx::tree::fundamental_base< " <<
- fq_name (t) << ", " << char_type << ", " <<
- any_simple_type << ", " <<
- "::xsd::cxx::tree::schema_type::double_ >";
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- os << "::xsd::cxx::tree::fundamental_base< " <<
- fq_name (t) << ", " << char_type << ", " <<
- any_simple_type << ", " <<
- "::xsd::cxx::tree::schema_type::decimal >";
- }
- };
-
- // Initial value should be true.
- //
- struct IsSimpleType: Traversal::Complex,
- Traversal::Member,
- Traversal::Any,
- Traversal::AnyAttribute
- {
- IsSimpleType (bool& v)
- : v_ (v)
- {
- *this >> names_ >> *this;
- *this >> inherits_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- if (c.mixed_p ())
- v_ = false;
-
- if (v_)
- names (c, names_);
-
- if (v_)
- inherits (c, inherits_);
- }
-
- virtual void
- traverse (SemanticGraph::Member&)
- {
- v_ = false;
- }
-
- virtual void
- traverse (SemanticGraph::Any&)
- {
- v_ = false;
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute&)
- {
- v_ = false;
- }
-
- private:
- bool& v_;
- Traversal::Names names_;
- Traversal::Inherits inherits_;
- };
-
- // Test whether we need to generate default c-tor. Note that we are not
- // interested in anyAttribute since it is always mapped to a sequence.
- //
- struct GenerateDefaultCtor: Traversal::Complex,
- Traversal::Enumeration,
- Traversal::Type,
- Traversal::Element,
- Traversal::Attribute,
- Traversal::Any,
- Context
- {
- // generate should initially be false.
- //
- GenerateDefaultCtor (Context&, bool& generate, bool no_base);
-
- virtual void
- traverse (SemanticGraph::Complex&);
-
- virtual void
- traverse (SemanticGraph::Type&);
-
- virtual void
- traverse (SemanticGraph::Enumeration&);
-
- virtual void
- traverse (SemanticGraph::Element&);
-
- virtual void
- traverse (SemanticGraph::Attribute&);
-
- virtual void
- traverse (SemanticGraph::Any&);
-
- private:
- bool& generate_;
- bool no_base_;
-
- private:
- Traversal::Inherits inherits_;
- Traversal::Names names_;
- };
-
- // Test whether we need to generate from-base c-tor.
- //
- struct GenerateFromBaseCtor: Traversal::Complex
- {
- // generate should initially be false.
- //
- GenerateFromBaseCtor (Context& c, bool& generate);
-
- virtual void
- traverse (SemanticGraph::Complex& c);
-
- private:
- bool& generate_;
- bool custom_;
-
- // Note that we are not interested in anyAttribute since it is always
- // mapped to a sequence.
- //
- struct Traverser: Traversal::Type,
- Traversal::Complex,
- Traversal::Element,
- Traversal::Attribute,
- Traversal::Any,
- Context
- {
- Traverser (Context& c, bool& generate, bool& custom);
-
- virtual void
- traverse (SemanticGraph::Type&);
-
- virtual void
- traverse (SemanticGraph::Complex&);
-
- virtual void
- traverse (SemanticGraph::Attribute&);
-
- virtual void
- traverse (SemanticGraph::Element&);
-
- virtual void
- traverse (SemanticGraph::Any&);
-
- private:
- bool& generate_;
- bool& custom_;
-
- private:
- Traversal::Inherits inherits_;
- Traversal::Names names_;
- } traverser_;
-
- Traversal::Inherits inherits_;
- };
-
- // Test whether the type has any non-optional element of complex
- // (has attributes/elements) and polymorpjic types.
- //
- struct HasComplexPolyNonOptArgs: Traversal::Complex,
- Traversal::Element,
- Context
- {
- // complex and poly should initially be false. clash
- // should initially be true.
- //
- HasComplexPolyNonOptArgs (Context& c,
- bool including_base,
- bool& complex,
- bool& poly,
- bool& clash);
-
- virtual void
- traverse (SemanticGraph::Complex&);
-
- virtual void
- traverse (SemanticGraph::Element&);
-
- private:
- bool& complex_;
- bool& poly_;
- bool& clash_;
-
- Traversal::Inherits inherits_;
- Traversal::Names names_;
- };
-
- // Contructor argument types.
- //
- struct CtorArgType
- {
- enum Value
- {
- type,
- complex_auto_ptr,
- poly_auto_ptr
- };
-
- CtorArgType (Value v = Value (0)) : v_ (v) {}
- operator Value () const {return v_;}
-
- private:
- Value v_;
- };
-
- // Immediate non-optional member. Note that AnyAttribute is always
- // mapped to a sequence.
- //
- struct FromBaseCtorArg: Traversal::Any,
- Traversal::Element,
- Traversal::Attribute,
- Context
- {
- FromBaseCtorArg (Context& c, CtorArgType, bool arg);
-
- virtual void
- traverse (SemanticGraph::Any&);
-
- virtual void
- traverse (SemanticGraph::Attribute&);
-
- virtual void
- traverse (SemanticGraph::Element&);
-
- private:
- CtorArgType arg_type_;
- bool arg_;
- };
-
- // List of all non-optional members and a simple base. Note that
- // AnyAttribute is always mapped to a sequence.
- //
- struct CtorArgs: Traversal::Complex,
- Traversal::Enumeration,
- Traversal::Type,
- Traversal::Any,
- Traversal::Element,
- Traversal::Attribute,
- Context
- {
- // The second version outputs the argument name and stores
- // in in the base_arg string.
- //
- CtorArgs (Context&, CtorArgType);
- CtorArgs (Context&, CtorArgType, String& base_arg);
-
- virtual void
- traverse (SemanticGraph::Type&);
-
- virtual void
- traverse (SemanticGraph::Enumeration&);
-
- virtual void
- traverse (SemanticGraph::Any&);
-
- virtual void
- traverse (SemanticGraph::Attribute&);
-
- virtual void
- traverse (SemanticGraph::Element&);
-
- private:
- String
- comma ();
-
- private:
- CtorArgType arg_type_;
- String base_;
- String* base_arg_;
- bool first_;
-
- private:
- Traversal::Inherits inherits_;
- Traversal::Names names_;
-
- MemberTypeName member_name_;
- };
-
-
- // Check whether we need to generate c-tor without the base argument.
- //
- struct GenerateWithoutBaseCtor: Traversal::List,
- Traversal::Union,
- Traversal::Complex,
- Traversal::Enumeration,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
-
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary
- {
- // generate should initially be false.
- //
- GenerateWithoutBaseCtor (bool& generate)
- : generate_ (generate)
- {
- *this >> inherits_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::List&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Union&)
- {
- // No default initialization.
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- Complex::inherits (c);
- }
-
- virtual void
- traverse (SemanticGraph::Enumeration&)
- {
- // No default initialization.
- }
-
- virtual void
- traverse (SemanticGraph::AnyType&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::String&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary&)
- {
- generate_ = true;
- }
-
- private:
- bool& generate_;
- Traversal::Inherits inherits_;
- };
-
-
- // List of all non-optional members sans simple base. Note that
- // AnyAttribute is always mapped to a sequence.
- //
- struct CtorArgsWithoutBase: Traversal::Complex,
- Traversal::Any,
- Traversal::Element,
- Traversal::Attribute,
- Context
- {
- CtorArgsWithoutBase (Context& c, CtorArgType, bool arg, bool first);
-
- virtual void
- traverse (SemanticGraph::Any&);
-
- virtual void
- traverse (SemanticGraph::Element&);
-
- virtual void
- traverse (SemanticGraph::Attribute&);
-
- private:
- String
- comma ();
-
- private:
- CtorArgType arg_type_;
- bool arg_;
- bool first_;
-
- private:
- Traversal::Inherits inherits_;
- Traversal::Names names_;
- };
-
- //
- //
- struct GlobalElementBase
- {
- GlobalElementBase (Context& c)
- : ctx_ (c)
- {
- }
-
- bool
- generate_p (SemanticGraph::Element&);
-
- bool
- doc_root_p (SemanticGraph::Element&);
-
- private:
- Context& ctx_;
- };
-
-
- //
- //
- struct Namespace: CXX::Namespace,
- GlobalElementBase,
- CXX::Namespace::ScopeTracker
- {
- Namespace (Context&,
- size_t first = 1,
- size_t last = 0);
-
- virtual void
- traverse (Type&);
-
- protected:
- virtual void
- enter (Type&, String const& name, bool last);
-
- virtual void
- leave ();
-
- protected:
- Context& ctx_;
-
- private:
- size_t first_;
- size_t last_;
- size_t count_;
- };
-
- //
- //
- struct DocumentedNamespace: Namespace
- {
- DocumentedNamespace (Context& c)
- : Namespace (c)
- {
- }
-
- virtual void
- enter (Type& ns, String const& name, bool last)
- {
- Namespace::enter (ns, name, last);
-
- // Only add documentation to the innermost namespace.
- //
- if (ctx_.doxygen && name && last)
- {
- ctx_.os << "/**" << endl
- << " * @brief C++ namespace for the %" <<
- ctx_.comment (ns.name ()) << endl
- << " * schema namespace." << endl
- << " */" << endl;
- }
- }
- };
-
- //
- //
- struct TypeForward: Traversal::Type, Context
- {
- TypeForward (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t);
- };
-
- struct Includes: Traversal::Imports,
- Traversal::Includes
- {
- enum Type
- {
- forward,
- header,
- inline_,
- source
- };
-
- Includes (Context& c, Type type)
- : ctx_ (c),
- type_ (type),
- forward_ (c.options.generate_forward ()),
- namespace_ (c),
- type_forward_ (c)
- {
- schema_ >> schema_names_ >> namespace_ >> names_ >> type_forward_;
- }
-
- virtual void
- traverse (SemanticGraph::Imports& i)
- {
- traverse_ (i);
- }
-
- virtual void
- traverse (SemanticGraph::Includes& i)
- {
- traverse_ (i);
- }
-
- private:
- void
- traverse_ (SemanticGraph::Uses&);
-
- private:
- Context& ctx_;
- Type type_;
- bool forward_;
-
- Traversal::Schema schema_;
- Traversal::Names schema_names_;
- Namespace namespace_;
- Traversal::Names names_;
- TypeForward type_forward_;
- };
-
- //
- //
- struct FundIncludes: Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
- Context
- {
- FundIncludes (Context& c, String const& prefix)
- : Context (c), prefix_ (prefix),
- long_ (false), unsigned_long_ (false)
- {
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- gen_include (t, "byte.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- gen_include (t, "unsigned-byte.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- gen_include (t, "short.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- gen_include (t, "unsigned-short.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- gen_include (t, "int.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- gen_include (t, "unsigned-int.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- if (!long_)
- long_ = gen_include (t, "long.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- if (!unsigned_long_)
- unsigned_long_ = gen_include (t, "unsigned-long.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- if (!long_)
- long_ = gen_include (t, "long.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- if (!long_)
- long_ = gen_include (t, "long.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- if (!unsigned_long_)
- unsigned_long_ = gen_include (t, "unsigned-long.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- if (!unsigned_long_)
- unsigned_long_ = gen_include (t, "unsigned-long.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- if (!long_)
- long_ = gen_include (t, "long.hxx");
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- gen_include (t, "boolean.hxx");
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- gen_include (t, "float.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- gen_include (t, "double.hxx");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- gen_include (t, "decimal.hxx");
- }
-
- private:
- bool
- gen_include (SemanticGraph::Type& t, String const& file)
- {
- String custom;
-
- // XML Schema built-in type customization is only possible when
- // we are generating separate header.
- //
- if (generate_xml_schema && custom_type (t, custom))
- {
- String new_name;
- renamed_type (t, new_name);
-
- if (!new_name)
- return false;
- }
-
- os << "#include <xsd/cxx/tree/" << prefix_ << "/" << file << ">"
- << endl;
-
- return true;
- }
-
- private:
- String prefix_;
- bool long_;
- bool unsigned_long_;
- };
- }
-}
-
-#endif // CXX_TREE_ELEMENTS_HXX
diff --git a/xsd/cxx/tree/fundamental-header.hxx b/xsd/cxx/tree/fundamental-header.hxx
deleted file mode 100644
index e553d29..0000000
--- a/xsd/cxx/tree/fundamental-header.hxx
+++ /dev/null
@@ -1,1335 +0,0 @@
-// file : xsd/cxx/tree/fundamental-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_FUNDAMENTAL_HEADER_HXX
-#define CXX_TREE_FUNDAMENTAL_HEADER_HXX
-
-#include <set>
-#include <vector>
-#include <algorithm>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- struct FundamentalNamespace : DocumentedNamespace,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities,
- Context
- {
- FundamentalNamespace (Context& c)
- : DocumentedNamespace (c),
- Context (c),
- export_ (c.options.export_xml_schema () && type_exp)
- {
- *this >> names_ >> *this;
-
- if (export_)
- xs_ns_ = ns_name (xs_ns ());
- }
-
- void
- gen_typedef (String const& name,
- String const& type,
- String const& arg1 = L"",
- String const& arg2 = L"",
- String const& arg3 = L"",
- bool export_type = true)
- {
- os << "typedef " << type;
-
- // Use unqualified arguments since we are in the same
- // namespace.
- //
- if (arg1)
- {
- os << arg1;
-
- if (arg2)
- {
- os << ", " << arg2;
-
- if (arg3)
- os << ", " << arg3;
- }
-
- os << " >";
- }
-
- os << " " << name << ";";
-
- if (export_type && export_ && type.find (L'<') != String::npos)
- {
- String s (type);
-
- // Use qualified arguments.
- //
- if (arg1)
- {
- s += xs_ns_;
- s += L"::";
- s += arg1;
-
- if (arg2)
- {
- s += L", ";
- s += xs_ns_;
- s += L"::";
- s += arg2;
-
- if (arg3)
- {
- s += L", ";
- s += xs_ns_;
- s += L"::";
- s += arg3;
- }
- }
-
- s += " >";
- }
-
- if (exports_set_.count (s) == 0)
- {
- exports_.push_back (s);
- exports_set_.insert (s);
- }
- }
- }
-
- String
- built_in_type (SemanticGraph::Type& t,
- String const& type,
- String const& arg1 = L"",
- String const& arg2 = L"",
- String const& arg3 = L"")
- {
- String custom;
-
- String name (ename (t));
-
- // XML Schema built-in type customization is only possible when
- // we are generating separate header.
- //
- if (generate_xml_schema && custom_type (t, custom))
- {
- if (custom.empty ())
- custom = name;
-
- String new_name;
- renamed_type (t, new_name);
-
- if (new_name)
- {
- gen_typedef (new_name, type, arg1, arg2, arg3);
-
- if (doxygen)
- os << endl;
- }
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief C++ type corresponding to the " <<
- comment (t.name ()) << " XML Schema" << endl
- << " * built-in type." << endl
- << " */" << endl;
-
- if (custom == name)
- os << "class " << name << ";";
- else
- os << "typedef " << custom << " " << name << ";";
-
- if (doxygen)
- os << endl;
- }
- else
- {
- // Otherwise generate simple typedef.
- //
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief C++ type corresponding to the " <<
- comment (t.name ()) << " XML Schema" << endl
- << " * built-in type." << endl
- << " */" << endl;
-
- gen_typedef (name, type, arg1, arg2, arg3);
-
- if (doxygen)
- os << endl;
- }
-
- return name;
- }
-
- // anyType and anySimpleType
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- os << "// anyType and anySimpleType." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- type_ = built_in_type (t, "::xsd::cxx::tree::type");
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- simple_type_ = built_in_type (
- t, L"::xsd::cxx::tree::simple_type< " + char_type + L", ", type_);
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Alias for the anyType type." << endl
- << " */" << endl;
-
- gen_typedef (xs_ns ().context().get<String> ("container"),
- "::xsd::cxx::tree::type");
-
- os << endl;
-
- if (doxygen)
- os << endl;
- }
-
- // Integrals.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- os << "// 8-bit" << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "signed char");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- built_in_type (t, "unsigned char");
- os << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- os << "// 16-bit" << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "short");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- built_in_type (t, "unsigned short");
- os << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- os << "// 32-bit" << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "int");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- built_in_type (t, "unsigned int");
- os << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- os << "// 64-bit" << endl
- << "//" <<endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "long long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- built_in_type (t, "unsigned long long");
- os << endl;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- os << "// Supposed to be arbitrary-length integral types." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "long long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- built_in_type (t, "long long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- built_in_type (t, "unsigned long long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- built_in_type (t, "unsigned long long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- built_in_type (t, "long long");
- os << endl;
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- os << "// Boolean." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "bool");
-
- os << endl;
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- os << "// Floating-point types." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (t, "float");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- double_ = built_in_type (t, "double");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- decimal_ = built_in_type (t, "double");
- os << endl;
- }
-
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- os << "// String types." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- string_ = built_in_type (
- t, L"::xsd::cxx::tree::string< " + char_type + L", ", simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- norm_string_ = built_in_type (
- t,
- L"::xsd::cxx::tree::normalized_string< " + char_type + L", ",
- string_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- token_ = built_in_type (
- t, L"::xsd::cxx::tree::token< " + char_type + L", ", norm_string_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- nmtoken_ = built_in_type (
- t, L"::xsd::cxx::tree::nmtoken< " + char_type + L", ", token_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::nmtokens< " + char_type + L", ",
- simple_type_,
- nmtoken_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- name_ = built_in_type (
- t, L"::xsd::cxx::tree::name< " + char_type + L", ", token_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- ncname_ = built_in_type (
- t, L"::xsd::cxx::tree::ncname< " + char_type + L", ", name_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- built_in_type (
- t, L"::xsd::cxx::tree::language< " + char_type + L", ", token_);
-
- os << endl;
- }
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- os << "// ID/IDREF." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (
- t, L"::xsd::cxx::tree::id< " + char_type + L", ", ncname_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- idref_ = built_in_type (
- t, L"::xsd::cxx::tree::idref< " + char_type + L", ", ncname_, type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::idrefs< " + char_type + L", ",
- simple_type_,
- idref_);
-
- os << endl;
- }
-
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- os << "// URI." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- uri_ = built_in_type (
- t, L"::xsd::cxx::tree::uri< " + char_type + L", ", simple_type_);
-
- os << endl;
- }
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- os << "// Qualified name." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- built_in_type (
- t,
- L"::xsd::cxx::tree::qname< " + char_type + L", ",
- simple_type_,
- uri_,
- ncname_);
-
- os << endl;
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- os << "// Binary." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Binary buffer type." << endl
- << " */" << endl;
-
- gen_typedef (xs_ns ().context().get<String> ("buffer"),
- L"::xsd::cxx::tree::buffer< " + char_type + L" >");
-
- if (doxygen)
- os << endl;
-
- built_in_type (
- t,
- L"::xsd::cxx::tree::base64_binary< " + char_type + L", ",
- simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::hex_binary< " + char_type + L", ",
- simple_type_);
-
- os << endl;
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- os << "// Date/time." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Time zone type." << endl
- << " */" << endl;
-
- gen_typedef (xs_ns ().context().get<String> ("time-zone"),
- "::xsd::cxx::tree::time_zone");
-
- if (doxygen)
- os << endl;
-
- built_in_type (
- t, L"::xsd::cxx::tree::date< " + char_type + L", ", simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::date_time< " + char_type + L", ",
- simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::duration< " + char_type + L", ",
- simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- built_in_type (
- t, L"::xsd::cxx::tree::gday< " + char_type + L", ", simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- built_in_type (
- t, L"::xsd::cxx::tree::gmonth< " + char_type + L", ", simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::gmonth_day< " + char_type + L", ",
- simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- built_in_type (
- t, L"::xsd::cxx::tree::gyear< " + char_type + L", ", simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::gyear_month< " + char_type + L", ",
- simple_type_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- built_in_type (
- t, L"::xsd::cxx::tree::time< " + char_type + L", ", simple_type_);
-
- os << endl;
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity& t)
- {
- os << "// Entity." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl;
-
- entity_ = built_in_type (
- t, L"::xsd::cxx::tree::entity< " + char_type + L", ", ncname_);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities& t)
- {
- built_in_type (
- t,
- L"::xsd::cxx::tree::entities< " + char_type + L", ",
- simple_type_,
- entity_);
-
- os << endl;
- }
-
- virtual void
- post (SemanticGraph::Namespace& n)
- {
- SemanticGraph::Context& c (xs_ns ().context());
-
- bool parsing (!options.suppress_parsing ());
- bool serialization (options.generate_serialization ());
- bool element_map (options.generate_element_map ());
-
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Content order sequence entry." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("content-order"),
- "::xsd::cxx::tree::content_order");
- }
-
- if (options.generate_element_type ())
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Base class for element types." << endl
- << " */" << endl;
- else
- os << "// Base class for element types." << endl
- << "//" << endl;
-
- gen_typedef (
- c.get<String> ("element-type"),
- L"::xsd::cxx::tree::element_type< " + char_type + L", ",
- type_);
-
- os << endl;
- }
-
- if (element_map)
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Root element map." << endl
- << " */" << endl;
- else
- os << "// Root element map." << endl
- << "//" << endl;
-
- gen_typedef (
- c.get<String> ("element-map"),
- L"::xsd::cxx::tree::element_map< " + char_type + L", ",
- type_);
-
- os << endl;
- }
-
- if (serialization)
- {
- os << "// Namespace information and list stream. Used in" << endl
- << "// serialization functions." << endl
- << "//" << endl;
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Namespace serialization information." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("namespace-info"),
- L"::xsd::cxx::xml::dom::namespace_info< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Namespace serialization information map." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("namespace-infomap"),
- L"::xsd::cxx::xml::dom::namespace_infomap< " +
- char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief List serialization stream." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("list-stream"),
- L"::xsd::cxx::tree::list_stream< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Serialization wrapper for the %double type." << endl
- << " */" << endl;
-
- // Do not export as_double and as_decimal since they are already
- // instantiated.
- //
- gen_typedef (c.get<String> ("as-double"),
- L"::xsd::cxx::tree::as_double< ",
- double_,
- "",
- "",
- false);
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Serialization wrapper for the %decimal type." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("as-decimal"),
- L"::xsd::cxx::tree::as_decimal< ",
- decimal_,
- "",
- "",
- false);
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Simple type facet." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("facet"), "::xsd::cxx::tree::facet");
-
- os << endl;
- }
-
- //@@ Can't change names of ostream/istream since they are
- // templates.
- //
- if (!options.generate_insertion ().empty ())
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Data representation output stream template." << endl
- << " */" << endl;
- else
- os << "// Data representation output stream template." << endl
- << "//" << endl;
-
- os << "using ::xsd::cxx::tree::ostream;"
- << endl;
- }
-
- if (!options.generate_extraction ().empty ())
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Data representation input stream template." << endl
- << " */" << endl;
- else
- os << "// Data representation input stream template." << endl
- << "//" << endl;
-
- os << "using ::xsd::cxx::tree::istream;"
- << endl;
- }
-
- os << "// Flags and properties." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Parsing and serialization flags." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("flags"), "::xsd::cxx::tree::flags");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Parsing properties." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("properties"),
- L"::xsd::cxx::tree::properties< " + char_type + L" >");
- os << endl;
-
-
- //
- //
- if (parsing || serialization)
- {
- os << "// Parsing/serialization diagnostics." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Error severity." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("severity"),
- "::xsd::cxx::tree::severity");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Error condition." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("error"),
- L"::xsd::cxx::tree::error< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief List of %error conditions." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("diagnostics"),
- L"::xsd::cxx::tree::diagnostics< " + char_type + L" >");
- os << endl;
- }
-
- //
- //
- os << "// Exceptions." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Root of the C++/Tree %exception hierarchy." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("exception"),
- L"::xsd::cxx::tree::exception< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that the size argument exceeds" <<
- endl
- << " * the capacity argument." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("bounds"),
- L"::xsd::cxx::tree::bounds< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that a duplicate ID value" <<
- endl
- << " * was encountered in the object model." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("duplicate-id"),
- L"::xsd::cxx::tree::duplicate_id< " + char_type + L" >");
-
- if (parsing)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating a parsing failure." << endl
- << " */" << endl;
-
- gen_typedef (c.get<String> ("parsing"),
- L"::xsd::cxx::tree::parsing< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that an expected element" <<
- endl
- << " * was not encountered." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("expected-element"),
- L"::xsd::cxx::tree::expected_element< " + char_type + L" >");
- }
-
- if (parsing || serialization)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that an unexpected " <<
- "element" << endl
- << " * was encountered." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("unexpected-element"),
- L"::xsd::cxx::tree::unexpected_element< " + char_type + L" >");
- }
-
- if (parsing)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that an expected " <<
- "attribute" << endl
- << " * was not encountered." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("expected-attribute"),
- L"::xsd::cxx::tree::expected_attribute< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that an unexpected " <<
- "enumerator" << endl
- << " * was encountered." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("unexpected-enumerator"),
- L"::xsd::cxx::tree::unexpected_enumerator< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that the text content " <<
- "was" << endl
- << " * expected for an element." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("expected-text-content"),
- L"::xsd::cxx::tree::expected_text_content< " + char_type + L" >");
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that a prefix-namespace" <<
- endl
- << " * mapping was not provided." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("no-prefix-mapping"),
- L"::xsd::cxx::tree::no_prefix_mapping< " + char_type + L" >");
- }
-
- if (options.generate_polymorphic ())
- {
- if (parsing || serialization)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that the type " <<
- "information" << endl
- << " * is not available for a type." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("no-type-info"),
- L"::xsd::cxx::tree::no_type_info< " + char_type + L" >");
- }
-
- if (parsing)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that the types are not" <<
- endl
- << " * related by inheritance." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("not-derived"),
- L"::xsd::cxx::tree::not_derived< " + char_type + L" >");
- }
- }
-
- if (element_map)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating that parsing or " <<
- "serialization" << endl
- << " * information is not available for an element." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("no-element-info"),
- L"::xsd::cxx::tree::no_element_info< " + char_type + L" >");
- }
-
- if (serialization)
- {
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Exception indicating a serialization " <<
- "failure." << endl
- << " */" << endl;
-
- gen_typedef (
- c.get<String> ("serialization"),
- L"::xsd::cxx::tree::serialization< " + char_type + L" >");
- }
-
- os << endl;
-
- if (parsing || serialization)
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Error handler callback interface." << endl
- << " */" << endl;
- else
- os << "// Error handler callback interface." << endl
- << "//" << endl;
-
- gen_typedef (
- c.get<String> ("error-handler"),
- L"::xsd::cxx::xml::error_handler< " + char_type + L" >");
-
- os << endl;
- }
-
- if (parsing || serialization)
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief DOM interaction." << endl
- << " */" << endl;
- else
- os << "// DOM interaction." << endl
- << "//" << endl;
-
- os << "namespace dom"
- << "{";
-
- // @@ Disregarding current naming convention by using the
- // fixed name (even in C++11, template alias is not yet
- // widely supported).
- //
- if (doxygen)
- os << "/**" << endl
- << " * @brief Automatic pointer for DOMDocument." << endl
- << " */" << endl;
- else
- os << "// Automatic pointer for DOMDocument." << endl
- << "//" << endl;
-
- if (std >= cxx_version::cxx11)
- os << "using ::xsd::cxx::xml::dom::unique_ptr;";
- else
- os << "using ::xsd::cxx::xml::dom::auto_ptr;";
-
- os << endl;
-
- if (parsing)
- {
- if (!generate_xml_schema)
- {
- String g (L"XSD_CXX_TREE_TREE_NODE_KEY" + ns_name (n));
-
- std::transform (g.begin (), g.end(), g.begin (), upcase);
- g = escape (g); // Make it a C++ id.
-
- os << "#ifndef " << g << endl
- << "#define " << g << endl;
- }
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief DOM user data key for back pointers to " <<
- "tree nodes." << endl
- << " */" << endl;
- else
- os << "// DOM user data key for back pointers to tree nodes." << endl
- << "//" << endl;
-
- os << "const XMLCh* const " << c.get<String> ("tree-node-key") <<
- " = ::xsd::cxx::tree::user_data_keys::node;";
-
- if (!generate_xml_schema)
- os << "#endif" << endl;
- }
-
- os << "}"; // namespace dom
- }
-
- if (element_map)
- {
- if (doxygen)
- os << "//@cond" << endl
- << endl;
-
- if (!generate_xml_schema)
- {
- String g (L"XSD_CXX_TREE_ELEMENT_MAP_INIT" + ns_name (n));
-
- std::transform (g.begin (), g.end(), g.begin (), upcase);
- g = escape (g); // Make it a C++ id.
-
- os << "#ifndef " << g << endl
- << "#define " << g << endl;
- }
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::element_map_init< " <<
- char_type << ", " << type_ << " >" << endl
- << "_xsd_element_map_init;";
-
- if (!generate_xml_schema)
- os << "#endif" << endl;
-
- if (doxygen)
- os << endl
- << "//@endcond" << endl;
- }
-
- Namespace::post (n);
-
- // Generate exports.
- //
- if (export_)
- {
- StringSet ns_set;
-
- for (StringList::const_iterator i (exports_.begin ());
- i != exports_.end (); ++i)
- {
- String const& e (*i);
-
- // 12 is to skip ::xsd::cxx::
- //
- ns_set.insert (String (e, 12, e.rfind (':', e.find ('<')) - 13));
- }
-
- os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{";
-
- for (StringSet::const_iterator i (ns_set.begin ());
- i != ns_set.end (); ++i)
- {
- String const& ns (*i);
- String prefix (L"::xsd::cxx::" + ns);
-
- size_t n (1);
- for (size_t b (0), e (ns.find (':')); ; n++)
- {
- os << "namespace " << String (ns, b, e)
- << "{";
-
- if (e == String::npos)
- break;
-
- b = e + 2;
- e = ns.find (':', b);
- }
-
- for (StringList::const_iterator i (exports_.begin ());
- i != exports_.end (); ++i)
- {
- String const& e (*i);
- String ens (e, 12, e.rfind (':', e.find ('<')) - 13);
-
- if (ns == ens)
- {
- String type (e, e.rfind (':', e.find ('<')) + 1);
- os << "template class " << type_exp << type << ";";
- }
- }
-
- while (n--)
- os << "}";
- }
-
- os << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
- }
- }
-
- private:
- typedef std::set<String> StringSet;
- typedef std::vector<String> StringList;
-
- bool export_;
- StringList exports_;
- StringSet exports_set_;
- String xs_ns_;
-
- Traversal::Names names_;
-
- String type_;
- String simple_type_;
- String string_;
- String norm_string_;
- String token_;
- String nmtoken_;
- String name_;
- String ncname_;
- String idref_;
- String uri_;
- String entity_;
-
- String double_;
- String decimal_;
- };
- }
-}
-
-#endif // CXX_TREE_FUNDAMENTAL_HEADER_HXX
diff --git a/xsd/cxx/tree/generator.cxx b/xsd/cxx/tree/generator.cxx
deleted file mode 100644
index edf5523..0000000
--- a/xsd/cxx/tree/generator.cxx
+++ /dev/null
@@ -1,1227 +0,0 @@
-// file : xsd/cxx/tree/generator.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <vector>
-#include <algorithm>
-#include <iostream>
-#include <fstream>
-
-#include <cutl/re.hxx>
-#include <cutl/shared-ptr.hxx>
-
-#include <cutl/compiler/code-stream.hxx>
-#include <cutl/compiler/cxx-indenter.hxx>
-#include <cutl/compiler/sloc-counter.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/generators/dependencies.hxx>
-
-#include <cxx/tree/generator.hxx>
-
-#include <cxx/tree/elements.hxx>
-
-#include <cxx/tree/counter.hxx>
-#include <cxx/tree/validator.hxx>
-#include <cxx/tree/name-processor.hxx>
-#include <cxx/tree/order-processor.hxx>
-#include <cxx/tree/polymorphism-processor.hxx>
-
-#include <cxx/tree/tree-forward.hxx>
-#include <cxx/tree/tree-header.hxx>
-#include <cxx/tree/tree-inline.hxx>
-#include <cxx/tree/tree-source.hxx>
-
-#include <cxx/tree/parser-header.hxx>
-#include <cxx/tree/parser-source.hxx>
-
-#include <cxx/tree/stream-header.hxx>
-#include <cxx/tree/stream-source.hxx>
-
-#include <cxx/tree/serialization-header.hxx>
-#include <cxx/tree/serialization-source.hxx>
-
-#include <cxx/tree/stream-insertion-header.hxx>
-#include <cxx/tree/stream-insertion-source.hxx>
-#include <cxx/tree/stream-extraction-source.hxx>
-
-#include <cxx/tree/options.hxx>
-
-#include "../../../libxsd/xsd/cxx/version.hxx"
-
-using namespace std;
-using namespace cutl;
-using namespace XSDFrontend::SemanticGraph;
-
-//
-//
-typedef std::wifstream WideInputFileStream;
-typedef std::wofstream WideOutputFileStream;
-
-namespace CXX
-{
- namespace
- {
- char const copyright_gpl[] =
- "// Copyright (c) 2005-2020 Code Synthesis Tools CC.\n"
- "//\n"
- "// This program was generated by CodeSynthesis XSD, an XML Schema to\n"
- "// C++ data binding compiler.\n"
- "//\n"
- "// This program is free software; you can redistribute it and/or modify\n"
- "// it under the terms of the GNU General Public License version 2 as\n"
- "// published by the Free Software Foundation.\n"
- "//\n"
- "// This program is distributed in the hope that it will be useful,\n"
- "// but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "// GNU General Public License for more details.\n"
- "//\n"
- "// You should have received a copy of the GNU General Public License\n"
- "// along with this program; if not, write to the Free Software\n"
- "// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
- "//\n"
- "// In addition, as a special exception, Code Synthesis Tools CC gives\n"
- "// permission to link this program with the Xerces-C++ library (or with\n"
- "// modified versions of Xerces-C++ that use the same license as Xerces-C++),\n"
- "// and distribute linked combinations including the two. You must obey\n"
- "// the GNU General Public License version 2 in all respects for all of\n"
- "// the code used other than Xerces-C++. If you modify this copy of the\n"
- "// program, you may extend this exception to your version of the program,\n"
- "// but you are not obligated to do so. If you do not wish to do so, delete\n"
- "// this exception statement from your version.\n"
- "//\n"
- "// Furthermore, Code Synthesis Tools CC makes a special exception for\n"
- "// the Free/Libre and Open Source Software (FLOSS) which is described\n"
- "// in the accompanying FLOSSE file.\n"
- "//\n\n";
-
- char const copyright_proprietary[] =
- "// Copyright (c) 2005-2020 Code Synthesis Tools CC.\n"
- "//\n"
- "// This program was generated by CodeSynthesis XSD, an XML Schema\n"
- "// to C++ data binding compiler, in the Proprietary License mode.\n"
- "// You should have received a proprietary license from Code Synthesis\n"
- "// Tools CC prior to generating this code. See the license text for\n"
- "// conditions.\n"
- "//\n\n";
- }
-
- void Tree::Generator::
- usage ()
- {
- CXX::Tree::options::print_usage (wcout);
- CXX::options::print_usage (wcout);
- }
-
- namespace
- {
- void
- open (WideInputFileStream& ifs, NarrowString const& path)
- {
- try
- {
- Path fs_path (path);
- ifs.open (fs_path.string ().c_str (),
- std::ios_base::in | std::ios_base::binary);
-
- if (!ifs.is_open ())
- {
- wcerr << path.c_str () << ": error: unable to open in read mode"
- << endl;
-
- throw Tree::Generator::Failed ();
- }
- }
- catch (InvalidPath const&)
- {
- wcerr << "error: '" << path.c_str () << "' is not a valid "
- << "filesystem path" << endl;
-
- throw Tree::Generator::Failed ();
- }
- }
-
- void
- append (WideOutputFileStream& os,
- NarrowString const& path,
- WideInputFileStream& default_is)
- {
- using std::ios_base;
-
- if (path)
- {
- WideInputFileStream is;
- open (is, path);
- os << is.rdbuf ();
- }
- else if (default_is.is_open ())
- {
- os << default_is.rdbuf ();
- default_is.seekg (0, ios_base::beg);
- }
- }
-
- void
- append (WideOutputFileStream& os,
- NarrowStrings const& primary,
- NarrowStrings const& def)
- {
- NarrowStrings const& v (primary.empty () ? def : primary);
-
- for (NarrowStrings::const_iterator i (v.begin ()), e (v.end ());
- i != e; ++i)
- {
- os << i->c_str () << endl;
- }
- }
- }
-
-
- size_t Tree::Generator::
- generate (Tree::options const& ops,
- Schema& schema,
- Path const& file_path,
- bool fpt,
- StringLiteralMap const& string_literal_map,
- const WarningSet& disabled_warnings,
- FileList& file_list,
- AutoUnlinks& unlinks)
- {
- using cutl::shared_ptr;
- typedef cutl::re::regexsub Regex;
-
- typedef vector<Path> Paths;
- typedef vector<shared_ptr<WideOutputFileStream> > WideOutputFileStreams;
-
- try
- {
- // Do option validation.
- //
- if (ops.parts () < 1)
- {
- wcerr << "error: invalid value for option --parts: " <<
- ops.parts () << endl;
- throw Failed ();
- }
-
- // Get counts.
- //
- Counts counts;
- {
- Counter counter;
- counts = counter.count (ops, schema, file_path);
-
- /*
- wcerr << "global type count: " << counts.global_types << endl;
- wcerr << "global element count: " << counts.global_elements << endl;
- wcerr << "generated global element count: " <<
- counts.generated_global_elements << endl;
-
- wcerr << "total complexity: " << counts.complexity_total << endl;
- wcerr << "complexity vector size: " << counts.complexity.size ()
- << endl;
- */
- }
-
- // Evaluate the graph for possibility of generating something useful.
- //
- {
- Validator validator;
- if (!validator.validate (
- ops, schema, file_path, disabled_warnings, counts))
- throw Failed ();
- }
-
- bool gen_cxx (!ops.generate_dep_only ());
-
- // Process ordered types.
- //
- if (gen_cxx)
- {
- OrderProcessor proc;
- if (!proc.process (ops, schema, file_path))
- throw Failed ();
- }
-
- // Process names.
- //
- if (gen_cxx)
- {
- NameProcessor proc;
- if (!proc.process (ops, schema, file_path, string_literal_map))
- throw Failed ();
- }
-
- // Process polymorphic types.
- //
- if (gen_cxx &&
- ops.generate_polymorphic () &&
- !ops.polymorphic_type_all ())
- {
- PolymorphismProcessor proc;
- if (!proc.process (ops, schema, file_path, disabled_warnings))
- throw Failed ();
- }
-
- // Parts.
- //
- size_t parts (ops.parts ());
- size_t units (counts.global_types + counts.generated_global_elements);
- size_t units_per_part (units / parts);
-
- if (parts != 1 && units_per_part < 1)
- {
- wcerr << "error: too many parts specified: " << parts << endl;
- throw Failed ();
- }
-
- size_t complexity_per_part (counts.complexity_total / parts);
-
-
- NarrowString parts_suffix (ops.parts_suffix ());
-
- //
- //
- bool generate_xml_schema (ops.generate_xml_schema ());
-
- // We could be compiling several schemas at once in which case
- // handling of the --generate-xml-schema option gets tricky: we
- // will need to rely on the presence of the --extern-xml-schema
- // to tell us which (fake) schema file corresponds to XML Schema.
- //
- if (generate_xml_schema)
- {
- if (NarrowString name = ops.extern_xml_schema ())
- {
- if (file_path.string () != name)
- generate_xml_schema = false;
- }
- }
-
- bool header (true);
- bool inline_ (ops.generate_inline () && !generate_xml_schema);
- bool forward (ops.generate_forward () && !generate_xml_schema);
- bool source (!generate_xml_schema);
- bool gen_dep ((ops.generate_dep () || ops.generate_dep_only ()) &&
- !generate_xml_schema);
-
- if (ops.generate_dep_only () && generate_xml_schema)
- {
- wcerr << "error: no dependency information can be generated for "
- "XML Schema header" << endl;
- throw Failed ();
- }
-
- if (gen_dep && fpt)
- {
- wcerr << "error: dependency generation not support in the " <<
- "file-per-type mode" << endl;
- throw Failed ();
- }
-
- // Generate code.
- //
- NarrowString name (file_path.leaf ().string ());
-
- NarrowString hxx_suffix (ops.hxx_suffix ());
- NarrowString ixx_suffix (ops.ixx_suffix ());
- NarrowString cxx_suffix (ops.cxx_suffix ());
- NarrowString fwd_suffix (ops.fwd_suffix ());
- NarrowString dep_suffix (ops.dep_suffix ());
-
- Regex hxx_expr (ops.hxx_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + hxx_suffix + "#"
- : ops.hxx_regex ());
-
- Regex ixx_expr (ops.ixx_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + ixx_suffix + "#"
- : ops.ixx_regex ());
-
- Regex cxx_expr (ops.cxx_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + cxx_suffix + "#"
- : ops.cxx_regex ());
-
- Regex fwd_expr (ops.fwd_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + fwd_suffix + "#"
- : ops.fwd_regex ());
-
- Regex dep_expr (ops.dep_regex ().empty ()
- ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + dep_suffix + "#"
- : ops.dep_regex ());
-
- if (header && !hxx_expr.match (name))
- {
- wcerr << "error: header expression '" <<
- hxx_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (inline_ && !ixx_expr.match (name))
- {
- wcerr << "error: inline expression '" <<
- ixx_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (source && parts == 1 && !cxx_expr.match (name))
- {
- wcerr << "error: source expression '" <<
- cxx_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (forward && !fwd_expr.match (name))
- {
- wcerr << "error: forward expression '" <<
- fwd_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- if (gen_dep && !dep_expr.match (name))
- {
- wcerr << "error: dependency expression '" <<
- dep_expr.regex ().str ().c_str () << "' does not match '" <<
- name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- NarrowString hxx_name (header ? hxx_expr.replace (name) : NarrowString ());
- NarrowString ixx_name (inline_ ? ixx_expr.replace (name) : NarrowString ());
- NarrowString fwd_name (forward ? fwd_expr.replace (name) : NarrowString ());
- NarrowString dep_name (gen_dep ? dep_expr.replace (name) : NarrowString ());
-
- Path hxx_path (hxx_name);
- Path ixx_path (ixx_name);
- Path fwd_path (fwd_name);
- Path dep_path (dep_name);
- Paths cxx_paths;
-
- if (source)
- {
- if (parts > 1)
- {
- for (size_t i (0); i < parts; ++i)
- {
- std::ostringstream os;
- os << i;
-
- Regex expr (
- "#^(.+?)(\\.[^./\\\\]+)?$#$1" + parts_suffix + os.str () + "$2#");
-
- NarrowString part_name (expr.replace (name));
-
- if (!cxx_expr.match (part_name))
- {
- wcerr << "error: source expression '" <<
- cxx_expr.regex ().str ().c_str () << "' does not match '" <<
- part_name.c_str () << "'" << endl;
- throw Failed ();
- }
-
- cxx_paths.push_back (Path (cxx_expr.replace (part_name)));
- }
- }
- else
- cxx_paths.push_back (Path (cxx_expr.replace (name)));
- }
-
- Path out_dir;
-
- if (NarrowString dir = ops.output_dir ())
- {
- try
- {
- out_dir = Path (dir);
- }
- catch (InvalidPath const&)
- {
- wcerr << dir.c_str () << ": error: invalid path" << endl;
- throw Failed ();
- }
- }
-
- if (fpt && !generate_xml_schema)
- {
- // In the file-per-type mode the schema files are always local
- // unless the user added the directory so that we propagate this
- // to the output files.
- //
- Path fpt_dir (file_path.directory ());
-
- if (!fpt_dir.empty ())
- out_dir /= fpt_dir;
- }
-
- if (!out_dir.empty ())
- {
- hxx_path = out_dir / hxx_path;
- ixx_path = out_dir / ixx_path;
- fwd_path = out_dir / fwd_path;
- dep_path = out_dir / dep_path;
-
- for (Paths::iterator i (cxx_paths.begin ());
- i != cxx_paths.end (); ++i)
- *i = out_dir / *i;
- }
-
- //
- //
- WideOutputFileStream hxx;
- WideOutputFileStream ixx;
- WideOutputFileStream fwd;
- WideOutputFileStream dep;
- WideOutputFileStreams cxx;
-
- // DEP
- //
- if (gen_dep)
- {
- dep.open (dep_path.string ().c_str (), ios_base::out);
-
- if (!dep.is_open ())
- {
- wcerr << dep_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (dep_path);
- file_list.push_back (dep_path.string ());
- }
-
- // FWD
- //
- if (gen_cxx && forward)
- {
- fwd.open (fwd_path.string ().c_str (), ios_base::out);
-
- if (!fwd.is_open ())
- {
- wcerr << fwd_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (fwd_path);
- file_list.push_back (fwd_path.string ());
- }
-
- // HXX
- //
- if (gen_cxx && header)
- {
- hxx.open (hxx_path.string ().c_str (), ios_base::out);
-
- if (!hxx.is_open ())
- {
- wcerr << hxx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (hxx_path);
- file_list.push_back (hxx_path.string ());
- }
-
- // IXX
- //
- if (gen_cxx && inline_)
- {
- ixx.open (ixx_path.string ().c_str (), ios_base::out);
-
- if (!ixx.is_open ())
- {
- wcerr << ixx_path << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (ixx_path);
- file_list.push_back (ixx_path.string ());
- }
-
- // CXX
- //
- if (gen_cxx && source)
- {
- for (Paths::iterator i (cxx_paths.begin ());
- i != cxx_paths.end (); ++i)
- {
- shared_ptr<WideOutputFileStream> s (
- new (shared) WideOutputFileStream (
- i->string ().c_str (), ios_base::out));
-
- if (!s->is_open ())
- {
- wcerr << *i << ": error: unable to open in write mode" << endl;
- throw Failed ();
- }
-
- unlinks.add (*i);
- file_list.push_back (i->string ());
- cxx.push_back (s);
- }
- }
-
- // Print copyright and license.
- //
- char const* copyright (
- ops.proprietary_license () ? copyright_proprietary : copyright_gpl);
-
- if (gen_cxx && header)
- hxx << copyright;
-
- if (gen_cxx && forward)
- fwd << copyright;
-
- if (ops.generate_doxygen ())
- {
- // Use native path format.
- //
- hxx << "/**" << endl
- << " * @file" << endl
- << " * @brief Generated from " << name.c_str () << "." << endl
- << " */" << endl
- << endl;
-
- }
-
- if (gen_cxx && inline_)
- ixx << copyright;
-
- if (gen_cxx && source)
- {
- for (WideOutputFileStreams::iterator i (cxx.begin ());
- i != cxx.end (); ++i)
- **i << copyright;
- }
-
-
- // Prologue.
- //
- WideInputFileStream prologue;
- {
- NarrowString name (ops.prologue_file ());
-
- if (name)
- open (prologue, name);
- }
-
- // Epilogue.
- //
- WideInputFileStream epilogue;
- {
- NarrowString name (ops.epilogue_file ());
-
- if (name)
- open (epilogue, name);
- }
-
- // SLOC counter.
- //
- size_t sloc_total (0);
- bool show_sloc (ops.show_sloc ());
-
- typedef
- compiler::ostream_filter<compiler::cxx_indenter, wchar_t>
- ind_filter;
-
- typedef
- compiler::ostream_filter<compiler::sloc_counter, wchar_t>
- sloc_filter;
-
- //
- //
- Regex guard_expr ("/([a-z])([A-Z])/$1_$2/"); // Split words.
- NarrowString guard_prefix (ops.guard_prefix ());
-
- if (!guard_prefix)
- guard_prefix = file_path.directory ().string ();
-
- if (guard_prefix)
- guard_prefix += '_';
-
- // DEP
- //
- if (gen_dep)
- {
- NarrowString target;
- NarrowStrings const& ts (ops.dep_target ());
-
- if (!ts.empty ())
- {
- for (NarrowStrings::const_iterator i (ts.begin ());
- i != ts.end (); ++i)
- target += (target.empty () ? "" : " \\\n") + *i;
- }
- else
- {
- target = hxx_path.string ();
-
- if (forward)
- target += " \\\n" + fwd_path.string ();
-
- if (inline_)
- target += " \\\n" + ixx_path.string ();
-
- for (Paths::iterator i (cxx_paths.begin ());
- i != cxx_paths.end (); ++i)
- target += " \\\n" + i->string ();
-
- target += " \\\n" + dep_path.string ();
- }
-
- dep << target.c_str () << ':';
-
- XSDFrontend::Generators::Dependencies gen;
- Paths prq (gen.generate (schema, file_path));
-
- for (Paths::iterator i (prq.begin ()); i != prq.end (); ++i)
- dep << " \\" << endl
- << " " << *i;
-
- dep << endl;
-
- // If requested, generate phony rules for included/imported schemas
- // but not the main file which is the first in the list.
- //
- if (ops.dep_phony () && prq.size () > 1)
- {
- for (Paths::iterator i (prq.begin () + 1); i != prq.end (); ++i)
- dep << endl
- << *i << ':' << endl;
- }
- }
-
- // FWD
- //
- if (gen_cxx && forward)
- {
- Context ctx (fwd,
- schema,
- file_path,
- ops,
- counts,
- generate_xml_schema,
- &string_literal_map,
- &fwd_expr,
- &hxx_expr,
- &ixx_expr);
-
- sloc_filter sloc (fwd);
-
- // Guard
- //
- String guard (guard_expr.replace (guard_prefix + fwd_name));
- guard = ctx.escape (guard); // make a c++ id
- std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
-
- fwd << "#ifndef " << guard << endl
- << "#define " << guard << endl
- << endl;
-
- if (ctx.std >= cxx_version::cxx11)
- {
- fwd << "#ifndef XSD_CXX11" << endl
- << "#define XSD_CXX11" << endl
- << "#endif" << endl
- << endl;
- }
-
- if (ctx.char_type == L"char")
- {
- fwd << "#ifndef XSD_USE_CHAR" << endl
- << "#define XSD_USE_CHAR" << endl
- << "#endif" << endl
- << endl;
-
- fwd << "#ifndef XSD_CXX_TREE_USE_CHAR" << endl
- << "#define XSD_CXX_TREE_USE_CHAR" << endl
- << "#endif" << endl
- << endl;
- }
- else if (ctx.char_type == L"wchar_t")
- {
- fwd << "#ifndef XSD_USE_WCHAR" << endl
- << "#define XSD_USE_WCHAR" << endl
- << "#endif" << endl
- << endl;
-
- fwd << "#ifndef XSD_CXX_TREE_USE_WCHAR" << endl
- << "#define XSD_CXX_TREE_USE_WCHAR" << endl
- << "#endif" << endl
- << endl;
- }
-
- // Copy prologue.
- //
- fwd << "// Begin prologue." << endl
- << "//" << endl;
-
- append (fwd, ops.fwd_prologue (), ops.prologue ());
- append (fwd, ops.fwd_prologue_file (), prologue);
-
- fwd << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- // Version check.
- //
- fwd << "#include <xsd/cxx/version.hxx>" << endl
- << endl
- << "#if (XSD_INT_VERSION != " << XSD_INT_VERSION << "L)" << endl
- << "#error XSD runtime version mismatch" << endl
- << "#endif" << endl
- << endl;
-
- fwd << "#include <xsd/cxx/pre.hxx>" << endl
- << endl;
-
- // Generate.
- //
- {
- ind_filter ind (fwd); // We don't want to indent prologues/epilogues.
- generate_forward (ctx);
- }
-
- fwd << "#include <xsd/cxx/post.hxx>" << endl
- << endl;
-
- // Copy epilogue.
- //
- fwd << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (fwd, ops.fwd_epilogue_file (), epilogue);
- append (fwd, ops.fwd_epilogue (), ops.epilogue ());
-
- fwd << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- fwd << "#endif // " << guard << endl;
-
- if (show_sloc)
- wcerr << fwd_path << ": " << sloc.stream ().count () << endl;
-
- sloc_total += sloc.stream ().count ();
- }
-
- // HXX
- //
- if (gen_cxx && header)
- {
- Context ctx (hxx,
- schema,
- file_path,
- ops,
- counts,
- generate_xml_schema,
- &string_literal_map,
- &fwd_expr,
- &hxx_expr,
- &ixx_expr);
-
- sloc_filter sloc (hxx);
-
- // Guard
- //
- String guard (guard_expr.replace (guard_prefix + hxx_name));
- guard = ctx.escape (guard); // make a c++ id
- std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
-
- hxx << "#ifndef " << guard << endl
- << "#define " << guard << endl
- << endl;
-
- if (!forward)
- {
- if (ctx.std >= cxx_version::cxx11)
- {
- hxx << "#ifndef XSD_CXX11" << endl
- << "#define XSD_CXX11" << endl
- << "#endif" << endl
- << endl;
- }
-
- if (ctx.char_type == L"char")
- {
- hxx << "#ifndef XSD_USE_CHAR" << endl
- << "#define XSD_USE_CHAR" << endl
- << "#endif" << endl
- << endl;
-
- hxx << "#ifndef XSD_CXX_TREE_USE_CHAR" << endl
- << "#define XSD_CXX_TREE_USE_CHAR" << endl
- << "#endif" << endl
- << endl;
- }
- else if (ctx.char_type == L"wchar_t")
- {
- hxx << "#ifndef XSD_USE_WCHAR" << endl
- << "#define XSD_USE_WCHAR" << endl
- << "#endif" << endl
- << endl;
-
- hxx << "#ifndef XSD_CXX_TREE_USE_WCHAR" << endl
- << "#define XSD_CXX_TREE_USE_WCHAR" << endl
- << "#endif" << endl
- << endl;
- }
- }
- else if (!generate_xml_schema)
- {
- // Generate it before the prologue so that we get the above
- // defines.
- //
- hxx << "#include " << ctx.process_include_path (fwd_name)
- << endl << endl;
- }
-
- // Copy prologue.
- //
- hxx << "// Begin prologue." << endl
- << "//" << endl;
-
- append (hxx, ops.hxx_prologue (), ops.prologue ());
- append (hxx, ops.hxx_prologue_file (), prologue);
-
- hxx << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- // Version check.
- //
- hxx << "#include <xsd/cxx/config.hxx>" << endl
- << endl
- << "#if (XSD_INT_VERSION != " << XSD_INT_VERSION << "L)" << endl
- << "#error XSD runtime version mismatch" << endl
- << "#endif" << endl
- << endl;
-
- hxx << "#include <xsd/cxx/pre.hxx>" << endl
- << endl;
-
- // Generate.
- //
- {
- ind_filter ind (hxx); // We don't want to indent prologues/epilogues.
-
- if (!generate_xml_schema && !forward)
- generate_forward (ctx);
-
- generate_tree_header (ctx);
-
- if (!generate_xml_schema)
- {
- if (ops.generate_ostream ())
- generate_stream_header (ctx);
-
- if (!ops.generate_element_type () && !ops.suppress_parsing ())
- generate_parser_header (ctx);
-
- if (ops.generate_serialization ())
- generate_serialization_header (ctx);
-
- if (!ops.generate_insertion ().empty ())
- generate_stream_insertion_header (ctx);
- }
- }
-
- if (inline_)
- {
- hxx << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
- << "#include " << ctx.process_include_path (ixx_name) << endl
- << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
- << endl;
- }
-
- hxx << "#include <xsd/cxx/post.hxx>" << endl
- << endl;
-
- // Copy epilogue.
- //
- hxx << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (hxx, ops.hxx_epilogue_file (), epilogue);
- append (hxx, ops.hxx_epilogue (), ops.epilogue ());
-
- hxx << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- hxx << "#endif // " << guard << endl;
-
- if (show_sloc)
- wcerr << hxx_path << ": " << sloc.stream ().count () << endl;
-
- sloc_total += sloc.stream ().count ();
- }
-
-
- // IXX
- //
- if (gen_cxx && inline_)
- {
- Context ctx (ixx,
- schema,
- file_path,
- ops,
- counts,
- generate_xml_schema,
- &string_literal_map,
- &fwd_expr,
- &hxx_expr,
- &ixx_expr);
-
- sloc_filter sloc (ixx);
-
- // Guard
- //
- String guard (guard_expr.replace (guard_prefix + ixx_name));
- guard = ctx.escape (guard); // make a c++ id
- std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
-
- ixx << "#ifndef " << guard.c_str () << endl
- << "#define " << guard.c_str () << endl
- << endl;
-
- // Copy prologue.
- //
- ixx << "// Begin prologue." << endl
- << "//" << endl;
-
- append (ixx, ops.ixx_prologue (), ops.prologue ());
- append (ixx, ops.ixx_prologue_file (), prologue);
-
- ixx << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- // Generate.
- //
- {
- ind_filter ind (ixx); // We don't want to indent prologues/epilogues.
- generate_tree_inline (ctx, 1, 0);
- }
-
- // Copy epilogue.
- //
- ixx << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (ixx, ops.ixx_epilogue_file (), epilogue);
- append (ixx, ops.ixx_epilogue (), ops.epilogue ());
-
- ixx << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- ixx << "#endif // " << guard.c_str () << endl;
-
- if (show_sloc)
- wcerr << ixx_path << ": " << sloc.stream ().count () << endl;
-
- sloc_total += sloc.stream ().count ();
- }
-
- // CXX
- //
- if (gen_cxx && source)
- {
- size_t first_unit (0); // First unit in the current part.
-
- for (size_t part (0); part < parts; ++part)
- {
- // Figure out the range of units for this part.
- //
- size_t last_unit (first_unit);
-
- if (units != 0)
- {
- size_t complexity (counts.complexity[last_unit]);
-
- while (complexity < complexity_per_part)
- {
- // Make sure there will be at least one unit for each part left.
- //
- if ((last_unit + 1) >= units ||
- (units - (last_unit + 1) - 1) < (parts - part - 1))
- break;
-
- // Check if the increase in complexity should be kept in this
- // part or moved to the next.
- //
- size_t new_complexity (
- complexity + counts.complexity[last_unit + 1]);
-
- if (new_complexity > complexity_per_part)
- {
- if ((new_complexity - complexity_per_part) >
- (counts.complexity[last_unit + 1] / 2))
- break;
- }
-
- last_unit++;
- complexity = new_complexity;
- }
-
- if (part + 1 == parts)
- {
- // Last part.
- //
- last_unit = units - 1;
- }
- }
-
- //
- //
- size_t first (first_unit);
- size_t last (last_unit);
-
- first_unit = last_unit + 1;
-
- //wcerr << "[" << first << ", " << last << "]: " << complexity
- // << endl;
-
- WideOutputFileStream& os (*cxx[part]);
-
- Context ctx (os,
- schema,
- file_path,
- ops,
- counts,
- generate_xml_schema,
- &string_literal_map,
- &fwd_expr,
- &hxx_expr,
- &ixx_expr);
-
- sloc_filter sloc (os);
-
- // Copy prologue.
- //
- os << "// Begin prologue." << endl
- << "//" << endl;
-
- append (os, ops.cxx_prologue (), ops.prologue ());
- append (os, ops.cxx_prologue_file (), prologue);
-
- os << "//" << endl
- << "// End prologue." << endl
- << endl;
-
- os << "#include <xsd/cxx/pre.hxx>" << endl
- << endl;
-
- os << "#include " << ctx.process_include_path (hxx_name) << endl
- << endl;
-
- // Generate.
- //
- {
- // We don't want to indent prologues/epilogues.
- //
- ind_filter ind (os);
-
- if (!inline_)
- generate_tree_inline (ctx, first, last);
-
- generate_tree_source (ctx, first, last);
-
- if (ops.generate_ostream ())
- generate_stream_source (ctx, first, last);
-
- if (!ops.generate_element_type () && !ops.suppress_parsing ())
- generate_parser_source (ctx, first, last);
-
- if (ops.generate_serialization ())
- generate_serialization_source (ctx, first, last);
-
- if (!ops.generate_extraction ().empty ())
- generate_stream_extraction_source (ctx);
-
- if (!ops.generate_insertion ().empty ())
- generate_stream_insertion_source (ctx);
- }
-
- os << "#include <xsd/cxx/post.hxx>" << endl
- << endl;
-
- // Copy epilogue.
- //
- os << "// Begin epilogue." << endl
- << "//" << endl;
-
- append (os, ops.cxx_epilogue_file (), epilogue);
- append (os, ops.cxx_epilogue (), ops.epilogue ());
-
- os << "//" << endl
- << "// End epilogue." << endl
- << endl;
-
- if (show_sloc)
- wcerr << cxx_paths[part] << ": " << sloc.stream ().count ()
- << endl;
-
- sloc_total += sloc.stream ().count ();
- }
- }
-
- return sloc_total;
- }
- catch (UnrepresentableCharacter const& e)
- {
- wcerr << "error: character at position " << e.position () << " "
- << "in string '" << e.string () << "' is unrepresentable in "
- << "the target encoding" << endl;
-
- wcerr << "info: use the --custom-literals option to provide custom "
- << "string literals mapping" << endl;
-
- throw Failed ();
- }
- catch (NoNamespaceMapping const& e)
- {
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": error: unable to map XML Schema namespace '" << e.ns ()
- << "' to C++ namespace" << endl;
-
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: use the --namespace-map or --namespace-regex option "
- << "to provide custom mapping" << endl;
-
- throw Failed ();
- }
- catch (InvalidNamespaceMapping const& e)
- {
- wcerr << "error: invalid XML to C++ namespace mapping specified: "
- << "'" << e.mapping () << "': " << e.reason () << endl;
-
- throw Failed ();
- }
- catch (InvalidCustomTypeMapping const& e)
- {
- wcerr << "error: invalid custom type mapping specified: "
- << "'" << e.mapping () << "': " << e.reason () << endl;
-
- throw Failed ();
- }
- catch (cutl::re::format const& e)
- {
- wcerr << "error: invalid regex: '" <<
- e.regex ().c_str () << "': " <<
- e.description ().c_str () << endl;
-
- throw Failed ();
- }
- catch (cutl::re::wformat const& e)
- {
- wcerr << "error: invalid regex: '" <<
- e.regex () << "': " << e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
-}
diff --git a/xsd/cxx/tree/generator.hxx b/xsd/cxx/tree/generator.hxx
deleted file mode 100644
index e3da0c3..0000000
--- a/xsd/cxx/tree/generator.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-// file : xsd/cxx/tree/generator.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_GENERATOR_HXX
-#define CXX_TREE_GENERATOR_HXX
-
-#include <xsd-frontend/semantic-graph/elements.hxx> // Path
-#include <xsd-frontend/semantic-graph/schema.hxx>
-
-#include <xsd.hxx>
-#include <types.hxx>
-
-#include <cxx/literal-map.hxx>
-#include <cxx/tree/options.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- class Generator
- {
- public:
- static void
- usage ();
-
- struct Failed {};
-
- static size_t
- generate (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file,
- bool file_per_type,
- StringLiteralMap const&,
- const WarningSet& disabled_warnings,
- FileList& file_list,
- AutoUnlinks& unlinks);
-
- private:
- Generator ();
- };
- }
-}
-
-#endif // CXX_TREE_GENERATOR_HXX
diff --git a/xsd/cxx/tree/name-processor.cxx b/xsd/cxx/tree/name-processor.cxx
deleted file mode 100644
index 51f058c..0000000
--- a/xsd/cxx/tree/name-processor.cxx
+++ /dev/null
@@ -1,2399 +0,0 @@
-// file : xsd/cxx/tree/name-processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-#include <map>
-#include <vector>
-#include <sstream>
-#include <iostream>
-
-#include <cutl/re.hxx>
-
-#include <cxx/tree/default-value.hxx>
-#include <cxx/tree/name-processor.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- //
- //
- typedef set<String> NameSet;
-
- class Context: public Tree::Context
- {
- public:
- struct Failed {};
-
- Context (Tree::options const& ops,
- Counts const& counts,
- bool generate_xml_schema,
- SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- StringLiteralMap const& map)
- : Tree::Context (std::wcerr,
- root,
- path,
- ops,
- counts,
- generate_xml_schema,
- &map,
- 0,
- 0,
- 0),
- global_type_names (global_type_names_),
- global_element_names (global_element_names_),
- detach (ops.generate_detach ()),
- type_regex (type_regex_),
- accessor_regex (accessor_regex_),
- one_accessor_regex (one_accessor_regex_),
- opt_accessor_regex (opt_accessor_regex_),
- seq_accessor_regex (seq_accessor_regex_),
- modifier_regex (modifier_regex_),
- one_modifier_regex (one_modifier_regex_),
- opt_modifier_regex (opt_modifier_regex_),
- seq_modifier_regex (seq_modifier_regex_),
- parser_regex (parser_regex_),
- serializer_regex (serializer_regex_),
- const_regex (const_regex_),
- enumerator_regex (enumerator_regex_),
- element_type_regex (element_type_regex_)
- {
- NarrowString tn (options.type_naming ());
- NarrowString fn (options.function_naming ());
-
- // Type name regex.
- //
- {
- // Predefined rules. The most frequently used come last: global
- // names, two components (<name>,type), three components
- // (<name>,const,iterator), and one component (value in enum).
- //
- if (tn == "knr")
- {
- type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+),([^,]+)/$1_$2_$3_$4/");
- type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
- type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+)/$1_$2/");
- type_regex.push_back ("/(?:[^ ]* )?([^,]+)/$1/");
-
- /*
- type_regex.push_back ("/([^,]+)/$1/");
- type_regex.push_back ("/([^,]+),([^,]+),([^,]+),([^,]+)/$1_$2_$3_$4/");
- type_regex.push_back ("/([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
- type_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
- type_regex.push_back ("/[^ ]* (.+)/$1/");
- */
- }
- else
- {
- // Upper camel case or Java.
- //
- type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3\\u$4/");
- type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3/");
- type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+)/\\u$1\\u$2/");
- type_regex.push_back ("/(?:[^ ]* )?([^,]+)/\\u$1/");
-
- /*
- type_regex.push_back ("/([^,]+)/\\u$1/");
- type_regex.push_back ("/([^,]+),([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3\\u$4/");
- type_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3/");
- type_regex.push_back ("/([^,]+),([^,]+)/\\u$1\\u$2/");
- type_regex.push_back ("/[^ ]* (.+)/\\u$1/");
- */
-
- }
-
- compile_regex (options.type_regex (), type_regex, "type");
- }
-
- // Accessor name regex.
- //
- {
- // Predefined rules. The most frequently used come last: one
- // component, three components (<name>,default,value) and two
- // component (dom,document).
- //
- if (fn == "knr")
- {
- accessor_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
- accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
- accessor_regex.push_back ("/([^,]+)/$1/");
- }
- else if (fn == "lcc")
- {
- accessor_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
- accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\l$1\\u$2\\u$3/");
- accessor_regex.push_back ("/([^,]+)/\\l$1/");
- }
- else
- {
- // Java: add get.
- //
- accessor_regex.push_back ("/([^,]+),([^,]+)/get\\u$1\\u$2/");
- accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/get\\u$1\\u$2\\u$3/");
- accessor_regex.push_back ("/([^,]+)/get\\u$1/");
- }
-
- compile_regex (options.accessor_regex (),
- accessor_regex,
- "accessor");
-
- compile_regex (options.one_accessor_regex (),
- one_accessor_regex,
- "one accessor");
-
- compile_regex (options.opt_accessor_regex (),
- opt_accessor_regex,
- "optional accessor");
-
- compile_regex (options.seq_accessor_regex (),
- seq_accessor_regex,
- "sequence accessor");
- }
-
- // Modifier name regex.
- //
- {
- if (fn == "knr")
- {
- // any,attribute
- //
- modifier_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
- }
- else if (fn == "lcc")
- {
- modifier_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
- modifier_regex.push_back ("/([^,]+)/\\l$1/");
- }
- else
- {
- // Java: add set.
- //
- modifier_regex.push_back ("/([^,]+),([^,]+)/set\\u$1\\u$2/");
- modifier_regex.push_back ("/([^,]+)/set\\u$1/");
- modifier_regex.push_back ("/detach,([^,]+)/detach\\u$1/");
- }
-
- compile_regex (options.modifier_regex (),
- modifier_regex,
- "modifier");
-
- compile_regex (options.one_modifier_regex (),
- one_modifier_regex,
- "one modifier");
-
- compile_regex (options.opt_modifier_regex (),
- opt_modifier_regex,
- "optional modifier");
-
- compile_regex (options.seq_modifier_regex (),
- seq_modifier_regex,
- "sequence modifier");
- }
-
- // Parser name regex.
- //
- {
- if (fn == "lcc")
- {
- parser_regex.push_back ("/(.+)/\\l$1/");
- }
- else if (fn == "java")
- {
- // Java: add parse.
- //
- parser_regex.push_back ("/(.+)/parse\\u$1/");
- }
-
- compile_regex (options.parser_regex (), parser_regex, "parser");
- }
-
- // Serializer name regex.
- //
- {
- if (fn == "lcc")
- {
- serializer_regex.push_back ("/(.+)/\\l$1/");
- }
- else if (fn == "java")
- {
- // Java: add serialize.
- //
- serializer_regex.push_back ("/(.+)/serialize\\u$1/");
- }
-
- compile_regex (options.serializer_regex (),
- serializer_regex,
- "serializer");
- }
-
- // Const regex.
- //
- {
- if (fn == "knr")
- {
- const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
- const_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
- }
- else if (fn == "lcc")
- {
- const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\l$1_\\u$2_\\u$3/");
- const_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
- }
- else
- {
- // Java: all uppercase.
- //
- const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\U$1_$2_$3/");
- const_regex.push_back ("/([^,]+),([^,]+)/\\U$1_$2/");
- }
-
- compile_regex (options.const_regex (), const_regex, "const");
- }
-
- // Enumerator name regex.
- //
- {
- // By default map an empty enumerator to the 'empty' word.
- //
- enumerator_regex.push_back ("/^$/empty/");
-
- compile_regex (options.enumerator_regex (),
- enumerator_regex,
- "enumerator");
- }
-
- // Element type regex.
- //
- compile_regex (options.element_type_regex (),
- element_type_regex,
- "element_type");
- }
-
- protected:
- Context (Context& c)
- : Tree::Context (c),
- global_type_names (c.global_type_names),
- global_element_names (c.global_element_names),
- detach (c.detach),
- type_regex (c.type_regex),
- accessor_regex (c.accessor_regex),
- one_accessor_regex (c.one_accessor_regex),
- opt_accessor_regex (c.opt_accessor_regex),
- seq_accessor_regex (c.seq_accessor_regex),
- modifier_regex (c.modifier_regex),
- one_modifier_regex (c.one_modifier_regex),
- opt_modifier_regex (c.opt_modifier_regex),
- seq_modifier_regex (c.seq_modifier_regex),
- parser_regex (c.parser_regex),
- serializer_regex (c.serializer_regex),
- const_regex (c.const_regex),
- enumerator_regex (c.enumerator_regex),
- element_type_regex (c.element_type_regex)
- {
- }
-
- public:
- typedef cutl::re::wregexsub Regex;
- typedef cutl::re::wformat RegexFormat;
-
- struct RegexVector: vector<Regex>
- {
- void
- push_back (String const& r)
- {
- vector<Regex>::push_back (Regex (r));
- }
- };
-
- String
- process_regex (String const& name,
- RegexVector const& rv,
- String const& id)
- {
- bool trace (options.name_regex_trace ());
-
- if (trace)
- os << id << " name: '" << name << "'" << endl;
-
- for (RegexVector::const_reverse_iterator i (rv.rbegin ());
- i != rv.rend (); ++i)
- {
- if (trace)
- os << "try: '" << i->regex () << "' : ";
-
- if (i->match (name))
- {
- String r (i->replace (name));
-
- if (trace)
- os << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace)
- os << '-' << endl;
- }
-
- return name;
- }
-
- String
- process_regex (String const& name,
- RegexVector const& primary,
- RegexVector const& backup,
- String const& id)
- {
- bool trace (options.name_regex_trace ());
-
- if (trace)
- os << id << " name: '" << name << "'" << endl;
-
- for (RegexVector::const_reverse_iterator i (primary.rbegin ());
- i != primary.rend (); ++i)
- {
- if (trace)
- os << "try: '" << i->regex () << "' : ";
-
- if (i->match (name))
- {
- String r (i->replace (name));
-
- if (trace)
- os << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace)
- os << '-' << endl;
- }
-
- for (RegexVector::const_reverse_iterator i (backup.rbegin ());
- i != backup.rend (); ++i)
- {
- if (trace)
- os << "try: '" << i->regex () << "' : ";
-
- if (i->match (name))
- {
- String r (i->replace (name));
-
- if (trace)
- os << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace)
- os << '-' << endl;
- }
-
- return name;
- }
-
- String
- process_regex (String const& ns,
- String const& name,
- RegexVector const& rv,
- String const& id)
- {
- String s (ns + L' ' + name);
- bool trace (options.name_regex_trace ());
-
- if (trace)
- os << id << " name: '" << s << "'" << endl;
-
- for (RegexVector::const_reverse_iterator i (rv.rbegin ());
- i != rv.rend (); ++i)
- {
- if (trace)
- os << "try: '" << i->regex () << "' : ";
-
- if (i->match (s))
- {
- String r (i->replace (s));
-
- if (trace)
- os << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace)
- os << '-' << endl;
- }
-
- return name;
- }
-
- String
- process_regex (String const& ns,
- String const& name,
- RegexVector const& primary,
- RegexVector const& backup,
- String const& id)
- {
- String s (ns + L' ' + name);
- bool trace (options.name_regex_trace ());
-
- if (trace)
- os << id << " name: '" << s << "'" << endl;
-
- for (RegexVector::const_reverse_iterator i (primary.rbegin ());
- i != primary.rend (); ++i)
- {
- if (trace)
- os << "try: '" << i->regex () << "' : ";
-
- if (i->match (s))
- {
- String r (i->replace (s));
-
- if (trace)
- os << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace)
- os << '-' << endl;
- }
-
- for (RegexVector::const_reverse_iterator i (backup.rbegin ());
- i != backup.rend (); ++i)
- {
- if (trace)
- os << "try: '" << i->regex () << "' : ";
-
- if (i->match (s))
- {
- String r (i->replace (s));
-
- if (trace)
- os << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace)
- os << '-' << endl;
- }
-
- return name;
- }
-
- public:
- String
- find_name (String const& base_name,
- NameSet& set,
- bool insert = true)
- {
- String name (base_name);
-
- for (size_t i (1); set.find (name) != set.end (); ++i)
- {
- std::wostringstream os;
- os << i;
- name = base_name + os.str ();
- }
-
- if (insert)
- set.insert (name);
-
- return name;
- }
-
- private:
- void
- compile_regex (NarrowStrings const& sv,
- RegexVector& rv,
- String const& id)
- {
- for (NarrowStrings::const_iterator i (sv.begin ()); i != sv.end ();
- ++i)
- {
- try
- {
- rv.push_back (*i);
- }
- catch (RegexFormat const& e)
- {
- os << "error: invalid " << id << " name regex: '" <<
- e.regex () << "': " << e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
- }
-
- private:
- map<String, NameSet> global_type_names_;
- map<String, NameSet> global_element_names_;
-
- RegexVector type_regex_;
- RegexVector accessor_regex_;
- RegexVector one_accessor_regex_;
- RegexVector opt_accessor_regex_;
- RegexVector seq_accessor_regex_;
- RegexVector modifier_regex_;
- RegexVector one_modifier_regex_;
- RegexVector opt_modifier_regex_;
- RegexVector seq_modifier_regex_;
- RegexVector parser_regex_;
- RegexVector serializer_regex_;
- RegexVector const_regex_;
- RegexVector enumerator_regex_;
- RegexVector element_type_regex_;
-
- public:
- map<String, NameSet>& global_type_names;
- map<String, NameSet>& global_element_names;
-
- bool detach;
-
- RegexVector& type_regex;
- RegexVector& accessor_regex;
- RegexVector& one_accessor_regex;
- RegexVector& opt_accessor_regex;
- RegexVector& seq_accessor_regex;
- RegexVector& modifier_regex;
- RegexVector& one_modifier_regex;
- RegexVector& opt_modifier_regex;
- RegexVector& seq_modifier_regex;
- RegexVector& parser_regex;
- RegexVector& serializer_regex;
- RegexVector& const_regex;
- RegexVector& enumerator_regex;
- RegexVector& element_type_regex;
- };
-
- //
- //
- struct Enumerator: Traversal::Enumerator, Context
- {
- Enumerator (Context& c, NameSet& set)
- : Context (c), set_ (set)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- // Process the name with enumerator name regex.
- //
- String name (
- process_regex (e.name (), enumerator_regex, L"enumerator"));
-
- // Escape and unclash.
- //
- name = find_name (escape (name), set_);
- e.context ().set ("name", name);
- }
-
- private:
- NameSet& set_;
- };
-
- //
- //
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- // Use processed name.
- //
- String name (e.context ().get<String> ("name"));
-
- // If renamed name is empty then we are not generating
- // anything for this type and name processing is not
- // required.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- NameSet enum_set;
- enum_set.insert (name);
-
- Enumerator enumerator (*this, enum_set);
- Traversal::Names names (enumerator);
-
- Traversal::Enumeration::names (e, names);
-
- // Assign name to the value type. First process the name
- // with type name regex.
- //
- String value_name (
- escape (process_regex ("value", type_regex, L"type")));
- e.context ().set ("value", find_name (value_name, enum_set));
- }
- };
-
- //
- //
- struct PrimaryMember: Traversal::Member, Context
- {
- PrimaryMember (Context& c, NameSet& name_set, NameSet& stem_set)
- : Context (c), name_set_ (name_set), stem_set_ (stem_set)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (Tree::Context::skip (m))
- return;
-
- String stem (find_name (m.name (), stem_set_));
-
- m.context ().set ("stem", stem);
- m.context ().set ("name",
- find_name (escape (stem), name_set_, false));
- }
-
- private:
- NameSet& name_set_;
- NameSet& stem_set_;
- };
-
- //
- //
- struct DerivedMember: Traversal::Member, Context
- {
- DerivedMember (Context& c, NameSet& name_set)
- : Context (c), name_set_ (name_set)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (Tree::Context::skip (m))
- return;
-
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (m.scope ()));
-
- size_t max (Tree::Context::max (m));
- size_t min (Tree::Context::min (m));
-
- String const& s (m.context ().get<String> ("stem"));
- String const& b (m.context ().get<String> ("name"));
-
- bool def_attr (m.default_p () &&
- m.is_a<SemanticGraph::Attribute> ());
-
- // Accessors/modifiers. Note that we postpone inserting
- // the names into the name_set to avoid over-escaping.
- //
- String an, mn;
-
- if (max != 1)
- {
- an = find_name (
- escape (process_regex (s,
- seq_accessor_regex,
- accessor_regex,
- L"sequence accessor")),
- name_set_,
- false);
-
- mn = find_name (
- escape (process_regex (s,
- seq_modifier_regex,
- modifier_regex,
- L"sequence modifier")),
- name_set_,
- false);
- }
- else if (min == 0 && !def_attr)
- {
- an = find_name (
- escape (process_regex (s,
- opt_accessor_regex,
- accessor_regex,
- L"optional accessor")),
- name_set_,
- false);
-
- mn = find_name (
- escape (process_regex (s,
- opt_modifier_regex,
- modifier_regex,
- L"optional modifier")),
- name_set_,
- false);
- }
- else
- {
- an = find_name (
- escape (process_regex (s,
- one_accessor_regex,
- accessor_regex,
- L"one accessor")),
- name_set_,
- false);
-
- mn = find_name (
- escape (process_regex (s,
- one_modifier_regex,
- modifier_regex,
- L"one modifier")),
- name_set_,
- false);
- }
-
- m.context ().set ("aname", an);
- m.context ().set ("mname", mn);
-
- name_set_.insert (b);
-
- if (an != b)
- name_set_.insert (an);
-
- if (mn != b && mn != an)
- name_set_.insert (mn);
-
- // Detach.
- //
- if (detach && max == 1 && (min == 1 || def_attr))
- {
- String dn (find_name (
- escape (process_regex (L"detach," + s,
- one_modifier_regex,
- modifier_regex,
- L"one modifier")),
- name_set_));
-
- m.context ().set ("dname", dn);
- }
-
- // Types.
- //
- m.context ().set (
- "type",
- find_name (
- escape (process_regex (s + L",type", type_regex, L"type")),
- name_set_));
-
- m.context ().set (
- "traits",
- find_name (
- escape (process_regex (s + L",traits", type_regex, L"type")),
- name_set_));
-
- if (max != 1)
- {
- m.context ().set (
- "container",
- find_name (
- escape (process_regex (s + L",sequence", type_regex, L"type")),
- name_set_));
-
- m.context ().set (
- "iterator",
- find_name (
- escape (process_regex (s + L",iterator", type_regex, L"type")),
- name_set_));
-
- m.context ().set (
- "const-iterator",
- find_name (
- escape (
- process_regex (s + L",const,iterator", type_regex, L"type")),
- name_set_));
- }
- else if (min == 0 && !def_attr)
- {
- m.context ().set (
- "container",
- find_name (
- escape (process_regex (s + L",optional", type_regex, L"type")),
- name_set_));
- }
-
- // Data member.
- //
- m.context ().set ("member", find_name (b + L"_", name_set_));
-
- // Default value.
- //
- if (m.default_p ())
- {
- bool simple (true);
-
- if (m.is_a<SemanticGraph::Element> ())
- {
- IsSimpleType test (simple);
- test.dispatch (m.type ());
- }
-
- if (simple)
- {
- String an (
- escape (
- process_regex (
- s + L",default,value", accessor_regex, L"accessor")));
-
- m.context ().set ("default-value", find_name (an, name_set_));
-
- bool lit (false);
- {
- IsLiteralValue test (lit);
- test.dispatch (m.type ());
- }
-
- if (!lit)
- {
- m.context ().set (
- "default-value-member",
- find_name (b + L"_default_value_", name_set_));
- }
- }
- }
-
- // Element id.
- //
- if (m.is_a<SemanticGraph::Element> () && ordered_p (c))
- {
- String id (
- escape (
- process_regex (
- s + L",id", const_regex, L"const")));
-
- m.context ().set ("ordered-id-name", find_name (id, name_set_));
- }
- }
-
- private:
- NameSet& name_set_;
- };
-
-
- //
- //
- struct Any: Traversal::Any, Traversal::AnyAttribute, Context
- {
- Any (Context& c,
- NameSet& name_set,
- NameSet& stem_set,
- bool& has_wildcard)
- : Context (c),
- name_set_ (name_set),
- stem_set_ (stem_set),
- has_wildcard_ (has_wildcard)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
-
- size_t max (Tree::Context::max (a));
- size_t min (Tree::Context::min (a));
-
- String s (find_name (L"any", stem_set_));
-
- String b (find_name (escape (s), name_set_, false));
- a.context ().set ("name", b);
-
- // Accessors/modifiers. Note that we postpone inserting the
- // names into the name_set to avoid over-escaping.
- //
- String an, mn;
-
- if (max != 1)
- {
- an = find_name (
- escape (process_regex (s,
- seq_accessor_regex,
- accessor_regex,
- L"sequence accessor")),
- name_set_,
- false);
-
- mn = find_name (
- escape (process_regex (s,
- seq_modifier_regex,
- modifier_regex,
- L"sequence modifier")),
- name_set_,
- false);
- }
- else if (min == 0)
- {
- an = find_name (
- escape (process_regex (s,
- opt_accessor_regex,
- accessor_regex,
- L"optional accessor")),
- name_set_,
- false);
-
- mn = find_name (
- escape (process_regex (s,
- opt_modifier_regex,
- modifier_regex,
- L"optional modifier")),
- name_set_,
- false);
- }
- else
- {
- an = find_name (
- escape (process_regex (s,
- one_accessor_regex,
- accessor_regex,
- L"one accessor")),
- name_set_,
- false);
-
- mn = find_name (
- escape (process_regex (s,
- one_modifier_regex,
- modifier_regex,
- L"one modifier")),
- name_set_,
- false);
- }
-
- a.context ().set ("aname", an);
- a.context ().set ("mname", mn);
-
- name_set_.insert (b);
-
- if (an != b)
- name_set_.insert (an);
-
- if (mn != b && mn != an)
- name_set_.insert (mn);
-
- // Types
- //
- if (max != 1)
- {
- a.context ().set (
- "container",
- find_name (
- escape (process_regex (s + L",sequence", type_regex, L"type")),
- name_set_));
-
- a.context ().set (
- "iterator",
- find_name (
- escape (process_regex (s + L",iterator", type_regex, L"type")),
- name_set_));
-
- a.context ().set (
- "const-iterator",
- find_name (
- escape (
- process_regex (s + L",const,iterator", type_regex, L"type")),
- name_set_));
- }
- else if (min == 0)
- {
- a.context ().set (
- "container",
- find_name (
- escape (process_regex (s + L",optional", type_regex, L"type")),
- name_set_));
- }
-
- // Data member.
- //
- a.context ().set ("member", find_name (b + L"_", name_set_));
-
- // Wildcard id.
- //
- if (ordered_p (c))
- {
- String id (
- escape (
- process_regex (
- s + L",id", const_regex, L"const")));
-
- a.context ().set ("ordered-id-name", find_name (id, name_set_));
- }
-
- if (!has_wildcard_)
- has_wildcard_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String s (find_name (L"any,attribute", stem_set_));
-
- String b (find_name (escape (s), name_set_, false));
- a.context ().set ("name", b);
-
- // Accessors/modifiers. Note that we postpone inserting the
- // names into the name_set to avoid over-escaping.
- //
- String an (
- find_name (
- escape (process_regex (s, accessor_regex, L"accessor")),
- name_set_,
- false));
-
- String mn (
- find_name (
- escape (process_regex (s, modifier_regex, L"modifier")),
- name_set_,
- false));
-
- a.context ().set ("aname", an);
- a.context ().set ("mname", mn);
-
- name_set_.insert (b);
-
- if (an != b)
- name_set_.insert (an);
-
- if (mn != b && mn != an)
- name_set_.insert (mn);
-
- // Types
- //
- a.context ().set (
- "container",
- find_name (
- escape (process_regex (s + L",set", type_regex, L"type")),
- name_set_));
-
- a.context ().set (
- "iterator",
- find_name (
- escape (process_regex (s + L",iterator", type_regex, L"type")),
- name_set_));
-
- a.context ().set (
- "const-iterator",
- find_name (
- escape (
- process_regex (s + L",const,iterator", type_regex, L"type")),
- name_set_));
-
- // Data member.
- //
- a.context ().set ("member", find_name (b + L"_", name_set_));
-
- if (!has_wildcard_)
- has_wildcard_ = true;
- }
-
- private:
- NameSet& name_set_;
- NameSet& stem_set_;
- bool& has_wildcard_;
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- SemanticGraph::Context& ctx (c.context ());
-
- // We leave this set around to allow other mappings to use
- // this information.
- //
- ctx.set ("cxx-tree-name-processor-stem-set", NameSet ());
- ctx.set ("cxx-tree-name-processor-member-set", NameSet ());
-
- // Use processed name.
- //
- String name (ctx.get<String> ("name"));
-
- // If renamed name is empty then we are not generating
- // anything for this type and name processing is not
- // required.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- NameSet& stem_set (
- ctx.get<NameSet> ("cxx-tree-name-processor-stem-set"));
-
- NameSet& member_set (
- ctx.get<NameSet> ("cxx-tree-name-processor-member-set"));
-
- stem_set.insert (c.name ());
- member_set.insert (name);
-
- // Add our base's stems and members to the initial list.
- //
- if (c.inherits_p ())
- {
- // @@ What if this types name is the same as one of base's
- // members?
- //
- SemanticGraph::Type& base (c.inherits ().base ());
-
- if (base.is_a<SemanticGraph::Complex> () &&
- !base.is_a<SemanticGraph::Enumeration> ())
- {
- if (!base.context ().count (
- "cxx-tree-name-processor-member-set"))
- {
- dispatch (base);
- }
-
- NameSet const& base_stem_set (
- base.context ().get<NameSet> (
- "cxx-tree-name-processor-stem-set"));
-
- stem_set.insert (base_stem_set.begin (), base_stem_set.end ());
-
- NameSet const& base_member_set (
- base.context ().get<NameSet> (
- "cxx-tree-name-processor-member-set"));
-
- member_set.insert (base_member_set.begin (),
- base_member_set.end ());
- }
- }
-
- // First assign the "primary" names.
- //
- {
- PrimaryMember member (*this, member_set, stem_set);
- Traversal::Names names (member);
-
- Complex::names (c, names);
- }
-
- // Derived names for members.
- //
- {
- DerivedMember member (*this, member_set);
- Traversal::Names names (member);
-
- Complex::names (c, names);
- }
-
- // Names for the mixed content.
- //
- if (mixed_p (c))
- {
- // Check if we already have the mixed content down inheritance
- // hierarchy.
- //
- using SemanticGraph::Complex;
-
- for (Complex* p (&c); p->inherits_p ();)
- {
- if (Complex* b = dynamic_cast<Complex*> (
- &p->inherits ().base ()))
- {
- if (mixed_p (*b))
- {
- SemanticGraph::Context& bctx (b->context ());
- ctx.set ("mixed-type", bctx.get<String> ("mixed-type"));
- ctx.set ("mixed-const-iterator",
- bctx.get<String> ("mixed-const-iterator"));
- ctx.set ("mixed-ordered-id-name",
- bctx.get<String> ("mixed-ordered-id-name"));
- ctx.set ("mixed-aname", bctx.get<String> ("mixed-aname"));
- ctx.set ("mixed-member", bctx.get<String> ("mixed-member"));
- ctx.set ("mixed-in-base", true);
- break;
- }
-
- p = b;
- }
- else
- break;
- }
-
- // If not, set up the names.
- //
- if (!ctx.count ("mixed-in-base"))
- {
- String s (find_name (L"text,content", stem_set));
- String n (find_name (escape (s), member_set, false));
-
- String an (find_name (
- escape (process_regex (s,
- seq_accessor_regex,
- accessor_regex,
- L"sequence accessor")),
- member_set,
- false));
-
- String mn (find_name (
- escape (process_regex (s,
- seq_modifier_regex,
- modifier_regex,
- L"sequence modifier")),
- member_set,
- false));
-
- ctx.set ("mixed-aname", an);
- ctx.set ("mixed-mname", mn);
-
- member_set.insert (name);
-
- if (an != n)
- member_set.insert (an);
-
- if (mn != n && mn != an)
- member_set.insert (mn);
-
- // Types.
- //
- ctx.set (
- "mixed-type",
- find_name (
- escape (process_regex (s + L",type", type_regex, L"type")),
- member_set));
-
- ctx.set (
- "mixed-container",
- find_name (
- escape (process_regex (s + L",sequence", type_regex, L"type")),
- member_set));
-
- ctx.set (
- "mixed-iterator",
- find_name (
- escape (process_regex (s + L",iterator", type_regex, L"type")),
- member_set));
-
- ctx.set (
- "mixed-const-iterator",
- find_name (
- escape (
- process_regex (s + L",const,iterator", type_regex, L"type")),
- member_set));
-
- // Text content id.
- //
- ctx.set (
- "mixed-ordered-id-name",
- find_name (
- escape (
- process_regex (s + L",id", const_regex, L"const")),
- member_set));
-
- // Data member.
- //
- ctx.set ("mixed-member", find_name (n + L"_", member_set));
- }
- }
-
- // Names for wildcards.
- //
- if (options.generate_wildcard ())
- {
- bool has_wildcard (false);
- Any any (*this, member_set, stem_set, has_wildcard);
- Traversal::Names names (any);
- Complex::names (c, names);
-
- // Assign names for dom_document.
- //
- if (has_wildcard)
- {
- // Check if we already have dom_document down inheritance
- // hierarchy.
- //
- for (SemanticGraph::Complex* p (&c); p->inherits_p ();)
- {
- if (SemanticGraph::Complex* base =
- dynamic_cast<SemanticGraph::Complex*> (
- &p->inherits ().base ()))
- {
- if (base->context ().count ("dom-document"))
- {
- c.context ().set (
- "dom-document",
- base->context ().get<String> ("dom-document"));
- break;
- }
-
- p = base;
- }
- else
- break;
- }
-
- // If not, set up the names.
- //
- if (!c.context ().count ("dom-document"))
- {
- String stem (find_name (L"dom,document", stem_set));
-
- String an (
- escape (
- process_regex (stem, accessor_regex, L"accessor")));
-
- c.context ().set ("dom-document", find_name (an, member_set));
-
- c.context ().set (
- "dom-document-member",
- find_name (escape (stem + L"_"), member_set));
- }
- }
- }
-
- // Names for the order container.
- //
- if (ordered_p (c))
- {
- // Check if we already have the order container down
- // inheritance hierarchy.
- //
- using SemanticGraph::Complex;
-
- for (Complex* p (&c); p->inherits_p ();)
- {
- if (Complex* b = dynamic_cast<Complex*> (
- &p->inherits ().base ()))
- {
- if (ordered_p (*b))
- {
- SemanticGraph::Context& bctx (b->context ());
- ctx.set ("order-type", bctx.get<String> ("order-type"));
- ctx.set ("order-const-iterator",
- bctx.get<String> ("order-const-iterator"));
- ctx.set ("order-aname", bctx.get<String> ("order-aname"));
- ctx.set ("order-member", bctx.get<String> ("order-member"));
- ctx.set ("order-in-base", true);
- break;
- }
-
- p = b;
- }
- else
- break;
- }
-
- // If not, set up the names.
- //
- if (!ctx.count ("order-in-base"))
- {
- String s (find_name (L"content,order", stem_set));
- String n (find_name (escape (s), member_set, false));
-
- String an (find_name (
- escape (process_regex (s,
- seq_accessor_regex,
- accessor_regex,
- L"sequence accessor")),
- member_set,
- false));
-
- String mn (find_name (
- escape (process_regex (s,
- seq_modifier_regex,
- modifier_regex,
- L"sequence modifier")),
- member_set,
- false));
-
- ctx.set ("order-aname", an);
- ctx.set ("order-mname", mn);
-
- member_set.insert (name);
-
- if (an != n)
- member_set.insert (an);
-
- if (mn != n && mn != an)
- member_set.insert (mn);
-
- // Types.
- //
- ctx.set (
- "order-type",
- find_name (
- escape (process_regex (s + L",type", type_regex, L"type")),
- member_set));
-
- ctx.set (
- "order-container",
- find_name (
- escape (process_regex (s + L",sequence", type_regex, L"type")),
- member_set));
-
- ctx.set (
- "order-iterator",
- find_name (
- escape (process_regex (s + L",iterator", type_regex, L"type")),
- member_set));
-
- ctx.set (
- "order-const-iterator",
- find_name (
- escape (
- process_regex (s + L",const,iterator", type_regex, L"type")),
- member_set));
-
- // Data member.
- //
- ctx.set ("order-member", find_name (n + L"_", member_set));
- }
- }
- }
- };
-
-
- //
- //
- struct GlobalType: Traversal::Type, Context
- {
- GlobalType (Context& c, NameSet& set)
- : Context (c), set_ (set)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- // Process the name with type name regex.
- //
- String name (process_regex (
- namespace_ (t).name (),
- t.name (),
- type_regex,
- L"type"));
-
- // Escape and unclash.
- //
- name = find_name (escape (name), set_);
- t.context ().set ("name", name);
-
- // Also add renamed name if any.
- //
- if (renamed_type (t, name) && name)
- set_.insert (name);
- }
-
- private:
- NameSet& set_;
- };
-
-
- //
- //
- struct GlobalElement: Traversal::Element,
- GlobalElementBase,
- Context
- {
- GlobalElement (Context& c,
- NameSet const& type_set,
- NameSet& element_set)
- : GlobalElementBase (c),
- Context (c),
- type_set_ (type_set),
- element_set_ (element_set)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- // First we need to figure out if we need to process this
- // global element.
- //
- if (!generate_p (e))
- return;
-
- if (options.generate_element_type ())
- {
- SemanticGraph::Context& ec (e.context ());
-
- String name;
-
- if (doc_root_p (e))
- {
- name = find_name (
- escape (
- process_regex (
- namespace_ (e).name (),
- e.name (),
- element_type_regex,
- type_regex,
- L"element type")));
-
- // Assign inner names.
- //
- NameSet set;
- set.insert (name);
-
- ec.set (
- "type",
- Context::find_name (
- escape (process_regex (L"value,type", type_regex, L"type")),
- set));
-
- ec.set (
- "traits",
- Context::find_name (
- escape (process_regex (L"value,traits", type_regex, L"type")),
- set));
-
- String an (Context::find_name (
- escape (process_regex ("value",
- one_accessor_regex,
- accessor_regex,
- L"one accessor")),
- set,
- false));
-
- String mn (Context::find_name (
- escape (process_regex ("value",
- one_modifier_regex,
- modifier_regex,
- L"one modifier")),
- set,
- false));
-
- ec.set ("aname", an);
- ec.set ("mname", mn);
-
- set.insert (an);
-
- if (an != mn)
- set.insert (mn);
-
- // Detach.
- //
- if (detach)
- {
- String dn (Context::find_name (
- escape (process_regex (L"detach,value",
- one_modifier_regex,
- modifier_regex,
- L"one modifier")),
- set));
-
- ec.set ("dname", dn);
- }
-
- // Assign name() and namespace_() names.
- //
- ec.set (
- "element-name",
- Context::find_name (
- escape (
- process_regex ("name", accessor_regex, L"modifier")),
- set));
-
- ec.set (
- "element-ns",
- Context::find_name (
- escape (
- process_regex ("namespace", accessor_regex, L"modifier")),
- set));
-
- // Data members.
- //
- ec.set ("member", Context::find_name ("value_", set));
- ec.set ("element-name-member",
- Context::find_name ("name_", set));
- ec.set ("element-ns-member",
- Context::find_name ("namespace__", set));
- }
- else
- name = find_name (escape (e.name ()));
-
- ec.set ("name", name);
- element_set_.insert (name);
- }
- else
- {
- // Make sure the name is unique among global elements and
- // does not collide with a global type name.
- //
- String base (find_name (escape (e.name ())));
- e.context ().set ("name", base);
-
- String n (e.name ());
-
- // Assign the parsing function name.
- //
- String p;
-
- if (!options.suppress_parsing () && doc_root_p (e))
- {
- p = find_name (
- escape (
- process_regex (n, parser_regex, L"parsing function")));
-
- e.context ().set ("parser", p);
- }
-
- // Assign the serialization function name.
- //
- String s;
-
- if (options.generate_serialization () && doc_root_p (e))
- {
- s = find_name (
- escape (
- process_regex (
- n, serializer_regex, L"serialization function")));
-
- e.context ().set ("serializer", s);
- }
-
- // Add the names to the set only after processing parsing and
- // serialization function names so that we do not over-escape
- // them.
- //
- element_set_.insert (base);
-
- if (p && p != base)
- element_set_.insert (p);
-
- if (s && s != base && s != p)
- element_set_.insert (s);
- }
- }
-
- private:
- String
- find_name (String const& name)
- {
- String r (name);
-
- // If we are conflicting with a type name let's first try to
- // simply append an underscore and only resort to ugly names
- // like name1, etc., if this fails.
- //
- if (type_set_.find (r) != type_set_.end ())
- r += L"_";
-
- for (size_t i (1);
- element_set_.find (r) != element_set_.end () ||
- type_set_.find (r) != type_set_.end (); ++i)
- {
- std::wostringstream os;
- os << i;
- r = name + os.str ();
- }
-
- return r;
- }
-
- private:
- NameSet const& type_set_;
- NameSet& element_set_;
- };
-
- struct NamespacePassOne: Traversal::Namespace, Context
- {
- NamespacePassOne (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& ns)
- {
- NameSet& type_set (global_type_names[ns.name ()]);
-
- GlobalType type (*this, type_set);
- Traversal::Names names (type);
-
- Traversal::Namespace::names (ns, names);
- Traversal::Namespace::names (ns);
- }
- };
-
-
- struct NamespacePassThree: Traversal::Namespace, Context
- {
- NamespacePassThree (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& ns)
- {
- String const& name (ns.name ());
-
- NameSet const& type_set (global_type_names[name]);
- NameSet& element_set (global_element_names[name]);
-
- GlobalElement element (*this, type_set, element_set);
- Traversal::Names names (element);
-
- Traversal::Namespace::names (ns, names);
- }
- };
-
-
- struct FundamentalNamespace: Traversal::Namespace,
-
- Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities,
-
- Context
- {
- FundamentalNamespace (Context& c)
- : Context (c)
- {
- *this >> names_ >> *this;
- }
-
- void
- process_name (SemanticGraph::Type& t, String const& name)
- {
- String r (
- process_regex (
- namespace_ (t).name (), name, type_regex, L"type"));
-
- t.context ().set ("name", escape (r));
- }
-
- void
- process_name (SemanticGraph::Namespace& n,
- String const& name,
- char const* key)
- {
- String r (process_regex (name, type_regex, L"type"));
- n.context ().set (key, escape (r));
- }
-
- // anyType and anySimpleType
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- process_name (t, "type");
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- process_name (t, "simple,type");
- }
-
- // Integrals.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- process_name (t, "byte");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- process_name (t, "unsigned,byte");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- process_name (t, "short");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- process_name (t, "unsigned,short");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- process_name (t, "int");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- process_name (t, "unsigned,int");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- process_name (t, "long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- process_name (t, "unsigned,long");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- process_name (t, "integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- process_name (t, "non,positive,integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- process_name (t, "non,negative,integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- process_name (t, "positive,integer");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- process_name (t, "negative,integer");
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- process_name (t, "boolean");
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- process_name (t, "float");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- process_name (t, "double");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- process_name (t, "decimal");
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- process_name (t, "string");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- process_name (t, "normalized,string");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- process_name (t, "token");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- process_name (t, "nmtoken");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- process_name (t, "nmtokens");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- process_name (t, "name");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- process_name (t, "ncname");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- process_name (t, "language");
- }
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- process_name (t, "id");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- process_name (t, "idref");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- process_name (t, "idrefs");
- }
-
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- process_name (t, "uri");
- }
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- process_name (t, "qname");
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- process_name (t, "base64,binary");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- process_name (t, "hex,binary");
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- process_name (t, "date");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- process_name (t, "date,time");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- process_name (t, "duration");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- process_name (t, "gday");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- process_name (t, "gmonth");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- process_name (t, "gmonth,day");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- process_name (t, "gyear");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- process_name (t, "gyear,month");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- process_name (t, "time");
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity& t)
- {
- process_name (t, "entity");
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities& t)
- {
- process_name (t, "entities");
- }
-
- virtual void
- post (SemanticGraph::Namespace& n)
- {
- // Assign names to extra stuff in the XML Schema namespace.
- //
- process_name (n, "container", "container");
- process_name (n, "buffer", "buffer");
- process_name (n, "time,zone", "time-zone");
-
- process_name (n, "content,order", "content-order");
-
- if (options.generate_element_type ())
- process_name (n, "element,type", "element-type");
-
- if (options.generate_element_map ())
- process_name (n, "element,map", "element-map");
-
- if (options.generate_serialization ())
- {
- process_name (n, "namespace,info", "namespace-info");
- process_name (n, "namespace,infomap", "namespace-infomap");
- process_name (n, "list,stream", "list-stream");
- process_name (n, "as,double", "as-double");
- process_name (n, "as,decimal", "as-decimal");
- process_name (n, "facet", "facet");
- }
-
- if (!options.generate_insertion ().empty ())
- {
- process_name (n, "ostream", "ostream");
- }
-
- if (!options.generate_extraction ().empty ())
- {
- process_name (n, "istream", "istream");
- }
-
- process_name (n, "flags", "flags");
- process_name (n, "properties", "properties");
-
- NarrowString fn (options.function_naming ());
-
- if (fn == "knr")
- n.context ().set ("tree-node-key", String ("tree_node_key"));
- else
- n.context ().set ("tree-node-key", String ("treeNodeKey"));
-
- process_name (n, "exception", "exception");
- process_name (n, "parsing", "parsing");
- process_name (n, "expected,element", "expected-element");
- process_name (n, "unexpected,element", "unexpected-element");
- process_name (n, "expected,attribute", "expected-attribute");
- process_name (n, "unexpected,enumerator", "unexpected-enumerator");
- process_name (n, "expected,text,content", "expected-text-content");
- process_name (n, "no,type,info", "no-type-info");
- process_name (n, "no,element,info", "no-element-info");
- process_name (n, "not,derived", "not-derived");
- process_name (n, "duplicate,id", "duplicate-id");
- process_name (n, "serialization", "serialization");
- process_name (n, "no,namespace,mapping", "no-namespace-mapping");
- process_name (n, "no,prefix,mapping", "no-prefix-mapping");
- process_name (n, "xsi,already,in,use", "xsi-already-in-use");
- process_name (n, "bounds", "bounds");
-
- process_name (n, "severity", "severity");
- process_name (n, "error", "error");
- process_name (n, "diagnostics", "diagnostics");
-
- if (!options.suppress_parsing () ||
- options.generate_serialization ())
- {
- process_name (n, "error,handler", "error-handler");
- }
-
- Namespace::post (n);
- }
-
- private:
- Traversal::Names names_;
- };
-
-
- // Go into sourced/included/imported schemas while making sure
- // we don't process the same stuff more than once.
- //
- struct UsesPassOne: Traversal::Uses
- {
- virtual void
- traverse (Type& u)
- {
- SemanticGraph::Schema& s (u.schema ());
-
- if (!s.context ().count ("cxx-tree-name-processor-pass-1"))
- {
- s.context ().set ("cxx-tree-name-processor-pass-1", true);
- Traversal::Uses::traverse (u);
- }
- }
- };
-
- struct UsesPassThree: Traversal::Uses
- {
- virtual void
- traverse (Type& u)
- {
- SemanticGraph::Schema& s (u.schema ());
-
- if (!s.context ().count ("cxx-tree-name-processor-pass-3"))
- {
- s.context ().set ("cxx-tree-name-processor-pass-3", true);
- Traversal::Uses::traverse (u);
- }
- }
- };
-
- // Go into implied schemas while making sure we don't process
- // the same stuff more than once.
- //
- struct Implies: Traversal::Implies
- {
- virtual void
- traverse (SemanticGraph::Implies& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count ("cxx-tree-name-processor-seen"))
- {
- s.context ().set ("cxx-tree-name-processor-seen", true);
- Traversal::Implies::traverse (i);
- }
- }
- };
-
- bool
- process_impl (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& file,
- StringLiteralMap const& map)
- {
- try
- {
- Counts counts;
- Context ctx (ops, counts, false, tu, file, map);
-
- if (tu.names_begin ()->named ().name () ==
- L"http://www.w3.org/2001/XMLSchema")
- {
- // XML Schema namespace.
- //
- Traversal::Schema xs_schema;
- Traversal::Names xs_schema_names;
- FundamentalNamespace xs_ns (ctx);
-
- xs_schema >> xs_schema_names >> xs_ns;
-
- xs_schema.dispatch (tu);
- }
- else
- {
-
- // Pass one - assign names to global types. This pass cannot
- // be combined with pass two because of possible recursive
- // schema inclusions. Also note that we check first if this
- // schema has already been processed which may happen in the
- // file-per-type compilation mode.
- //
- if (!tu.context ().count ("cxx-tree-name-processor-pass-1"))
- {
- Traversal::Schema schema;
- Traversal::Schema xs_schema;
- UsesPassOne uses;
- Implies implies;
-
- schema >> uses >> schema;
- schema >> implies >> xs_schema;
-
- Traversal::Names schema_names;
- Traversal::Names xs_schema_names;
- NamespacePassOne ns (ctx);
- FundamentalNamespace xs_ns (ctx);
-
- schema >> schema_names >> ns;
- xs_schema >> xs_schema_names >> xs_ns;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set ("cxx-tree-name-processor-pass-1", true);
-
- schema.dispatch (tu);
- }
-
- // Pass two - assign names inside complex types. Here
- // we don't need to go into included/imported schemas.
- //
- {
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
-
- schema >> schema_names >> ns >> ns_names;
-
- Complex complex (ctx);
- Traversal::Enumeration enumeration; // Avoid fallback on complex.
-
- ns_names >> complex;
- ns_names >> enumeration;
-
- schema.dispatch (tu);
- }
-
- // Pass three - assign names to global elements as well as
- // inside enums. Also note that we check first if this schema
- // has already been processed which may happen in the file-per-
- // type compilation mode.
- //
- if (!tu.context ().count ("cxx-tree-name-processor-pass-3"))
- {
- Traversal::Schema schema;
- UsesPassThree uses;
-
- schema >> uses >> schema;
-
- Traversal::Names schema_names;
- NamespacePassThree ns (ctx);
- Traversal::Namespace ns_enum;
-
- schema >> schema_names;
-
- schema_names >> ns;
- schema_names >> ns_enum;
-
- Traversal::Names ns_names;
- Enumeration enumeration (ctx);
-
- ns_enum >> ns_names >> enumeration;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set ("cxx-tree-name-processor-pass-3", true);
-
- schema.dispatch (tu);
- }
- }
- }
- catch (Context::Failed const&)
- {
- // Diagnostics has already been issued.
- //
- return false;
- }
-
- return true;
- }
- }
-
- bool NameProcessor::
- process (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& file,
- StringLiteralMap const& map)
- {
- return process_impl (ops, tu, file, map);
- }
- }
-}
diff --git a/xsd/cxx/tree/name-processor.hxx b/xsd/cxx/tree/name-processor.hxx
deleted file mode 100644
index 62b3af4..0000000
--- a/xsd/cxx/tree/name-processor.hxx
+++ /dev/null
@@ -1,28 +0,0 @@
-// file : xsd/cxx/tree/name-processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_NAME_PROCESSOR_HXX
-#define CXX_TREE_NAME_PROCESSOR_HXX
-
-#include <types.hxx>
-
-#include <cxx/tree/elements.hxx>
-#include <cxx/tree/options.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- class NameProcessor
- {
- public:
- bool
- process (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file,
- StringLiteralMap const&);
- };
- }
-}
-
-#endif // CXX_TREE_NAME_PROCESSOR_HXX
diff --git a/xsd/cxx/tree/options.cli b/xsd/cxx/tree/options.cli
deleted file mode 100644
index 08c9be3..0000000
--- a/xsd/cxx/tree/options.cli
+++ /dev/null
@@ -1,479 +0,0 @@
-// file : xsd/cxx/tree/options.cli
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include <cstddef>; // std::size_t
-
-include <types.hxx>; // NarrowString, NarrowStrings
-
-include <cxx/options.cli>;
-
-namespace CXX
-{
- namespace Tree
- {
- class options: CXX::options
- {
- // Polymorphism.
- //
- bool --generate-polymorphic
- {
- "Generate polymorphism-aware code. Specify this option if you use
- substitution groups or \cb{xsi:type}. Use the \cb{--polymorphic-type}
- or \cb{--polymorphic-type-all} option to specify which type
- hierarchies are polymorphic."
- };
-
- NarrowStrings --polymorphic-type
- {
- "<type>",
- "Indicate that <type> is a root of a polymorphic type hierarchy. The
- compiler can often automatically determine which types are
- polymorphic based on the substitution group declarations. However,
- you may need to use this option if you are not using substitution
- groups or if substitution groups are defined in another schema. You
- need to specify this option when compiling every schema file that
- references <type>. The <type> argument is an XML Schema type name
- that can be optionally qualified with a namespace in the
- \c{\i{namespace}\b{#}\i{name}} form."
- };
-
- bool --polymorphic-type-all
- {
- "Indicate that all types should be treated as polymorphic."
- };
-
- unsigned long --polymorphic-plate = 0
- {
- "<num>",
- "Specify the polymorphic map plate the generated code should register
- on. This functionality is primarily useful to segregate multiple
- schemas that define the same polymorphic types."
- };
-
- // Ordered content.
- //
- NarrowStrings --ordered-type
- {
- "<type>",
- "Indicate that element order in <type> is significant. An example
- would be a complex type with unbounded choice as a content model
- where the element order in XML has application-specific semantics.
- For ordered types the compiler generates a special container data
- member and a corresponding set of accessors and modifiers that are
- used to capture the order of elements and, for mixed content, of
- text.
-
- The <type> argument is an XML Schema type name that can be optionally
- qualified with a namespace in the \c{\i{namespace}\b{#}\i{name}} form.
- Note also that you will need to specify this option when compiling
- every schema file that has other ordered types derived from this
- type."
- };
-
- bool --ordered-type-derived
- {
- "Automatically treat types derived from ordered bases as also
- ordered. This is primarily useful if you would like to be able
- to iterate over the complete content using the content order
- container."
- };
-
- bool --ordered-type-mixed
- {
- "Automatically treat complex types with mixed content as ordered."
- };
-
- bool --ordered-type-all
- {
- "Indicate that element order in all types is significant."
- };
-
- NarrowString --order-container
- {
- "<type>",
- "Specify a custom class template that should be used as a container
- for the content order in ordered types instead of the default
- \cb{std::vector}. See \cb{--ordered-type} for more information on
- ordered type. This option is primarily useful if you need to
- perform more complex lookups in the content order container, for
- example by element id. In this case, a container like Boost
- multi-index may be more convenient. Note that if using a custom
- container, you will also most likely need to include the relevant
- headers using the \cb{--hxx-prologue*} options."
- };
-
- // Features.
- //
- bool --generate-serialization
- {
- "Generate serialization functions. Serialization functions convert
- the object model back to XML."
- };
-
- bool --generate-ostream
- {
- "Generate ostream insertion operators (\cb{operator<<}) for generated
- types. This allows one to easily print a fragment or the whole object
- model for debugging or logging."
- };
-
- bool --generate-doxygen
- {
- "Generate documentation comments suitable for extraction by the
- Doxygen documentation system. Documentation from annotations is
- added to the comments if present in the schema."
- };
-
- bool --generate-comparison
- {
- "Generate comparison operators (\cb{operator==} and \cb{operator!=})
- for complex types. Comparison is performed member-wise."
- };
-
- bool --generate-default-ctor
- {
- "Generate default constructors even for types that have required
- members. Required members of an instance constructed using such a
- constructor are not initialized and accessing them results in
- undefined behavior."
- };
-
- bool --generate-from-base-ctor
- {
- "Generate constructors that expect an instance of a base type
- followed by all required members."
- };
-
- bool --suppress-assignment
- {
- "Suppress the generation of copy assignment operators for complex
- types. If this option is specified, the copy assignment operators
- for such types are declared private and left unimplemented."
- };
-
- bool --generate-detach
- {
- "Generate detach functions for required elements and attributes.
- Detach functions for optional and sequence cardinalities are
- provided by the respective containers. These functions, for
- example, allow you to move sub-trees in the object model either
- within the same tree or between different trees."
- };
-
- bool --generate-wildcard
- {
- "Generate accessors and modifiers as well as parsing and serialization
- code for XML Schema wildcards (\cb{any} and \cb{anyAttribute}). XML
- content matched by wildcards is presented as DOM fragments. Note
- that you need to initialize the Xerces-C++ runtime if you are using
- this option."
- };
-
- bool --generate-any-type
- {
- "Extract and store content of the XML Schema \cb{anyType} type as a
- DOM fragment. Note that you need to initialize the Xerces-C++ runtime
- if you are using this option."
- };
-
- NarrowStrings --generate-insertion
- {
- "<os>",
- "Generate data representation stream insertion operators for the <os>
- output stream type. Repeat this option to specify more than one
- stream type. The ACE CDR stream (\cb{ACE_OutputCDR}) and RPC XDR
- are recognized by the compiler and the necessary \cb{#include}
- directives are automatically generated. For custom stream types use
- the \cb{--hxx-prologue*} options to provide the necessary
- declarations."
- };
-
- NarrowStrings --generate-extraction
- {
- "<is>",
- "Generate data representation stream extraction constructors for the
- <is> input stream type. Repeat this option to specify more than one
- stream type. The ACE CDR stream (\cb{ACE_InputCDR}) and RPC XDR are
- recognized by the compiler and the necessary \cb{#include} directives
- are automatically generated. For custom stream types use the
- \cb{--hxx-prologue*} options to provide the necessary declarations."
- };
-
- bool --generate-forward
- {
- "Generate a separate header file with forward declarations for the
- types being generated."
- };
-
- bool --suppress-parsing
- {
- "Suppress the generation of the parsing functions and constructors.
- Use this option to reduce the generated code size when parsing from
- XML is not needed."
- };
-
- bool --generate-element-type
- {
- "Generate types instead of parsing and serialization functions for
- root elements. This is primarily useful to distinguish object models
- with the same root type but with different root elements."
- };
-
- bool --generate-element-map
- {
- "Generate a root element map that allows uniform parsing and
- serialization of multiple root elements. This option is only valid
- together with \cb{--generate-element-type}."
- };
-
- bool --generate-intellisense
- {
- "Generate workarounds for IntelliSense bugs in Visual Studio 2005
- (8.0). When this option is used, the resulting code is slightly
- more verbose. IntelliSense in Visual Studio 2008 (9.0) and later
- does not require these workarounds. Support for IntelliSense in
- Visual Studio 2003 (7.1) is improved with this option but is
- still incomplete."
- };
-
- bool --omit-default-attributes
- {
- "Omit attributes with default and fixed values from serialized XML
- documents."
- };
-
- // Naming.
- //
- NarrowString --type-naming = "knr"
- {
- "<style>",
- "Specify the type naming convention that should be used in the
- generated code. Valid styles are \cb{knr} (default), \cb{ucc},
- and \cb{java}. See the NAMING CONVENTION section below for more
- information."
- };
-
- NarrowString --function-naming = "knr"
- {
- "<style>",
- "Specify the function naming convention that should be used in the
- generated code. Valid styles are \cb{knr} (default), \cb{lcc}, and
- \cb{java}. See the NAMING CONVENTION section below for more
- information."
- };
-
- NarrowStrings --type-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema type names to C++ type names. See the NAMING CONVENTION
- section below for more information."
- };
-
- NarrowStrings --accessor-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes to C++ accessor function
- names. See the NAMING CONVENTION section below for more information."
- };
-
- NarrowStrings --one-accessor-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes with cardinality one to
- C++ accessor function names. See the NAMING CONVENTION section
- below for more information."
- };
-
- NarrowStrings --opt-accessor-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes with cardinality optional
- to C++ accessor function names. See the NAMING CONVENTION section
- below for more information."
- };
-
- NarrowStrings --seq-accessor-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes with cardinality sequence
- to C++ accessor function names. See the NAMING CONVENTION section
- below for more information."
- };
-
- NarrowStrings --modifier-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes to C++ modifier function
- names. See the NAMING CONVENTION section below for more information."
- };
-
- NarrowStrings --one-modifier-regex
-
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes with cardinality one to C++
- modifier function names. See the NAMING CONVENTION section below
- for more information."
- };
-
- NarrowStrings --opt-modifier-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes with cardinality optional
- to C++ modifier function names. See the NAMING CONVENTION section
- below for more information."
- };
-
- NarrowStrings --seq-modifier-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema names of elements/attributes with cardinality sequence
- to C++ modifier function names. See the NAMING CONVENTION section
- below for more information."
- };
-
- NarrowStrings --parser-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema element names to C++ parsing function names. See the
- NAMING CONVENTION section below for more information."
- };
-
- NarrowStrings --serializer-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema element names to C++ serialization function names. See
- the NAMING CONVENTION section below for more information."
- };
-
- NarrowStrings --const-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema-derived names to C++ constant names. See the NAMING
- CONVENTION section below for more information."
- };
-
- NarrowStrings --enumerator-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema enumeration values to C++ enumerator names. See the
- NAMING CONVENTION section below for more information."
- };
-
- NarrowStrings --element-type-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate
- XML Schema element names to C++ element type names. See the NAMING
- CONVENTION section below for more information."
- };
-
- bool --name-regex-trace
- {
- "Trace the process of applying regular expressions specified with
- the name transformation options. Use this option to find out why
- your regular expressions don't do what you expected them to do."
- };
-
- // Root element.
- //
- bool --root-element-first
- {
- "Treat only the first global element as a document root. By default
- all global elements are considered document roots."
- };
-
- bool --root-element-last
- {
- "Treat only the last global element as a document root. By default
- all global elements are considered document roots."
- };
-
- bool --root-element-all
- {
- "Treat all global elements as document roots. This is the default
- behavior. By explicitly specifying this option you can suppress
- the warning that is issued if more than one global element is
- defined."
- };
-
- bool --root-element-none
- {
- "Do not treat any global elements as document roots. By default all
- global elements are considered document roots."
- };
-
- NarrowStrings --root-element
- {
- "<element>",
- "Treat only <element> as a document root. Repeat this option to
- specify more than one root element."
- };
-
- // Custom type.
- //
- NarrowStrings --custom-type
- {
- "<map>",
- "Use a custom C++ type instead of the generated class. The <map>
- argument is in the form \c{\i{name}[\b{=}\i{type}[\b{/}\i{base}]]},
- where \i{name} is a type name as defined in XML Schema and \i{type}
- is a C++ type name that should be used instead. If \i{type} is not
- present or empty then the custom type is assumed to have the same
- name and be defined in the same namespace as the generated class
- would have. If \i{base} is specified then the generated class is
- still generated but with that name."
- };
-
- NarrowStrings --custom-type-regex
- {
- "<regex>",
- "Use custom C++ types instead of the generated classes. The <regex>
- argument is in the form
- \c{\b{/}\i{name-pat}\b{/}[\i{type-sub}\b{/}[\i{base-sub}\b{/}]]},
- where \i{name-pat} is a regex pattern that will be matched against
- type names as defined in XML Schema and \i{type-sub} is a C++ type
- name substitution that should be used instead. If \i{type-sub} is
- not present or its substitution results in an empty string then
- the custom type is assumed to have the same name and be defined
- in the same namespace as the generated class would have. If
- \i{base-sub} is present and its substitution results in a
- non-empty string then the generated class is still generated
- but with the result of this substitution as its name. The pattern
- and substitutions are in the Perl regular expression format.
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- // Parts.
- //
- std::size_t --parts = 1
- {
- "<num>",
- "Split generated source code into <num> parts. This is useful when
- translating large, monolithic schemas and a C++ compiler is not
- able to compile the resulting source code at once (usually due
- to insufficient memory)."
- };
-
- NarrowString --parts-suffix = "-"
- {
- "<suffix>",
- "Use <suffix> instead of the default '\cb{-}' to separate the file
- name from the part number."
- };
- };
- }
-}
diff --git a/xsd/cxx/tree/order-processor.cxx b/xsd/cxx/tree/order-processor.cxx
deleted file mode 100644
index 234f427..0000000
--- a/xsd/cxx/tree/order-processor.cxx
+++ /dev/null
@@ -1,243 +0,0 @@
-// file : xsde/cxx/tree/order-processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <iostream>
-
-#include <cxx/tree/elements.hxx>
-#include <cxx/tree/order-processor.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct Member: Traversal::Element, Traversal::Any
- {
- Member (size_t count): count_ (count) {}
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (Context::skip (e))
- return;
-
- e.context ().set ("ordered-id", count_++);
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- a.context ().set ("ordered-id", count_++);
- }
-
- size_t count_;
- };
-
- //
- //
- struct Type: Traversal::Complex
- {
- Type (TypeNameSet& ordered_types, bool derived, bool mixed, bool all)
- : ordered_types_ (ordered_types),
- derived_ (derived),
- mixed_ (mixed),
- all_ (all)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- SemanticGraph::Context& ctx (c.context ());
-
- if (!ctx.count ("ordered"))
- {
- // First process our base.
- //
- if (c.inherits_p ())
- {
- SemanticGraph::Type& b (c.inherits ().base ());
-
- if (!b.context ().count ("ordered"))
- dispatch (b);
- }
-
- // See if our base (not necessarily immediate) is ordered.
- //
- using SemanticGraph::Complex;
-
- Complex* b (0);
-
- for (Complex* p (&c); p->inherits_p ();)
- {
- if ((b = dynamic_cast<Complex*> (&p->inherits ().base ())))
- {
- if (Context::ordered_p (*b))
- break;
-
- p = b;
- }
- else
- break;
- }
-
- bool o (all_ ||
- (derived_ && b != 0 && Context::ordered_p (*b)) ||
- (mixed_ && c.mixed_p ()) ||
- ordered_types_.find (c));
- ctx.set ("ordered", o);
-
- // Assign ids to elements and wildcards, calculate total count.
- //
- if (o)
- {
- size_t count (
- b != 0 && Context::ordered_p (*b)
- ? b->context ().get<size_t> ("ordered-count")
- : 1);
-
- ctx.set ("ordered-start", count);
-
- Member m (count);
- Traversal::Names n (m);
- names (c, n);
-
- // Assign content id for mixed text.
- //
- if (Context::mixed_p (c) && count == 1)
- ctx.set ("mixed-ordered-id", m.count_++);
-
- ctx.set ("ordered-count", m.count_);
- }
- }
- }
-
- private:
- TypeNameSet& ordered_types_;
- bool derived_;
- bool mixed_;
- bool all_;
- };
-
- // Go into sourced/included/imported schemas while making sure
- // we don't process the same stuff more than once.
- //
- struct Uses: Traversal::Sources,
- Traversal::Includes,
- Traversal::Imports
- {
- Uses (char const* seen_key)
- : seen_key_ (seen_key)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Sources& sr)
- {
- SemanticGraph::Schema& s (sr.schema ());
-
- if (!s.context ().count (seen_key_))
- {
- s.context ().set (seen_key_, true);
- Traversal::Sources::traverse (sr);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Includes& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count (seen_key_))
- {
- s.context ().set (seen_key_, true);
- Traversal::Includes::traverse (i);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Imports& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count (seen_key_))
- {
- s.context ().set (seen_key_, true);
- Traversal::Imports::traverse (i);
- }
- }
-
- private:
- char const* seen_key_;
- };
-
- char const* seen_key = "cxx-tree-order-processor-seen";
-
- bool
- process_impl (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const&)
- {
- // Prepare a set of ordered types.
- //
- TypeNameSet ordered_types (ops.ordered_type ().begin (),
- ops.ordered_type ().end ());
-
- // Root schema in the file-per-type mode is just a bunch
- // of includes without a namespace.
- //
- SemanticGraph::Schema::NamesIterator i (tu.names_begin ());
-
- // Nothing to do if this is the XML Schema namespace.
- //
- if (i == tu.names_end () ||
- i->named ().name () != L"http://www.w3.org/2001/XMLSchema")
- {
- // Note that we check first if this schema has already been
- // processed which may happen in the file-per-type compilation
- // mode.
- //
- if (!tu.context ().count (seen_key))
- {
- Traversal::Schema schema;
- Uses uses (seen_key);
-
- schema >> uses >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- Type type (ordered_types,
- ops.ordered_type_derived (),
- ops.ordered_type_mixed (),
- ops.ordered_type_all ());
-
- schema >> schema_names >> ns >> ns_names >> type;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set (seen_key, true);
-
- schema.dispatch (tu);
- }
- }
-
- return true;
- }
- }
-
- bool OrderProcessor::
- process (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& file)
- {
- return process_impl (ops, tu, file);
- }
- }
-}
diff --git a/xsd/cxx/tree/order-processor.hxx b/xsd/cxx/tree/order-processor.hxx
deleted file mode 100644
index bde6c32..0000000
--- a/xsd/cxx/tree/order-processor.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-// file : xsde/cxx/tree/order-processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_ORDER_PROCESSOR_HXX
-#define CXX_TREE_ORDER_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-
-#include <xsd.hxx>
-#include <types.hxx>
-
-#include <cxx/tree/options.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- class OrderProcessor
- {
- public:
- bool
- process (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file);
- };
- }
-}
-
-#endif // CXX_TREE_ORDER_PROCESSOR_HXX
diff --git a/xsd/cxx/tree/parser-header.cxx b/xsd/cxx/tree/parser-header.cxx
deleted file mode 100644
index 4d76f2c..0000000
--- a/xsd/cxx/tree/parser-header.cxx
+++ /dev/null
@@ -1,472 +0,0 @@
-// file : xsd/cxx/tree/parser-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/parser-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct ElementFunction: Traversal::Element,
- GlobalElementBase,
- Context
- {
- ElementFunction (Context& c)
- : GlobalElementBase (c), Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (!doc_root_p (e))
- return;
-
- String const& name (eparser (e));
- String const& error_handler (error_handler_type);
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name Parsing functions for the %" <<
- comment (e.name ()) << " document root." << endl;
-
- if (e.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (e.annotation ());
- }
-
- os << " */" << endl
- << "//@{" << endl
- << endl;
- }
-
- if (!doxygen)
- {
- os << "// Parse a URI or a local file." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a URI or a local file." << endl
- << " *" << endl
- << " * @param uri A URI or a local file name." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function uses exceptions to report parsing errors." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (const " << string_type << "& uri," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a URI or a local file with an error handler." << endl
- << " *" << endl
- << " * @param uri A URI or a local file name." << endl
- << " * @param eh An error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (const " << string_type << "& uri," << endl
- << error_handler << "& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a URI or a local file with a Xerces-C++ " <<
- "DOM error" << endl
- << " * handler." << endl
- << " *" << endl
- << " * @param uri A URI or a local file name." << endl
- << " * @param eh A Xerces-C++ DOM error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (const " << string_type << "& uri," << endl
- << xerces_ns << "::DOMErrorHandler& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (!doxygen)
- {
- os << "// Parse std::istream." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a standard input stream." << endl
- << " *" << endl
- << " * @param is A standrad input stream." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function uses exceptions to report parsing errors." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (::std::istream& is," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a standard input stream with an error handler." << endl
- << " *" << endl
- << " * @param is A standrad input stream." << endl
- << " * @param eh An error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (::std::istream& is," << endl
- << error_handler << "& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a standard input stream with a " <<
- "Xerces-C++ DOM error" << endl
- << " * handler." << endl
- << " *" << endl
- << " * @param is A standrad input stream." << endl
- << " * @param eh A Xerces-C++ DOM error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (::std::istream& is," << endl
- << xerces_ns << "::DOMErrorHandler& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a standard input stream with a resource id." << endl
- << " *" << endl
- << " * @param is A standrad input stream." << endl
- << " * @param id A resource id." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * The resource id is used to identify the document " <<
- "being parsed in" << endl
- << " * diagnostics as well as to resolve relative paths." << endl
- << " *" << endl
- << " * This function uses exceptions to report parsing errors." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (::std::istream& is," << endl
- << "const " << string_type << "& id," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a standard input stream with a resource " <<
- "id and an" << endl
- << " * error handler." << endl
- << " *" << endl
- << " * @param is A standrad input stream." << endl
- << " * @param id A resource id." << endl
- << " * @param eh An error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * The resource id is used to identify the document " <<
- "being parsed in" << endl
- << " * diagnostics as well as to resolve relative paths." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (::std::istream& is," << endl
- << "const " << string_type << "& id," << endl
- << error_handler << "& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a standard input stream with a resource " <<
- "id and a" << endl
- << " * Xerces-C++ DOM error handler." << endl
- << " *" << endl
- << " * @param is A standrad input stream." << endl
- << " * @param id A resource id." << endl
- << " * @param eh A Xerces-C++ DOM error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * The resource id is used to identify the document " <<
- "being parsed in" << endl
- << " * diagnostics as well as to resolve relative paths." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (::std::istream& is," << endl
- << "const " << string_type << "& id," << endl
- << xerces_ns << "::DOMErrorHandler& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (!doxygen)
- {
- os << "// Parse xercesc::InputSource." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a Xerces-C++ input source." << endl
- << " *" << endl
- << " * @param is A Xerces-C++ input source." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function uses exceptions to report parsing errors." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (" << xerces_ns << "::InputSource& is," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a Xerces-C++ input source with an " <<
- "error handler." << endl
- << " *" << endl
- << " * @param is A Xerces-C++ input source." << endl
- << " * @param eh An error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (" << xerces_ns << "::InputSource& is," << endl
- << error_handler << "& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a Xerces-C++ input source with a " <<
- "Xerces-C++ DOM" << endl
- << " * error handler." << endl
- << " *" << endl
- << " * @param is A Xerces-C++ input source." << endl
- << " * @param eh A Xerces-C++ DOM error handler." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function reports parsing errors by calling the " <<
- "error handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (" << xerces_ns << "::InputSource& is," << endl
- << xerces_ns << "::DOMErrorHandler& eh," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (!doxygen)
- {
- os << "// Parse xercesc::DOMDocument." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a Xerces-C++ DOM document." << endl
- << " *" << endl
- << " * @param d A Xerces-C++ DOM document." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (const " << xerces_ns << "::DOMDocument& d," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Parse a Xerces-C++ DOM document." << endl
- << " *" << endl
- << " * @param d A pointer to the Xerces-C++ DOM document." << endl
- << " * @param f Parsing flags." << endl
- << " * @param p Parsing properties. " << endl
- << " * @return A pointer to the root of the object model." << endl
- << " *" << endl
- << " * This function is normally used together with the " <<
- "keep_dom and" << endl
- << " * own_dom parsing flags to assign ownership of the DOM " <<
- "document" << endl
- << " * to the object model." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << auto_ptr << "< " << type_name (e) << " >" << endl
- << name << " (" << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d," << endl
- << flags_type << " f = 0," << endl
- << "const " << properties_type << "& p = " << properties_type << " ());"
- << endl;
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
- }
-
- private:
- String
- type_name (Type& e)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (e.type ());
-
- return o.str ();
- }
- };
- }
-
-
- void
- generate_parser_header (Context& ctx)
- {
- ctx.os << "#include <iosfwd>" << endl
- << endl
- << "#include <xercesc/sax/InputSource.hpp>" << endl
- << "#include <xercesc/dom/DOMDocument.hpp>" << endl
- << "#include <xercesc/dom/DOMErrorHandler.hpp>" << endl
- << endl;
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names names_ns, names;
- Namespace ns (ctx);
- ElementFunction element (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names >> element;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/parser-header.hxx b/xsd/cxx/tree/parser-header.hxx
deleted file mode 100644
index 6942190..0000000
--- a/xsd/cxx/tree/parser-header.hxx
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : xsd/cxx/tree/parser-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_PARSER_HEADER_HXX
-#define CXX_TREE_PARSER_HEADER_HXX
-
-#include <cxx/tree/elements.hxx>
-
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_parser_header (Context&);
- }
-}
-
-#endif // CXX_TREE_PARSER_HEADER_HXX
diff --git a/xsd/cxx/tree/parser-source.cxx b/xsd/cxx/tree/parser-source.cxx
deleted file mode 100644
index e00997b..0000000
--- a/xsd/cxx/tree/parser-source.cxx
+++ /dev/null
@@ -1,541 +0,0 @@
-// file : xsd/cxx/tree/parser-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/parser-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct ElementFunction: Traversal::Element,
- GlobalElementBase,
- Context
- {
- ElementFunction (Context& c)
- : GlobalElementBase (c), Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (!doc_root_p (e))
- return;
-
- SemanticGraph::Type& t (e.type ());
-
- // Check if we need to handle xsi:type and substitution groups.
- // If this element's type is anonymous then we don't need to do
- // anything.
- //
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- // Check if this element is abstract.
- //
- bool abst;
- {
- SemanticGraph::Complex* tc;
- abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
- tc->abstract_p ();
- }
-
- // Nothing to do if we are abstract and not polymorphic.
- //
- if (abst && !polymorphic)
- return;
-
- String const& name (eparser (e));
- String type (type_name (e));
- String const& error_handler (error_handler_type);
-
- // Note that I am using fq-name in function calls because g++ gets
- // confused if the name is 'type'. (see tests/schema/anonymous)
- //
-
- char const* d (std >= cxx_version::cxx11 ? "std::move (d)" : "d");
-
- // URI.
- //
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (const " << string_type << "& u," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0," << endl
- << "(f & " << flags_type << "::keep_dom) == 0);"
- << endl
- << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
- << endl
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
- << "u, h, p, f";
-
- if (options.disable_multi_import ())
- os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
-
- os << "));"
- << endl
- << "h.throw_if_failed< ::xsd::cxx::tree::parsing< " <<
- char_type << " > > ();"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (const " << string_type << "& u," << endl
- << error_handler << "& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0," << endl
- << "(f & " << flags_type << "::keep_dom) == 0);"
- << endl
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
- << "u, h, p, f";
-
- if (options.disable_multi_import ())
- os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
-
- os << "));"
- << endl
- << "if (!d.get ())" << endl
- << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (const " << string_type << "& u," << endl
- << xerces_ns << "::DOMErrorHandler& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
- << "u, h, p, f";
-
- if (options.disable_multi_import ())
- os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
-
- os << "));"
- << endl
- << "if (!d.get ())" << endl
- << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}";
-
-
- // istream
- //
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (::std::istream& is," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0," << endl
- << "(f & " << flags_type << "::keep_dom) == 0);"
- << endl
- << "::xsd::cxx::xml::sax::std_input_source isrc (is);"
- << "return " << fq_name (e, "parser") << " (isrc, f, p);"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (::std::istream& is," << endl
- << error_handler << "& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0," << endl
- << "(f & " << flags_type << "::keep_dom) == 0);"
- << endl
- << "::xsd::cxx::xml::sax::std_input_source isrc (is);"
- << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (::std::istream& is," << endl
- << xerces_ns << "::DOMErrorHandler& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::sax::std_input_source isrc (is);"
- << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (::std::istream& is," << endl
- << "const " << string_type << "& sid," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0," << endl
- << "(f & " << flags_type << "::keep_dom) == 0);"
- << endl
- << "::xsd::cxx::xml::sax::std_input_source isrc (is, sid);"
- << "return " << fq_name (e, "parser") << " (isrc, f, p);"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (::std::istream& is," << endl
- << "const " << string_type << "& sid," << endl
- << error_handler << "& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0," << endl
- << "(f & " << flags_type << "::keep_dom) == 0);"
- << endl
- << "::xsd::cxx::xml::sax::std_input_source isrc (is, sid);"
- << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (::std::istream& is," << endl
- << "const " << string_type << "& sid," << endl
- << xerces_ns << "::DOMErrorHandler& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::xml::sax::std_input_source isrc (is, sid);"
- << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
- << "}";
-
-
- // InputSource.
- //
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (" << xerces_ns << "::InputSource& i," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
- << endl
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
- << "i, h, p, f";
-
- if (options.disable_multi_import ())
- os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
-
- os << "));"
- << endl
- << "h.throw_if_failed< ::xsd::cxx::tree::parsing< " <<
- char_type << " > > ();"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}";
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (" << xerces_ns << "::InputSource& i," << endl
- << error_handler << "& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
- << "i, h, p, f";
-
- if (options.disable_multi_import ())
- os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
-
- os << "));"
- << endl
- << "if (!d.get ())" << endl
- << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}";
-
-
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (" << xerces_ns << "::InputSource& i," << endl
- << xerces_ns << "::DOMErrorHandler& h," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
- << "i, h, p, f";
-
- if (options.disable_multi_import ())
- os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
-
- os << "));"
- << endl
- << "if (!d.get ())" << endl
- << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}";
-
-
- // DOM.
- //
-
- bool fund (false);
- {
- IsFundamentalType test (fund);
- test.dispatch (t);
- }
-
- // const DOMDocument&
- //
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (const " << xerces_ns << "::DOMDocument& doc," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "& p)"
- << "{"
- << "if (f & " << flags_type << "::keep_dom)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "static_cast< " << xerces_ns <<
- "::DOMDocument* > (doc.cloneNode (true)));"
- << endl
- << "return " << auto_ptr << "< " << type << " > (" << endl
- << fq_name (e, "parser") << " (" << endl
- << d << ", f | " << flags_type << "::own_dom, p));"
- << "}"
- << "const " << xerces_ns << "::DOMElement& e (*doc.getDocumentElement ());"
- << "const " << qname_type << " n (" << endl
- << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
- << endl;
-
- if (poly)
- {
- os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
- << "::xsd::cxx::tree::type_factory_map_instance< " <<
- poly_plate << ", " << char_type << " > ().create (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_().name ()) << "," << endl;
-
- if (abst)
- os << "0,";
- else
- os << "&::xsd::cxx::tree::factory_impl< " << type << " >,";
-
- os << endl
- << "true, true, e, n, f, 0));"
- << endl
- << "if (tmp.get () != 0)"
- << "{"
- << auto_ptr << "< " << type << " > r (" << endl
- << "dynamic_cast< " << type << "* > (tmp.get ()));"
- << endl
- << "if (r.get ())" << endl
- << "tmp.release ();"
- << "else" << endl
- << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
- " > ();"
- << endl;
- }
- else
- {
- os << "if (n.name () == " << strlit (e.name ()) << " &&" << endl
- << "n.namespace_ () == " << strlit (e.namespace_().name ()) << ")"
- << "{";
-
- if (fund)
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << "new " << type << " (" << endl
- << "::xsd::cxx::tree::traits< " << type << ", " <<
- char_type;
-
- if (t.is_a<SemanticGraph::Fundamental::Double> ())
- os << ", ::xsd::cxx::tree::schema_type::double_";
- else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
- os << ", ::xsd::cxx::tree::schema_type::decimal";
-
- os << " >::create (" << endl
- << "e, f, 0)));";
- }
- else
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << "::xsd::cxx::tree::traits< " << type << ", " <<
- char_type << " >::create (" << endl
- << "e, f, 0));";
- }
- }
-
- os << "return r;"
- << "}"
- << "throw ::xsd::cxx::tree::unexpected_element < " <<
- char_type << " > (" << endl
- << "n.name ()," << endl
- << "n.namespace_ ()," << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_().name ()) << ");"
- << "}";
-
-
- // dom::auto_ptr/unique_ptr<DOMDocument>
- //
- os << auto_ptr << "< " << type << " >" << endl
- << name << " (" << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d," << endl
- << flags_type << " f," << endl
- << "const " << properties_type << "&)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > c (" << endl
- << "((f & " << flags_type << "::keep_dom) &&" << endl
- << "!(f & " << flags_type << "::own_dom))" << endl
- << "? static_cast< " << xerces_ns << "::DOMDocument* > (" <<
- "d->cloneNode (true))" << endl
- << ": 0);"
- << endl
- << xerces_ns << "::DOMDocument& doc (c.get () ? *c : *d);"
- << "const " << xerces_ns << "::DOMElement& e (" <<
- "*doc.getDocumentElement ());"
- << endl
- << "const " << qname_type << " n (" << endl
- << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
- << endl
- << "if (f & " << flags_type << "::keep_dom)" << endl
- << "doc.setUserData (" << dom_node_key << "," << endl
- << "(c.get () ? &c : &d)," << endl
- << "0);"
- << endl;
-
- if (poly)
- {
- os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
- << "::xsd::cxx::tree::type_factory_map_instance< " <<
- poly_plate << ", " << char_type << " > ().create (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_().name ()) << "," << endl;
-
- if (abst)
- os << "0,";
- else
- os << "&::xsd::cxx::tree::factory_impl< " << type << " >,";
-
- os << endl
- << "true, true, e, n, f, 0));"
- << endl
- << "if (tmp.get () != 0)"
- << "{";
- }
- else
- {
- os << "if (n.name () == " << strlit (e.name ()) << " &&" << endl
- << "n.namespace_ () == " << strlit (e.namespace_().name ()) << ")"
- << "{";
-
- if (fund)
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << "new " << type << " (" << endl
- << "::xsd::cxx::tree::traits< " << type << ", " <<
- char_type;
-
- if (t.is_a<SemanticGraph::Fundamental::Double> ())
- os << ", ::xsd::cxx::tree::schema_type::double_";
- else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
- os << ", ::xsd::cxx::tree::schema_type::decimal";
-
- os << " >::create (" << endl
- << "e, f, 0)));";
- }
- else
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << "::xsd::cxx::tree::traits< " << type << ", " <<
- char_type << " >::create (" << endl
- << "e, f, 0));";
- }
- }
-
- if (poly)
- {
- os << endl
- << auto_ptr << "< " << type << " > r (" << endl
- << "dynamic_cast< " << type << "* > (tmp.get ()));"
- << endl
- << "if (r.get ())" << endl
- << "tmp.release ();"
- << "else" << endl
- << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
- " > ();"
- << endl;
- }
-
- os << "return r;"
- << "}"
- << "throw ::xsd::cxx::tree::unexpected_element < " <<
- char_type << " > (" << endl
- << "n.name ()," << endl
- << "n.namespace_ ()," << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_().name ()) << ");"
- << "}";
- }
-
- private:
- String
- type_name (Type& e)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (e.type ());
-
- return o.str ();
- }
- };
- }
-
- void
- generate_parser_source (Context& ctx, size_t first, size_t last)
- {
- ctx.os << "#include <istream>" << endl
- << "#include <xsd/cxx/xml/sax/std-input-source.hxx>" << endl
- << "#include <xsd/cxx/tree/error-handler.hxx>" << endl
- << endl;
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names names_ns, names;
- Namespace ns (ctx, first, last);
- ElementFunction element (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names >> element;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/parser-source.hxx b/xsd/cxx/tree/parser-source.hxx
deleted file mode 100644
index 8a52cd2..0000000
--- a/xsd/cxx/tree/parser-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/parser-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_PARSER_SOURCE_HXX
-#define CXX_TREE_PARSER_SOURCE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_parser_source (Context&, size_t first, size_t last);
- }
-}
-
-#endif // CXX_TREE_PARSER_SOURCE_HXX
diff --git a/xsd/cxx/tree/polymorphism-processor.cxx b/xsd/cxx/tree/polymorphism-processor.cxx
deleted file mode 100644
index 2788a73..0000000
--- a/xsd/cxx/tree/polymorphism-processor.cxx
+++ /dev/null
@@ -1,740 +0,0 @@
-// file : xsde/cxx/tree/polymorphism-processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <iostream>
-
-#include <cxx/tree/elements.hxx>
-#include <cxx/tree/polymorphism-processor.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- //
- //
- struct Type: Traversal::Type,
- Traversal::Complex
- {
- Type (TypeNameSet& poly_types)
- : poly_types_ (poly_types)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- SemanticGraph::Context& ctx (t.context ());
-
- if (!ctx.count ("polymorphic"))
- ctx.set ("polymorphic", poly_types_.find (t));
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- SemanticGraph::Context& ctx (c.context ());
-
- if (!ctx.count ("polymorphic"))
- {
- // First check our base.
- //
- bool pb (false);
- if (c.inherits_p ())
- {
- SemanticGraph::Type& b (c.inherits ().base ());
-
- if (!b.context ().count ("polymorphic"))
- dispatch (b);
-
- pb = b.context ().get<bool> ("polymorphic");
- }
-
- ctx.set ("polymorphic", pb || poly_types_.find (c));
- }
- }
-
- private:
- TypeNameSet& poly_types_;
- };
-
- struct FundType: Traversal::AnyType,
- Traversal::AnySimpleType,
-
- Traversal::Fundamental::Byte,
- Traversal::Fundamental::UnsignedByte,
- Traversal::Fundamental::Short,
- Traversal::Fundamental::UnsignedShort,
- Traversal::Fundamental::Int,
- Traversal::Fundamental::UnsignedInt,
- Traversal::Fundamental::Long,
- Traversal::Fundamental::UnsignedLong,
- Traversal::Fundamental::Integer,
- Traversal::Fundamental::NonPositiveInteger,
- Traversal::Fundamental::NonNegativeInteger,
- Traversal::Fundamental::PositiveInteger,
- Traversal::Fundamental::NegativeInteger,
-
- Traversal::Fundamental::Boolean,
-
- Traversal::Fundamental::Float,
- Traversal::Fundamental::Double,
- Traversal::Fundamental::Decimal,
-
- Traversal::Fundamental::String,
- Traversal::Fundamental::NormalizedString,
- Traversal::Fundamental::Token,
- Traversal::Fundamental::Name,
- Traversal::Fundamental::NameToken,
- Traversal::Fundamental::NameTokens,
- Traversal::Fundamental::NCName,
- Traversal::Fundamental::Language,
-
- Traversal::Fundamental::QName,
-
- Traversal::Fundamental::Id,
- Traversal::Fundamental::IdRef,
- Traversal::Fundamental::IdRefs,
-
- Traversal::Fundamental::AnyURI,
-
- Traversal::Fundamental::Base64Binary,
- Traversal::Fundamental::HexBinary,
-
- Traversal::Fundamental::Date,
- Traversal::Fundamental::DateTime,
- Traversal::Fundamental::Duration,
- Traversal::Fundamental::Day,
- Traversal::Fundamental::Month,
- Traversal::Fundamental::MonthDay,
- Traversal::Fundamental::Year,
- Traversal::Fundamental::YearMonth,
- Traversal::Fundamental::Time,
-
- Traversal::Fundamental::Entity,
- Traversal::Fundamental::Entities
- {
- FundType (TypeNameSet& poly_types, bool& valid)
- : poly_types_ (poly_types), valid_ (valid)
- {
- }
-
- void
- check (SemanticGraph::Type& t, bool fund)
- {
- SemanticGraph::Context& ctx (t.context ());
-
- if (poly_types_.find (t))
- {
- if (!fund)
- ctx.set ("polymorphic", true);
- else
- {
- wcerr << "error: built-in type '" << t.name () << "' cannot "
- << "be polymorphic because it is mapped to a fundamental "
- << "C++ type"
- << endl;
-
- valid_ = false;
- }
- }
- else
- ctx.set ("polymorphic", false);
- }
-
- // anyType & anySimpleType.
- //
- virtual void
- traverse (SemanticGraph::AnyType& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::AnySimpleType& t)
- {
- check (t, false);
- }
-
- // Boolean.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Boolean& t)
- {
- check (t, true);
- }
-
- // Integral types.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Byte& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedByte& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Short& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedShort& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Int& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedInt& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Long& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::UnsignedLong& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Integer& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::PositiveInteger& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NegativeInteger& t)
- {
- check (t, true);
- }
-
- // Floats.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Float& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Double& t)
- {
- check (t, true);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Decimal& t)
- {
- check (t, true);
- }
-
- // Strings.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::String& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NormalizedString& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Token& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameToken& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NameTokens& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Name& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::NCName& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Language& t)
- {
- check (t, false);
- }
-
-
- // Qualified name.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::QName& t)
- {
- check (t, false);
- }
-
-
- // ID/IDREF.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Id& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRef& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::IdRefs& t)
- {
- check (t, false);
- }
-
- // URI.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::AnyURI& t)
- {
- check (t, false);
- }
-
- // Binary.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Base64Binary& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::HexBinary& t)
- {
- check (t, false);
- }
-
-
- // Date/time.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Date& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::DateTime& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Duration& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Day& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Month& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::MonthDay& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Year& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::YearMonth& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Time& t)
- {
- check (t, false);
- }
-
- // Entity.
- //
- virtual void
- traverse (SemanticGraph::Fundamental::Entity& t)
- {
- check (t, false);
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Entities& t)
- {
- check (t, false);
- }
-
- private:
- TypeNameSet& poly_types_;
- bool& valid_;
- };
-
- struct GlobalElement: Traversal::Element
- {
- GlobalElement (TypeNameSet& poly_types,
- bool& valid,
- const WarningSet& disabled_warnings)
- : poly_types_ (poly_types), valid_ (valid), warning_ (true)
- {
- if (disabled_warnings.find ("all") != disabled_warnings.end () ||
- disabled_warnings.find ("T005") != disabled_warnings.end ())
- warning_ = false;
- }
-
- virtual void
- traverse (Type& e)
- {
- using SemanticGraph::Schema;
-
- if (!e.substitutes_p ())
- return;
-
- // If we are a substitution for some element, then mark
- // that element's type as polymorphic.
- //
- Type& r (e.substitutes ().root ());
- SemanticGraph::Type& rt (r.type ());
- SemanticGraph::Context& ctx (rt.context ());
-
- // We may need to override the previous value.
- //
- if (ctx.count ("polymorphic") && ctx.get<bool> ("polymorphic"))
- return;
-
- // Built-in types that are mapped to fundamental types cannot
- // be declared polymorphic.
- //
- bool fund (false);
- IsFundamentalType test (fund);
- test.dispatch (rt);
-
- if (fund)
- {
- wcerr << r.file () << ":" << r.line () << ":" << r.column ()
- << ": error: built-in type '" << rt.name () << "' "
- << "is mapped to a fundamental C++ type and is expected "
- << "to be polymorphic" << endl;
-
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: because type '" << rt.name () << "' is "
- << "used in a substitution group declared here" << endl;
-
- valid_ = false;
- return;
- }
-
- ctx.set ("polymorphic", true);
-
- if (!warning_)
- return;
-
- Schema& es (dynamic_cast<Schema&> (e.scope ().scope ()));
- Schema& rts (dynamic_cast<Schema&> (rt.scope ().scope ()));
-
- // If the root type and this element are in different schemas
- // and the root type is not explicitly marked as polymorphic,
- // then issue a warning.
- //
- if (&es != &rts && !sources_p (es, rts) && !poly_types_.find (rt))
- {
- wcerr << rt.file () << ":" << rt.line () << ":" << rt.column ()
- << ": warning T005: assuming type '" << rt.name () << "' "
- << "is polymorphic" << endl;
-
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: because type '" << rt.name () << "' is "
- << "used in a substitution group declared here" << endl;
-
- wcerr << rt.file () << ":" << rt.line () << ":" << rt.column ()
- << ": info: use --polymorphic-type to indicate this type "
- << "is polymorphic when compiling schemas that "
- << "reference it" << endl;
- }
- }
-
- private:
- // Return true if root sources s.
- //
- bool
- sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
- {
- using SemanticGraph::Schema;
- using SemanticGraph::Sources;
-
- for (Schema::UsesIterator i (root.uses_begin ());
- i != root.uses_end (); ++i)
- {
- if (i->is_a<Sources> ())
- {
- if (&i->schema () == &s || sources_p (i->schema (), s))
- return true;
- }
- }
-
- return false;
- }
-
- private:
- TypeNameSet& poly_types_;
- bool& valid_;
- bool warning_;
- };
-
- // Go into sourced/included/imported schemas while making sure
- // we don't process the same stuff more than once.
- //
- struct Uses: Traversal::Sources,
- Traversal::Includes,
- Traversal::Imports
- {
- Uses (char const* seen_key)
- : seen_key_ (seen_key)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Sources& sr)
- {
- SemanticGraph::Schema& s (sr.schema ());
-
- if (!s.context ().count (seen_key_))
- {
- s.context ().set (seen_key_, true);
- Traversal::Sources::traverse (sr);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Includes& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count (seen_key_))
- {
- s.context ().set (seen_key_, true);
- Traversal::Includes::traverse (i);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Imports& i)
- {
- SemanticGraph::Schema& s (i.schema ());
-
- if (!s.context ().count (seen_key_))
- {
- s.context ().set (seen_key_, true);
- Traversal::Imports::traverse (i);
- }
- }
-
- private:
- char const* seen_key_;
- };
-
- char const* pass_one_key = "cxx-tree-polymorphism-processor-seen-one";
- char const* pass_two_key = "cxx-tree-polymorphism-processor-seen-two";
-
- bool
- process_impl (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const&,
- const WarningSet& disabled_warnings)
- {
- bool valid (true);
-
- // Prepare a set of polymorphic types.
- //
-
- TypeNameSet poly_types (ops.polymorphic_type ().begin (),
- ops.polymorphic_type ().end ());
-
- // Root schema in the file-per-type mode is just a bunch
- // of includes without a namespace.
- //
- SemanticGraph::Schema::NamesIterator i (tu.names_begin ());
-
- if (i != tu.names_end () &&
- i->named ().name () == L"http://www.w3.org/2001/XMLSchema")
- {
- // XML Schema namespace.
- //
- Traversal::Schema schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundType fund_type (poly_types, valid);
-
- schema >> schema_names >> ns >> ns_names >> fund_type;
-
- schema.dispatch (tu);
- }
- else
- {
- // First handle fundamental types.
- //
- {
- Traversal::Schema schema;
- Traversal::Implies implies;
- Traversal::Schema xs_schema;
-
- schema >> implies >> xs_schema;
-
- Traversal::Names xs_schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundType fund_type (poly_types, valid);
-
- xs_schema >> xs_schema_names >> ns >> ns_names >> fund_type;
-
- schema.dispatch (tu);
- }
-
- // Note that we check first if this schema has already been
- // processed which may happen in the file-per-type compilation
- // mode.
- //
- if (!tu.context ().count (pass_two_key))
- {
- // Pass one - check substitution groups.
- //
- if (valid)
- {
- Traversal::Schema schema;
- Uses uses (pass_one_key);
-
- schema >> uses >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- GlobalElement element (poly_types, valid, disabled_warnings);
-
- schema >> schema_names >> ns >> ns_names >> element;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set (pass_one_key, true);
-
- schema.dispatch (tu);
- }
-
- // Pass two - process types.
- //
- if (valid)
- {
- Traversal::Schema schema;
- Uses uses (pass_two_key);
-
- schema >> uses >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- Type type (poly_types);
-
- schema >> schema_names >> ns >> ns_names >> type;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set (pass_two_key, true);
-
- schema.dispatch (tu);
- }
- }
- }
-
- return valid;
- }
- }
-
- bool PolymorphismProcessor::
- process (options const& ops,
- SemanticGraph::Schema& tu,
- SemanticGraph::Path const& file,
- const WarningSet& disabled_warnings)
- {
- return process_impl (ops, tu, file, disabled_warnings);
- }
- }
-}
diff --git a/xsd/cxx/tree/polymorphism-processor.hxx b/xsd/cxx/tree/polymorphism-processor.hxx
deleted file mode 100644
index 08c2502..0000000
--- a/xsd/cxx/tree/polymorphism-processor.hxx
+++ /dev/null
@@ -1,30 +0,0 @@
-// file : xsde/cxx/tree/polymorphism-processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_POLYMORPHISM_PROCESSOR_HXX
-#define CXX_TREE_POLYMORPHISM_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-
-#include <xsd.hxx>
-#include <types.hxx>
-
-#include <cxx/tree/options.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- class PolymorphismProcessor
- {
- public:
- bool
- process (options const&,
- XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file,
- const WarningSet& disabled_warnings);
- };
- }
-}
-
-#endif // CXX_TREE_POLYMORPHISM_PROCESSOR_HXX
diff --git a/xsd/cxx/tree/serialization-header.cxx b/xsd/cxx/tree/serialization-header.cxx
deleted file mode 100644
index 729d2b3..0000000
--- a/xsd/cxx/tree/serialization-header.cxx
+++ /dev/null
@@ -1,579 +0,0 @@
-// file : xsd/cxx/tree/serialization-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/serialization-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- // operator<< (xercesc::DOMElement)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (xercesc::DOMAttr)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (list_stream)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << list_stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
-
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- // operator<< (xercesc::DOMElement)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (xercesc::DOMAttr)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (list_stream)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << list_stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- // operator<< (xercesc::DOMElement)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (xercesc::DOMAttr)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (list_stream)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << list_stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- // operator<< (xercesc::DOMElement)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement&, " <<
- "const " << name << "&);"
- << endl;
-
- bool simple (true);
- {
- IsSimpleType t (simple);
- t.dispatch (c);
- }
-
- if (simple)
- {
- // operator<< (xercesc::DOMAttr)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
- "const " << name << "&);"
- << endl;
-
- // operator<< (list_stream)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << list_stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- }
- };
-
- struct ElementType: Traversal::Element,
- GlobalElementBase,
- Context
- {
- ElementType (Context& c)
- : GlobalElementBase (c), Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (doc_root_p (e))
- {
- // operator<< (xercesc::DOMElement)
- //
- os << inst_exp
- << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement&, " <<
- "const " << ename (e) << "&);"
- << endl;
- }
- }
- };
-
- struct ElementFunction: Traversal::Element,
- GlobalElementBase,
- Context
- {
- ElementFunction (Context& c)
- : GlobalElementBase (c), Context (c)
- {
- }
-
-
- virtual void
- traverse (Type& e)
- {
- if (!doc_root_p (e))
- return;
-
- String const& name (eserializer (e));
- String const& error_handler (error_handler_type);
- String const& namespace_infomap (namespace_infomap_type);
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name Serialization functions for the %" <<
- comment (e.name ()) << " document root." << endl;
-
- if (e.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (e.annotation ());
- }
-
- os << " */" << endl
- << "//@{" << endl
- << endl;
- }
-
- if (!doxygen)
- {
- os << "// Serialize to std::ostream." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a standard output stream." << endl
- << " *" << endl
- << " * @param os A standrad output stream." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param m A namespace information map." << endl
- << " * @param e A character encoding to produce XML in." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * This function uses exceptions to report " <<
- "serialization errors." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << "void" << endl
- << name << " (::std::ostream& os," << endl
- << "const " << type_name (e) << "& x, " << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a standard output stream with an " <<
- "error handler." << endl
- << " *" << endl
- << " * @param os A standrad output stream." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param eh An error handler." << endl
- << " * @param m A namespace information map." << endl
- << " * @param e A character encoding to produce XML in." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * This function reports serialization errors by " <<
- "calling the error" << endl
- << " * handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << "void" << endl
- << name << " (::std::ostream& os," << endl
- << "const " << type_name (e) << "& x, " << endl
- << error_handler << "& eh," << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a standard output stream with a " <<
- "Xerces-C++ DOM" << endl
- << " * error handler." << endl
- << " *" << endl
- << " * @param os A standrad output stream." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param eh A Xerces-C++ DOM error handler." << endl
- << " * @param m A namespace information map." << endl
- << " * @param e A character encoding to produce XML in." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * This function reports serialization errors by " <<
- "calling the error" << endl
- << " * handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << "void" << endl
- << name << " (::std::ostream& os," << endl
- << "const " << type_name (e) << "& x, " << endl
- << xerces_ns << "::DOMErrorHandler& eh," << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (!doxygen)
- {
- os << "// Serialize to xercesc::XMLFormatTarget." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a Xerces-C++ XML format target." << endl
- << " *" << endl
- << " * @param ft A Xerces-C++ XML format target." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param m A namespace information map." << endl
- << " * @param e A character encoding to produce XML in." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * This function uses exceptions to report " <<
- "serialization errors." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << "void" << endl
- << name << " (" << xerces_ns << "::XMLFormatTarget& ft," << endl
- << "const " << type_name (e) << "& x, " << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a Xerces-C++ XML format target " <<
- "with an error" << endl
- << " * handler." << endl
- << " *" << endl
- << " * @param ft A Xerces-C++ XML format target." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param eh An error handler." << endl
- << " * @param m A namespace information map." << endl
- << " * @param e A character encoding to produce XML in." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * This function reports serialization errors by " <<
- "calling the error" << endl
- << " * handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << "void" << endl
- << name << " (" << xerces_ns << "::XMLFormatTarget& ft," << endl
- << "const " << type_name (e) << "& x, " << endl
- << error_handler << "& eh," << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a Xerces-C++ XML format target " <<
- "with a" << endl
- << " * Xerces-C++ DOM error handler." << endl
- << " *" << endl
- << " * @param ft A Xerces-C++ XML format target." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param eh A Xerces-C++ DOM error handler." << endl
- << " * @param m A namespace information map." << endl
- << " * @param e A character encoding to produce XML in." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * This function reports serialization errors by " <<
- "calling the error" << endl
- << " * handler." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << "void" << endl
- << name << " (" << xerces_ns << "::XMLFormatTarget& ft," << endl
- << "const " << type_name (e) << "& x, " << endl
- << xerces_ns << "::DOMErrorHandler& eh," << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (!doxygen)
- {
- os << "// Serialize to an existing xercesc::DOMDocument." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to an existing Xerces-C++ DOM document." << endl
- << " *" << endl
- << " * @param d A Xerces-C++ DOM document." << endl
- << " * @param x An object model to serialize." << endl
- << " * @param f Serialization flags." << endl
- << " *" << endl
- << " * Note that it is your responsibility to create the " <<
- "DOM document" << endl
- << " * with the correct root element as well as set the " <<
- "necessary" << endl
- << " * namespace mapping attributes." << endl
- << " */" << endl;
- }
- os << inst_exp
- << "void" << endl
- << name << " (" << xerces_ns << "::DOMDocument& d," << endl
- << "const " << type_name (e) << "& x," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (!doxygen)
- {
- os << "// Serialize to a new xercesc::DOMDocument." << endl
- << "//" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Serialize to a new Xerces-C++ DOM document." << endl
- << " *" << endl
- << " * @param x An object model to serialize." << endl
- << " * @param m A namespace information map." << endl
- << " * @param f Serialization flags." << endl
- << " * @return A pointer to the new Xerces-C++ DOM document." << endl
- << " */" << endl;
- }
-
- os << inst_exp
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument >" << endl
- << name << " (const " << type_name (e) << "& x, " << endl
- << "const " << namespace_infomap << "& m = " <<
- namespace_infomap << " ()," << endl
- << flags_type << " f = 0);"
- << endl;
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
- }
-
- private:
- String
- type_name (Type& e)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (e.type ());
-
- return o.str ();
- }
- };
-
- }
-
- void
- generate_serialization_header (Context& ctx)
- {
- bool elemen_type (ctx.options.generate_element_type ());
-
- if (!elemen_type)
- ctx.os << "#include <iosfwd>" << endl
- << endl
- << "#include <xercesc/dom/DOMDocument.hpp>" << endl
- << "#include <xercesc/dom/DOMErrorHandler.hpp>" << endl
- << "#include <xercesc/framework/XMLFormatter.hpp>" << endl
- << endl
- << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl
- << endl;
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
- ElementType element_type (ctx);
- ElementFunction element_function (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- if (elemen_type)
- names >> element_type;
- else
- names >> element_function;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/serialization-header.hxx b/xsd/cxx/tree/serialization-header.hxx
deleted file mode 100644
index beef6c8..0000000
--- a/xsd/cxx/tree/serialization-header.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/serialization-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_SERIALIZATION_HEADER_HXX
-#define CXX_TREE_SERIALIZATION_HEADER_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_serialization_header (Context&);
- }
-}
-
-#endif // CXX_TREE_SERIALIZATION_HEADER_HXX
diff --git a/xsd/cxx/tree/serialization-source.cxx b/xsd/cxx/tree/serialization-source.cxx
deleted file mode 100644
index aa6f1ef..0000000
--- a/xsd/cxx/tree/serialization-source.cxx
+++ /dev/null
@@ -1,1468 +0,0 @@
-// file : xsd/cxx/tree/serialization-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/serialization-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- enum schema_type
- {
- st_other,
- st_double,
- st_decimal
- };
-
- enum schema_type
- schema_type (SemanticGraph::Type& t)
- {
- if (t.is_a<SemanticGraph::Fundamental::Double> ())
- return st_double;
- else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
- return st_decimal;
- else
- return st_other;
- }
-
-
- //
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String base (L"::xsd::cxx::tree::list< " +
- item_type_name (item_type) + L", " + char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base += L" >";
-
- // operator<< (xercesc::DOMElement)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
- "const " << name << "& i)"
- << "{"
- << "e << static_cast< const " << base << "& > (i);"
- << "}";
-
- // operator<< (xercesc::DOMAttr)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr& a, " <<
- "const " << name << "& i)"
- << "{"
- << "a << static_cast< const " << base << "& > (i);"
- << "}";
-
- // operator<< (list_stream)
- //
- os << "void" << endl
- << "operator<< (" << list_stream_type << "& l," << endl
- << "const " << name << "& i)"
- << "{"
- << "l << static_cast< const " << base << "& > (i);"
- << "}";
-
- // Register with type factory map. If this type is anonymous
- // but substitutes, then it will be registered as part of the
- // substitution registration.
- //
- if (polymorphic && polymorphic_p (l) && !anonymous_p (l))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (l));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_serializer_init (" << endl
- << strlit (l.name ()) << "," << endl
- << strlit (xml_ns_name (l)) << ");"
- << endl
- << endl;
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- String const& base (xs_string_type);
-
- // operator<< (xercesc::DOMElement)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
- "const " << name << "& i)"
- << "{"
- << "e << static_cast< const " << base << "& > (i);"
- << "}";
-
- // operator<< (xercesc::DOMAttr)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr& a, " <<
- "const " << name << "& i)"
- << "{"
- << "a << static_cast< const " << base << "& > (i);"
- << "}";
-
- // operator<< (list_stream)
- //
- os << "void" << endl
- << "operator<< (" << list_stream_type << "& l," << endl
- << "const " << name << "& i)"
- << "{"
- << "l << static_cast< const " << base << "& > (i);"
- << "}";
-
- // Register with type factory map. If this type is anonymous
- // but substitutes, then it will be registered as part of the
- // substitution registration.
- //
- if (polymorphic && polymorphic_p (u) && !anonymous_p (u))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (u));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_serializer_init (" << endl
- << strlit (u.name ()) << "," << endl
- << strlit (xml_ns_name (u)) << ");"
- << endl
- << endl;
- }
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c), base_ (c)
- {
- inherits_base_ >> base_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- // operator<< (xercesc::DOMElement)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
- "const " << name << "& i)"
- << "{"
- << "e << static_cast< const ";
-
- inherits (e, inherits_base_);
-
- os << "& > (i);"
- << "}";
-
-
- // operator<< (xercesc::DOMAttr)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr& a, " <<
- "const " << name << "& i)"
- << "{"
- << "a << static_cast< const ";
-
- inherits (e, inherits_base_);
-
- os << "& > (i);"
- << "}";
-
-
- // operator<< (list_stream)
- //
- os << "void" << endl
- << "operator<< (" << list_stream_type << "& l," << endl
- << "const " << name << "& i)"
- << "{"
- << "l << static_cast< const ";
-
- inherits (e, inherits_base_);
-
- os << "& > (i);"
- << "}";
-
-
- // Register with type factory map. If this type is anonymous
- // but substitutes, then it will be registered as part of the
- // substitution registration.
- //
- if (polymorphic && polymorphic_p (e) && !anonymous_p (e))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (e));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_serializer_init (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (xml_ns_name (e)) << ");"
- << endl
- << endl;
- }
- }
-
- private:
- Traversal::Inherits inherits_base_;
- BaseTypeName base_;
- };
-
- struct Element: Traversal::Element, Context
- {
- Element (Context& c, String const& scope_)
- : Context (c), scope (scope_)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (e.scope ()));
-
- bool ordered (ordered_p (c));
-
- String const& aname (eaname (e));
- String ns (e.qualified_p () ? e.namespace_ ().name () : "");
- String type (scope + L"::" + etype (e));
-
- // Check if we need to handle xsi:type and substitution groups.
- // If this element's type is anonymous then we don't need to do
- // anything. Note that if the type is anonymous then it can't be
- // derived from which makes it impossible to substitute or
- // dynamically-type with xsi:type.
- //
- SemanticGraph::Type& t (e.type ());
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- os << "// " << comment (e.name ()) << endl
- << "//" << endl;
-
- if (ordered)
- os << "case " << scope << "::" <<
- e.context ().get<String> ("ordered-id-name") << ":"
- << "{";
-
- if (poly)
- {
- os << (ordered ? "" : "{")
- << "::xsd::cxx::tree::type_serializer_map< " << char_type
- << " >& tsm (" << endl
- << "::xsd::cxx::tree::type_serializer_map_instance< " <<
- poly_plate << ", " << char_type << " > ());"
- << endl;
- }
-
- if (max (e) != 1)
- {
- // sequence
- //
- if (ordered)
- os << "const " << type << "& x (i." << aname <<
- " ()[b->index]);"
- << endl;
- else
- os << "for (" << scope << "::" << econst_iterator (e) << endl
- << "b (i." << aname << " ().begin ()), " <<
- "n (i." << aname << " ().end ());" << endl
- << "b != n; ++b)"
- << "{";
-
- char const* x (ordered ? "x" : "*b");
-
- if (poly)
- {
- os << "if (typeid (" << type << ") == typeid (" << x << "))"
- << "{"
- << xerces_ns << "::DOMElement& s (" << endl
- << "::xsd::cxx::xml::dom::create_element (" << endl
- << strlit (e.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl
- << "s << " << x << ";"
- << "}"
- << "else" << endl
- << "tsm.serialize (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (ns) << "," << endl
- << (e.global_p () ? "true" : "false") << ", " <<
- (e.qualified_p () ? "true" : "false") << ", e, " << x << ");";
- }
- else
- {
- os << xerces_ns << "::DOMElement& s (" << endl
- << "::xsd::cxx::xml::dom::create_element (" << endl
- << strlit (e.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl;
-
- switch (schema_type (t))
- {
- case st_other:
- {
- os << "s << " << x << ";";
- break;
- }
- case st_double:
- {
- os << "s << " << as_double_type << " (" << x << ");";
- break;
- }
- case st_decimal:
- {
- os << "s << " << as_decimal_type << " (" << x << ");";
- break;
- }
- }
- }
- }
- else if (min (e) == 0)
- {
- // optional
- //
- if (!ordered)
- os << "if (i." << aname << " ())"
- << "{";
-
- if (poly)
- {
- os << "const " << type << "& x (*i." << aname << " ());"
- << "if (typeid (" << type << ") == typeid (x))"
- << "{"
- << xerces_ns << "::DOMElement& s (" << endl
- << "::xsd::cxx::xml::dom::create_element (" << endl
- << strlit (e.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl
- << "s << x;"
- << "}"
- << "else" << endl
- << "tsm.serialize (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (ns) << "," << endl
- << (e.global_p () ? "true" : "false") << ", " <<
- (e.qualified_p () ? "true" : "false") << ", e, x);";
- }
- else
- {
- os << xerces_ns << "::DOMElement& s (" << endl
- << "::xsd::cxx::xml::dom::create_element (" << endl
- << strlit (e.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl;
-
- switch (schema_type (t))
- {
- case st_other:
- {
- os << "s << *i." << aname << " ();";
- break;
- }
- case st_double:
- {
- os << "s << " << as_double_type << "(*i." << aname << " ());";
- break;
- }
- case st_decimal:
- {
- os << "s << " << as_decimal_type << "(*i." << aname << " ());";
- break;
- }
- }
- }
- }
- else
- {
- // one
- //
- if (poly)
- {
- os << "const " << type << "& x (i." << aname << " ());"
- << "if (typeid (" << type << ") == typeid (x))"
- << "{"
- << xerces_ns << "::DOMElement& s (" << endl
- << "::xsd::cxx::xml::dom::create_element (" << endl
- << strlit (e.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl
- << "s << x;"
- << "}"
- << "else" << endl
- << "tsm.serialize (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (ns) << "," << endl
- << (e.global_p () ? "true" : "false") << ", " <<
- (e.qualified_p () ? "true" : "false") << ", e, x);";
- }
- else
- {
- if (!ordered)
- os << "{";
-
- os << xerces_ns << "::DOMElement& s (" << endl
- << "::xsd::cxx::xml::dom::create_element (" << endl
- << strlit (e.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl;
-
- switch (schema_type (t))
- {
- case st_other:
- {
- os << "s << i." << aname << " ();";
- break;
- }
- case st_double:
- {
- os << "s << " << as_double_type << "(i." << aname << " ());";
- break;
- }
- case st_decimal:
- {
- os << "s << " << as_decimal_type << "(i." << aname << " ());";
- break;
- }
- }
- }
- }
-
- if (ordered)
- {
- // See comment for bool text (false); below.
- //
- if (mixed_p (c) && c.context ().get<size_t> ("ordered-start") != 1)
- os << "text = true;";
-
- os << "continue;"
- << "}";
- }
- else
- {
- os << "}";
-
- if (poly && (max (e) != 1 || min (e) == 0))
- os << "}"; // There is no extra block for poly one.
- }
- }
-
- private:
- String scope;
- };
-
- struct Any: Traversal::Any, Context
- {
- Any (Context& c, String const& scope_)
- : Context (c), scope (scope_)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
-
- bool ordered (ordered_p (c));
-
- String const& aname (eaname (a));
-
- os << "// " << ename (a) << endl
- << "//" << endl;
-
- if (ordered)
- os << "case " << scope << "::" <<
- a.context ().get<String> ("ordered-id-name") << ":";
-
- if (max (a) != 1)
- {
- // sequence
- //
- if (!ordered)
- os << "for (" << scope << "::" << econst_iterator (a) << endl
- << "b (i." << aname << " ().begin ()), " <<
- "n (i." << aname << " ().end ());" << endl
- << "b != n; ++b)";
-
- os << "{"
- << "e.appendChild (" << endl
- << "e.getOwnerDocument ()->importNode (" << endl
- << "const_cast< " << xerces_ns <<
- "::DOMElement* > (&(" <<
- (ordered ? (L"i." + aname + L" ()[b->index]") : L"*b") <<
- ")), true));";
- }
- else if (min (a) == 0)
- {
- // optional
- //
- if (!ordered)
- os << "if (i." << aname << " ())";
-
- os << "{"
- << "e.appendChild (" << endl
- << "e.getOwnerDocument ()->importNode (" << endl
- << "const_cast< " << xerces_ns << "::DOMElement* > (&(*i." <<
- aname << " ())), true));";
- }
- else
- {
- // one
- //
- if (ordered)
- os << "{";
-
- os << "e.appendChild (" << endl
- << "e.getOwnerDocument ()->importNode (" << endl
- << "const_cast< " << xerces_ns << "::DOMElement* > (&(i." <<
- aname << " ())), true));"
- << endl;
- }
-
- if (ordered)
- {
- // See comment for bool text (false); below.
- //
- if (mixed_p (c) && c.context ().get<size_t> ("ordered-start") != 1)
- os << "text = true;";
-
- os << "continue;";
- }
-
- if (ordered || max (a) != 1 || min (a) == 0)
- os << "}";
- }
-
- private:
- String scope;
- };
-
- struct Attribute: Traversal::Attribute, Context
- {
- Attribute (Context& c, String const& scope_)
- : Context (c), scope (scope_)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& aname (eaname (a));
- String ns (a.qualified_p () ? a.namespace_ ().name () : "");
-
- os << "// " << comment (a.name ()) << endl
- << "//" << endl;
-
- if (a.optional_p () && !a.default_p ())
- {
- os << "if (i." << aname << " ())"
- << "{"
- << xerces_ns << "::DOMAttr& a (" << endl
- << "::xsd::cxx::xml::dom::create_attribute (" << endl
- << strlit (a.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl;
-
- switch (schema_type (a.type ()))
- {
- case st_other:
- {
- os << "a << *i." << aname << " ();";
- break;
- }
- case st_double:
- {
- os << "a << " << as_double_type << "(*i." << aname << " ());";
- break;
- }
- case st_decimal:
- {
- os << "a << " << as_decimal_type << "(*i." << aname << " ());";
- break;
- }
- }
-
- os << "}";
- }
- else
- {
- // Make sure we serialize required fixed attributes.
- //
- if (a.optional_p () && options.omit_default_attributes ())
- {
- os << "if (i." << aname << " () != " << scope <<
- "::" << edefault_value (a) << " ())";
- }
-
- os << "{"
- << xerces_ns << "::DOMAttr& a (" << endl
- << "::xsd::cxx::xml::dom::create_attribute (" << endl
- << strlit (a.name ()) << "," << endl
- << (ns ? strlit (ns) + L",\n" : L"")
- << "e));"
- << endl;
-
- switch (schema_type (a.type ()))
- {
- case st_other:
- {
- os << "a << i." << aname << " ();";
- break;
- }
- case st_double:
- {
- os << "a << " << as_double_type << "(i." << aname << " ());";
- break;
- }
- case st_decimal:
- {
- os << "a << " << as_decimal_type << "(i." << aname << " ());";
- break;
- }
- }
-
- os << "}";
- }
- }
-
- private:
- String scope;
- };
-
- struct AnyAttribute: Traversal::AnyAttribute, Context
- {
- AnyAttribute (Context& c, String const& scope_)
- : Context (c), scope (scope_)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& aname (eaname (a));
-
- os << "// " << ename (a) << endl
- << "//" << endl;
-
- os << "for (" << scope << "::" << econst_iterator (a) << endl
- << "b (i." << aname << " ().begin ()), " <<
- "n (i." << aname << " ().end ());" << endl
- << "b != n; ++b)"
- << "{"
- << xerces_ns << "::DOMAttr* a (" << endl
- << "static_cast< " << xerces_ns << "::DOMAttr* > (" << endl
- << "e.getOwnerDocument ()->importNode (" << endl
- << "const_cast< " << xerces_ns << "::DOMAttr* > (&(*b)), true)));"
- << endl
- << "if (a->getLocalName () == 0)" << endl
- << "e.setAttributeNode (a);"
- << "else" << endl
- << "e.setAttributeNodeNS (a);"
- << "}";
- }
-
- private:
- String scope;
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c), base_ (c)
- {
- inherits_ >> base_;
- }
-
- virtual void
- traverse (Type& c)
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- // operator<< (xercesc::DOMElement)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
- "const " << name << "& i)"
- << "{";
-
- if (c.inherits_p ())
- {
- os << "e << static_cast< const ";
- inherits (c, inherits_);
- os << "& > (i);"
- << endl;
- }
- else
- os << "e << static_cast< const " << any_type << "& > (i);"
- << endl;
-
- // Serialize anyAttribute content first so that is gets
- // overriden by schema-defined attributes.
- //
- if (options.generate_wildcard ())
- {
- AnyAttribute any_attribute (*this, name);
- Traversal::Names names (any_attribute);
-
- Complex::names (c, names);
- }
-
- {
- bool o (ordered_p (c));
- size_t start, count;
-
- if (o)
- {
- start = ctx.get<size_t> ("ordered-start");
- count = ctx.get<size_t> ("ordered-count");
-
- if (start != count)
- {
- String const& ci (ctx.get<String> ("order-const-iterator"));
- String const& an (ctx.get<String> ("order-aname"));
-
- // If we have mixed content and a base, then we have to
- // skip the text content until we serialize one of "our"
- // elements.
- //
- if (mixed_p (c) && start != 1)
- os << "bool text (false);"
- << endl;
-
- os << "for (" << name << "::" << ci << endl
- << "b (i." << an << " ().begin ()), n (i." << an <<
- " ().end ());" << endl
- << "b != n; ++b)"
- << "{"
- << "switch (b->id)"
- << "{";
- }
- }
-
- Traversal::Names names;
- Any any (*this, name);
- Element element (*this, name);
-
- names >> element;
-
- if (options.generate_wildcard ())
- names >> any;
-
- Complex::names (c, names);
-
- if (o)
- {
- if (start != count)
- {
- if (mixed_p (c))
- {
- //@@ propagate mixed-ordered-id to derived
-
- os << "// text_content" << endl
- << "//" << endl
- << "case " << name << "::" <<
- ctx.get<String> ("mixed-ordered-id-name") << ":"
- << "{";
-
- // See the comment above.
- //
- if (start != 1)
- os << "if (text)" << endl;
-
- os << "e.appendChild (" << endl
- << "e.getOwnerDocument ()->createTextNode (" << endl
- << "::xsd::cxx::xml::string (" << endl
- << "i." << ctx.get<String> ("mixed-aname") <<
- " ()[b->index].c_str ()).c_str ()));";
-
- // os << "e << i." << ctx.get<String> ("mixed-aname") <<
- // " ()[b->index];";
-
- os << "continue;"
- << "}";
- }
-
- // Ignore content before our id range and stop serializing
- // if we see anything past. This handles inheritance.
- //
- os << "default:"
- << "{";
-
- if (start != 1)
- os << "if (b->id < " << start << "UL)" << endl
- << "continue;";
-
- os << "break;" // Stop (see break below).
- << "}";
-
- os << "}" // switch
- << "break;" // Unknown element past our elements.
- << "}"; // for
- }
- }
- }
-
- {
- Attribute attribute (*this, name);
- Traversal::Names names (attribute);
- Complex::names (c, names);
- }
-
- os << "}";
-
- bool simple (true);
- {
- IsSimpleType t (simple);
- t.dispatch (c);
- }
-
- if (simple)
- {
- bool hb (c.inherits_p ());
-
- // operator<< (xercesc::DOMAttr)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMAttr&" <<
- (hb ? " a" : "") << ", " <<
- "const " << name << "&" << (hb ? " i" : "") << ")"
- << "{";
-
- if (hb)
- {
- os << "a << static_cast< const ";
-
- inherits (c, inherits_);
-
- os << "& > (i);";
- }
-
- os << "}";
-
-
- // operator<< (list_stream)
- //
- os << "void" << endl
- << "operator<< (" << list_stream_type << "&" <<
- (hb ? " l" : "") << "," << endl
- << "const " << name << "&" << (hb ? " i" : "") << ")"
- << "{";
-
- if (hb)
- {
- os << "l << static_cast< const ";
-
- inherits (c, inherits_);
-
- os << "& > (i);";
- }
-
- os << "}";
- }
-
- // Register with type factory map. If this type is anonymous
- // but substitutes, then it will be registered as part of the
- // substitution registration.
- //
- if (polymorphic &&
- polymorphic_p (c) &&
- !c.abstract_p () &&
- !anonymous_p (c))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (c));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_serializer_init (" << endl
- << strlit (c.name ()) << "," << endl
- << strlit (xml_ns_name (c)) << ");"
- << endl
- << endl;
- }
- }
-
- private:
- Traversal::Inherits inherits_;
- BaseTypeName base_;
- };
-
-
- // Generate substitution group map entry.
- //
- struct GlobalElement: Traversal::Element,
- GlobalElementBase,
- Context
- {
- GlobalElement (Context& c)
- : GlobalElementBase (c), Context (c), type_name_ (c)
- {
- belongs_ >> type_name_;
- }
-
- virtual void
- traverse (Type& e)
- {
- if (polymorphic && e.substitutes_p ())
- {
- Type& r (e.substitutes ().root ());
-
- String const& name (ename (e));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::element_serializer_initializer< " <<
- poly_plate << ", " << char_type << ", ";
-
- belongs (e, belongs_);
-
- os << " >" << endl
- << "_xsd_" << name << "_element_serializer_init (" << endl
- << strlit (r.name ()) << "," << endl
- << strlit (r.namespace_ ().name ()) << "," << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_ ().name ()) << ");"
- << endl
- << endl;
- }
- }
-
- private:
- Traversal::Belongs belongs_;
- MemberTypeName type_name_;
-
- };
-
- struct ElementType: Traversal::Element,
- GlobalElementBase,
- Context
- {
- ElementType (Context& c)
- : GlobalElementBase (c),
- Context (c),
- element_map_ (c.options.generate_element_map ())
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (doc_root_p (e))
- {
- String const& name (ename (e));
-
- // operator<< (xercesc::DOMElement)
- //
- os << "void" << endl
- << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
- "const " << name << "& i)"
- << "{"
- << "e << i." << eaname (e) << " ();"
- << "}";
-
- // Element map registration.
- //
- if (element_map_)
- {
- SemanticGraph::Context& ec (e.context ());
- String const& aname (ec.get<String> ("element-name"));
- String const& ans (ec.get<String> ("element-ns"));
-
- os << "static " << endl
- << "const ::xsd::cxx::tree::serializer_init< " <<
- name << ", " << char_type << ", " << any_type << " >" << endl
- << "_xsd_" << name << "_serializer_init (" <<
- name << "::" << aname << " (), " <<
- name << "::" << ans << " ());"
- << endl;
- }
- }
- }
-
- private:
- bool element_map_;
- };
-
- struct ElementFunction: Traversal::Element,
- GlobalElementBase,
- Context
- {
- ElementFunction (Context& c)
- : GlobalElementBase (c), Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (!doc_root_p (e))
- return;
-
- String const& name (eserializer (e));
- String ns (e.namespace_ ().name ());
- String const& error_handler (error_handler_type);
- String const& namespace_infomap (namespace_infomap_type);
-
- SemanticGraph::Type& type (e.type ());
-
- // Note that I am using fq-name in function calls because g++ gets
- // confused if the name is 'type'. (see tests/schema/anonymous)
- //
-
- // Check if we need to handle xsi:type and substitution groups.
- // If this element's type is anonymous then we don't need to do
- // anything.
- //
- bool poly (polymorphic &&
- polymorphic_p (type) &&
- !anonymous_p (type));
-
- // To std::ostream.
- //
- os << "void" << endl
- << name << " (::std::ostream& o," << endl
- << "const " << type_name (e) << "& s," << endl
- << "const " << namespace_infomap << "& m," << endl
- << "const " << string_type << "& e," << endl
- << flags_type << " f)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0);"
- << endl
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << fq_name (e, "serializer") << " (s, m, f));"
- << endl
- << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
- << endl
- << "::xsd::cxx::xml::dom::ostream_format_target t (o);"
- << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
- << "{"
- << "h.throw_if_failed< ::xsd::cxx::tree::serialization< " <<
- char_type << " > > ();"
- << "}"
- << "}";
-
- os << "void" << endl
- << name << " (::std::ostream& o," << endl
- << "const " << type_name (e) << "& s," << endl
- << error_handler << "& h," << endl
- << "const " << namespace_infomap << "& m," << endl
- << "const " << string_type << "& e," << endl
- << flags_type << " f)"
- << "{"
- << "::xsd::cxx::xml::auto_initializer i (" << endl
- << "(f & " << flags_type << "::dont_initialize) == 0);"
- << endl
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << fq_name (e, "serializer") << " (s, m, f));"
- << "::xsd::cxx::xml::dom::ostream_format_target t (o);"
- << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
- << "{"
- << "throw ::xsd::cxx::tree::serialization< " <<
- char_type << " > ();"
- << "}"
- << "}";
-
- os << "void" << endl
- << name << " (::std::ostream& o," << endl
- << "const " << type_name (e) << "& s," << endl
- << xerces_ns << "::DOMErrorHandler& h," << endl
- << "const " << namespace_infomap << "& m," << endl
- << "const " << string_type << "& e," << endl
- << flags_type << " f)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << fq_name (e, "serializer") << " (s, m, f));"
- << "::xsd::cxx::xml::dom::ostream_format_target t (o);"
- << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
- << "{"
- << "throw ::xsd::cxx::tree::serialization< " <<
- char_type << " > ();"
- << "}"
- << "}";
-
- // To XMLFormatTarget.
- //
- os << "void" << endl
- << name << " (" << xerces_ns << "::XMLFormatTarget& t," << endl
- << "const " << type_name (e) << "& s," << endl
- << "const " << namespace_infomap << "& m," << endl
- << "const " << string_type << "& e," << endl
- << flags_type << " f)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << fq_name (e, "serializer") << " (s, m, f));"
- << endl
- << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
- << endl
- << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
- << "{"
- << "h.throw_if_failed< ::xsd::cxx::tree::serialization< " <<
- char_type << " > > ();"
- << "}"
- << "}";
-
- os << "void" << endl
- << name << " (" << xerces_ns << "::XMLFormatTarget& t," << endl
- << "const " << type_name (e) << "& s," << endl
- << error_handler << "& h," << endl
- << "const " << namespace_infomap << "& m," << endl
- << "const " << string_type << "& e," << endl
- << flags_type << " f)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << fq_name (e, "serializer") << " (s, m, f));"
- << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
- << "{"
- << "throw ::xsd::cxx::tree::serialization< " <<
- char_type << " > ();"
- << "}"
- << "}";
-
- os << "void" << endl
- << name << " (" << xerces_ns << "::XMLFormatTarget& t," << endl
- << "const " << type_name (e) << "& s," << endl
- << xerces_ns << "::DOMErrorHandler& h," << endl
- << "const " << namespace_infomap << "& m," << endl
- << "const " << string_type << "& e," << endl
- << flags_type << " f)"
- << "{"
- << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << fq_name (e, "serializer") << " (s, m, f));"
- << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
- << "{"
- << "throw ::xsd::cxx::tree::serialization< " <<
- char_type << " > ();"
- << "}"
- << "}";
-
- // To an existing DOM instance.
- //
- os << "void" << endl
- << name << " (" << xerces_ns << "::DOMDocument& d," << endl
- << "const " << type_name (e) << "& s," << endl
- << flags_type << ")"
- << "{"
- << xerces_ns << "::DOMElement& e (*d.getDocumentElement ());"
- << "const " << qname_type << " n (" << endl
- << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
- << endl;
-
- if (poly)
- {
- os << "if (typeid (" << type_name (e) << ") == typeid (s))"
- << "{";
- }
-
- os << "if (n.name () == " << strlit (e.name ()) << " &&" << endl
- << "n.namespace_ () == " << strlit (ns) << ")"
- << "{";
-
- switch (schema_type (type))
- {
- case st_other:
- {
- os << "e << s;";
- break;
- }
- case st_double:
- {
- os << "e << " << as_double_type << "(s);";
- break;
- }
- case st_decimal:
- {
- os << "e << " << as_decimal_type << "(s);";
- break;
- }
- }
-
- os << "}"
- << "else"
- << "{"
- << "throw ::xsd::cxx::tree::unexpected_element < " <<
- char_type << " > (" << endl
- << "n.name ()," << endl
- << "n.namespace_ ()," << endl
- << strlit (e.name ()) << "," << endl
- << strlit (ns) << ");"
- << "}";
-
- if (poly)
- {
- os << "}"
- << "else"
- << "{"
- << "::xsd::cxx::tree::type_serializer_map_instance< " <<
- poly_plate << ", " << char_type << " > ().serialize (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_().name ()) << "," << endl
- << "e, n, s);"
- << "}";
- }
-
- os << "}";
-
-
- // To a new DOM instance.
- //
- os << dom_auto_ptr << "< " << xerces_ns << "::DOMDocument >" << endl
- << name << " (const " << type_name (e) << "& s," << endl
- << "const " << namespace_infomap << "& m," << endl
- << flags_type << " f)"
- << "{";
-
- if (poly)
- {
- os << dom_auto_ptr << "< " << xerces_ns << "::DOMDocument > d;"
- << endl
- << "if (typeid (" << type_name (e) << ") == typeid (s))"
- << "{"
- << "d = ::xsd::cxx::xml::dom::serialize< " <<
- char_type << " > (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (ns) << "," << endl
- << "m, f);"
- << "}"
- << "else"
- << "{"
- << "d = ::xsd::cxx::tree::type_serializer_map_instance< " <<
- poly_plate << ", " << char_type << " > ().serialize (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_().name ()) << "," << endl
- << "m, s, f);"
- << "}";
- }
- else
- {
- os << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > d (" << endl
- << "::xsd::cxx::xml::dom::serialize< " <<
- char_type << " > (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (ns) << "," << endl
- << "m, f));"
- << endl;
- }
-
- os << fq_name (e, "serializer") << " (*d, s, f);"
- << "return d;"
- << "}";
-
- }
-
- private:
- String
- type_name (Type& e)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (e.type ());
-
- return o.str ();
- }
- };
- }
-
- void
- generate_serialization_source (Context& ctx, size_t first, size_t last)
- {
- bool elemen_type (ctx.options.generate_element_type ());
-
- if (!elemen_type)
- ctx.os << "#include <ostream>" << endl
- << "#include <xsd/cxx/tree/error-handler.hxx>" << endl;
-
- ctx.os << "#include <xsd/cxx/xml/dom/serialization-source.hxx>" << endl
- << endl;
-
- if (ctx.polymorphic)
- {
- ctx.os << "#include <xsd/cxx/tree/type-serializer-map.hxx>" << endl
- << endl;
-
- bool import_maps (ctx.options.import_maps ());
- bool export_maps (ctx.options.export_maps ());
-
- if (import_maps || export_maps)
- {
- ctx.os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{"
- << "namespace tree"
- << "{"
- << "#ifdef _MSC_VER" << endl;
-
- if (export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "type_serializer_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "type_serializer_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
- << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "type_serializer_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
- << "template struct XSD_MAP_VISIBILITY " <<
- "type_serializer_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#endif" << endl
- << "}" // tree
- << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
- }
-
- ctx.os << "namespace _xsd"
- << "{"
- << "static" << endl
- << "const ::xsd::cxx::tree::type_serializer_plate< " <<
- ctx.poly_plate << ", " << ctx.char_type << " >" << endl
- << "type_serializer_plate_init;"
- << "}";
- }
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx, first, last);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
- GlobalElement element (ctx);
- ElementType element_type (ctx);
- ElementFunction element_function (ctx);
-
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
- names >> element;
-
- if (elemen_type)
- names >> element_type;
- else
- names >> element_function;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/serialization-source.hxx b/xsd/cxx/tree/serialization-source.hxx
deleted file mode 100644
index 7580cf8..0000000
--- a/xsd/cxx/tree/serialization-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/serialization-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_SERIALIZATION_SOURCE_HXX
-#define CXX_TREE_SERIALIZATION_SOURCE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_serialization_source (Context&, size_t first, size_t last);
- }
-}
-
-#endif // CXX_TREE_SERIALIZATION_SOURCE_HXX
diff --git a/xsd/cxx/tree/stream-extraction-source.cxx b/xsd/cxx/tree/stream-extraction-source.cxx
deleted file mode 100644
index a5b195b..0000000
--- a/xsd/cxx/tree/stream-extraction-source.cxx
+++ /dev/null
@@ -1,864 +0,0 @@
-// file : xsd/cxx/tree/stream-extraction-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/stream-extraction-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String base (L"::xsd::cxx::tree::list< " +
- item_type_name (item_type) + L", " + char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base += L" >";
-
- size_t n (0);
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ());
- i != st.end (); ++i)
- {
- os << name << "::" << endl
- << name << " (" << istream_type << "< " <<
- i->c_str () << " >& s," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << any_simple_type << " (s, f, c)," << endl
- << " " << base << " (s, f, this)"
- << "{"
- << "}";
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (l) &&
- (!anonymous_p (l) || anonymous_substitutes_p (l)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (l));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_extraction_init_" <<
- n++ << " (" << endl
- << strlit (l.name ()) << "," << endl
- << strlit (xml_ns_name (l)) << ");"
- << endl;
- }
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- String const& base (xs_string_type);
-
- size_t n (0);
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- os << name << "::" << endl
- << name << " (" << istream_type << "< " <<
- i->c_str () << " >& s," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (s, f, c)"
- << "{"
- << "}";
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (u) &&
- (!anonymous_p (u) || anonymous_substitutes_p (u)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (u));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_extraction_init_" <<
- n++ << " (" << endl
- << strlit (u.name ()) << "," << endl
- << strlit (xml_ns_name (u)) << ");"
- << endl;
- }
- }
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c), base_ (c)
- {
- inherits_base_ >> base_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- bool enum_based (false);
- if (string_based)
- {
- SemanticGraph::Enumeration* base_enum (0);
- IsEnumBasedType t (base_enum);
- t.dispatch (e);
-
- enum_based = (base_enum != 0);
- }
-
- String value;
- if (string_based)
- value = evalue (e);
-
- size_t n (0);
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- os << name << "::" << endl
- << name << " (" << istream_type << "< " <<
- i->c_str () << " >& s," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": ";
-
- inherits (e, inherits_base_);
-
- if (string_based && !enum_based)
- {
- // Use copy c-tor to pass the flags and container.
- //
- os << " (" << endl;
- inherits (e, inherits_base_);
- os << " (_xsd_" << name << "_literals_[s.read_uint ()]), f, c)";
- }
- else
- os << " (s, f, c)";
-
- os << "{";
-
- if (string_based)
- os << "_xsd_" << name << "_convert ();";
-
- os << "}";
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (e) &&
- (!anonymous_p (e) || anonymous_substitutes_p (e)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (e));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_extraction_init_" <<
- n++ << " (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (xml_ns_name (e)) << ");"
- << endl;
- }
- }
- }
-
- private:
- Traversal::Inherits inherits_base_;
- BaseTypeName base_;
- };
-
- struct CtorMember: Traversal::Member, Context
- {
- CtorMember (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- if (skip (m))
- return;
-
- os << "," << endl
- << " " << emember (m) << " (this)";
- }
- };
-
- struct CtorAny: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- CtorAny (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
- };
-
- struct Element: Traversal::Element, Context
- {
- Element (Context& c, String const& stream_)
- : Context (c), stream (stream_)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- String const& member (emember (e));
-
- SemanticGraph::Type& t (e.type ());
- String type (etype (e));
- String tr (etraits (e)); // traits type name
-
- bool fund (false);
- {
- IsFundamentalType traverser (fund);
- traverser.dispatch (t);
- }
-
- // Figure out if we need to generate polymorphic code. If this
- // elemen's type is anonymous then we don't need to do anything.
- // Note that if the type is anonymous then it can't be derived
- // from which makes it impossible to substitute or dynamically-
- // type with xsi:type.
- //
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- // Check if this element is abstract.
- //
- bool abst (false);
- if (poly)
- {
- SemanticGraph::Complex* tc;
- abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
- tc->abstract_p ();
- }
-
- char const* r (
- (poly || !fund) && std >= cxx_version::cxx11
- ? "::std::move (r)"
- : "r");
-
- if (max (e) != 1)
- {
- // sequence
- //
- String container (econtainer (e));
-
- os << "{"
- << "::std::size_t n;"
- << "::xsd::cxx::tree::istream_common::as_size< " <<
- "::std::size_t > as (n);"
- << "s >> as;"
- << "if (n > 0)"
- << "{"
- << container << "& c (this->" << member << ");"
- << "c.reserve (n);"
- << "while (n--)"
- << "{";
-
- if (poly)
- {
- os << auto_ptr << "< " << type << " > r;";
-
- if (!abst)
- os << "bool d;"
- << "s >> d;"
- << endl
- << "if (!d)" << endl
- << "r.reset (new " << type << " (s, f, this));"
- << "else"
- << "{";
-
- os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
- << "::xsd::cxx::tree::stream_extraction_map_instance< " <<
- poly_plate << ", " << stream << ", " << char_type <<
- " > ().extract (" << endl
- << "s, f, this));"
- << "r.reset (dynamic_cast< " << type << "* > (tmp.get ()));"
- << "if (r.get ())" << endl
- << "tmp.release ();"
- << "else" << endl
- << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
- " > ();";
-
- if (!abst)
- os << "}";
- }
- else if (fund)
- {
- os << type << " r;"
- << "s >> r;";
- }
- else
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << tr << "::create (s, f, this));";
- }
-
- os << "c.push_back (" << r << ");"
- << "}" // while
- << "}" // if
- << "}";
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "{"
- << "bool p;"
- << "s >> p;"
- << "if (p)"
- << "{";
-
- if (poly)
- {
- os << auto_ptr << "< " << type << " > r;";
-
- if (!abst)
- os << "bool d;"
- << "s >> d;"
- << endl
- << "if (!d)" << endl
- << "r.reset (new " << type << " (s, f, this));"
- << "else"
- << "{";
-
- os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
- << "::xsd::cxx::tree::stream_extraction_map_instance< " <<
- poly_plate << ", " << stream << ", " << char_type <<
- " > ().extract (" << endl
- << "s, f, this));"
- << "r.reset (dynamic_cast< " << type << "* > (tmp.get ()));"
- << "if (r.get ())" << endl
- << "tmp.release ();"
- << "else" << endl
- << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
- " > ();";
-
- if (!abst)
- os << "}";
- }
- else if (fund)
- {
- os << type << " r;"
- << "s >> r;";
- }
- else
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << tr << "::create (s, f, this));";
- }
-
- os << "this->" << member << ".set (" << r << ");"
- << "}" // if (p)
- << "}";
- }
- else
- {
- // one
- //
- os << "{";
-
- if (poly)
- {
- os << auto_ptr << "< " << type << " > r;";
-
- if (!abst)
- os << "bool d;"
- << "s >> d;"
- << endl
- << "if (!d)" << endl
- << "r.reset (new " << type << " (s, f, this));"
- << "else"
- << "{";
-
- os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
- << "::xsd::cxx::tree::stream_extraction_map_instance< " <<
- poly_plate << ", " << stream << ", " << char_type <<
- " > ().extract (" << endl
- << "s, f, this));"
- << "r.reset (dynamic_cast< " << type << "* > (tmp.get ()));"
- << "if (r.get ())" << endl
- << "tmp.release ();"
- << "else" << endl
- << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
- " > ();";
-
- if (!abst)
- os << "}";
- }
- else if (fund)
- {
- os << type << " r;"
- << "s >> r;";
- }
- else
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << tr << "::create (s, f, this));";
- }
-
- os << "this->" << member << ".set (" << r << ");"
- << "}";
- }
- }
-
- private:
- String stream;
- };
-
- struct Attribute: Traversal::Attribute, Context
- {
- Attribute (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& member (emember (a));
- String type (etype (a));
- String tr (etraits (a)); // traits type name
-
- bool fund (false);
- {
- IsFundamentalType traverser (fund);
- traverser.dispatch (a.type ());
- }
-
- if (a.optional_p () && !a.default_p ())
- {
- os << "{"
- << "bool p;"
- << "s >> p;"
- << "if (p)"
- << "{";
-
- if (fund)
- {
- os << type << " r;"
- << "s >> r;"
- << "this->" << member << ".set (r);";
- }
- else
- {
- os << "this->" << member << ".set (" << tr <<
- "::create (s, f, this));";
- }
-
- os << "}" // if (p)
- << "}";
- }
- else
- {
- os << "{";
-
- if (fund)
- {
- os << type << " r;"
- << "s >> r;"
- << "this->" << member << ".set (r);";
- }
- else
- {
- os << "this->" << member << ".set (" << tr <<
- "::create (s, f, this));";
- }
-
- os << "}";
- }
- }
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c), base_ (c), ctor_any_ (c), ctor_member_ (c)
- {
- inherits_ >> base_;
- names_ctor_member_ >> ctor_member_;
-
- if (options.generate_wildcard ())
- names_ctor_member_ >> ctor_any_;
- }
-
- virtual void
- traverse (Type& c)
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
- bool has_members (has<Traversal::Member> (c));
-
- bool facets (false);
- if (c.inherits_p ())
- {
- // See if we have any facets that we need to handle.
- //
- using SemanticGraph::Restricts;
- using SemanticGraph::Fundamental::Decimal;
-
- if (Restricts* r = dynamic_cast<Restricts*> (&c.inherits ()))
- {
- if (!r->facet_empty () &&
- (r->facet_find ("fractionDigits") != r->facet_end () ||
- r->facet_find ("totalDigits") != r->facet_end ()) &&
- ultimate_base (c).is_a<Decimal> ())
- facets = true;
- }
- }
-
- size_t n (0);
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- os << name << "::" << endl
- << name << " (" << istream_type << "< " <<
- i->c_str () << " >& s," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": ";
-
- if (c.inherits_p ())
- inherits (c, inherits_);
- else
- os << any_type;
-
- os << " (s, f, c)";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- names (c, names_ctor_member_);
-
- os << "{";
-
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);"
- << endl;
-
- if (has_members)
- os << "this->" << unclash (name, "parse") << " (s, f);";
-
- os << "}";
-
- // Parse
- //
- if (ordered || has_members)
- {
- os << "void " << name << "::" << endl
- << unclash (name, "parse") << " (" <<
- istream_type << "< " << i->c_str () << " >& s," << endl
- << flags_type << " f)"
- << "{"
- << "XSD_UNUSED (f);"; // Can be unused.
-
- // Read the order sequence.
- //
- if (ordered)
- {
- String const& t (ctx.get<String> ("order-type"));
- String const& m (ctx.get<String> ("order-member"));
-
- os << "{"
- << "::std::size_t n;"
- << "::xsd::cxx::tree::istream_common::as_size< " <<
- "::std::size_t > na (n);"
- << "s >> na;"
- << "if (n > 0)"
- << "{"
- << "this->" << m << ".reserve (n);"
- << "while (n--)"
- << "{"
- << "::std::size_t id, in;"
- << "::xsd::cxx::tree::istream_common::as_size< " <<
- "::std::size_t > ida (id), ina (in);"
- << "s >> ida;"
- << "s >> ina;"
- << "this->" << m << ".push_back (" << t << " (id, in));"
- << "}" // while
- << "}" // if
- << "}";
- }
-
- {
- Element element (*this, *i);
- Attribute attribute (*this);
- Traversal::Names names_;
-
- names_ >> element;
- names_ >> attribute;
-
- names (c, names_);
- }
-
- os << "}";
- }
-
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (c) &&
- !c.abstract_p () &&
- (!anonymous_p (c) || anonymous_substitutes_p (c)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (c));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_extraction_init_" <<
- n++ << " (" << endl
- << strlit (c.name ()) << "," << endl
- << strlit (xml_ns_name (c)) << ");"
- << endl;
- }
- }
- }
-
- private:
- Traversal::Inherits inherits_;
- BaseTypeName base_;
-
- CtorAny ctor_any_;
- CtorMember ctor_member_;
-
- Traversal::Names names_ctor_member_;
- };
- }
-
- void
- generate_stream_extraction_source (Context& ctx)
- {
- if (ctx.polymorphic)
- {
- NarrowStrings const& st (ctx.options.generate_extraction ());
-
- ctx.os << "#include <xsd/cxx/tree/stream-extraction-map.hxx>" << endl
- << endl;
-
- bool import_maps (ctx.options.import_maps ());
- bool export_maps (ctx.options.export_maps ());
-
- if (import_maps || export_maps)
- {
- ctx.os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{"
- << "namespace tree"
- << "{";
-
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream (*i);
-
- ctx.os << "#ifdef _MSC_VER" << endl;
-
- if (export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "stream_extraction_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;";
-
- if (import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "stream_extraction_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;";
-
- ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
- << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "stream_extraction_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;"
- << "#elif defined(XSD_MAP_VISIBILITY)" << endl
- << "template struct XSD_MAP_VISIBILITY " <<
- "stream_extraction_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;"
- << "#endif" << endl;
- }
-
- ctx.os << "}" // tree
- << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
-
- }
-
- ctx.os << "namespace _xsd"
- << "{";
-
- size_t n (0);
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream (*i);
-
- ctx.os << "static" << endl
- << "const ::xsd::cxx::tree::stream_extraction_plate< " <<
- ctx.poly_plate << ", " << stream << ", " << ctx.char_type <<
- " >" << endl
- << "stream_extraction_plate_init_" << n++ << ";";
- }
-
- ctx.os << "}";
- }
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/stream-extraction-source.hxx b/xsd/cxx/tree/stream-extraction-source.hxx
deleted file mode 100644
index 29e33f8..0000000
--- a/xsd/cxx/tree/stream-extraction-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/stream-extraction-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_EXTRACTION_SOURCE_HXX
-#define CXX_TREE_EXTRACTION_SOURCE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_stream_extraction_source (Context&);
- }
-}
-
-#endif // CXX_TREE_EXTRACTION_SOURCE_HXX
diff --git a/xsd/cxx/tree/stream-header.cxx b/xsd/cxx/tree/stream-header.cxx
deleted file mode 100644
index fcb18d1..0000000
--- a/xsd/cxx/tree/stream-header.cxx
+++ /dev/null
@@ -1,181 +0,0 @@
-// file : xsd/cxx/tree/stream-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/stream-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- os << inst_exp
- << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "&, const " <<
- name << "&);"
- << endl;
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- os << inst_exp
- << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "&, const " <<
- name << "&);"
- << endl;
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- bool enum_based (false);
- if (string_based)
- {
- SemanticGraph::Enumeration* be (0);
- IsEnumBasedType t (be);
- t.dispatch (e);
-
- enum_based = (be != 0);
- }
-
- // If we are based on an enum then the value type is just an
- // alias and we don't need to generate this operator again.
- //
- if (string_based && !enum_based)
- {
- os << inst_exp
- << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "&, " <<
- name << "::" << evalue (e) << ");"
- << endl;
- }
-
- os << inst_exp
- << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "&, const " <<
- name << "&);"
- << endl;
- }
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- os << inst_exp
- << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "&, const " <<
- name << "&);"
- << endl;
- }
- };
- }
-
- void
- generate_stream_header (Context& ctx)
- {
- String c (ctx.char_type);
-
- ctx.os << "#include <iosfwd>" << endl
- << endl;
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/stream-header.hxx b/xsd/cxx/tree/stream-header.hxx
deleted file mode 100644
index 18d2eef..0000000
--- a/xsd/cxx/tree/stream-header.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/stream-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_STREAM_HEADER_HXX
-#define CXX_TREE_STREAM_HEADER_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_stream_header (Context&);
- }
-}
-
-#endif // CXX_TREE_STREAM_HEADER_HXX
diff --git a/xsd/cxx/tree/stream-insertion-header.cxx b/xsd/cxx/tree/stream-insertion-header.cxx
deleted file mode 100644
index 4c1d88e..0000000
--- a/xsd/cxx/tree/stream-insertion-header.cxx
+++ /dev/null
@@ -1,178 +0,0 @@
-// file : xsd/cxx/tree/stream-insertion-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/stream-insertion-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type (ostream_type + L"< " + String (*i) + L" >");
-
- os << inst_exp
- << stream_type << "&" << endl
- << "operator<< (" << stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type (ostream_type + L"< " + String (*i) + L" >");
-
- os << inst_exp
- << stream_type << "&" << endl
- << "operator<< (" << stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type (ostream_type + L"< " + String (*i) + L" >");
-
- os << inst_exp
- << stream_type << "&" << endl
- << "operator<< (" << stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- }
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type (ostream_type + L"< " + String (*i) + L" >");
-
- os << inst_exp
- << stream_type << "&" << endl
- << "operator<< (" << stream_type << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
- }
- };
- }
-
- void
- generate_stream_insertion_header (Context& ctx)
- {
- String c (ctx.char_type);
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/stream-insertion-header.hxx b/xsd/cxx/tree/stream-insertion-header.hxx
deleted file mode 100644
index 5bf8f26..0000000
--- a/xsd/cxx/tree/stream-insertion-header.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/stream-insertion-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_STREAM_INSERTION_HEADER_HXX
-#define CXX_TREE_STREAM_INSERTION_HEADER_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_stream_insertion_header (Context&);
- }
-}
-
-#endif // CXX_TREE_STREAM_INSERTION_HEADER_HXX
diff --git a/xsd/cxx/tree/stream-insertion-source.cxx b/xsd/cxx/tree/stream-insertion-source.cxx
deleted file mode 100644
index 7f00c76..0000000
--- a/xsd/cxx/tree/stream-insertion-source.cxx
+++ /dev/null
@@ -1,623 +0,0 @@
-// file : xsd/cxx/tree/stream-insertion-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/stream-insertion-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String base (L"::xsd::cxx::tree::list< " +
- item_type_name (item_type) + L", " + char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base += L" >";
-
- size_t n (0);
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
-
- os << stream_type << "&" << endl
- << "operator<< (" << stream_type << "& s," << endl
- << "const " << name << "& x)"
- << "{"
- << "return s << static_cast< const " << base << "& > (x);"
- << "}";
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (l) &&
- (!anonymous_p (l) || anonymous_substitutes_p (l)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (l));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_insertion_init_" <<
- n++ << " (" << endl
- << strlit (l.name ()) << "," << endl
- << strlit (xml_ns_name (l)) << ");"
- << endl;
- }
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- String const& base (xs_string_type);
-
- size_t n (0);
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
-
- os << stream_type << "&" << endl
- << "operator<< (" << stream_type << "& s," << endl
- << "const " << name << "& x)"
- << "{"
- << "return s << static_cast< const " << base << "& > (x);"
- << "}";
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (u) &&
- (!anonymous_p (u) || anonymous_substitutes_p (u)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (u));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_insertion_init_" <<
- n++ << " (" << endl
- << strlit (u.name ()) << "," << endl
- << strlit (xml_ns_name (u)) << ");"
- << endl;
- }
- }
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c), base_ (c)
- {
- inherits_base_ >> base_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- bool enum_based (false);
- if (string_based)
- {
- SemanticGraph::Enumeration* base_enum (0);
- IsEnumBasedType t (base_enum);
- t.dispatch (e);
-
- enum_based = (base_enum != 0);
- }
-
- String value;
- if (string_based)
- value = evalue (e);
-
- size_t n (0);
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
-
- os << stream_type << "&" << endl
- << "operator<< (" << stream_type << "& s," << endl
- << "const " << name << "& x)"
- << "{";
-
- if (!string_based || enum_based)
- {
- os << "return s << static_cast< const ";
- inherits (e, inherits_base_);
- os << "& > (x);";
- }
- else
- {
- os << name << "::" << value << " v (x);"
- << "return s << static_cast< unsigned int > (v);";
- }
-
- os << "}";
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (e) &&
- (!anonymous_p (e) || anonymous_substitutes_p (e)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (e));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_insertion_init_" <<
- n++ << " (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (xml_ns_name (e)) << ");"
- << endl;
- }
- }
- }
-
- private:
- Traversal::Inherits inherits_base_;
- BaseTypeName base_;
- };
-
- struct Element: Traversal::Element, Context
- {
- Element (Context& c, String const& scope_, String const& stream_)
- : Context (c), scope (scope_), stream (stream_)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e)) return;
-
- String const& aname (eaname (e));
- SemanticGraph::Type& t (e.type ());
- String type (scope + L"::" + etype (e));
-
- // Figure out if we need to generate polymorphic code. If this
- // elemen's type is anonymous then we don't need to do anything.
- // Note that if the type is anonymous then it can't be derived
- // from which makes it impossible to substitute or dynamically-
- // type with xsi:type.
- //
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- // Check if this element is abstract.
- //
- bool abst (false);
- if (poly)
- {
- SemanticGraph::Complex* tc;
- abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
- tc->abstract_p ();
- }
-
- if (max (e) != 1)
- {
- // sequence
- //
- os << "{"
- << "const " << scope << "::" << econtainer (e) << "& c (" <<
- "x." << aname << " ());"
- << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
- "::std::size_t > (c.size ());";
-
- os << "for (" << scope << "::" << econst_iterator (e) << endl
- << "i (c.begin ()), e (c.end ());" << endl
- << "i != e; ++i)"
- << "{";
-
- if (poly)
- {
- if (!abst)
- os << "bool d (typeid (" << type << ") != typeid (*i));"
- << "s << d;"
- << "if (!d)" << endl
- << "s << *i;"
- << "else" << endl;
-
- os << "::xsd::cxx::tree::stream_insertion_map_instance< " <<
- poly_plate << ", " << stream << ", " << char_type <<
- " > ().insert (s, *i);";
- }
- else
- os << "s << *i;";
-
- os << "}" // for
- << "}";
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "{"
- << "bool p (x." << aname << " ());"
- << "s << p;"
- << "if (p)";
-
- if (poly)
- {
- os << "{"
- << "const " << type << "& i (*x." << aname << " ());";
-
- if (!abst)
- os << "bool d (typeid (" << type << ") != typeid (i));"
- << "s << d;"
- << "if (!d)" << endl
- << "s << i;"
- << "else" << endl;
-
- os << "::xsd::cxx::tree::stream_insertion_map_instance< " <<
- poly_plate << ", " << stream << ", " << char_type <<
- " > ().insert (s, i);"
- << "}";
- }
- else
- os << endl
- << "s << *x." << aname << " ();";
-
- os << "}";
- }
- else
- {
- // one
- //
- if (poly)
- {
- os << "{"
- << "const " << type << "& i (x." << aname << " ());";
-
- if (!abst)
- os << "bool d (typeid (" << type << ") != typeid (i));"
- << "s << d;"
- << "if (!d)" << endl
- << "s << i;"
- << "else" << endl;
-
- os << "::xsd::cxx::tree::stream_insertion_map_instance< " <<
- poly_plate << ", " << stream << ", " << char_type <<
- " > ().insert (s, i);"
- << "}";
- }
- else
- os << "s << x." << aname << " ();";
- }
- }
-
- private:
- String scope;
- String stream;
- };
-
- struct Attribute: Traversal::Attribute, Context
- {
- Attribute (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& aname (eaname (a));
-
- if (a.optional_p () && !a.default_p ())
- {
- os << "{"
- << "bool p (x." << aname << " ());"
- << "s << p;"
- << "if (p)" << endl
- << "s << *x." << aname << " ();"
- << "}";
- }
- else
- {
- os << "s << x." << aname << " ();";
- }
- }
- };
-
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c), base_ (c)
- {
- inherits_ >> base_;
- }
-
- virtual void
- traverse (Type& c)
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
- bool has_body (ordered ||
- has<Traversal::Member> (c) ||
- c.inherits_p ());
-
- size_t n (0);
- NarrowStrings const& st (options.generate_insertion ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
-
- os << stream_type << "&" << endl
- << "operator<< (" << stream_type << "& s," << endl
- << "const " << name << "&" << (has_body ? " x" : "") << ")"
- << "{";
-
- if (c.inherits_p ())
- {
- os << "s << static_cast< const ";
-
- inherits (c, inherits_);
-
- os << "& > (x);";
- }
-
- // Write the order sequence.
- //
- if (ordered)
- {
- String const& ci (ctx.get<String> ("order-const-iterator"));
- String const& an (ctx.get<String> ("order-aname"));
-
- os << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
- "::std::size_t > (" << endl
- << "x." << an << " ().size ());"
- << endl
- << "for (" << name << "::" << ci << endl
- << "b (x." << an << " ().begin ()), n (x." << an <<
- " ().end ());" << endl
- << "b != n; ++b)"
- << "{"
- << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
- "::std::size_t > (b->id);"
- << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
- "::std::size_t > (b->index);"
- << "}";
- }
-
- {
- Traversal::Names names_member;
- Element element (*this, name, *i);
- Attribute attribute (*this);
-
- names_member >> element;
- names_member >> attribute;
-
- names (c, names_member);
- }
-
- os << "return s;"
- << "}";
-
-
- // Register with type map.
- //
- if (polymorphic &&
- polymorphic_p (c) &&
- !c.abstract_p () &&
- (!anonymous_p (c) || anonymous_substitutes_p (c)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (c));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
- poly_plate << ", " << i->c_str () << ", " << char_type <<
- ", " << name << " >" << endl
- << "_xsd_" << name << "_stream_insertion_init_" <<
- n++ << " (" << endl
- << strlit (c.name ()) << "," << endl
- << strlit (xml_ns_name (c)) << ");"
- << endl;
- }
- }
- }
-
- private:
- Traversal::Inherits inherits_;
- BaseTypeName base_;
- };
- }
-
- void
- generate_stream_insertion_source (Context& ctx)
- {
- if (ctx.polymorphic)
- {
- NarrowStrings const& st (ctx.options.generate_insertion ());
-
- ctx.os << "#include <xsd/cxx/tree/stream-insertion-map.hxx>" << endl
- << endl;
-
- bool import_maps (ctx.options.import_maps ());
- bool export_maps (ctx.options.export_maps ());
-
- if (import_maps || export_maps)
- {
- ctx.os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{"
- << "namespace tree"
- << "{";
-
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream (*i);
-
- ctx.os << "#ifdef _MSC_VER" << endl;
-
- if (export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "stream_insertion_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;";
-
- if (import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "stream_insertion_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;";
-
- ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
- << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "stream_insertion_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;"
- << "#elif defined(XSD_MAP_VISIBILITY)" << endl
- << "template struct XSD_MAP_VISIBILITY " <<
- "stream_insertion_plate< " << ctx.poly_plate << ", " <<
- stream << ", " << ctx.char_type << " >;"
- << "#endif" << endl;
- }
-
- ctx.os << "}" // tree
- << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
- }
-
- ctx.os << "namespace _xsd"
- << "{";
-
- size_t n (0);
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- String stream (*i);
-
- ctx.os << "static" << endl
- << "const ::xsd::cxx::tree::stream_insertion_plate< " <<
- ctx.poly_plate << ", " << stream << ", " << ctx.char_type <<
- " >" << endl
- << "stream_insertion_plate_init_" << n++ << ";";
- }
-
- ctx.os << "}";
- }
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/stream-insertion-source.hxx b/xsd/cxx/tree/stream-insertion-source.hxx
deleted file mode 100644
index ef832db..0000000
--- a/xsd/cxx/tree/stream-insertion-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/stream-insertion-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_INSERTION_SOURCE_HXX
-#define CXX_TREE_INSERTION_SOURCE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_stream_insertion_source (Context&);
- }
-}
-
-#endif // CXX_TREE_INSERTION_SOURCE_HXX
diff --git a/xsd/cxx/tree/stream-source.cxx b/xsd/cxx/tree/stream-source.cxx
deleted file mode 100644
index a3572ef..0000000
--- a/xsd/cxx/tree/stream-source.cxx
+++ /dev/null
@@ -1,496 +0,0 @@
-// file : xsd/cxx/tree/stream-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/stream-source.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String base (L"::xsd::cxx::tree::list< " +
- item_type_name (item_type) + L", " + char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base += L" >";
-
- os << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "& o, " <<
- "const " << name << "& i)"
- << "{"
- << "return o << static_cast< const " << base << "& > (i);"
- << "}";
-
- // Register with ostream map.
- //
- if (polymorphic &&
- polymorphic_p (l) &&
- (!anonymous_p (l) || anonymous_substitutes_p (l)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (l));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_std_ostream_init;"
- << endl;
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- os << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "& o, " <<
- "const " << name << "& i)"
- << "{"
- << "return o << static_cast< const " << xs_string_type << "& > (i);"
- << "}";
-
- // Register with ostream map.
- //
- if (polymorphic &&
- polymorphic_p (u) &&
- (!anonymous_p (u) || anonymous_substitutes_p (u)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (u));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_std_ostream_init;"
- << endl;
- }
- }
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c), base_ (c)
- {
- inherits_base_ >> base_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- bool enum_based (false);
- if (string_based)
- {
- SemanticGraph::Enumeration* be (0);
- IsEnumBasedType t (be);
- t.dispatch (e);
-
- enum_based = (be != 0);
- }
-
- // If we are based on an enum then the value type is just an
- // alias and we don't need to generate this operator again.
- //
- if (string_based && !enum_based)
- {
- os << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "& o, " <<
- name << "::" << evalue (e) << " i)"
- << "{"
- << "return o << " << name << "::_xsd_" << name <<
- "_literals_[i];"
- << "}";
- }
-
- os << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "& o, " <<
- "const " << name << "& i)"
- << "{"
- << "return o << static_cast< const ";
-
- inherits (e, inherits_base_);
-
- os << "& > (i);"
- << "}";
-
- // Register with ostream map.
- //
- if (polymorphic &&
- polymorphic_p (e) &&
- (!anonymous_p (e) || anonymous_substitutes_p (e)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (e));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_std_ostream_init;"
- << endl;
- }
- }
-
- private:
- Traversal::Inherits inherits_base_;
- BaseTypeName base_;
- };
-
- struct Element: Traversal::Element, Context
- {
- Element (Context& c, String const& scope_)
- : Context (c), scope (scope_)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- String const& aname (eaname (e));
-
- // Check if we need to handle xsi:type and substitution groups.
- // If this element's type is anonymous then we don't need to do
- // anything. Note that if the type is anonymous then it can't be
- // derived from which makes it impossible to substitute or
- // dynamically-type with xsi:type.
- //
- SemanticGraph::Type& t (e.type ());
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- if (poly)
- {
- os << "{"
- << "::xsd::cxx::tree::std_ostream_map< " << char_type
- << " >& om (" << endl
- << "::xsd::cxx::tree::std_ostream_map_instance< " <<
- poly_plate << ", " << char_type << " > ());"
- << endl;
- }
-
- if (max (e) != 1)
- {
- // sequence
- //
- os << "for (" << scope << "::" << econst_iterator (e) << endl
- << "b (i." << aname << " ().begin ()), " <<
- "e (i." << aname << " ().end ());" << endl
- << "b != e; ++b)"
- << "{"
- << "o << ::std::endl << " << strlit (e.name () + L": ");
-
- if (!poly)
- os << " << *b;";
- else
- os << ";"
- << "om.insert (o, *b);";
-
- os << "}";
- }
- else if (min (e) == 0)
- {
- // optional
- //
-
- os << "if (i." << aname << " ())"
- << "{"
- << "o << ::std::endl << " << strlit (e.name () + L": ");
-
- if (!poly)
- os << " << *i." << aname << " ();";
- else
- os << ";"
- << "om.insert (o, *i." << aname << " ());";
-
- os << "}";
- }
- else
- {
- // one
- //
- os << "o << ::std::endl << " << strlit (e.name () + L": ");
-
- if (!poly)
- os << " << i." << aname << " ();";
- else
- os << ";"
- << "om.insert (o, i." << aname << " ());";
- }
-
- if (poly)
- os << "}";
- }
-
- private:
- String scope;
- };
-
- struct Attribute: Traversal::Attribute, Context
- {
- Attribute (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& aname (eaname (a));
-
- if (a.optional_p () && !a.default_p ())
- {
- os << "if (i." << aname << " ())"
- << "{"
- << "o << ::std::endl << " << strlit (a.name () + L": ") <<
- " << *i." << aname << " ();"
- << "}";
- }
- else
- {
- os << "o << ::std::endl << " << strlit (a.name () + L": ") <<
- " << i." << aname << " ();";
- }
- }
- };
-
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c), base_ (c)
- {
- inherits_ >> base_;
- }
-
- virtual void
- traverse (Type& c)
- {
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- //
- //
- bool has_body (has<Traversal::Member> (c) || c.inherits_p ());
-
- os << std_ostream_type << "&" << endl
- << "operator<< (" << std_ostream_type << "& o, " <<
- "const " << name << "&" << (has_body ? " i" : "") << ")"
- << "{";
-
- if (c.inherits_p ())
- {
- os << "o << static_cast< const ";
-
- inherits (c, inherits_);
-
- os << "& > (i);"
- << endl;
- }
-
- {
- Traversal::Names names_member;
- Element element (*this, name);
- Attribute attribute (*this);
-
- names_member >> element;
- names_member >> attribute;
-
- names (c, names_member);
- }
-
- os << "return o;"
- << "}";
-
- // Register with ostream map.
- //
- if (polymorphic &&
- polymorphic_p (c) &&
- !c.abstract_p () &&
- (!anonymous_p (c) || anonymous_substitutes_p (c)))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (c));
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_std_ostream_init;"
- << endl;
- }
- }
-
- private:
- Traversal::Inherits inherits_;
- BaseTypeName base_;
- };
- }
-
- void
- generate_stream_source (Context& ctx, size_t first, size_t last)
- {
- String c (ctx.char_type);
-
- ctx.os << "#include <ostream>" << endl
- << endl;
-
- if (ctx.polymorphic)
- {
- ctx.os << "#include <xsd/cxx/tree/std-ostream-map.hxx>" << endl
- << endl;
-
- bool import_maps (ctx.options.import_maps ());
- bool export_maps (ctx.options.export_maps ());
-
- if (import_maps || export_maps)
- {
- ctx.os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{"
- << "namespace tree"
- << "{"
- << "#ifdef _MSC_VER" << endl;
-
- if (export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "std_ostream_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "std_ostream_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
- << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "std_ostream_plate< " << ctx.poly_plate << ", " << ctx.char_type <<
- " >;";
-
- ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
- << "template struct XSD_MAP_VISIBILITY " <<
- "std_ostream_plate< " << ctx.poly_plate << ", " << ctx.char_type <<
- " >;";
-
- ctx.os << "#endif" << endl
- << "}" // tree
- << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
- }
-
- ctx.os << "namespace _xsd"
- << "{"
- << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_plate< " <<
- ctx.poly_plate << ", " << ctx.char_type << " >" << endl
- << "std_ostream_plate_init;"
- << "}";
- }
-
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- Namespace ns (ctx, first, last);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/stream-source.hxx b/xsd/cxx/tree/stream-source.hxx
deleted file mode 100644
index f095d9e..0000000
--- a/xsd/cxx/tree/stream-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/stream-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_STREAM_SOURCE_HXX
-#define CXX_TREE_STREAM_SOURCE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_stream_source (Context&, size_t first, size_t last);
- }
-}
-
-#endif // CXX_TREE_STREAM_SOURCE_HXX
diff --git a/xsd/cxx/tree/tree-forward.cxx b/xsd/cxx/tree/tree-forward.cxx
deleted file mode 100644
index 1bea79d..0000000
--- a/xsd/cxx/tree/tree-forward.cxx
+++ /dev/null
@@ -1,325 +0,0 @@
-// file : xsd/cxx/tree/tree-forward.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <cxx/tree/tree-forward.hxx>
-#include <cxx/tree/fundamental-header.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String const& name (ename (l));
-
- if (String custom = custom_type (l))
- {
- String new_name;
- renamed_type (l, new_name);
-
- if (new_name)
- os << "class " << new_name << ";";
-
- if (custom == name)
- os << "class " << name << ";";
- else
- os << "typedef " << custom << " " << name << ";";
- }
- else
- os << "class " << name << ";";
- }
- };
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String const& name (ename (u));
-
- if (String custom = custom_type (u))
- {
- String new_name;
- renamed_type (u, new_name);
-
- if (new_name)
- os << "class " << new_name << ";";
-
- if (custom == name)
- os << "class " << name << ";";
- else
- os << "typedef " << custom << " " << name << ";";
- }
- else
- os << "class " << name << ";";
- }
- };
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- String const& name (ename (e));
-
- if (String custom = custom_type (e))
- {
- String new_name;
- renamed_type (e, new_name);
-
- if (new_name)
- os << "class " << new_name << ";";
-
- if (custom == name)
- os << "class " << name << ";";
- else
- os << "typedef " << custom << " " << name << ";";
- }
- else
- os << "class " << name << ";";
- }
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- String const& name (ename (c));
-
- if (String custom = custom_type (c))
- {
- String new_name;
- renamed_type (c, new_name);
-
- if (new_name)
- os << "class " << new_name << ";";
-
- if (custom == name)
- os << "class " << name << ";";
- else
- os << "typedef " << custom << " " << name << ";";
- }
- else
- os << "class " << name << ";";
- }
- };
- }
-
- void
- generate_forward (Context& ctx)
- {
- NarrowString xml_schema (ctx.options.extern_xml_schema ());
-
- // Inlcude or Emit fundamental types.
- //
- if (xml_schema)
- {
- String name (ctx.hxx_expr->replace (xml_schema));
-
- ctx.os << "#include " << ctx.process_include_path (name) << endl
- << endl;
- }
- else
- {
- if (ctx.char_type == L"char" && ctx.char_encoding != L"custom")
- {
- ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding <<
- ".hxx>" << endl
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/exceptions.hxx>" << endl
- << "#include <xsd/cxx/tree/elements.hxx>" << endl
- << "#include <xsd/cxx/tree/types.hxx>" << endl
- << endl;
-
- if (!ctx.options.suppress_parsing () ||
- ctx.options.generate_serialization ())
- {
- ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl
- << endl;
- }
-
- if (!ctx.options.suppress_parsing () ||
- ctx.options.generate_serialization ())
- {
- ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl
- << endl;
- }
-
- bool element_map (ctx.options.generate_element_map ());
-
- if (element_map)
- ctx.os << "#include <xsd/cxx/tree/element-map.hxx>" << endl
- << endl;
-
- // I need to include all the "optional" headers here (instead of
- // later in the individual generators for each feature because
- // those headers provide implementation for the fundamental types.
- //
- if (!ctx.options.suppress_parsing ())
- {
- ctx.os << "#include <xsd/cxx/tree/parsing.hxx>" << endl;
-
- Traversal::Schema schema, xsd;
- Traversal::Implies implies;
- Traversal::Names names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundIncludes type (ctx, "parsing");
-
- schema >> implies >> xsd >> names >> ns >> ns_names >> type;
-
- schema.dispatch (ctx.schema_root);
-
- if (element_map)
- ctx.os << "#include <xsd/cxx/tree/parsing/element-map.txx>" <<
- endl;
-
- ctx.os << endl;
- }
-
- if (ctx.options.generate_serialization ())
- {
- ctx.os << "#include <xsd/cxx/xml/dom/serialization-header.hxx>" << endl
- << "#include <xsd/cxx/tree/serialization.hxx>" << endl;
-
- Traversal::Schema schema, xsd;
- Traversal::Implies implies;
- Traversal::Names names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundIncludes type (ctx, "serialization");
-
- schema >> implies >> xsd >> names >> ns >> ns_names >> type;
-
- schema.dispatch (ctx.schema_root);
-
- if (element_map)
- ctx.os << "#include <xsd/cxx/tree/serialization/element-map.txx>" <<
- endl;
-
- ctx.os << endl;
- }
-
- if (ctx.options.generate_ostream ())
- {
- ctx.os << "#include <xsd/cxx/tree/std-ostream-operators.hxx>" << endl
- << endl;
- }
-
- NarrowStrings const& ist (ctx.options.generate_insertion ());
- if (!ist.empty ())
- {
- for (NarrowStrings::const_iterator i (ist.begin ()); i != ist.end ();
- ++i)
- {
- if (*i == "ACE_OutputCDR")
- ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-insertion.hxx>"
- << endl;
- else if (*i == "XDR")
- ctx.os << "#include <xsd/cxx/tree/xdr-stream-insertion.hxx>"
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/stream-insertion.hxx>" << endl
- << endl;
- }
-
- NarrowStrings const& est (ctx.options.generate_extraction ());
- if (!est.empty ())
- {
- for (NarrowStrings::const_iterator i (est.begin ()); i != est.end ();
- ++i)
- {
- if (*i == "ACE_InputCDR")
- ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-extraction.hxx>"
- << endl;
- else if (*i == "XDR")
- ctx.os << "#include <xsd/cxx/tree/xdr-stream-extraction.hxx>"
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/stream-extraction.hxx>" << endl
- << endl;
- }
-
-
- Traversal::Schema schema, xsd;
- Traversal::Implies implies;
- Traversal::Names names;
- FundamentalNamespace ns (ctx);
-
- schema >> implies >> xsd >> names >> ns;
-
- schema.dispatch (ctx.schema_root);
- }
-
- // First emit header includes.
- //
- if (ctx.options.generate_forward ())
- {
- Traversal::Schema schema;
- Includes includes (ctx, Includes::forward);
-
- schema >> includes;
-
- schema.dispatch (ctx.schema_root);
- }
-
- ctx.os << "// Forward declarations." << endl
- << "//" << endl;
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names names_ns, names;
- Namespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- schema.dispatch (ctx.schema_root);
-
- ctx.os << endl;
- }
- }
-}
diff --git a/xsd/cxx/tree/tree-forward.hxx b/xsd/cxx/tree/tree-forward.hxx
deleted file mode 100644
index bd3c4f0..0000000
--- a/xsd/cxx/tree/tree-forward.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/tree-forward.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_TREE_FORWARD_HXX
-#define CXX_TREE_TREE_FORWARD_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_forward (Context&);
- }
-}
-
-#endif // CXX_TREE_TREE_FORWARD_HXX
diff --git a/xsd/cxx/tree/tree-header.cxx b/xsd/cxx/tree/tree-header.cxx
deleted file mode 100644
index 8a695d4..0000000
--- a/xsd/cxx/tree/tree-header.cxx
+++ /dev/null
@@ -1,4299 +0,0 @@
-// file : xsd/cxx/tree/tree-header.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/tree/tree-header.hxx>
-#include <cxx/tree/default-value.hxx>
-#include <cxx/tree/fundamental-header.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- // List mapping.
- //
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief List class corresponding to the %" <<
- comment (l.name ()) << endl
- << " * schema type." << endl
- << " *" << endl
- << " * This class has an interface of a standard C++ " <<
- "sequence (e.g.," << endl
- << " * std::vector)." << endl;
-
- if (l.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (l.annotation ());
- }
-
- os << " */" << endl;
- }
-
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String item_name (item_type_name (item_type));
- String base_type (L"::xsd::cxx::tree::list< " + item_name + L", " +
- char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base_type += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base_type += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base_type += L" >";
-
- os << "class " << type_exp << name <<
- ": public " << any_simple_type << "," << endl
- << " public " << base_type
- << "{"
- << "public:" << endl;
-
- // c-tor ()
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Default constructor." << endl
- << " *" << endl
- << " * Creates an empty list." << endl
- << " */" << endl;
- }
- os << name << " ();"
- << endl;
-
- // c-tor (size_type, const X& x)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create a list with copies of the specified " <<
- "element." << endl
- << " *" << endl
- << " * @param n A number of elements to copy." << endl
- << " * @param x An element to copy." << endl
- << " *" << endl
- << " * This constructor creates a list with @a n copies " <<
- "of @a x." << endl
- << " */" << endl;
- }
-
- String size_type (name != L"size_type"
- ? String (L"size_type")
- : base_type + L"::size_type");
-
- os << name << " (" << size_type << " n, const " << item_name <<
- "& x);"
- << endl;
-
- // c-tor (const I& begin, const I& end)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create a list from an iterator range." << endl
- << " *" << endl
- << " * @param begin An iterator pointing to the first " <<
- "element." << endl
- << " * @param end An iterator pointing to the one past " <<
- "the last element." << endl
- << " *" << endl
- << " * This constructor creates a list consisting of " <<
- "copies of the" << endl
- << " * elements in the range [begin,end)." << endl
- << " */" << endl;
- }
-
- String iter_type (unclash (name, "I"));
-
- os << "template < typename " << iter_type << " >" << endl
- << name << " (const " << iter_type << "& begin, const " <<
- iter_type << "& end)" << endl
- << ": " << base_type << " (begin, end, this)"
- << "{"
- << "}";
-
- // c-tor (istream&)
- //
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a data " <<
- "representation" << endl
- << " * stream." << endl
- << " *" << endl
- << " * @param s A stream to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (" << istream_type << "< " << i->c_str () <<
- " >& s," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM element." << endl
- << " *" << endl
- << " * @param e A DOM element to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (xercesc::DOMAttr)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM attribute." << endl
- << " *" << endl
- << " * @param a A DOM attribute to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (std::basic_string const&, xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string fragment." << endl
- << " *" << endl
- << " * @param s A string fragment to extract the data from." << endl
- << " * @param e A pointer to DOM element containing the " <<
- "string fragment." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
- // copy c-tor ()
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy constructor." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " *" << endl
- << " * For polymorphic object models use the @c _clone " <<
- "function instead." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << name << "& x," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // clone
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy the instance polymorphically." << endl
- << " *" << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " * @return A pointer to the dynamically allocated copy." << endl
- << " *" << endl
- << " * This function ensures that the dynamic type of the " <<
- "instance is" << endl
- << " * used for copying and should be used for polymorphic " <<
- "object" << endl
- << " * models instead of the copy constructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << name << "*" << endl
- << "_clone (" << flags_type << " f = 0," << endl
- << container << "* c = 0) const;"
- << endl;
-
- // d-tor
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Destructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << endl
- << "~" << name << " ();";
-
- os << "};";
-
- // Comparison operators.
- //
- if (options.generate_comparison ())
- {
- os << inst_exp
- << "bool" << endl
- << "operator== (const " << name << "&, const " << name << "&);"
- << endl;
-
- os << inst_exp
- << "bool" << endl
- << "operator!= (const " << name << "&, const " << name << "&);"
- << endl
- << endl;
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- // Union mapping.
- //
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Union class corresponding to the %" <<
- comment (u.name ()) << endl
- << " * schema type." << endl
- << " *" << endl
- << " * The mapping represents unions as strings." << endl;
-
- if (u.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (u.annotation ());
- }
-
- os << " */" << endl;
- }
-
- os << "class " << type_exp << name <<
- ": public " << xs_string_type
- << "{"
- << "public:" << endl
- << endl;
-
- if (options.generate_default_ctor ())
- {
- // c-tor ()
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Default constructor." << endl
- << " *" << endl
- << " * Note that this constructor may leave the " <<
- "instance in an" << endl
- << " * invalid state." << endl
- << " */" << endl;
- }
-
- os << name << " ();"
- << endl;
- }
-
- // c-tor (const char*)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a C string." << endl
- << " *" << endl
- << " * @param v A string value." << endl
- << " */" << endl;
- }
- os << name << " (const " << char_type << "* v);"
- << endl;
-
- // c-tor (string const&)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string." << endl
- << " *" << endl
- << " * @param v A string value." << endl
- << " */" << endl;
- }
- os << name << " (const " << string_type << "& v);"
- << endl;
-
- // c-tor (istream&)
- //
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a data " <<
- "representation" << endl
- << " * stream." << endl
- << " *" << endl
- << " * @param s A stream to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (" << istream_type << "< " << i->c_str () <<
- " >& s," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM element." << endl
- << " *" << endl
- << " * @param e A DOM element to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (xercesc::DOMAttr)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM attribute." << endl
- << " *" << endl
- << " * @param a A DOM attribute to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (std::basic_string const&, xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string fragment." << endl
- << " *" << endl
- << " * @param s A string fragment to extract the data from." << endl
- << " * @param e A pointer to DOM element containing the " <<
- "string fragment." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
- // copy c-tor ()
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy constructor." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " *" << endl
- << " * For polymorphic object models use the @c _clone " <<
- "function instead." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << name << "& x," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // clone
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy the instance polymorphically." << endl
- << " *" << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " * @return A pointer to the dynamically allocated copy." << endl
- << " *" << endl
- << " * This function ensures that the dynamic type of the " <<
- "instance is" << endl
- << " * used for copying and should be used for polymorphic " <<
- "object" << endl
- << " * models instead of the copy constructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << name << "*" << endl
- << "_clone (" << flags_type << " f = 0," << endl
- << container << "* c = 0) const;"
- << endl;
-
- os << "};";
- }
- };
-
- // Enum mapping.
- //
- struct Enumerator: Traversal::Enumerator, Context
- {
- Enumerator (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (doxygen && e.annotated_p ())
- {
- os << "/**" << endl;
- write_annotation (e.annotation ());
- os << " */" << endl;
- }
-
- os << ename (e);
- }
- };
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c),
- base_ (c),
- member_ (c),
- enumerator_ (c)
- {
- inherits_base_ >> base_;
- inherits_member_ >> member_;
-
- names_ >> enumerator_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- bool enum_based (false);
- SemanticGraph::Enumeration* base_enum (0);
-
- if (string_based)
- {
- IsEnumBasedType t (base_enum);
- t.dispatch (e);
-
- if (base_enum != 0)
- enum_based = true;
- }
-
- String value;
- if (string_based)
- value = evalue (e);
-
- // Get to the ultimate base and see if is a fundamental type.
- //
- bool fund_based (false);
- SemanticGraph::Type& ult_base (ultimate_base (e));
- {
- IsFundamentalType t (fund_based);
- t.dispatch (ult_base);
- }
-
- // Count enumerators.
- //
- size_t enum_count (0);
-
- for (Type::NamesIterator i (e.names_begin ()), end (e.names_end ());
- i != end; ++i)
- ++enum_count;
-
- //
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Enumeration class corresponding to the %" <<
- comment (e.name ()) << endl
- << " * schema type." << endl;
-
- if (e.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (e.annotation ());
- }
-
- os << " */" << endl;
- }
-
- os << "class " << type_exp << name << ": public ";
-
- // Enumeration always has a base.
- //
- inherits (e, inherits_base_);
-
- os << "{"
- << "public:" << endl;
-
- if (string_based)
- {
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief Underlying enum type." << endl
- << " */" << endl;
- }
-
- if (enum_based)
- {
- os << "typedef ";
-
- inherits (e, inherits_base_);
-
- os << "::" << evalue (*base_enum) << " " << value << ";"
- << endl;
- }
- else
- {
- os << "enum " << value
- << "{";
-
- names<Enumeration> (e, names_, 0, 0, 0, &Enumeration::comma);
-
- os << "};";
- }
- }
-
- // default c-tor
- //
- bool list_based (
- ult_base.is_a<SemanticGraph::List> () ||
- ult_base.is_a<SemanticGraph::Fundamental::NameTokens> () ||
- ult_base.is_a<SemanticGraph::Fundamental::IdRefs> () ||
- ult_base.is_a<SemanticGraph::Fundamental::Entities> ());
-
- if (options.generate_default_ctor () || list_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Default constructor." << endl
- << " *" << endl
- << " * Note that this constructor may leave the " <<
- "instance in an" << endl
- << " * invalid state." << endl
- << " */" << endl;
- }
-
- os << name << " ();"
- << endl;
- }
-
- // c-tor (value)
- //
- if (string_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the " <<
- "underlying enum value." << endl
- << " *" << endl
- << " * @param v A enum value." << endl
- << " */" << endl;
- }
-
- os << name << " (" << value << " v);"
- << endl;
- }
-
- // c-tor (const char*)
- //
- if (string_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a C string." << endl
- << " *" << endl
- << " * @param v A string value." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << char_type << "* v);"
- << endl;
- }
-
- // c-tor (const std::string&)
- //
- if (string_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string." << endl
- << " *" << endl
- << " * @param v A string value." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << string_type << "& v);"
- << endl;
- }
-
- // c-tor (fundamental)
- //
- if (fund_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a fundamental " <<
- "type value." << endl
- << " *" << endl
- << " * @param v A fundamental type value." << endl
- << " */" << endl;
- }
-
- os << name << " (";
-
- member_.dispatch (ult_base);
-
- os << " v);"
- << endl;
- }
-
- // c-tor (base)
- //
- // If the ultimate is also our immediate base and it is a
- // fundamental type then this c-tor clashes with c-tor
- // (fundamental) above.
- //
- if (!fund_based || &ult_base != &e.inherits ().base ())
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the " <<
- "base value." << endl
- << " *" << endl
- << " * @param v A base value." << endl
- << " */" << endl;
- }
-
- os << name << " (const ";
-
- inherits (e, inherits_member_);
-
- os << "& v);"
- << endl;
- }
-
-
- // c-tor (istream&)
- //
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a data " <<
- "representation" << endl
- << " * stream." << endl
- << " *" << endl
- << " * @param s A stream to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (" << istream_type << "< " << i->c_str () <<
- " >& s," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM element." << endl
- << " *" << endl
- << " * @param e A DOM element to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (xercesc::DOMAttr)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM attribute." << endl
- << " *" << endl
- << " * @param a A DOM attribute to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (std::basic_string const&, xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string fragment." << endl
- << " *" << endl
- << " * @param s A string fragment to extract the data from." << endl
- << " * @param e A pointer to DOM element containing the " <<
- "string fragment." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
- // copy c-tor
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy constructor." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " *" << endl
- << " * For polymorphic object models use the @c _clone " <<
- "function instead." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << name << "& x," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // clone
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy the instance polymorphically." << endl
- << " *" << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " * @return A pointer to the dynamically allocated copy." << endl
- << " *" << endl
- << " * This function ensures that the dynamic type of the " <<
- "instance is" << endl
- << " * used for copying and should be used for polymorphic " <<
- "object" << endl
- << " * models instead of the copy constructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << name << "*" << endl
- << "_clone (" << flags_type << " f = 0," << endl
- << container << "* c = 0) const;"
- << endl;
-
- // operator= (value)
- //
- if (string_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Assign the underlying enum value." << endl
- << " *" << endl
- << " * @param v A enum value." << endl
- << " * @return A refernce to the instance." << endl
- << " */" << endl;
- }
-
- os << name << "&" << endl
- << "operator= (" << value << " v);"
- << endl;
- }
-
- // operator value ()
- //
- // Name lookup differences in various compilers make generation
- // of this operator outside of the class a really hard task. So
- // we are going to make it "always inline".
- //
- if (string_based)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Implicit conversion operator to the " <<
- "underlying" << endl
- << " * enum value." << endl
- << " *" << endl
- << " * @return A enum value." << endl
- << " */" << endl;
- }
-
- os << "virtual" << endl
- << "operator " << value << " () const"
- << "{"
- << "return _xsd_" << name << "_convert ();"
- << "}";
- }
-
- //
- //
- if (string_based)
- {
- if (doxygen)
- os << "//@cond" << endl
- << endl;
-
- os << "protected:" << endl
- << value << endl
- << "_xsd_" << name << "_convert () const;"
- << endl;
-
- os << "public:" << endl;
-
- if (enum_based)
- {
- // We are going to reuse our base's literals.
- //
- os << "static const " << char_type << "* const* " <<
- "_xsd_" << name << "_literals_;";
- }
- else
- {
- os << "static const " << char_type << "* const " <<
- "_xsd_" << name << "_literals_[" << enum_count << "];";
- }
-
- os << "static const " << value <<
- " _xsd_" << name << "_indexes_[" << enum_count << "];";
-
- if (doxygen)
- os << endl
- << "//@endcond" << endl
- << endl;
- }
-
- os << "};";
- }
-
- virtual void
- comma (Type&)
- {
- os << "," << endl;
- }
-
- private:
- Traversal::Inherits inherits_base_;
- BaseTypeName base_;
-
- Traversal::Inherits inherits_member_;
- MemberTypeName member_;
-
- Traversal::Names names_;
- Enumerator enumerator_;
- };
-
-
- //
- //
- struct MemberFunction: Traversal::Member, Context
- {
- MemberFunction (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& aname (eaname (m));
- String const& mname (emname (m));
- String kind (m.is_a<SemanticGraph::Element> ()
- ? "element" : "attribute");
-
- bool fund (false);
- {
- IsFundamentalType t (fund);
- t.dispatch (m.type ());
- }
-
- bool def_attr (m.default_p () &&
- m.is_a<SemanticGraph::Attribute> ());
-
- if (max (m) != 1)
- {
- // sequence
- //
- String container (econtainer (m));
-
- // container const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the element" << endl
- << " * sequence." << endl
- << " *" << endl
- << " * @return A constant reference to the sequence " <<
- "container." << endl
- << " */" << endl;
- }
-
- os << "const " << container << "&" << endl
- << aname << " () const;"
- << endl;
-
- // container&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "element sequence." << endl
- << " *" << endl
- << " * @return A reference to the sequence container." << endl
- << " */" << endl;
- }
-
- os << container << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (container const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy elements from a given sequence." << endl
- << " *" << endl
- << " * @param s A sequence to copy elements from." << endl
- << " *" << endl
- << " * For each element in @a s this function " <<
- "makes a copy and adds it " << endl
- << " * to the sequence. Note that this operation " <<
- "completely changes the " << endl
- << " * sequence and all old elements will be lost." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << container << "& s);"
- << endl;
- }
- else if (min (m) == 0 && !def_attr)
- {
- // optional
- //
- String const& type (etype (m));
- String container (econtainer (m));
-
- // container const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the " << kind << endl
- << " * container." << endl
- << " *" << endl
- << " * @return A constant reference to the optional " <<
- "container." << endl
- << " */" << endl;
- }
-
- os << "const " << container << "&" << endl
- << aname << " () const;"
- << endl;
-
- // container&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- kind << " container." << endl
- << " *" << endl
- << " * @return A reference to the optional container." << endl
- << " */" << endl;
- }
-
- os << container << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (type const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the " << kind << " value." << endl
- << " *" << endl
- << " * @param x A new value to set." << endl
- << " *" << endl
- << " * This function makes a copy of its argument " <<
- "and sets it as" << endl
- << " * the new value of the " << kind << "." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << type << "& x);"
- << endl;
-
- // void
- // name (container const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the " << kind << " value." << endl
- << " *" << endl
- << " * @param x An optional container with the new value " <<
- "to set." << endl
- << " *" << endl
- << " * If the value is present in @a x then this function " <<
- "makes a copy " << endl
- << " * of this value and sets it as the new value of the " <<
- kind << "." << endl
- << " * Otherwise the " << kind << " container is set " <<
- "the 'not present' state." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << container << "& x);"
- << endl;
-
- // void
- // name (auto_ptr<type>);
- //
- if (!fund)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the " << kind << " value without " <<
- "copying." << endl
- << " *" << endl
- << " * @param p A new value to use." << endl
- << " *" << endl
- << " * This function will try to use the passed value " <<
- "directly instead" << endl
- << " * of making a copy." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (" << auto_ptr << "< " << type << " > p);"
- << endl;
- }
- }
- else
- {
- // one
- //
- String const& type (etype (m));
-
- // type const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the " << kind << "." << endl
- << " *" << endl
- << " * @return A constant reference to the " << kind <<
- "." << endl
- << " */" << endl;
- }
-
- os << "const " << type << "&" << endl
- << aname << " () const;"
- << endl;
-
- // Do not generate modifiers for fixed attributes.
- //
- if (!(def_attr && m.fixed_p ()))
- {
- // type&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- kind << "." << endl
- << " *" << endl
- << " * @return A reference to the " << kind << "." << endl
- << " */" << endl;
- }
-
- os << type << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (type const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the " << kind << " value." << endl
- << " *" << endl
- << " * @param x A new value to set." << endl
- << " *" << endl
- << " * This function makes a copy of its argument " <<
- "and sets it as" << endl
- << " * the new value of the " << kind << "." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << type << "& x);"
- << endl;
-
- // void
- // name (auto_ptr<type>);
- //
- if (!fund)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the " << kind << " value without " <<
- "copying." << endl
- << " *" << endl
- << " * @param p A new value to use." << endl
- << " *" << endl
- << " * This function will try to use the passed value " <<
- "directly" << endl
- << " * instead of making a copy." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (" << auto_ptr << "< " << type << " > p);"
- << endl;
-
- }
-
- // auto_ptr<type>
- // detach_name ();
- //
- if (detach && !fund)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Detach the " << kind << " value from " <<
- "the object model." << endl
- << " *" << endl
- << " * @return A pointer to the " << kind << " value." << endl
- << " *" << endl
- << " * Note that this function leaves the required " <<
- kind << " in " << endl
- << " * the original object model uninitialized." << endl
- << " */" << endl;
- }
-
- os << auto_ptr << "< " << type << " >" << endl
- << edname (m) << " ();"
- << endl;
- }
- }
- }
-
- // default_value
- //
- if (m.default_p ())
- {
- bool simple (true);
-
- if (m.is_a<SemanticGraph::Element> ())
- {
- IsSimpleType test (simple);
- test.dispatch (m.type ());
- }
-
- if (simple)
- {
- bool lit (false);
- {
- IsLiteralValue test (lit);
- test.dispatch (m.type ());
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return the default value for the " <<
- kind << "." << endl
- << " *" << endl;
-
- if (lit)
- os << " * @return The " << kind << "'s default value." << endl;
- else
- os << " * @return A read-only (constant) reference to the "
- << kind << "'s" << endl
- << " * default value." << endl;
-
- os << " */" << endl;
- }
-
- if (lit)
- os << "static " << etype (m) << endl;
- else
- os << "static const " << etype (m) << "&" << endl;
-
- os << edefault_value (m) << " ();"
- << endl;
- }
- }
- }
- };
-
- struct AnyFunction: Traversal::Any, Context
- {
- AnyFunction (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& aname (eaname (a));
- String const& mname (emname (a));
-
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
-
- if (max (a) != 1)
- {
- // sequence
- //
- String container (econtainer (a));
-
- // container const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the wildcard" << endl
- << " * element sequence." << endl
- << " *" << endl
- << " * @return A constant reference to the sequence " <<
- "container." << endl
- << " */" << endl;
- }
-
- os << "const " << container << "&" << endl
- << aname << " () const;"
- << endl;
-
- // container&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "wildcard element" << endl
- << " * sequence." << endl
- << " *" << endl
- << " * @return A reference to the sequence container." << endl
- << " */" << endl;
- }
-
- os << container << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (container const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy elements from a given sequence." << endl
- << " *" << endl
- << " * @param s A sequence to copy elements from." << endl
- << " *" << endl
- << " * For each element in @a s this function " <<
- "makes a copy and adds" << endl
- << " * it to the wildcard element sequence. Note that " <<
- "this operation" << endl
- << " * completely changes the sequence and all old " <<
- "elements will be" << endl
- << " * lost." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << container << "& s);"
- << endl;
- }
- else if (min (a) == 0)
- {
- // optional
- //
- String container (econtainer (a));
-
- // container const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the wildcard" << endl
- << " * element container." << endl
- << " *" << endl
- << " * @return A constant reference to the optional " <<
- "container." << endl
- << " */" << endl;
- }
-
- os << "const " << container << "&" << endl
- << aname << " () const;"
- << endl;
-
- // container&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "wildcard element" << endl
- << " * container." << endl
- << " *" << endl
- << " * @return A reference to the optional container." << endl
- << " */" << endl;
- }
-
- os << container << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (type const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the wildcard content." << endl
- << " *" << endl
- << " * @param e A new element to set." << endl
- << " *" << endl
- << " * This function makes a copy of its argument " <<
- "and sets it as" << endl
- << " * the new wildcard content." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << xerces_ns << "::DOMElement& e);"
- << endl;
-
- // void
- // name (type*);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the wildcard content without copying." << endl
- << " *" << endl
- << " * @param p A new element to use." << endl
- << " *" << endl
- << " * This function will use the passed element " <<
- "directly instead" << endl
- << " * of making a copy. For this to work the element " <<
- "should belong" << endl
- << " * to the DOM document associated with this instance." << endl
- << " *" << endl
- << " * @see " << edom_document (c) << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (" << xerces_ns << "::DOMElement* p);"
- << endl;
-
- // void
- // name (container const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the wildcard content." << endl
- << " *" << endl
- << " * @param x An optional container with the new " <<
- "element to set." << endl
- << " *" << endl
- << " * If the element is present in @a x then this function " <<
- "makes a " << endl
- << " * copy of this element and sets it as the new wildcard " <<
- "content." << endl
- << " * Otherwise the element container is set the 'not " <<
- "present' state." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << container << "& x);"
- << endl;
- }
- else
- {
- // one
- //
-
- // type const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the wildcard" << endl
- << " * element." << endl
- << " *" << endl
- << " * @return A constant reference to the DOM element." << endl
- << " */" << endl;
- }
-
- os << "const " << xerces_ns << "::DOMElement&" << endl
- << aname << " () const;"
- << endl;
-
- // type&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "wildcard element." << endl
- << " *" << endl
- << " * @return A reference to the DOM element." << endl
- << " */" << endl;
- }
-
- os << xerces_ns << "::DOMElement&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (type const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the wildcard content." << endl
- << " *" << endl
- << " * @param e A new element to set." << endl
- << " *" << endl
- << " * This function makes a copy of its argument " <<
- "and sets it as" << endl
- << " * the new wildcard content." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << xerces_ns << "::DOMElement& e);"
- << endl;
-
- // void
- // name (const*);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the wildcard content without copying." << endl
- << " *" << endl
- << " * @param p A new element to use." << endl
- << " *" << endl
- << " * This function will use the passed element " <<
- "directly instead" << endl
- << " * of making a copy. For this to work the element " <<
- "should belong" << endl
- << " * to the DOM document associated with this instance." << endl
- << " *" << endl
- << " * @see " << edom_document (c) << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (" << xerces_ns << "::DOMElement* p);"
- << endl;
- }
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& aname (eaname (a));
- String const& mname (emname (a));
-
- String container (econtainer (a));
-
- // container const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the" << endl
- << " * attribute set." << endl
- << " *" << endl
- << " * @return A constant reference to the set " <<
- "container." << endl
- << " */" << endl;
- }
-
- os << "const " << container << "&" << endl
- << aname << " () const;"
- << endl;
-
- // container&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "attribute set." << endl
- << " *" << endl
- << " * @return A reference to the set container." << endl
- << " */" << endl;
- }
-
- os << container << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (container const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy attributes from a given set." << endl
- << " *" << endl
- << " * @param s A set to copy elements from." << endl
- << " *" << endl
- << " * For each attribute in @a s this function " <<
- "makes a copy and adds" << endl
- << " * it to the set. Note that this operation " <<
- "completely changes the " << endl
- << " * set and all old attributes will be lost." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << container << "& s);"
- << endl;
- }
- };
-
- //
- //
- struct Member: Traversal::Member, Context
- {
- Member (Context& c)
- : Context (c),
- type_name_ (c),
- member_function_ (c)
- {
- belongs_ >> type_name_;
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (m.scope ()));
-
- String const& type (etype (m));
- bool el (m.is_a<SemanticGraph::Element> ());
-
- bool def_attr (m.default_p () && !el);
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name " << comment (m.name ()) << endl
- << " *" << endl
- << " * @brief Accessor and modifier functions for the %" <<
- comment (m.name ()) << endl
- << " * ";
-
- if (max (m) != 1)
- {
- os << "sequence element." << endl;
- }
- else if (min (m) == 0)
- {
- if (def_attr)
- os << "optional attribute with a default value." << endl;
- else
- os << "optional " << (el ? "element." : "attribute.") << endl;
- }
- else
- {
- os << "required " << (el ? "element." : "attribute.") << endl;
- }
-
- if (m.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (m.annotation ());
- }
-
- os << " */" << endl
- << "//@{" << endl;
- }
- else
- {
- os << "// " << comment (m.name ()) << endl
- << "//" << endl;
- }
-
- // Typedefs.
- //
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief " << (el ? "Element" : "Attribute") <<
- " type." << endl
- << " */" << endl;
- }
-
- os << "typedef ";
-
- belongs (m, belongs_);
-
- os << " " << type << ";";
-
- if (max (m) != 1)
- {
- String const& container (econtainer (m));
- bool isense (options.generate_intellisense ());
-
- // sequence
- //
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief Element sequence container type." << endl
- << " */" << endl;
- }
-
- os << "typedef ::xsd::cxx::tree::sequence< " << type << " > " <<
- container << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief Element iterator type." << endl
- << " */" << endl;
- }
-
- // IntelliSense does not like aliases and fully-qualified
- // names here.
- //
- if (!isense)
- os << "typedef " << container << "::iterator " <<
- eiterator (m) << ";";
- else
- os << "typedef xsd::cxx::tree::sequence< " << type <<
- " >::iterator " << eiterator (m) << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief Element constant iterator type." << endl
- << " */" << endl;
- }
-
- if (!isense)
- os << "typedef " << container << "::const_iterator " <<
- econst_iterator (m) << ";";
- else
- os << "typedef xsd::cxx::tree::sequence< " << type <<
- " >::const_iterator " << econst_iterator (m) << ";";
-
- }
- else if (min (m) == 0 && !def_attr)
- {
- // optional
- //
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief " << (el ? "Element" : "Attribute") <<
- " optional container type." << endl
- << " */" << endl;
- }
-
- os << "typedef ::xsd::cxx::tree::optional< " << type << " > " <<
- econtainer (m) << ";";
- }
- else
- {
- // one
- //
- }
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief " << (el ? "Element" : "Attribute") <<
- " traits type." << endl
- << " */" << endl;
- }
- os << "typedef ::xsd::cxx::tree::traits< " << type << ", " <<
- char_type;
-
- SemanticGraph::Type& t (m.type ());
-
- if (t.is_a<SemanticGraph::Fundamental::Double> ())
- os << ", ::xsd::cxx::tree::schema_type::double_";
- else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
- os << ", ::xsd::cxx::tree::schema_type::decimal";
-
- os << " > " << etraits (m) << ";"
- << endl;
-
-
- // Element id.
- //
- if (el && ordered_p (c))
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Element id used for capturing content " <<
- "order." << endl
- << " */" << endl;
-
- SemanticGraph::Context& ctx (m.context ());
-
- os << "static const ::std::size_t " <<
- ctx.get<String> ("ordered-id-name") << " = " <<
- ctx.get<size_t> ("ordered-id") << "UL;" << endl;
- }
-
- member_function_.traverse (m);
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
- }
-
- private:
- MemberTypeName type_name_;
- Traversal::Belongs belongs_;
-
- MemberFunction member_function_;
- };
-
-
- struct Any: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- Any (Context& c)
- : Context (c), any_function_ (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name " << ename (a) << endl
- << " *" << endl
- << " * @brief Accessor and modifier functions for the " <<
- "any wildcard." << endl;
-
- if (a.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (a.annotation ());
- }
-
- os << " */" << endl
- << "//@{" << endl;
- }
- else
- {
- os << "// " << ename (a) << endl
- << "//" << endl;
- }
-
- // Typedefs.
- //
- if (max (a) != 1)
- {
- String const& container (econtainer (a));
-
- // sequence
- //
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM element sequence container type." << endl
- << " */" << endl;
- }
-
- os << "typedef ::xsd::cxx::tree::element_sequence " <<
- container << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM element iterator type." << endl
- << " */" << endl;
- }
-
- os << "typedef " << container << "::iterator " <<
- eiterator (a) << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM element constant iterator type." << endl
- << " */" << endl;
- }
-
- os << "typedef " << container << "::const_iterator " <<
- econst_iterator (a) << ";"
- << endl;
-
- }
- else if (min (a) == 0)
- {
- // optional
- //
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM element optional container type." << endl
- << " */" << endl;
- }
-
- os << "typedef ::xsd::cxx::tree::element_optional " <<
- econtainer (a) << ";"
- << endl;
- }
- else
- {
- // one
- //
- if (doxygen)
- os << endl;
- }
-
- // Wildcard id.
- //
- if (ordered_p (c))
- {
- if (doxygen)
- os << "/**" << endl
- << " * @brief Wildcard id used for capturing content " <<
- "order." << endl
- << " */" << endl;
-
- SemanticGraph::Context& ctx (a.context ());
-
- os << "static const ::std::size_t " <<
- ctx.get<String> ("ordered-id-name") << " = " <<
- ctx.get<size_t> ("ordered-id") << "UL;" << endl;
- }
-
- any_function_.traverse (a);
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& container (econtainer (a));
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name " << ename (a) << endl
- << " *" << endl
- << " * @brief Accessor and modifier functions for the " <<
- "anyAttribute" << endl
- << " * wildcard." << endl;
-
- if (a.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (a.annotation ());
- }
-
- os << " */" << endl
- << "//@{" << endl;
- }
- else
- {
- os << "// " << ename (a) << endl
- << "//" << endl;
- }
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM attribute set container type." << endl
- << " */" << endl;
- }
-
- os << "typedef ::xsd::cxx::tree::attribute_set< " << char_type <<
- " > " << container << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM attribute iterator type." << endl
- << " */" << endl;
- }
-
- os << "typedef " << container << "::iterator " <<
- eiterator (a) << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief DOM attribute constant iterator type." << endl
- << " */" << endl;
- }
-
- os << "typedef " << container << "::const_iterator " <<
- econst_iterator (a) << ";"
- << endl;
-
- any_function_.traverse (a);
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
- }
-
- private:
- AnyFunction any_function_;
- };
-
- struct DataMember: Traversal::Member, Context
- {
- DataMember (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m)) return;
-
- String const& member (emember (m));
-
- bool def_attr (m.default_p () &&
- m.is_a<SemanticGraph::Attribute> ());
-
- if (max (m) != 1)
- {
- // sequence
- //
- os << econtainer (m) << " " << member << ";";
- }
- else if (min (m) == 0 && !def_attr)
- {
- // optional
- //
- os << econtainer (m) << " " << member << ";";
- }
- else
- {
- // one
- //
- os << "::xsd::cxx::tree::one< " << etype (m) << " > " <<
- member << ";";
- }
-
- // default_value
- //
- if (m.default_p ())
- {
- bool simple (true);
-
- if (m.is_a<SemanticGraph::Element> ())
- {
- IsSimpleType test (simple);
- test.dispatch (m.type ());
- }
-
- if (simple)
- {
- bool lit (false);
- {
- IsLiteralValue test (lit);
- test.dispatch (m.type ());
- }
-
- if (!lit)
- {
- os << "static const " << etype (m) << " " <<
- edefault_value_member (m) << ";";
- }
- }
- }
- }
- };
-
- struct DataAny: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- DataAny (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
-
- if (max (a) != 1)
- {
- // sequence
- //
- os << econtainer (a) << " " << member << ";";
- }
- else if (min (a) == 0)
- {
- // optional
- //
- os << econtainer (a) << " " << member << ";";
- }
- else
- {
- // one
- //
- os << "::xsd::cxx::tree::element_one " << member << ";";
- }
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- os << econtainer (a) << " " << emember (a) << ";";
- }
- };
-
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- base_name_ (c),
- member_name_ (c),
- any_ (c),
- member_ (c),
- data_any_ (c),
- data_member_ (c)
- {
- inherits_base_ >> base_name_;
- inherits_member_ >> member_name_;
-
- names_ >> member_;
- if (options.generate_wildcard ())
- names_ >> any_;
-
- names_data_ >> data_member_;
- if (options.generate_wildcard ())
- names_data_ >> data_any_;
- }
-
- virtual void
- traverse (Type& c)
- {
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- bool renamed (renamed_type (c, name));
- if (renamed && !name)
- return;
-
- SemanticGraph::Context& ctx (c.context ());
-
- bool has_members (has<Traversal::Member> (c));
-
- bool hae (has<Traversal::Any> (c));
- bool haa (has<Traversal::AnyAttribute> (c));
-
- bool gen_wildcard (options.generate_wildcard ());
-
- bool mixed (mixed_p (c) && !ctx.count ("mixed-in-base"));
- bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
-
- bool simple (true);
- {
- IsSimpleType t (simple);
- t.dispatch (c);
- }
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (c);
- }
-
- SemanticGraph::Enumeration* enum_base (0);
- {
- IsEnumBasedType t (enum_base);
- t.dispatch (c);
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Class corresponding to the %" <<
- comment (c.name ()) << " schema type." << endl;
-
- if (c.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (c.annotation ());
- }
-
- os << " *" << endl
- << " * @nosubgrouping" << endl
- << " */" << endl;
- }
-
- os << "class " << type_exp << name << ": public ";
-
- if (c.inherits_p ())
- inherits (c, inherits_base_);
- else
- os << any_type;
-
- os << "{"
- << "public:" << endl;
-
- // Members.
- //
- names (c, names_);
-
- // Mixed content.
- //
- if (mixed)
- {
- String const& type (ctx.get<String> ("mixed-type"));
- String const& cont (ctx.get<String> ("mixed-container"));
- String const& iter (ctx.get<String> ("mixed-iterator"));
- String const& citer (ctx.get<String> ("mixed-const-iterator"));
-
- if (doxygen)
- os << "/**" << endl
- << " * @name " << comment ("text_content") << endl
- << " *" << endl
- << " * @brief Accessor and modifier functions for text " <<
- "content." << endl
- << " */" << endl
- << "//@{" << endl;
- else
- os << "// text_content" << endl
- << "//" << endl;
-
- // Typedefs.
- //
- bool isense (options.generate_intellisense ());
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Text content type." << endl
- << " */" << endl;
-
- os << "typedef " << xs_string_type << " " << type << ";";
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Text content sequence container type." << endl
- << " */" << endl;
-
- os << "typedef ::xsd::cxx::tree::sequence< " << type <<
- " > " << cont << ";";
-
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Text content iterator type." << endl
- << " */" << endl;
-
- // IntelliSense does not like aliases and fully-qualified
- // names here.
- //
- if (!isense)
- os << "typedef " << cont << "::iterator " << iter<< ";";
- else
- os << "typedef ::xsd::cxx::tree::sequence< " << type <<
- " >::iterator " << iter << ";";
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Text content constant iterator type." << endl
- << " */" << endl;
-
- if (!isense)
- os << "typedef " << cont << "::const_iterator " << citer<< ";";
- else
- os << "typedef ::xsd::cxx::tree::sequence< " << type <<
- " >::const_iterator " << citer << ";";
-
- os << endl;
-
- // Content id.
- //
- if (doxygen)
- os << "/**" << endl
- << " * @brief Text content id used for capturing content " <<
- "order." << endl
- << " */" << endl;
-
- os << "static const ::std::size_t " <<
- ctx.get<String> ("mixed-ordered-id-name") << " = " <<
- ctx.get<size_t> ("mixed-ordered-id") << "UL;" << endl;
-
- // Accessors and modifiers.
- //
- String const& aname (ctx.get<String> ("mixed-aname"));
- String const& mname (ctx.get<String> ("mixed-mname"));
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the text" << endl
- << " * content sequence." << endl
- << " *" << endl
- << " * @return A constant reference to the sequence " <<
- "container." << endl
- << " */" << endl;
-
- os << "const " << cont << "&" << endl
- << aname << " () const;"
- << endl;
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "text content" << endl
- << " * sequence." << endl
- << " *" << endl
- << " * @return A reference to the sequence container." << endl
- << " */" << endl;
-
- os << cont << "&" << endl
- << aname << " ();"
- << endl;
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Copy elements from a given sequence." << endl
- << " *" << endl
- << " * @param s A sequence to copy entries from." << endl
- << " *" << endl
- << " * For each element in @a s this function " <<
- "add it to the sequence." << endl
- << " * Note that this operation " <<
- "completely changes the sequence and" << endl
- << " * all old elements will be lost." << endl
- << " */" << endl;
-
- os << "void" << endl
- << mname << " (const " << cont << "& s);"
- << endl;
-
- if (doxygen)
- os << "//@}" << endl
- << endl;
- }
-
- // dom_document accessors.
- //
- if (edom_document_member_p (c))
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the DOM" << endl
- << " * document associated with this instance." << endl
- << " *" << endl
- << " * @return A constant reference to the DOM document." << endl
- << " *" << endl
- << " * The DOM document returned by this function is " <<
- "used to store" << endl
- << " * the raw XML content corresponding to wildcards." << endl
- << " */" << endl;
- }
- else
- os << "// DOMDocument for wildcard content." << endl
- << "//" << endl;
-
- os << "const " << xerces_ns << "::DOMDocument&" << endl
- << edom_document (c) << " () const;"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the DOM " <<
- "document" << endl
- << " * associated with this instance." << endl
- << " *" << endl
- << " * @return A reference to the DOM document." << endl
- << " *" << endl
- << " * The DOM document returned by this function is " <<
- "used to store" << endl
- << " * the raw XML content corresponding to wildcards." << endl
- << " */" << endl;
- }
- os << xerces_ns << "::DOMDocument&" << endl
- << edom_document (c) << " ();"
- << endl;
- }
-
- // Order container.
- //
- if (ordered)
- {
- String const& type (ctx.get<String> ("order-type"));
- String const& cont (ctx.get<String> ("order-container"));
- String const& iter (ctx.get<String> ("order-iterator"));
- String const& citer (ctx.get<String> ("order-const-iterator"));
-
- String const ct (options.order_container_specified ()
- ? options.order_container ()
- : "::std::vector");
-
- if (doxygen)
- os << "/**" << endl
- << " * @name " << comment ("content_order") << endl
- << " *" << endl
- << " * @brief Accessor and modifier functions for content " <<
- "order." << endl
- << " */" << endl
- << "//@{" << endl;
- else
- os << "// content_order" << endl
- << "//" << endl;
-
- // Typedefs.
- //
- bool isense (options.generate_intellisense ());
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Content order entry type." << endl
- << " */" << endl;
-
- os << "typedef " << ns_name (xs_ns ()) << "::" <<
- xs_ns ().context ().get<String> ("content-order") << " " <<
- type << ";";
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Content order sequence container type." << endl
- << " */" << endl;
-
- os << "typedef " << ct << "< " << type << " > " << cont << ";";
-
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Content order iterator type." << endl
- << " */" << endl;
-
- // IntelliSense does not like aliases and fully-qualified
- // names here.
- //
- if (!isense)
- os << "typedef " << cont << "::iterator " << iter<< ";";
- else
- os << "typedef " << ct << "< " << type << " >::iterator " <<
- iter << ";";
-
- if (doxygen)
- os << endl
- << "/**" << endl
- << " * @brief Content order constant iterator type." << endl
- << " */" << endl;
-
- if (!isense)
- os << "typedef " << cont << "::const_iterator " << citer<< ";";
- else
- os << "typedef " << ct << "< " << type <<
- " >::const_iterator " << citer << ";";
-
- os << endl;
-
- // Accessors and modifiers.
- //
- String const& aname (ctx.get<String> ("order-aname"));
- String const& mname (ctx.get<String> ("order-mname"));
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the content" << endl
- << " * order sequence." << endl
- << " *" << endl
- << " * @return A constant reference to the sequence " <<
- "container." << endl
- << " */" << endl;
-
- os << "const " << cont << "&" << endl
- << aname << " () const;"
- << endl;
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "content order" << endl
- << " * sequence." << endl
- << " *" << endl
- << " * @return A reference to the sequence container." << endl
- << " */" << endl;
-
- os << cont << "&" << endl
- << aname << " ();"
- << endl;
-
- if (doxygen)
- os << "/**" << endl
- << " * @brief Copy elements from a given sequence." << endl
- << " *" << endl
- << " * @param s A sequence to copy entries from." << endl
- << " *" << endl
- << " * For each element in @a s this function " <<
- "add it to the sequence." << endl
- << " * Note that this operation " <<
- "completely changes the sequence and" << endl
- << " * all old elements will be lost." << endl
- << " */" << endl;
-
- os << "void" << endl
- << mname << " (const " << cont << "& s);"
- << endl;
-
- if (doxygen)
- os << "//@}" << endl
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name Constructors" << endl
- << " */" << endl
- << "//@{" << endl
- << endl;
- }
- else
- {
- os << "// Constructors." << endl
- << "//" << endl;
- }
-
- bool generate_no_base_ctor (false);
- {
- GenerateWithoutBaseCtor t (generate_no_base_ctor);
- t.traverse (c);
- }
-
- bool has_complex_non_op_args (false);
- bool has_poly_non_op_args (false);
- bool complex_poly_args_clash (true);
- {
- HasComplexPolyNonOptArgs t (*this, true,
- has_complex_non_op_args,
- has_poly_non_op_args,
- complex_poly_args_clash);
- t.traverse (c);
- }
-
- // default c-tor
- //
- if (options.generate_default_ctor ())
- {
- // c-tor (ultimate-base, all-non-optional-members) will become
- // default c-tor if our inheritance hierarchy has no required
- // members and no simple base. We can also collide with
- // c-tor (all-non-optional-members) if we have no required
- // members.
- //
- bool generate (false);
- {
- GenerateDefaultCtor t (*this, generate, generate_no_base_ctor);
- t.traverse (c);
- }
-
- if (generate)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Default constructor." << endl
- << " *" << endl
- << " * Note that this constructor leaves required " <<
- "elements and" << endl
- << " * attributes uninitialized." << endl
- << " */" << endl;
- }
-
- os << name << " ();"
- << endl;
- }
- }
-
- // c-tor (base, all-non-optional-members)
- //
- if (options.generate_from_base_ctor ())
- {
- // c-tor (base, all-non-optional-members) will be equivalent to
- // c-tor (ultimate-base, all-non-optional-members) unless our
- // immediate base's hierarchy has some non-optional members.
- // We also need to generate this c-tor when one of the types
- // in our inheritance hierarchy was customized since the
- // customized version may not necessarily be convertible to
- // the base without loss of information.
- //
- bool generate (false);
- {
- GenerateFromBaseCtor t (*this, generate);
- t.traverse (c);
- }
-
- if (generate)
- {
- bool has_complex_non_op_args (false);
- bool has_poly_non_op_args (false);
- bool complex_poly_args_clash (true);
- {
- HasComplexPolyNonOptArgs t (*this, false,
- has_complex_non_op_args,
- has_poly_non_op_args,
- complex_poly_args_clash);
- t.traverse (c);
- }
-
- //
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the immediate "
- "base and" << endl
- << " * initializers for required elements and "
- << "attributes." << endl
- << " */" << endl;
- }
-
- os << name << " (const ";
- inherits (c, inherits_member_);
- os << "&";
- {
- FromBaseCtorArg args (*this, CtorArgType::type, false);
- Traversal::Names args_names (args);
- names (c, args_names);
- }
- os << ");"
- << endl;
-
- // If we have any complex arguments in the previous c-tor
- // then also generate the auto_ptr version.
- //
- if (has_complex_non_op_args)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the immediate "
- "base and" << endl
- << " * initializers for required elements and "
- << "attributes" << endl
- << " * (" << auto_ptr << " version)." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "values directly" << endl
- << " * instead of making copies." << endl
- << " */" << endl;
- }
-
- os << name << " (const ";
- inherits (c, inherits_member_);
- os << "&";
- {
- FromBaseCtorArg args (
- *this, CtorArgType::complex_auto_ptr, false);
- Traversal::Names args_names (args);
- names (c, args_names);
- }
- os << ");"
- << endl;
- }
-
- // If we are generating polymorphic code then we also need to
- // provide auto_ptr version for every polymorphic type.
- //
- if (polymorphic &&
- has_poly_non_op_args && !complex_poly_args_clash)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the immediate "
- "base and" << endl
- << " * initializers for required elements and "
- << "attributes" << endl
- << " * (" << auto_ptr << " version)." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "values directly" << endl
- << " * instead of making copies." << endl
- << " */" << endl;
- }
-
- os << name << " (const ";
- inherits (c, inherits_member_);
- os << "&";
- {
- FromBaseCtorArg args (
- *this, CtorArgType::poly_auto_ptr, false);
- Traversal::Names args_names (args);
- names (c, args_names);
- }
- os << ");"
- << endl;
- }
- }
- }
-
- // c-tor (all-non-optional-members)
- //
- if (generate_no_base_ctor)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from initializers " <<
- "for required " << endl
- << " * elements and attributes." << endl
- << " */" << endl;
- }
-
- os << name << " (";
- {
- CtorArgsWithoutBase ctor_args (
- *this, CtorArgType::type, false, true);
- ctor_args.dispatch (c);
- }
- os << ");"
- << endl;
-
-
- // If we have any complex arguments in the previous c-tor
- // then also generate the auto_ptr version. One case where
- // this c-tor will be generated is restriction of anyType.
- //
- if (has_complex_non_op_args)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from initializers " <<
- "for required " << endl
- << " * elements and attributes (" << auto_ptr <<
- " version)." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "values directly" << endl
- << " * instead of making copies." << endl
- << " */" << endl;
- }
-
- os << name << " (";
- {
- CtorArgsWithoutBase ctor_args (
- *this, CtorArgType::complex_auto_ptr, false, true);
- ctor_args.dispatch (c);
- }
- os << ");"
- << endl;
- }
-
- // If we are generating polymorphic code then we also need to
- // provide auto_ptr version for every polymorphic type.
- //
- if (polymorphic &&
- has_poly_non_op_args && !complex_poly_args_clash)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from initializers " <<
- "for required " << endl
- << " * elements and attributes (" << auto_ptr <<
- " version)." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "values directly" << endl
- << " * instead of making copies." << endl
- << " */" << endl;
- }
-
- os << name << " (";
- {
- CtorArgsWithoutBase ctor_args (
- *this, CtorArgType::poly_auto_ptr, false, true);
- ctor_args.dispatch (c);
- }
- os << ");"
- << endl;
- }
- }
-
- if (string_based)
- {
- // We might not have the value type if this enum is customized.
- //
- if (enum_base != 0 && enum_base->context ().count ("value"))
- {
- // c-tor (enum-value, all-non-optional-members)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the " <<
- "underlying enum value" << endl
- << " * and initializers for required elements and " <<
- "attributes." << endl
- << " */" << endl;
- }
-
- os << name << " (" << fq_name (*enum_base) << "::" <<
- evalue (*enum_base);
-
- {
- CtorArgsWithoutBase ctor_args (
- *this, CtorArgType::type, false, false);
- ctor_args.dispatch (c);
- }
-
- os << ");"
- << endl;
- }
-
- // c-tor (const char*, all-non-optional-members)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a C string and " <<
- "initializers" << endl
- << " * for required elements and attributes." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << char_type << "*";
-
- {
- CtorArgsWithoutBase ctor_args (
- *this, CtorArgType::type, false, false);
- ctor_args.dispatch (c);
- }
-
- os << ");"
- << endl;
-
- // c-tor (const std::string&, all-non-optional-members)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string and" <<
- "initializers" << endl
- << " * for required elements and attributes." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << string_type << "&";
-
- {
- CtorArgsWithoutBase ctor_args (
- *this, CtorArgType::type, false, false);
- ctor_args.dispatch (c);
- }
-
- os << ");"
- << endl;
- }
-
- // c-tor (ultimate-base, all-non-optional-members)
- //
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the ultimate "
- "base and" << endl
- << " * initializers for required elements and " <<
- "attributes." << endl
- << " */" << endl;
- }
-
- os << name << " (";
-
- {
- CtorArgs ctor_args (*this, CtorArgType::type);
- ctor_args.dispatch (c);
- }
-
- os << ");"
- << endl;
-
- // If we have any complex arguments in the previous c-tor
- // then also generate the auto_ptr version.
- //
- if (has_complex_non_op_args)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the ultimate "
- "base and" << endl
- << " * initializers for required elements and " <<
- "attributes" << endl
- << " * (" << auto_ptr << " version)." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "values directly" << endl
- << " * instead of making copies." << endl
- << " */" << endl;
- }
-
- os << name << " (";
-
- {
- CtorArgs ctor_args (*this, CtorArgType::complex_auto_ptr);
- ctor_args.dispatch (c);
- }
-
- os << ");"
- << endl;
- }
-
- // If we are generating polymorphic code then we also need to
- // provide auto_ptr version for every polymorphic type.
- //
- if (polymorphic && has_poly_non_op_args && !complex_poly_args_clash)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from the ultimate "
- "base and" << endl
- << " * initializers for required elements and " <<
- "attributes" << endl
- << " * (" << auto_ptr << " version)." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "values directly" << endl
- << " * instead of making copies." << endl
- << " */" << endl;
- }
-
- os << name << " (";
-
- {
- CtorArgs ctor_args (*this, CtorArgType::poly_auto_ptr);
- ctor_args.dispatch (c);
- }
-
- os << ");"
- << endl;
- }
-
- // c-tor (istream&)
- //
- NarrowStrings const& st (options.generate_extraction ());
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a data " <<
- "representation" << endl
- << " * stream." << endl
- << " *" << endl
- << " * @param s A stream to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (" << istream_type << "< " << i->c_str () <<
- " >& s," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
-
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM element." << endl
- << " *" << endl
- << " * @param e A DOM element to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
-
- if (simple)
- {
- // c-tor (xercesc::DOMAttr)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM attribute." << endl
- << " *" << endl
- << " * @param a A DOM attribute to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // c-tor (std::basic_string const&, xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a string fragment." << endl
- << " *" << endl
- << " * @param s A string fragment to extract the data from." << endl
- << " * @param e A pointer to DOM element containing the " <<
- "string fragment." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " * @param c A pointer to the object that will " <<
- "contain the new" << endl
- << " * instance." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
- }
- }
-
- // copy c-tor
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy constructor." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " *" << endl
- << " * For polymorphic object models use the @c _clone " <<
- "function instead." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << name << "& x," << endl
- << flags_type << " f = 0," << endl
- << container << "* c = 0);"
- << endl;
-
- // clone
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy the instance polymorphically." << endl
- << " *" << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @param c A pointer to the object that will contain " <<
- "the copy." << endl
- << " * @return A pointer to the dynamically allocated copy." << endl
- << " *" << endl
- << " * This function ensures that the dynamic type of the " <<
- "instance is" << endl
- << " * used for copying and should be used for polymorphic " <<
- "object" << endl
- << " * models instead of the copy constructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << name << "*" << endl
- << "_clone (" << flags_type << " f = 0," << endl
- << container << "* c = 0) const";
-
- // Make the _clone() function pure virtual if the type is
- // abstract or we are generating a polymorphic base for a
- // custom implementation (in which case the base must be
- // inherited from and _clone() overridden).
- //
- if (c.abstract_p () ||
- (renamed && polymorphic && polymorphic_p (c)))
- os << " = 0";
-
- os << ";"
- << endl;
-
- // operator=
- //
- bool priv (false);
-
- if (!simple)
- {
- if (options.suppress_assignment ())
- {
- priv = true;
- os << "private:" << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Disabled copy assignment operator." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @return A reference to itself." << endl
- << " */" << endl;
- }
-
- os << name << "&" << endl
- << "operator= (const " << name << "& x);"
- << endl;
- }
- else if (has_members || (gen_wildcard && (hae || haa)))
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy assignment operator." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @return A reference to itself." << endl
- << " *" << endl
- << " * For polymorphic object models use the @c _clone " <<
- "function instead." << endl
- << " */" << endl;
- }
-
- os << name << "&" << endl
- << "operator= (const " << name << "& x);"
- << endl;
- }
- }
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
-
- if (priv)
- os << "public:" << endl;
-
- // d-tor
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Destructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << endl
- << "~" << name << " ();"
- << endl;
-
- // Data members and implementation functions.
- //
- if (has_members || hae || (haa && gen_wildcard) || ordered || mixed)
- {
- os << "// Implementation." << endl
- << "//" << endl;
-
- if (doxygen)
- os << endl
- << "//@cond" << endl
- << endl;
-
- if (!options.suppress_parsing () &&
- (has_members || hae || (haa && gen_wildcard) || mixed))
- {
- // parse ()
- //
- os << "protected:" << endl
- << "void" << endl
- << unclash (name, "parse") << " (" <<
- parser_type << "&," << endl
- << flags_type << ");"
- << endl;
- }
-
- os << "protected:"
- << endl;
-
- // parse (istream)
- //
- if (has_members)
- {
- for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
- ++i)
- {
- os << "void" << endl
- << unclash (name, "parse") << " (" <<
- istream_type << "< " << i->c_str () << " >&," << endl
- << flags_type << ");"
- << endl;
- }
- }
-
- // DOM document.
- //
- if (edom_document_member_p (c))
- {
- os << dom_auto_ptr << "< " << xerces_ns <<
- "::DOMDocument > " << edom_document_member (c) << ";"
- << endl;
- }
-
- // Mixed text content.
- //
- if (mixed)
- {
- os << ctx.get<String> ("mixed-container") << " " <<
- ctx.get<String> ("mixed-member") << ";"
- << endl;
- }
-
- // Order container.
- //
- if (ordered)
- {
- os << ctx.get<String> ("order-container") << " " <<
- ctx.get<String> ("order-member") << ";"
- << endl;
- }
-
- //
- //
- names (c, names_data_);
-
- if (doxygen)
- os << endl
- << "//@endcond" << endl;
- }
-
- os << "};";
-
- // Comparison operators.
- //
- if (options.generate_comparison () &&
- (has_members || !c.inherits_p () ||
- ((hae || haa) && gen_wildcard)))
- {
- os << inst_exp
- << "bool" << endl
- << "operator== (const " << name << "&, const " << name << "&);"
- << endl;
-
- os << inst_exp
- << "bool" << endl
- << "operator!= (const " << name << "&, const " << name << "&);"
- << endl
- << endl;
- }
- }
-
- private:
- Traversal::Inherits inherits_base_;
- BaseTypeName base_name_;
-
- Traversal::Inherits inherits_member_;
- MemberTypeName member_name_;
-
- Traversal::Names names_;
- Any any_;
- Member member_;
-
- Traversal::Names names_data_;
- DataAny data_any_;
- DataMember data_member_;
- };
-
-
- struct GlobalElement: Traversal::Element,
- GlobalElementBase,
- Context
- {
- GlobalElement (Context& c)
- : GlobalElementBase (c), Context (c), type_name_ (c)
- {
- belongs_ >> type_name_;
- }
-
- virtual void
- traverse (Type& e)
- {
- if (!doc_root_p (e))
- return;
-
- SemanticGraph::Type& t (e.type ());
-
- bool fund (false);
- {
- IsFundamentalType test (fund);
- test.dispatch (t);
- }
-
- bool simple (true);
- if (!fund)
- {
- IsSimpleType test (simple);
- test.dispatch (t);
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Class corresponding to the %" <<
- comment (e.name ()) << " root element." << endl;
-
- if (e.annotated_p ())
- {
- os << " *" << endl;
- write_annotation (e.annotation ());
- }
-
- os << " *" << endl
- << " * @nosubgrouping" << endl
- << " */" << endl;
- }
-
- String const& name (ename (e));
-
- os << "class " << type_exp << name << ": public " << element_type
- << "{"
- << "public:" << endl
- << endl;
-
- String const& type (etype (e));
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name Element value" << endl
- << " *" << endl
- << " * @brief Accessor and modifier functions for the " <<
- "element value." << endl
- << " */" << endl
- << "//@{" << endl
- << endl;
- }
- else
- {
- os << "// Element value." << endl
- << "//" << endl;
- }
-
- // Typedefs.
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Element value type." << endl
- << " */" << endl;
- }
-
- os << "typedef ";
-
- belongs (e, belongs_);
-
- os << " " << type << ";";
-
- if (doxygen)
- {
- os << endl
- << "/**" << endl
- << " * @brief Element value traits type." << endl
- << " */" << endl;
- }
-
- os << "typedef ::xsd::cxx::tree::traits< " << type << ", " <<
- char_type;
-
- if (t.is_a<SemanticGraph::Fundamental::Double> ())
- os << ", ::xsd::cxx::tree::schema_type::double_";
- else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
- os << ", ::xsd::cxx::tree::schema_type::decimal";
-
- os << " > " << etraits (e) << ";"
- << endl;
-
- // Accessors/modifiers.
- //
- String const& aname (eaname (e));
- String const& mname (emname (e));
-
- // type const&
- // name () const;
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) reference " <<
- "to the element" << endl
- << " * value." << endl
- << " *" << endl
- << " * @return A constant reference to the element value." <<
- endl
- << " */" << endl;
- }
-
- os << "const " << type << "&" << endl
- << aname << " () const;"
- << endl;
-
- // type&
- // name ();
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-write reference to the " <<
- "element value." << endl
- << " *" << endl
- << " * @return A reference to the element value." << endl
- << " */" << endl;
- }
-
- os << type << "&" << endl
- << aname << " ();"
- << endl;
-
- // void
- // name (type const&);
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the element value." << endl
- << " *" << endl
- << " * @param x A new value to set." << endl
- << " *" << endl
- << " * This function makes a copy of its argument " <<
- "and sets it as" << endl
- << " * the new value of the element." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (const " << type << "& x);"
- << endl;
-
- // void
- // name (auto_ptr<type>);
- //
- if (!fund)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Set the element value without " <<
- "copying." << endl
- << " *" << endl
- << " * @param p A new value to use." << endl
- << " *" << endl
- << " * This function will try to use the passed value " <<
- "directly" << endl
- << " * instead of making a copy." << endl
- << " */" << endl;
- }
-
- os << "void" << endl
- << mname << " (" << auto_ptr << "< " << type << " > p);"
- << endl;
- }
-
- // auto_ptr<type>
- // detach_name ();
- //
- if (detach && !fund)
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Detach the element value from " <<
- "the object." << endl
- << " *" << endl
- << " * @return A pointer to the element value." << endl
- << " *" << endl
- << " * Note that this function leaves the element " <<
- "object uninitialized." << endl
- << " */" << endl;
- }
-
- os << auto_ptr << "< " << type << " >" << endl
- << edname (e) << " ();"
- << endl;
- }
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a read-only (constant) pointer " <<
- "to the element" << endl
- << " * value." << endl
- << " *" << endl
- << " * @return A constant pointer to the element value " <<
- "or 0 if this" << endl
- << " * element is of a fundamental type." << endl
- << " */" << endl;
- }
-
- os << "virtual const " << any_type << "*" << endl
- << "_value () const;"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return a pointer to the element value." << endl
- << " *" << endl
- << " * @return A pointer to the element value or 0 if this " <<
- "element is" << endl
- << " * of a fundamental type." << endl
- << " */" << endl;
- }
- os << "virtual " << any_type << "*" << endl
- << "_value ();"
- << endl;
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
-
- // Constructor.
- //
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name Constructors" << endl
- << " */" << endl
- << "//@{" << endl
- << endl;
- }
- else
- {
- os << "// Constructors." << endl
- << "//" << endl;
- }
-
- // default c-tor
- //
- if (options.generate_default_ctor ())
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Default constructor." << endl
- << " *" << endl
- << " * Note that this constructor leaves the element " <<
- "value" << endl
- << " * uninitialized." << endl
- << " */" << endl;
- }
-
- os << name << " ();"
- << endl;
- }
-
- // c-tor (value)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from an initializer " <<
- "for the element" << endl
- << " * value." << endl
- << " *" << endl
- << " * @param x Element value." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << type << "& x);"
- << endl;
-
-
- // If the element value is a complex type (has elements,
- // attributes, or wildcards) then also generate the auto_ptr
- // version. If we are generating polymorphic code then we
- // also need to provide auto_ptr version for simple types.
- //
- if (!simple || (polymorphic && polymorphic_p (t)))
- {
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from an initializer " <<
- "for" << endl
- << " * the element value (" << auto_ptr <<
- " version)." << endl
- << " *" << endl
- << " * @param p Element value to use." << endl
- << " *" << endl
- << " * This constructor will try to use the passed " <<
- "value directly" << endl
- << " * instead of making a copy." << endl
- << " */" << endl;
- }
-
- os << name << " (" << auto_ptr << "< " << type << " > p);"
- << endl;
- }
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Create an instance from a DOM element." << endl
- << " *" << endl
- << " * @param e A DOM element to extract the data from." << endl
- << " * @param f Flags to create the new instance with." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << xerces_ns << "::DOMElement& e, " <<
- flags_type << " f = 0);"
- << endl;
- }
-
- // copy c-tor
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy constructor." << endl
- << " *" << endl
- << " * @param x An instance to make a copy of." << endl
- << " * @param f Flags to create the copy with." << endl
- << " *" << endl
- << " * For polymorphic object models use the @c _clone " <<
- "function instead." << endl
- << " */" << endl;
- }
-
- os << name << " (const " << name << "& x, " <<
- flags_type << " f = 0);"
- << endl;
-
- // _clone
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Copy the instance polymorphically." << endl
- << " *" << endl
- << " * @param f Flags to create the copy with." << endl
- << " * @return A pointer to the dynamically allocated copy." << endl
- << " *" << endl
- << " * This function ensures that the dynamic type of the " <<
- "instance is" << endl
- << " * used for copying and should be used for polymorphic " <<
- "object" << endl
- << " * models instead of the copy constructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << name << "*" << endl
- << "_clone (" << flags_type << " f = 0) const;"
- << endl;
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
-
- // Element name and namespace accessors.
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @name Element name and namespace" << endl
- << " *" << endl
- << " * @brief Accessor functions for the element name " <<
- "and namespace." << endl
- << " */" << endl
- << "//@{" << endl
- << endl;
- }
- else
- {
- os << "// Element name and namespace." << endl
- << "//" << endl;
- }
-
- SemanticGraph::Context& ec (e.context ());
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return the element name (static function)." << endl
- << " *" << endl
- << " * @return A read-only string reference containing " <<
- "the element" << endl
- << " * name." << endl
- << " */" << endl;
- }
- os << "static const " << string_type << "&" << endl
- << ec.get<String> ("element-name") << " ();"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return the element namespace (static " <<
- "function)." << endl
- << " *" << endl
- << " * @return A read-only string reference containing " <<
- "the element" << endl
- << " * namespace." << endl
- << " */" << endl;
- }
- os << "static const " << string_type << "&" << endl
- << ec.get<String> ("element-ns") << " ();"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return the element name." << endl
- << " *" << endl
- << " * @return A read-only string reference containing " <<
- "the element" << endl
- << " * name." << endl
- << " */" << endl;
- }
- os << "virtual const " << string_type << "&" << endl
- << "_name () const;"
- << endl;
-
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Return the element namespace." << endl
- << " *" << endl
- << " * @return A read-only string reference containing " <<
- "the element" << endl
- << " * namespace." << endl
- << " */" << endl;
- }
- os << "virtual const " << string_type << "&" << endl
- << "_namespace () const;"
- << endl;
-
- if (doxygen)
- {
- os << "//@}" << endl
- << endl;
- }
-
- // d-tor
- //
- if (doxygen)
- {
- os << "/**" << endl
- << " * @brief Destructor." << endl
- << " */" << endl;
- }
-
- os << "virtual " << endl
- << "~" << name << " ();"
- << endl;
-
- // Data member.
- //
-
- if (doxygen)
- os << "//@cond" << endl
- << endl;
-
- os << "protected:" << endl
- << "::xsd::cxx::tree::one< " << type << " > " <<
- emember (e) << ";"
- << "static const " << string_type << " " <<
- ec.get<String> ("element-name-member") << ";"
- << "static const " << string_type << " " <<
- ec.get<String> ("element-ns-member") << ";";
-
- if (doxygen)
- os << endl
- << "//@endcond" << endl;
-
- os << "};";
- }
-
- private:
- Traversal::Belongs belongs_;
- MemberTypeName type_name_;
- };
- }
-
- void
- generate_tree_header (Context& ctx)
- {
- if (ctx.generate_xml_schema)
- {
- if (ctx.char_type == L"char" && ctx.char_encoding != L"custom")
- {
- ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding <<
- ".hxx>" << endl
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/exceptions.hxx>" << endl
- << "#include <xsd/cxx/tree/elements.hxx>" << endl
- << "#include <xsd/cxx/tree/types.hxx>" << endl
- << endl;
-
- if (!ctx.options.suppress_parsing () ||
- ctx.options.generate_serialization ())
- {
- ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl
- << endl;
- }
-
- if (!ctx.options.suppress_parsing () ||
- ctx.options.generate_serialization ())
- {
- ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl
- << endl;
- }
-
- bool element_map (ctx.options.generate_element_map ());
-
- if (element_map)
- ctx.os << "#include <xsd/cxx/tree/element-map.hxx>" << endl
- << endl;
-
- // I need to include all the "optional" headers here (instead of
- // later in the individual generators for each feature because
- // those headers provide implementation for the fundamental types.
- //
- if (!ctx.options.suppress_parsing ())
- {
- ctx.os << "#include <xsd/cxx/tree/parsing.hxx>" << endl;
-
- Traversal::Schema schema;
- Traversal::Names names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundIncludes type (ctx, "parsing");
-
- schema >> names >> ns >> ns_names >> type;
-
- schema.dispatch (ctx.schema_root);
-
- if (element_map)
- ctx.os << "#include <xsd/cxx/tree/parsing/element-map.txx>" <<
- endl;
-
- ctx.os << endl;
- }
-
- if (ctx.options.generate_serialization ())
- {
- ctx.os << "#include <xsd/cxx/xml/dom/serialization-header.hxx>" << endl
- << "#include <xsd/cxx/tree/serialization.hxx>" << endl;
-
- Traversal::Schema schema;
- Traversal::Names names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
- FundIncludes type (ctx, "serialization");
-
- schema >> names >> ns >> ns_names >> type;
-
- schema.dispatch (ctx.schema_root);
-
- if (element_map)
- ctx.os << "#include <xsd/cxx/tree/serialization/element-map.txx>" <<
- endl;
-
- ctx.os << endl;
- }
-
- if (ctx.options.generate_ostream ())
- {
- ctx.os << "#include <xsd/cxx/tree/std-ostream-operators.hxx>" << endl
- << endl;
- }
-
- NarrowStrings const& ist (ctx.options.generate_insertion ());
- if (!ist.empty ())
- {
- for (NarrowStrings::const_iterator i (ist.begin ()); i != ist.end ();
- ++i)
- {
- if (*i == "ACE_OutputCDR")
- ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-insertion.hxx>"
- << endl;
- else if (*i == "XDR")
- ctx.os << "#include <xsd/cxx/tree/xdr-stream-insertion.hxx>"
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/stream-insertion.hxx>" << endl
- << endl;
- }
-
- NarrowStrings const& est (ctx.options.generate_extraction ());
- if (!est.empty ())
- {
- for (NarrowStrings::const_iterator i (est.begin ()); i != est.end ();
- ++i)
- {
- if (*i == "ACE_InputCDR")
- ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-extraction.hxx>"
- << endl;
- else if (*i == "XDR")
- ctx.os << "#include <xsd/cxx/tree/xdr-stream-extraction.hxx>"
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/stream-extraction.hxx>" << endl
- << endl;
- }
-
- // Emit fundamental types.
- //
- {
- Traversal::Schema schema;
- Traversal::Names names;
- FundamentalNamespace ns (ctx);
-
- schema >> names >> ns;
-
- schema.dispatch (ctx.schema_root);
- }
- }
- else
- {
- bool inline_ (ctx.options.generate_inline ());
-
- ctx.os << "#include <memory> // " << ctx.auto_ptr << endl
- << "#include <limits> // std::numeric_limits" << endl
- << "#include <algorithm> // std::binary_search" << endl;
-
- if (ctx.std >= cxx_version::cxx11)
- ctx.os << "#include <utility> // std::move" << endl;
-
- if (!ctx.options.ordered_type ().empty () ||
- ctx.options.ordered_type_all ())
- {
- ctx.os << "#include <cstddef> // std::size_t" << endl;
-
- if (!ctx.options.order_container_specified ())
- ctx.os << "#include <vector>" << endl;
- }
-
- ctx.os << endl;
-
- if (ctx.char_type == L"char" && ctx.char_encoding != L"custom")
- {
- ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding <<
- ".hxx>" << endl
- << endl;
- }
-
- ctx.os << "#include <xsd/cxx/tree/exceptions.hxx>" << endl
- << "#include <xsd/cxx/tree/elements.hxx>" << endl
- << "#include <xsd/cxx/tree/containers.hxx>" << endl
- << "#include <xsd/cxx/tree/list.hxx>" << endl
- << endl;
-
- if (!ctx.options.suppress_parsing ())
- {
- ctx.os << "#include <xsd/cxx/xml/dom/parsing-header.hxx>" << endl
- << endl;
- }
-
- if (ctx.options.generate_wildcard ())
- {
- if (ctx.options.suppress_parsing () ||
- !ctx.options.generate_serialization ())
- ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl;
-
- ctx.os << "#include <xsd/cxx/tree/containers-wildcard.hxx>" << endl
- << endl;
- }
-
- if (!ctx.options.generate_extraction ().empty ())
- ctx.os << "#include <xsd/cxx/tree/istream-fwd.hxx>" << endl
- << endl;
-
- // Emit header includes.
- //
- {
- if (inline_)
- {
- ctx.os << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
- << "#define XSD_DONT_INCLUDE_INLINE" << endl
- << endl;
- }
-
- Traversal::Schema schema;
- Includes includes (ctx, Includes::header);
-
- schema >> includes;
-
- schema.dispatch (ctx.schema_root);
-
- if (inline_)
- {
- ctx.os << "#undef XSD_DONT_INCLUDE_INLINE" << endl
- << "#else" << endl
- << endl;
-
- schema.dispatch (ctx.schema_root);
-
- ctx.os << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
- << endl;
- }
- }
-
-
- {
- Traversal::Schema schema;
-
- Sources sources;
- Traversal::Names names_ns, names;
-
- DocumentedNamespace ns (ctx);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
- GlobalElement element (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- if (ctx.options.generate_element_type ())
- names >> element;
-
- schema.dispatch (ctx.schema_root);
- }
-
- // Emit inline includes.
- //
- if (inline_)
- {
- ctx.os << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
- << endl;
-
- Traversal::Schema schema;
- Includes ixx_includes (ctx, Includes::inline_);
- schema >> ixx_includes;
-
- schema.dispatch (ctx.schema_root);
-
- ctx.os << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
- << endl;
- }
- }
- }
- }
-}
diff --git a/xsd/cxx/tree/tree-header.hxx b/xsd/cxx/tree/tree-header.hxx
deleted file mode 100644
index 153af5b..0000000
--- a/xsd/cxx/tree/tree-header.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/tree-header.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_TREE_HEADER_HXX
-#define CXX_TREE_TREE_HEADER_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_tree_header (Context&);
- }
-}
-
-#endif // CXX_TREE_TREE_HEADER_HXX
diff --git a/xsd/cxx/tree/tree-inline.cxx b/xsd/cxx/tree/tree-inline.cxx
deleted file mode 100644
index 874586e..0000000
--- a/xsd/cxx/tree/tree-inline.cxx
+++ /dev/null
@@ -1,1161 +0,0 @@
-// file : xsd/cxx/tree/tree-inline.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/tree/tree-inline.hxx>
-#include <cxx/tree/default-value.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String item_name (item_type_name (item_type));
- String base_type (L"::xsd::cxx::tree::list< " + item_name +
- L", " + char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base_type += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base_type += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base_type += L" >";
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- // c-tor ()
- //
- os << inl
- << name << "::" << endl
- << name << " ()" << endl
- << ": " << base_type << " (this)"
- << "{"
- << "}";
-
- // c-tor (size_type, const X& x)
- //
- String size_type (name != L"size_type"
- ? String (L"size_type")
- : base_type + L"::size_type");
-
- os << inl
- << name << "::" << endl
- << name << " (" << size_type << " n, const " << item_name <<
- "& x)" << endl
- << ": " << base_type << " (n, x, this)"
- << "{"
- << "}";
-
- // copy c-tor ()
- //
- os << inl
- << name << "::" << endl
- << name << " (const " << name << "& o," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << any_simple_type << " (o, f, c)," << endl
- << " " << base_type << " (o, f, this)"
- << "{"
- << "}";
-
- // Comparison operators.
- //
- if (options.generate_comparison ())
- {
- os << inl
- << "bool" << endl
- << "operator== (const " << name << "& x, " <<
- "const " << name << "& y)"
- << "{"
- << "const " << base_type << "& bx (x);"
- << "return bx == y;"
- << "}";
-
- os << inl
- << "bool" << endl
- << "operator!= (const " << name << "& x, " <<
- "const " << name << "& y)"
- << "{"
- << "return !(x == y);"
- << "}";
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- String const& base (xs_string_type);
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- if (options.generate_default_ctor ())
- {
- // c-tor ()
- //
- os << inl
- << name << "::" << endl
- << name << " ()" << endl
- << ": " << base << " ()"
- << "{"
- << "}";
- }
-
- // c-tor (const char*)
- //
- os << inl
- << name << "::" << endl
- << name << " (const " << char_type << "* s)" << endl
- << ": " << base << " (s)"
- << "{"
- << "}";
-
- // c-tor (string const&)
- //
- os << inl
- << name << "::" << endl
- << name << " (const " << string_type << "& s)" << endl
- << ": " << base << " (s)"
- << "{"
- << "}";
-
- // copy c-tor ()
- //
- os << inl
- << name << "::" << endl
- << name << " (const " << name << "& o," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (o, f, c)"
- << "{"
- << "}";
- }
- };
-
- // Enumeration
- //
-
- // Generate a sequence of explicit c-tor calls until we reach
- // one of the fundamental string types that can be constructed
- // from char literals.
- //
- struct CtorCallSequence: Traversal::Complex,
- Traversal::Fundamental::Type,
- Context
- {
- CtorCallSequence (Context& c, String const& arg)
- : Context (c), arg_ (arg), base_type_name_ (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- // This type should be ultimately string based.
- //
- assert (c.inherits_p ());
-
- os << ename (c) << " (" << endl;
-
- dispatch (c.inherits ().base ());
-
- os << ")";
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Type& t)
- {
- base_type_name_.dispatch (t);
-
- os << " (" << arg_ << ")";
- }
-
- private:
- String arg_;
- BaseTypeName base_type_name_;
- };
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c), member_ (c)
- {
- inherits_member_ >> member_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- bool enum_based (false);
- if (string_based)
- {
- SemanticGraph::Enumeration* be (0);
- IsEnumBasedType t (be);
- t.dispatch (e);
-
- enum_based = (be != 0);
- }
-
- String value;
- if (string_based)
- value = evalue (e);
-
- // Get to the ultimate base and see if is a fundamental type.
- //
- bool fund_based (false);
- SemanticGraph::Type& ult_base (ultimate_base (e));
- {
- IsFundamentalType t (fund_based);
- t.dispatch (ult_base);
- }
-
- //
- //
- String base; // base type name
- {
- std::wostringstream o;
-
- BaseTypeName base_type (*this, o);
- Traversal::Inherits inherits_type (base_type);
-
- inherits (e, inherits_type);
- base = o.str ();
- }
-
- os << "// " << name << endl
- << "// " << endl
- << endl;
-
- // default c-tor
- //
- bool list_based (
- ult_base.is_a<SemanticGraph::List> () ||
- ult_base.is_a<SemanticGraph::Fundamental::NameTokens> () ||
- ult_base.is_a<SemanticGraph::Fundamental::IdRefs> () ||
- ult_base.is_a<SemanticGraph::Fundamental::Entities> ());
-
- if (options.generate_default_ctor () || list_based)
- {
- os << inl
- << name << "::" << endl
- << name << " ()" << endl
- << ": " << base << " ()"
- << "{"
- << "}";
- }
-
- // c-tor (value)
- //
- if (string_based)
- {
- os << inl
- << name << "::" << endl
- << name << " (" << value << " v)" << endl
- << ": ";
-
- // If we are enum-based then we can just use the corresponding
- // base c-tor directly. Otherwise we will use the from-string
- // c-tor.
- //
- if (enum_based)
- os << base << " (v)";
- else
- {
- CtorCallSequence t (*this, L"_xsd_" + name + L"_literals_[v]");
- t.dispatch (e.inherits ().base ());
- }
-
- os << "{"
- << "}";
- }
-
- // c-tor (const char*)
- //
- if (string_based)
- {
- os << inl
- << name << "::" << endl
- << name << " (const " << char_type << "* v)" << endl
- << ": " << base << " (v)"
- << "{"
- << "}";
- }
-
- // c-tor (const std::string&)
- //
- if (string_based)
- {
- os << inl
- << name << "::" << endl
- << name << " (const " << string_type << "& v)" << endl
- << ": " << base << " (v)"
- << "{"
- << "}";
- }
-
- // c-tor (fundamental)
- //
- if (fund_based)
- {
- os << inl
- << name << "::" << endl
- << name << " (";
-
- member_.dispatch (ult_base);
-
- os << " v)"
- << ": " << base << " (v)"
- << "{"
- << "}";
- }
-
- // c-tor (base)
- //
- // If the ultimate is also our immediate base and it is a
- // fundamental type then this c-tor clashes with c-tor
- // (fundamental) above.
- //
- if (!fund_based || &ult_base != &e.inherits ().base ())
- {
- os << inl
- << name << "::" << endl
- << name << " (const ";
-
- inherits (e, inherits_member_);
-
- os << "& v)" << endl
- << ": " << base << " (v)"
- << "{"
- << "}";
- }
-
- // copy c-tor
- //
- os << inl
- << name << "::" << endl
- << name << " (const " << name << "& v," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (v, f, c)"
- << "{"
- << "}";
-
- // operato= (value)
- //
- if (string_based)
- {
- os << inl
- << name << "& " << name << "::" << endl
- << "operator= (" << value << " v)"
- << "{"
- << "static_cast< " << base << "& > (*this) = ";
-
- // If we are enum-based then we can just use the corresponding
- // base assignment directly. Otherwise we will use the from-
- // base assignment and a from-string base c-tor.
- //
- if (enum_based)
- os << "v";
- else
- {
- os << endl;
-
- CtorCallSequence t (*this, L"_xsd_" + name + L"_literals_[v]");
- t.dispatch (e.inherits ().base ());
- }
-
- os << ";"
- << endl
- << "return *this;"
- << "}";
- }
-
- os << endl;
- }
-
- private:
- Traversal::Inherits inherits_member_;
- MemberTypeName member_;
- };
-
- struct Member: Traversal::Member, Context
- {
- Member (Context& c, String const& scope)
- : Context (c), scope_ (scope), lit_value_ (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& aname (eaname (m));
- String const& mname (emname (m));
- String const& member (emember (m));
-
- bool fund (false);
- {
- IsFundamentalType t (fund);
- t.dispatch (m.type ());
- }
-
- bool def_attr (m.default_p () &&
- m.is_a<SemanticGraph::Attribute> ());
-
- if (max (m) != 1)
- {
- // sequence
- //
- String container (econtainer (m));
- String q_container (scope_ + L"::" + container);
-
- // container const&
- // name () const;
- //
- os << inl
- << "const " << q_container << "& " << scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // container&
- // name ();
- //
- os << inl
- << q_container << "& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // void
- // name (container const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << container << "& s)"
- << "{"
- << "this->" << member << " = s;"
- << "}";
- }
- else if (min (m) == 0 && !def_attr)
- {
- // optional
- //
- String type (etype (m));
- String container (econtainer (m));
- String q_container (scope_ + L"::" + container);
-
- // container const&
- // name () const;
- //
- os << inl
- << "const " << q_container << "& " << scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // container&
- // name ();
- //
- os << inl
- << q_container << "& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // void
- // name (type const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << type << "& x)"
- << "{"
- << "this->" << member << ".set (x);"
- << "}";
-
- // void
- // name (container const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << container << "& x)"
- << "{"
- << "this->" << member << " = x;"
- << "}";
-
- // void
- // name (auto_ptr<type>);
- //
- if (!fund)
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (" << auto_ptr << "< " << type << " > x)"
- << "{"
- << "this->" << member << ".set (" <<
- (std >= cxx_version::cxx11 ? "std::move (x)" : "x") << ");"
- << "}";
- }
- else
- {
- // one
- //
- String type (etype (m));
- String q_type (scope_ + L"::" + type);
-
- // type const&
- // name () const;
- //
- os << inl
- << "const " << q_type << "& " << scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ".get ();"
- << "}";
-
- // Do not generate modifiers for fixed attributes.
- //
- if (!(def_attr && m.fixed_p ()))
- {
- // type&
- // name ();
- //
- os << inl
- << q_type << "& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ".get ();"
- << "}";
-
- // void
- // name (type const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << type << "& x)"
- << "{"
- << "this->" << member << ".set (x);"
- << "}";
-
- // void
- // name (auto_ptr<type>);
- //
- if (!fund)
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (" << auto_ptr << "< " << type << " > x)"
- << "{"
- << "this->" << member << ".set (" <<
- (std >= cxx_version::cxx11 ? "std::move (x)" : "x") << ");"
- << "}";
-
- // auto_ptr<type>
- // detach_name ();
- //
- if (detach && !fund)
- os << inl
- << auto_ptr << "< " << q_type << " > " <<
- scope_ << "::" << endl
- << edname (m) << " ()"
- << "{"
- << "return this->" << member << ".detach ();"
- << "}";
- }
- }
-
-
- // default_value
- //
- if (m.default_p ())
- {
- bool simple (true);
-
- if (m.is_a<SemanticGraph::Element> ())
- {
- IsSimpleType test (simple);
- test.dispatch (m.type ());
- }
-
- if (simple)
- {
- String lit (lit_value_.dispatch (m.type (), m.value ()));
-
- os << inl;
-
- if (lit)
- os << scope_ << "::" << etype (m) << " ";
- else
- os << "const " << scope_ << "::" << etype (m) << "& ";
-
- os << scope_ << "::" << endl
- << edefault_value (m) << " ()"
- << "{";
-
- if (lit)
- os << "return " << etype (m) << " (" << lit << ");";
- else
- os << "return " << edefault_value_member (m) << ";";
-
- os << "}";
- }
- }
- }
-
- private:
- String scope_;
- LiteralValue lit_value_;
- };
-
- struct Any: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- Any (Context& c, String const& scope)
- : Context (c), scope_ (scope)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& aname (eaname (a));
- String const& mname (emname (a));
-
- String const& member (emember (a));
-
- if (max (a) != 1)
- {
- // sequence
- //
- String container (econtainer (a));
- String q_container (scope_ + L"::" + container);
-
- // container const&
- // name () const;
- //
- os << inl
- << "const " << q_container << "& " << scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // container&
- // name ();
- //
- os << inl
- << q_container << "& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // void
- // name (container const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << container << "& s)"
- << "{"
- << "this->" << member << " = s;"
- << "}";
- }
- else if (min (a) == 0)
- {
- // optional
- //
- String container (econtainer (a));
- String q_container (scope_ + L"::" + container);
-
- // container const&
- // name () const;
- //
- os << inl
- << "const " << q_container << "& " << scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // container&
- // name ();
- //
- os << inl
- << q_container << "& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // void
- // name (type const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << xerces_ns << "::DOMElement& e)"
- << "{"
- << "this->" << member << ".set (e);"
- << "}";
-
- // void
- // name (type*);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (" << xerces_ns << "::DOMElement* e)"
- << "{"
- << "this->" << member << ".set (e);"
- << "}";
-
- // void
- // name (container const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << container << "& x)"
- << "{"
- << "this->" << member << " = x;"
- << "}";
- }
- else
- {
- // one
- //
-
- // type const&
- // name () const;
- //
- os << inl
- << "const " << xerces_ns << "::DOMElement& " <<
- scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ".get ();"
- << "}";
-
- // type&
- // name ();
- //
- os << inl
- << xerces_ns << "::DOMElement& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ".get ();"
- << "}";
-
- // void
- // name (type const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << xerces_ns << "::DOMElement& e)"
- << "{"
- << "this->" << member << ".set (e);"
- << "}";
-
- // void
- // name (type*);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (" << xerces_ns << "::DOMElement* e)"
- << "{"
- << "this->" << member << ".set (e);"
- << "}";
- }
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& aname (eaname (a));
- String const& mname (emname (a));
-
- String const& member (emember (a));
- String container (econtainer (a));
- String q_container (scope_ + L"::" + container);
-
- // container const&
- // name () const;
- //
- os << inl
- << "const " << q_container << "& " << scope_ << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // container&
- // name ();
- //
- os << inl
- << q_container << "& " << scope_ << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ";"
- << "}";
-
- // void
- // name (container const&);
- //
- os << inl
- << "void " << scope_ << "::" << endl
- << mname << " (const " << container << "& s)"
- << "{"
- << "this->" << member << " = s;"
- << "}";
- }
-
- private:
- String scope_;
- };
-
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (c, name) && !name)
- return;
-
- os << "// " << name << endl
- << "// " << endl
- << endl;
-
- // Generate accessors and modifiers.
- //
- Any any (*this, name);
- Member member (*this, name);
- Traversal::Names names;
-
- if (options.generate_wildcard ())
- names >> any;
-
- names >> member;
-
- Complex::names (c, names);
-
- // Mixed text content.
- //
- if (mixed_p (c) && !c.context ().count ("mixed-in-base"))
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String const& cont (ctx.get<String> ("mixed-container"));
- String const& memb (ctx.get<String> ("mixed-member"));
-
- String const& aname (ctx.get<String> ("mixed-aname"));
- String const& mname (ctx.get<String> ("mixed-mname"));
-
- os << inl
- << "const " << name << "::" << cont << "& " <<
- name << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << memb << ";"
- << "}";
-
- os << inl
- << name << "::" << cont << "& " << name << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << memb << ";"
- << "}";
-
- os << inl
- << "void " << name << "::" << endl
- << mname << " (const " << cont << "& s)"
- << "{"
- << "this->" << memb << " = s;"
- << "}";
- }
-
- // dom_document accessors.
- //
- if (edom_document_member_p (c))
- {
- os << inl
- << "const " << xerces_ns << "::DOMDocument& " <<
- name << "::" << endl
- << edom_document (c) << " () const"
- << "{"
- << "return *this->" << edom_document_member (c) << ";"
- << "}";
-
- os << inl
- << xerces_ns << "::DOMDocument& " << name << "::" << endl
- << edom_document (c) << " ()"
- << "{"
- << "return *this->" << edom_document_member (c) << ";"
- << "}";
- }
-
- // Order container.
- //
- if (ordered_p (c) && !c.context ().count ("order-in-base"))
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String const& cont (ctx.get<String> ("order-container"));
- String const& memb (ctx.get<String> ("order-member"));
-
- String const& aname (ctx.get<String> ("order-aname"));
- String const& mname (ctx.get<String> ("order-mname"));
-
- os << inl
- << "const " << name << "::" << cont << "& " <<
- name << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << memb << ";"
- << "}";
-
- os << inl
- << name << "::" << cont << "& " << name << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << memb << ";"
- << "}";
-
- os << inl
- << "void " << name << "::" << endl
- << mname << " (const " << cont << "& s)"
- << "{"
- << "this->" << memb << " = s;"
- << "}";
- }
-
- os << endl;
- }
- };
-
-
- struct GlobalElement: Traversal::Element,
- GlobalElementBase,
- Context
- {
- GlobalElement (Context& c)
- : GlobalElementBase (c), Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (!doc_root_p (e))
- return;
-
- bool fund (false);
- {
- IsFundamentalType test (fund);
- test.dispatch (e.type ());
- }
-
- String const& name (ename (e));
-
- os << "// " << name << endl
- << "// " << endl
- << endl;
-
- // Accessors/modifiers.
- //
- String const& type (etype (e));
- String const& aname (eaname (e));
- String const& mname (emname (e));
- String const& member (emember (e));
-
- // type const&
- // name () const;
- //
- os << inl
- << "const " << name << "::" << type << "& " << name << "::" << endl
- << aname << " () const"
- << "{"
- << "return this->" << member << ".get ();"
- << "}";
-
- // type&
- // name ();
- //
- os << inl
- << name << "::" << type << "& " << name << "::" << endl
- << aname << " ()"
- << "{"
- << "return this->" << member << ".get ();"
- << "}";
-
- // void
- // name (type const&);
- //
- os << inl
- << "void " << name << "::" << endl
- << mname << " (const " << type << "& x)"
- << "{"
- << "this->" << member << ".set (x);"
- << "}";
-
- // void
- // name (auto_ptr<type>);
- //
- if (!fund)
- {
- os << inl
- << "void " << name << "::" << endl
- << mname << " (" << auto_ptr << "< " << type << " > x)"
- << "{"
- << "this->" << member << ".set (" <<
- (std >= cxx_version::cxx11 ? "std::move (x)" : "x") << ");"
- << "}";
- }
-
- // auto_ptr<type>
- // detach_name ();
- //
- if (detach && !fund)
- os << inl
- << auto_ptr << "< " << name << "::" << type << " > " <<
- name << "::" << endl
- << edname (e) << " ()"
- << "{"
- << "return this->" << member << ".detach ();"
- << "}";
- }
- };
- }
-
- void
- generate_tree_inline (Context& ctx, size_t first, size_t last)
- {
- // Generate includes.
- //
- if (ctx.options.generate_inline ())
- {
- Traversal::Schema schema;
- Includes includes (ctx, Includes::inline_);
-
- schema >> includes;
-
- schema.dispatch (ctx.schema_root);
- }
- else
- {
- // Emit "weak" header includes that are used in the file-per-type
- // compilation model.
- //
- Traversal::Schema schema;
- Includes includes (ctx, Includes::source);
-
- schema >> includes;
-
- schema.dispatch (ctx.schema_root);
- }
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names names_ns, names;
- Namespace ns (ctx, first, last);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
- GlobalElement element (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
-
- if (ctx.options.generate_element_type ())
- names >> element;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/tree-inline.hxx b/xsd/cxx/tree/tree-inline.hxx
deleted file mode 100644
index 7212dfd..0000000
--- a/xsd/cxx/tree/tree-inline.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/tree-inline.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_TREE_INLINE_HXX
-#define CXX_TREE_TREE_INLINE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_tree_inline (Context&, size_t first, size_t last);
- }
-}
-
-#endif // CXX_TREE_TREE_INLINE_HXX
diff --git a/xsd/cxx/tree/tree-source.cxx b/xsd/cxx/tree/tree-source.cxx
deleted file mode 100644
index e6b0aae..0000000
--- a/xsd/cxx/tree/tree-source.cxx
+++ /dev/null
@@ -1,3900 +0,0 @@
-// file : xsd/cxx/tree/tree-source.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <map>
-#include <list>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/tree/tree-source.hxx>
-#include <cxx/tree/default-value.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- struct List: Traversal::List, Context
- {
- List (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& l)
- {
- String name (ename (l));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (l, name) && !name)
- return;
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- if (!options.suppress_parsing ())
- {
- SemanticGraph::Type& item_type (l.argumented ().type ());
- String base (L"::xsd::cxx::tree::list< " +
- item_type_name (item_type) + L", " + char_type);
-
- if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
- base += L", ::xsd::cxx::tree::schema_type::double_";
- else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
- base += L", ::xsd::cxx::tree::schema_type::decimal";
-
- base += L" >";
-
- // c-tor (xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << any_simple_type << " (e, f, c)," << endl
- << " " << base << " (e, f, this)"
- << "{"
- << "}";
-
- // c-tor (xercesc::DOMAttr)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << any_simple_type << " (a, f, c)," << endl
- << " " << base << " (a, f, this)"
- << "{"
- << "}";
-
- // c-tor (string const&, xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << any_simple_type << " (s, e, f, c)," << endl
- << " " << base << " (s, e, f, this)"
- << "{"
- << "}";
- }
-
- // _clone
- //
- os << name << "* " << name << "::" << endl
- << "_clone (" << flags_type << " f," << endl
- << container << "* c) const"
- << "{"
- << "return new class " << name << " (*this, f, c);"
- << "}";
-
- // d-tor
- //
- os << name << "::" << endl
- << "~" << name << " ()"
- << "{"
- << "}";
-
- // Register with type factory map.
- //
- if (polymorphic && polymorphic_p (l))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (l));
-
- // If this type is anonymous but substitutes, then it will
- // be registered as part of the substitution registration.
- //
- if (!anonymous_p (l) && !options.suppress_parsing ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_factory_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_factory_init (" << endl
- << strlit (l.name ()) << "," << endl
- << strlit (xml_ns_name (l)) << ");"
- << endl;
- }
-
- if ((!anonymous_p (l) || anonymous_substitutes_p (l)) &&
- options.generate_comparison ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::comparison_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_comparison_init;"
- << endl;
- }
- }
- }
-
- private:
- String
- item_type_name (SemanticGraph::Type& t)
- {
- std::wostringstream o;
-
- MemberTypeName type (*this, o);
- type.dispatch (t);
-
- return o.str ();
- }
- };
-
-
- struct Union: Traversal::Union, Context
- {
- Union (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& u)
- {
- String name (ename (u));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (u, name) && !name)
- return;
-
- String const& base (xs_string_type);
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (e, f, c)"
- << "{"
- << "}";
-
- // c-tor (xercesc::DOMAttr)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (a, f, c)"
- << "{"
- << "}";
-
- // c-tor (string const&, xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (s, e, f, c)"
- << "{"
- << "}";
- }
-
- // _clone
- //
- os << name << "* " << name << "::" << endl
- << "_clone (" << flags_type << " f," << endl
- << container << "* c) const"
- << "{"
- << "return new class " << name << " (*this, f, c);"
- << "}";
-
- // Register with type factory map.
- //
- if (polymorphic && polymorphic_p (u))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (u));
-
- // If this type is anonymous but substitutes, then it will
- // be registered as part of the substitution registration.
- //
- if (!anonymous_p (u) && !options.suppress_parsing ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_factory_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_factory_init (" << endl
- << strlit (u.name ()) << "," << endl
- << strlit (xml_ns_name (u)) << ");"
- << endl;
- }
-
- if ((!anonymous_p (u) || anonymous_substitutes_p (u)) &&
- options.generate_comparison ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::comparison_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_comparison_init;"
- << endl;
- }
- }
- }
- };
-
-
- // Enumeration mapping.
- //
-
- struct EnumeratorLiteral: Traversal::Enumerator, Context
- {
- EnumeratorLiteral (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- os << strlit (e.name ());
- }
- };
-
-
- //
- //
- struct LiteralInfo
- {
- LiteralInfo (String const& value, String const& name)
- : value_ (value), name_ (name)
- {
- }
-
- String value_;
- String name_;
- };
-
- bool
- operator< (LiteralInfo const& x, LiteralInfo const& y)
- {
- return x.value_ < y.value_;
- }
-
- typedef list<LiteralInfo> LiteralInfoList;
-
-
- // Populate LiteralInfoList
- //
- struct EnumeratorLiteralInfo: Traversal::Enumerator, Context
-
- {
- EnumeratorLiteralInfo (Context& c, LiteralInfoList& list)
- : Context (c), list_ (list)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- list_.push_back (LiteralInfo (e.name (), ename (e)));
- }
-
- private:
- LiteralInfoList& list_;
- };
-
-
- struct Enumeration: Traversal::Enumeration, Context
- {
- Enumeration (Context& c)
- : Context (c), enumerator_literal_ (c)
- {
- names_enumerator_literal_ >> enumerator_literal_;
- }
-
- virtual void
- traverse (Type& e)
- {
- String name (ename (e));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- if (renamed_type (e, name) && !name)
- return;
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (e);
- }
-
- SemanticGraph::Enumeration* be (0);
- bool enum_based (false);
- if (string_based)
- {
- IsEnumBasedType t (be);
- t.dispatch (e);
-
- enum_based = (be != 0);
- }
-
- String value;
- if (string_based)
- value = evalue (e);
-
- size_t enum_count (0);
-
- for (Type::NamesIterator i (e.names_begin ()), end (e.names_end ());
- i != end; ++i)
- ++enum_count;
-
- String base; // base type name
- {
- std::wostringstream o;
-
- BaseTypeName base_type (*this, o);
- Traversal::Inherits inherits_type (base_type);
-
- inherits (e, inherits_type);
- base = o.str ();
- }
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (e, f, c)"
- << "{";
-
- if (string_based)
- os << "_xsd_" << name << "_convert ();";
-
- os << "}";
-
-
- // c-tor (xercesc::DOMAttr)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (a, f, c)"
- << "{";
-
- if (string_based)
- {
- os << "_xsd_" << name << "_convert ();";
- }
-
- os << "}";
-
-
- // c-tor (string const&, xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (s, e, f, c)"
- << "{";
-
- if (string_based)
- {
- os << "_xsd_" << name << "_convert ();";
- }
-
- os << "}";
- }
-
- // _clone
- //
- os << name << "* " << name << "::" << endl
- << "_clone (" << flags_type << " f," << endl
- << container << "* c) const"
- << "{"
- << "return new class " << name << " (*this, f, c);"
- << "}";
-
- // convert
- //
- // @@ TODO: expected list
- //
- if (string_based)
- {
- String i_name (L"_xsd_" + name + L"_indexes_");
-
- os << name << "::" << value << " " <<
- name << "::" << endl
- << "_xsd_" << name << "_convert () const"
- << "{"
- << "::xsd::cxx::tree::enum_comparator< " << char_type <<
- " > c (_xsd_" << name << "_literals_);"
- << "const " << value << "* i (::std::lower_bound (" << endl
- << i_name << "," << endl
- << i_name << " + " << enum_count << "," << endl
- << "*this," << endl
- << "c));"
- << endl
- << "if (i == " << i_name << " + " << enum_count << " || " <<
- "_xsd_" << name << "_literals_[*i] != *this)"
- << "{"
- << "throw ::xsd::cxx::tree::unexpected_enumerator < " <<
- char_type << " > (*this);"
- << "}"
- << "return *i;"
- << "}";
- }
-
- // literals and indexes
- //
- if (string_based)
- {
- if (enum_based)
- {
- os << "const " << char_type << "* const* " << name << "::" << endl
- << "_xsd_" << name << "_literals_ = " <<
- fq_name (*be) << "::_xsd_" << ename (*be) << "_literals_;"
- << endl;
- }
- else
- {
- os << "const " << char_type << "* const " << name << "::" << endl
- << "_xsd_" << name << "_literals_[" << enum_count << "] ="
- << "{";
-
- names<Enumeration> (
- e, names_enumerator_literal_, 0, 0, 0, &Enumeration::comma);
-
- os << "};";
- }
-
-
- LiteralInfoList l;
- {
- EnumeratorLiteralInfo enumerator (*this, l);
- Traversal::Names names_enumerator (enumerator);
- names (e, names_enumerator);
- }
-
- l.sort ();
-
- os << "const " << name << "::" << value << " " <<
- name << "::" << endl
- << "_xsd_" << name << "_indexes_[" << enum_count << "] ="
- << "{";
-
- String fq_name (ns_scope + L"::" + name);
-
- for (LiteralInfoList::iterator
- b (l.begin ()), i (b), end (l.end ()); i != end; ++i)
- {
- if (i != b)
- os << "," << endl;
-
- os << fq_name << "::" << i->name_;
- }
-
- os << "};";
- }
-
- // Register with type factory map.
- //
- if (polymorphic && polymorphic_p (e))
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (e));
-
- // If this type is anonymous but substitutes, then it will
- // be registered as part of the substitution registration.
- //
- if (!anonymous_p (e) && !options.suppress_parsing ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_factory_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_factory_init (" << endl
- << strlit (e.name ()) << "," << endl
- << strlit (xml_ns_name (e)) << ");"
- << endl;
- }
-
- if ((!anonymous_p (e) || anonymous_substitutes_p (e)) &&
- options.generate_comparison ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::comparison_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_comparison_init;"
- << endl;
- }
- }
- }
-
- virtual void
- comma (Type&)
- {
- os << "," << endl;
- }
-
- private:
- Traversal::Names names_enumerator_literal_;
- EnumeratorLiteral enumerator_literal_;
-
- };
-
- //
- //
- struct Member: Traversal::Member, Context
- {
- Member (Context& c, String const& scope)
- : Context (c), scope_ (scope), init_value_ (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- // default_value
- //
- if (m.default_p ())
- {
- SemanticGraph::Type& t (m.type ());
- bool simple (true);
-
- if (m.is_a<SemanticGraph::Element> ())
- {
- IsSimpleType test (simple);
- test.dispatch (t);
- }
-
- if (simple)
- {
- bool lit (false);
- {
- IsLiteralValue test (lit);
- test.dispatch (t);
- }
-
- if (!lit)
- {
- InitKind::Kind kind (InitKind::simple);
- {
- InitKind test (kind);
- test.dispatch (t);
- }
-
- String const& member (edefault_value_member (m));
-
- String init_name;
-
- switch (kind)
- {
- case InitKind::data:
- {
- init_name = escape (L"_xsd_" + scope_ + member + L"data");
- init_value_.data (init_name);
- init_value_.dispatch (t, m.value ());
- break;
- }
- case InitKind::function:
- {
- init_name = escape (L"_xsd_" + scope_ + member + L"init");
-
- os << "static " << scope_ << "::" << etype (m) << endl
- << init_name << " ()"
- << "{"
- << scope_ << "::" << etype (m) << " r;"
- << endl;
-
- init_value_.dispatch (t, m.value ());
-
- os << "return r;"
- << "};";
- break;
- }
- case InitKind::simple:
- break;
- }
-
- os << "const " << scope_ << "::" << etype (m) << " " <<
- scope_ << "::" << member << " (" << endl;
-
- switch (kind)
- {
- case InitKind::data:
- {
- // Second dispatch.
- //
- init_value_.dispatch (t, m.value ());
- break;
- }
- case InitKind::function:
- {
- os << init_name << " ()";
- break;
- }
- case InitKind::simple:
- {
- init_value_.dispatch (t, m.value ());
- break;
- }
- }
-
- os << ");"
- << endl;
- }
- }
- }
- }
-
- private:
- String scope_;
- InitValue init_value_;
- };
-
-
- struct Element: Traversal::Element, Context
- {
- Element (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (e.scope ()));
-
- String const& member (emember (e));
-
- String tr (etraits (e)); // traits type name
- String type (etype (e));
-
- SemanticGraph::Type& t (e.type ());
-
- bool fund (false);
- {
- IsFundamentalType traverser (fund);
- traverser.dispatch (t);
- }
-
- // Check if we need to handle xsi:type and substitution groups.
- // If this element's type is anonymous then we don't need to do
- // anything. Note that if the type is anonymous then it can't be
- // derived from which makes it impossible to substitute or
- // dynamically-type with xsi:type.
- //
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- os << "// " << comment (e.name ()) << endl
- << "//" << endl;
-
- if (poly)
- {
- os << "{"
- << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
- << "::xsd::cxx::tree::type_factory_map_instance< " <<
- poly_plate << ", " << char_type << " > ().create (" << endl
- << strlit (e.name ()) << "," << endl
- << (e.qualified_p ()
- ? strlit (e.namespace_ ().name ())
- : L + String ("\"\"")) << "," << endl;
-
- SemanticGraph::Complex* tc;
- if ((tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
- tc->abstract_p ())
- os << "0,";
- else
- os << "&::xsd::cxx::tree::factory_impl< " << type << " >,";
-
- os << endl
- << (e.global_p () ? "true" : "false") << ", " <<
- (e.qualified_p () ? "true" : "false") << ", " <<
- "i, n, f, this));"
- << endl
- << "if (tmp.get () != 0)"
- << "{";
- }
- else
- {
- if (e.qualified_p () && e.namespace_ ().name ())
- {
- os << "if (n.name () == " << strlit (e.name ()) << " && " <<
- "n.namespace_ () == " << strlit (e.namespace_ ().name ()) << ")"
- << "{";
- }
- else
- {
- os << "if (n.name () == " << strlit (e.name ()) << " && " <<
- "n.namespace_ ().empty ())"
- << "{";
- }
-
- if (!fund)
- {
- os << auto_ptr << "< " << type << " > r (" << endl
- << tr << "::create (i, f";
-
- if (t.is_a<SemanticGraph::AnyType> () &&
- options.generate_any_type ())
- os << " | " << flags_type << "::extract_content";
-
- os << ", this));"
- << endl;
- }
- }
-
-
- // Checks. Disabled at the moment since they make it impossible to
- // parse valid instances where the same element is used in both
- // base and derived types. See the cxx/tree/name-clash/inheritance
- // test for details.
- //
- //
- if (max (e) != 1)
- {
- // sequence
- //
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "if (!this->" << member << ")"
- << "{";
- }
- else
- {
- // one
- //
- os << "if (!" << member << ".present ())"
- << "{";
- }
-
-
- if (poly || !fund)
- {
- if (poly)
- {
- // Cast to static type.
- //
- os << auto_ptr << "< " << type << " > r (" << endl
- << "dynamic_cast< " << type << "* > (tmp.get ()));"
- << endl
- << "if (r.get ())" << endl
- << "tmp.release ();"
- << "else" << endl
- << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
- " > ();"
- << endl;
- }
-
- char const* r (std >= cxx_version::cxx11 ? "::std::move (r)" : "r");
-
- if (max (e) != 1)
- {
- // sequence
- //
- os << "this->" << member << ".push_back (" << r << ");";
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "this->" << member << ".set (" << r << ");";
- }
- else
- {
- // one
- //
- os << "this->" << member << ".set (" << r << ");";
- }
- }
- else
- {
- if (max (e) != 1)
- {
- // sequence
- //
- os << "this->" << member << ".push_back (" << tr <<
- "::create (i, f, this));";
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "this->" << member << ".set (" << tr <<
- "::create (i, f, this));";
- }
- else
- {
- // one
- //
- os << "this->" << member << ".set (" << tr <<
- "::create (i, f, this));";
- }
- }
-
- // Capture order.
- //
- if (ordered_p (c))
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String const& t (ctx.get<String> ("order-type"));
- String const& m (ctx.get<String> ("order-member"));
-
- os << "this->" << m << ".push_back (" << endl
- << t << " (" <<
- e.context ().get<String> ("ordered-id-name");
-
- // sequence
- //
- if (max (e) != 1)
- os << ", " << "this->" << member << ".size () - 1";
-
- os << "));";
- }
-
- os << "continue;";
-
- // End of check block.
- //
- if (max (e) != 1)
- {
- // sequence
- //
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "}";
- }
- else
- {
- // one
- //
- os << "}";
- }
-
- os << "}"; // if block
-
- if (poly)
- os << "}";
- }
- };
-
- struct ElementTest: Traversal::Element, Context
- {
- ElementTest (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& e)
- {
- if (skip (e))
- return;
-
- if (max (e) == 1 && min (e) == 1)
- {
- // one
- //
- os << "if (!" << emember (e) << ".present ())"
- << "{"
- << "throw ::xsd::cxx::tree::expected_element< " <<
- char_type << " > (" << endl
- << strlit (e.name ()) << "," << endl
- << (e.qualified_p ()
- ? strlit (e.namespace_ ().name ())
- : L + String ("\"\"")) << ");"
- << "}";
- }
- }
- };
-
- struct Any: Traversal::Any, Context
- {
- Any (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& member (emember (a));
-
- SemanticGraph::Complex& c (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
-
- String const& ns (a.definition_namespace ().name ());
- String const& dom_doc (edom_document (c));
-
- os << "// " << ename (a) << endl
- << "//" << endl
- << "if (";
-
- for (SemanticGraph::Any::NamespaceIterator i (a.namespace_begin ()),
- e (a.namespace_end ()); i != e;)
- {
- if (*i == L"##any")
- {
- os << "true";
- }
- else if (*i == L"##other")
- {
- if (ns)
- {
- // Note that here I assume that ##other does not include
- // unqualified names in a schema with target namespace.
- // This is not what the spec says but that seems to be
- // the consensus.
- //
- os << "(!n.namespace_ ().empty () && " <<
- "n.namespace_ () != " << strlit (ns) << ")";
- }
- else
- os << "!n.namespace_ ().empty ()";
- }
- else if (*i == L"##local")
- {
- os << "n.namespace_ ().empty ()";
- }
- else if (*i == L"##targetNamespace")
- {
- os << "n.namespace_ () == " << strlit (ns);
- }
- else
- {
- os << "n.namespace_ () == " << strlit (*i);
- }
-
- if (++i != e)
- os << " ||" << endl;
- }
-
- os << ")"
- << "{";
-
-
- // Checks.
- //
- //
- if (max (a) != 1)
- {
- // sequence
- //
- }
- else if (min (a) == 0)
- {
- // optional
- //
- os << "if (!this->" << member << ")"
- << "{";
- }
- else
- {
- // one
- //
- os << "if (!" << member << ".present ())"
- << "{";
- }
-
- os << xerces_ns << "::DOMElement* r (" << endl
- << "static_cast< " << xerces_ns << "::DOMElement* > (" << endl
- << "this->" << dom_doc << " ().importNode (" << endl
- << "const_cast< " << xerces_ns << "::DOMElement* > (&i), true)));";
-
- if (max (a) != 1)
- {
- // sequence
- //
- os << "this->" << member << ".push_back (r);";
- }
- else if (min (a) == 0)
- {
- // optional
- //
- os << "this->" << member << ".set (r);";
- }
- else
- {
- // one
- //
- os << "this->" << member << ".set (r);";
- }
-
- // Capture order.
- //
- if (ordered_p (c))
- {
- SemanticGraph::Context& ctx (c.context ());
-
- String const& t (ctx.get<String> ("order-type"));
- String const& m (ctx.get<String> ("order-member"));
-
- os << "this->" << m << ".push_back (" << endl
- << t << " (" <<
- a.context ().get<String> ("ordered-id-name") << ", ";
-
- if (max (a) != 1)
- // sequence
- //
- os << "this->" << member << ".size () - 1";
- else
- // optional & one
- //
- os << "0";
-
- os << "));";
- }
-
- os << "continue;";
-
- // End of check block.
- //
- if (max (a) != 1)
- {
- // sequence
- //
- }
- else if (min (a) == 0)
- {
- // optional
- //
- os << "}";
- }
- else
- {
- // one
- //
- os << "}";
- }
-
- os << "}"; // if block
- }
- };
-
- struct AnyTest: Traversal::Any, Context
- {
- AnyTest (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- if (max (a) == 1 && min (a) == 1)
- {
- // one
- //
- os << "if (!" << emember (a) << ".present ())"
- << "{"
- << "throw ::xsd::cxx::tree::expected_element< " <<
- char_type << " > (" << endl
- << L << "\"*\"," << endl
- << strlit (*a.namespace_begin ()) << ");"
- << "}";
- }
- }
- };
-
- struct Attribute: Traversal::Attribute, Context
- {
- Attribute (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& member (emember (a));
-
- String const& tr (etraits (a)); // traits type name
-
- if (a.qualified_p () && a.namespace_ ().name ())
- {
- os << "if (n.name () == " << strlit (a.name ()) << " && " <<
- "n.namespace_ () == " << strlit (a.namespace_ ().name ()) << ")"
- << "{";
- }
- else
- {
- os << "if (n.name () == " << strlit (a.name ()) << " && " <<
- "n.namespace_ ().empty ())"
- << "{";
- }
-
- os << "this->" << member << ".set (" << tr <<
- "::create (i, f, this));";
-
- os << "continue;"
- << "}";
-
- }
- };
-
- struct AnyAttribute: Traversal::AnyAttribute, Context
- {
- AnyAttribute (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& member (emember (a));
-
- String const& ns (a.definition_namespace ().name ());
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "// " << ename (a) << endl
- << "//" << endl
- << "if (";
-
- // Note that we need to filter out namespaces for xmlns and
- // xsi.
- //
- for (SemanticGraph::Any::NamespaceIterator i (a.namespace_begin ()),
- e (a.namespace_end ()); i != e;)
- {
- if (*i == L"##any")
- {
- os << "(n.namespace_ () != " <<
- "::xsd::cxx::xml::bits::xmlns_namespace< " << char_type <<
- " > () &&" << endl
- << "n.namespace_ () != " <<
- "::xsd::cxx::xml::bits::xsi_namespace< " << char_type <<
- " > ())";
- }
- else if (*i == L"##other")
- {
- if (ns)
- {
- // Note that here I assume that ##other does not include
- // unqualified names in a schema with target namespace.
- // This is not what the spec says but that seems to be
- // the consensus.
- //
- os << "(!n.namespace_ ().empty () &&" << endl
- << "n.namespace_ () != " << strlit (ns) << " &&" <<endl
- << "n.namespace_ () != " <<
- "::xsd::cxx::xml::bits::xmlns_namespace< " << char_type <<
- " > () &&" << endl
- << "n.namespace_ () != " <<
- "::xsd::cxx::xml::bits::xsi_namespace< " << char_type <<
- " > ())";
- }
- else
- os << "(!n.namespace_ ().empty () &&" << endl
- << "n.namespace_ () != " <<
- "::xsd::cxx::xml::bits::xmlns_namespace< " << char_type <<
- " > () &&" << endl
- << "n.namespace_ () != " <<
- "::xsd::cxx::xml::bits::xsi_namespace< " << char_type <<
- " > ())";
- }
- else if (*i == L"##local")
- {
- os << "n.namespace_ ().empty ()";
- }
- else if (*i == L"##targetNamespace")
- {
- os << "n.namespace_ () == " << strlit (ns);
- }
- else
- {
- os << "n.namespace_ () == " << strlit (*i);
- }
-
- if (++i != e)
- os << " ||" << endl;
- }
-
- os << ")"
- << "{"
- << xerces_ns << "::DOMAttr* r (" << endl
- << "static_cast< " << xerces_ns << "::DOMAttr* > (" << endl
- << "this->" << dom_doc << " ().importNode (" << endl
- << "const_cast< " << xerces_ns << "::DOMAttr* > (&i), true)));"
- << "this->" << member << " .insert (r);"
- << "continue;"
- << "}";
- }
- };
-
-
- struct AttributeTest: Traversal::Attribute, Context
- {
- AttributeTest (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& a)
- {
- String const& member (emember (a));
-
- if (!a.optional_p () || a.default_p ())
- {
- os << "if (!" << member << ".present ())"
- << "{";
-
- if (a.default_p ())
- {
- os << "this->" << member << ".set (" <<
- edefault_value (a) << " ());";
- }
- else
- os << "throw ::xsd::cxx::tree::expected_attribute< " <<
- char_type << " > (" << endl
- << strlit (a.name ()) << "," << endl
- << (a.qualified_p ()
- ? strlit (a.namespace_ ().name ())
- : L + String ("\"\"")) << ");";
-
- os << "}";
- }
- }
- };
-
-
- //
- //
- struct CtorBase: Traversal::Complex,
- Traversal::Enumeration,
- Traversal::Type,
- Context
- {
- // If base_arg is empty then no base argument is generated.
- //
- CtorBase (Context& c, CtorArgType at, String const& base_arg)
- : Context (c), args_ (c, at, base_arg)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type&)
- {
- if (args_.base_arg_)
- os << args_.base_arg_;
- }
-
- virtual void
- traverse (SemanticGraph::Enumeration&)
- {
- if (args_.base_arg_)
- os << args_.base_arg_;
- }
-
- void
- traverse (SemanticGraph::Complex& c)
- {
- args_.traverse (c);
- }
-
- private:
- // No need to traverse AnyAttribute since it is always mapped
- // to a sequence.
- //
- struct Args: Traversal::Complex,
- Traversal::Enumeration,
- Traversal::Type,
- Traversal::Any,
- Traversal::Element,
- Traversal::Attribute,
- Context
- {
- Args (Context& c, CtorArgType at, String const& base_arg)
- : Context (c),
- arg_type_ (at), base_arg_ (base_arg), first_ (true)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Type&)
- {
- if (base_arg_)
- os << comma () << base_arg_;
- }
-
- virtual void
- traverse (SemanticGraph::Enumeration&)
- {
- if (base_arg_)
- os << comma () << base_arg_;
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- if (!options.generate_wildcard ())
- return;
-
- if (min (a) == 1 && max (a) == 1)
- {
- // one
- //
- os << comma () << ename (a);
- }
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (!skip (e) && min (e) == 1 && max (e) == 1)
- {
- // one
- //
- bool move (false);
-
- if (std >= cxx_version::cxx11)
- {
- switch (arg_type_)
- {
- case CtorArgType::complex_auto_ptr:
- {
- bool simple (true);
- IsSimpleType t (simple);
- t.dispatch (e.type ());
- move = !simple;
- break;
- }
- case CtorArgType::poly_auto_ptr:
- {
- move = polymorphic && polymorphic_p (e.type ());
- break;
- }
- case CtorArgType::type:
- break;
- }
- }
-
- os << comma () << (move ? "std::move (" : "") << ename (e) <<
- (move ? ")" : "");
- }
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- // Note that we are not including attributes with default
- // or required fixed values here.
- //
- if (min (a) == 1 && !a.fixed_p ())
- {
- // one
- //
- os << comma () << ename (a);
- }
- }
-
- using Complex::traverse;
-
- private:
- String
- comma ()
- {
- bool tmp (first_);
- first_ = false;
- return tmp ? "" : ",\n";
- }
-
- public:
- CtorArgType arg_type_;
- String base_arg_;
-
- private:
- bool first_;
-
- Traversal::Inherits inherits_;
- Traversal::Names names_;
- };
-
- Args args_;
- };
-
-
- struct CtorMember: Traversal::Element,
- Traversal::Attribute,
- Context
- {
- CtorMember (Context& c, CtorArgType at)
- : Context (c), arg_type_ (at)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- String const& member (emember (e));
-
- if (max (e) != 1)
- {
- // sequence
- //
- os << "," << endl
- << " " << member << " (this)";
- }
- else if (min (e) == 0)
- {
- // optional
- //
- os << "," << endl
- << " " << member << " (this)";
- }
- else
- {
- // one
- //
- bool move (false);
-
- if (std >= cxx_version::cxx11)
- {
- switch (arg_type_)
- {
- case CtorArgType::complex_auto_ptr:
- {
- bool simple (true);
- IsSimpleType t (simple);
- t.dispatch (e.type ());
- move = !simple;
- break;
- }
- case CtorArgType::poly_auto_ptr:
- {
- move = polymorphic && polymorphic_p (e.type ());
- break;
- }
- case CtorArgType::type:
- break;
- }
- }
-
- os << "," << endl
- << " " << member << " (" << (move ? "std::move (" : "") <<
- ename (e) << (move ? ")" : "") << ", this)";
- }
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- String const& member (emember (a));
-
- bool def (a.default_p ());
-
- if (min (a) == 0 && !def)
- {
- // optional
- //
- os << "," << endl
- << " " << member << " (this)";
- }
- else
- {
- // one
- //
-
- if (def)
- {
- // This is an attribute with default or fixed value. We are
- // going to initialize it to its default value.
- //
- os << "," << endl
- << " " << member << " (" <<
- edefault_value (a) << " (), this)";
- }
- else
- {
- os << "," << endl
- << " " << member << " (" << ename (a) << ", this)";
- }
- }
- }
-
- private:
- CtorArgType arg_type_;
- };
-
- struct CtorAny: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- CtorAny (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- if (max (a) != 1)
- {
- // sequence
- //
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
- else if (min (a) == 0)
- {
- // optional
- //
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
- else
- {
- // one
- //
- os << "," << endl
- << " " << member << " (" << ename (a) << ", this->" <<
- dom_doc << " ())";
- }
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << emember (a) << " (this->" << dom_doc << " ())";
- }
- };
-
-
- struct CopyMember: Traversal::Member, Context
- {
- CopyMember (Context& c, String const& arg_name_)
- : Context (c), arg_name (arg_name_)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- if (skip (m))
- return;
-
- String const& member (emember (m));
-
- os << "," << endl
- << " " << member << " (" <<
- arg_name << "." << member << ", f, this)";
- }
-
- private:
- String arg_name;
- };
-
- struct CopyAny: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- CopyAny (Context& c, String const& arg_name_)
- : Context (c), arg_name (arg_name_)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (" <<
- arg_name << "." << member << ", this->" << dom_doc << " ())";
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (" <<
- arg_name << "." << member << ", this->" << dom_doc << " ())";
- }
-
- private:
- String arg_name;
- };
-
- struct AssignMember: Traversal::Member, Context
- {
- AssignMember (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- if (skip (m))
- return;
-
- String const& member (emember (m));
- os << "this->" << member << " = x." << member << ";";
- }
- };
-
- struct AssignAny: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- AssignAny (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
- os << "this->" << member << " = x." << member << ";";
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& member (emember (a));
- os << "this->" << member << " = x." << member << ";";
- }
- };
-
-
- // Element parsing c-tor initializers.
- //
- struct ElementCtorMember: Traversal::Member, Context
- {
- ElementCtorMember (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& m)
- {
- if (skip (m))
- return;
-
- String const& member (emember (m));
-
- os << "," << endl
- << " " << member << " (this)";
- }
- };
-
- struct ElementCtorAny: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- ElementCtorAny (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
- };
-
-
- // Default c-tor member initializer.
- //
- struct DefaultCtorMemberInit: Traversal::Element,
- Traversal::Attribute,
- Context
- {
- DefaultCtorMemberInit (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- String const& member (emember (e));
-
- os << "," << endl
- << " " << member << " (this)";
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- String const& member (emember (a));
-
- if (a.default_p ())
- {
- // This is an attribute with default or fixed value. We are
- // going to initialize it to its default value.
- //
- os << "," << endl
- << " " << member << " (" <<
- edefault_value (a) << " (), this)";
- }
- else
- os << "," << endl
- << " " << member << " (this)";
- }
- };
-
- struct DefaultCtorAnyInit: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- DefaultCtorAnyInit (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& member (emember (a));
- String const& dom_doc (
- edom_document (
- dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
-
- os << "," << endl
- << " " << member << " (this->" << dom_doc << " ())";
- }
- };
-
- // Test whether the base has comparison operators.
- //
- struct HasComparisonOperator: Traversal::Fundamental::Type,
- Traversal::List,
- Traversal::Union,
- Traversal::Complex,
- Traversal::Enumeration,
- Traversal::Member,
- Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- // generate should initially be false.
- //
- HasComparisonOperator (Context& c, bool& generate)
- : Context (c), generate_ (generate)
- {
- *this >> inherits_ >> *this;
- *this >> names_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Fundamental::Type&)
- {
- // All built-in types are comparable.
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::List&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Union&)
- {
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Enumeration& e)
- {
- Traversal::Enumeration::inherits (e);
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- Complex::names (c);
-
- if (!generate_)
- Complex::inherits (c);
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- if (!skip (m))
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Any&)
- {
- if (options.generate_wildcard ())
- generate_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute&)
- {
- if (options.generate_wildcard ())
- generate_ = true;
- }
-
- private:
- bool& generate_;
-
- Traversal::Inherits inherits_;
- Traversal::Names names_;
- };
-
- //
- //
- struct MemberComparison: Traversal::Element,
- Traversal::Attribute,
- Context
- {
- MemberComparison (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- String const& aname (eaname (e));
-
- // Check if we need to handle xsi:type and substitution groups.
- // If this element's type is anonymous then we don't need to do
- // anything. Note that if the type is anonymous then it can't be
- // derived from which makes it impossible to substitute or
- // dynamically-type with xsi:type.
- //
- SemanticGraph::Type& t (e.type ());
- bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
-
- if (!poly)
- {
- os << "if (!(x." << aname << " () == y." << aname << " ()))" << endl
- << "return false;"
- << endl;
- }
- else
- {
- os << "{"
- << "::xsd::cxx::tree::comparison_map< " << char_type
- << " >& cm (" << endl
- << "::xsd::cxx::tree::comparison_map_instance< " <<
- poly_plate << ", " << char_type << " > ());"
- << endl;
-
- if (max (e) != 1)
- {
- // sequence
- //
- String const& scope (ename (e.scope ()));
-
- os << scope << "::" << econtainer (e) <<
- " a (x." << aname << " ()), b (y." << aname << " ());"
- << endl;
-
- os << "if (a.size () != b.size ())" << endl
- << "return false;"
- << endl;
-
- os << "for (" << scope << "::" << econst_iterator (e) << endl
- << "ai (a.begin ()), bi (b.begin ()), " <<
- "ae (a.end ()), be (b.end ());" << endl
- << "ai != ae; ++ai, ++bi)"
- << "{"
- << "if (!cm.compare (*ai, *bi))" << endl
- << "return false;"
- << "}";
- }
- else if (min (e) == 0)
- {
- // optional
- //
- String const& scope (ename (e.scope ()));
-
- os << scope << "::" << econtainer (e) <<
- " a (x." << aname << " ()), b (y." << aname << " ());"
- << endl;
-
- os << "if (!a || !b)"
- << "{"
- << "if (a.present () != b.present ())" << endl
- << "return false;"
- << "}"
- << "else"
- << "{"
- << "if (!cm.compare (*a, *b))" << endl
- << "return false;"
- << "}";
- }
- else
- {
- // one
- //
- os << "if (!cm.compare (x." << aname << " (), y." <<
- aname << " ()))" << endl
- << "return false;";
- }
-
- os << "}";
- }
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- String const& aname (eaname (a));
-
- os << "if (!(x." << aname << " () == y." << aname << " ()))" << endl
- << "return false;"
- << endl;
- }
- };
-
- struct AnyComparison: Traversal::Any,
- Traversal::AnyAttribute,
- Context
- {
- AnyComparison (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- String const& aname (eaname (a));
-
- if (max (a) == 1 && min (a) == 1)
- os << "if (!x." << aname << " ().isEqualNode (&y." <<
- aname << " ()))";
- else
- os << "if (!(x." << aname << " () == y." << aname << " ()))";
-
- os << endl
- << "return false;"
- << endl;
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute& a)
- {
- String const& aname (eaname (a));
-
- os << "if (!(x." << aname << " () == y." << aname << " ()))" << endl
- << "return false;"
- << endl;
- }
- };
-
- // Check whether a type has a parse() function (i.e., has any
- // members, recursively).
- //
- struct HasParseFunction: Traversal::Complex,
- Traversal::Element,
- Traversal::Any,
- Traversal::Attribute,
- Traversal::AnyAttribute,
- Context
- {
- HasParseFunction (Context& c, bool& has_el, bool& has_at)
- : Context (c), has_el_ (has_el), has_at_ (has_at)
- {
- *this >> names_ >> *this;
- *this >> inherits_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- if (mixed_p (c) && !c.context ().count ("mixed-in-base"))
- has_el_ = true;
-
- names (c);
-
- if (!(has_el_ && has_at_))
- inherits (c);
- }
-
- virtual void
- traverse (SemanticGraph::Element&)
- {
- has_el_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Any&)
- {
- has_el_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::Attribute&)
- {
- has_at_ = true;
- }
-
- virtual void
- traverse (SemanticGraph::AnyAttribute&)
- {
- if (options.generate_wildcard ())
- has_at_ = true;
- }
-
- private:
- bool& has_el_;
- bool& has_at_;
-
- Traversal::Names names_;
- Traversal::Inherits inherits_;
- };
-
- //
- //
- struct FacetArray: Traversal::Complex, Context
- {
- FacetArray (Context& c)
- : Context (c)
- {
- }
-
- virtual void
- traverse (Type& c)
- {
- Facets f;
- FacetCollector col (f);
- col.traverse (c);
-
- for (Facets::const_iterator i (f.begin ()); i != f.end (); ++i)
- {
- if (i->first == L"fractionDigits")
- os << "{::xsd::cxx::tree::facet::fraction_digits, " <<
- i->second << "UL}," << endl;
- else if (i->first == L"totalDigits")
- os << "{::xsd::cxx::tree::facet::total_digits, " <<
- i->second << "UL}," << endl;
- }
- }
-
- private:
- typedef map<String, String> Facets;
-
- struct FacetCollector: Traversal::Complex
- {
- FacetCollector (Facets& facets)
- : facets_ (facets)
- {
- *this >> inherits_ >> *this;
- }
-
- virtual void
- traverse (Type& c)
- {
- if (c.inherits_p ())
- {
- // First collect our base so that we can override its
- // facets.
- //
- inherits (c);
-
- using SemanticGraph::Restricts;
-
- if (Restricts* r = dynamic_cast<Restricts*> (&c.inherits ()))
- {
- if (!r->facet_empty ())
- {
- Restricts::FacetIterator i (r->facet_find ("totalDigits"));
-
- if (i != r->facet_end ())
- facets_[i->first] = i->second;
-
- i = r->facet_find ("fractionDigits");
-
- if (i != r->facet_end ())
- facets_[i->first] = i->second;
- }
- }
- }
- }
-
- private:
- Traversal::Inherits inherits_;
- Facets& facets_;
- };
- };
-
- //
- //
- struct Complex: Traversal::Complex, Context
- {
- Complex (Context& c)
- : Context (c),
- member_name_ (c),
- any_ (c),
- element_ (c),
- any_test_ (c),
- element_test_ (c),
- attribute_ (c),
- attribute_test_ (c),
- any_attribute_ (c),
- default_ctor_any_init_ (c),
- default_ctor_member_init_ (c),
- ctor_any_ (c),
- ctor_member_ (c, CtorArgType::type),
- element_ctor_any_ (c),
- element_ctor_member_ (c),
- assign_any_ (c),
- assign_member_ (c),
- comparison_any_ (c),
- comparison_member_ (c),
- facet_array_ (c)
- {
- bool gen_wildcard (options.generate_wildcard ());
-
- inherits_member_ >> member_name_;
-
- names_element_ >> element_;
- if (gen_wildcard)
- names_element_ >> any_;
-
- names_element_test_ >> element_test_;
- if (gen_wildcard)
- names_element_test_ >> any_test_;
-
- names_attribute_ >> attribute_;
- names_attribute_test_ >> attribute_test_;
- names_any_attribute_ >> any_attribute_;
-
- default_ctor_init_names_ >> default_ctor_member_init_;
- if (gen_wildcard)
- default_ctor_init_names_ >> default_ctor_any_init_;
-
- ctor_names_ >> ctor_member_;
- if (gen_wildcard)
- ctor_names_ >> ctor_any_;
-
- element_ctor_names_ >> element_ctor_member_;
- if (gen_wildcard)
- element_ctor_names_ >> element_ctor_any_;
-
- assign_names_ >> assign_member_;
- if (gen_wildcard)
- assign_names_ >> assign_any_;
-
- comparison_names_ >> comparison_member_;
- if (gen_wildcard)
- comparison_names_ >> comparison_any_;
- }
-
-
- virtual void
- traverse (Type& c)
- {
- bool gen_wildcard (options.generate_wildcard ());
-
- String name (ename (c));
-
- // If renamed name is empty then we do not need to generate
- // anything for this type.
- //
- bool renamed (renamed_type (c, name));
- if (renamed && !name)
- return;
-
- SemanticGraph::Context& ctx (c.context ());
-
- bool mixed (mixed_p (c) && !ctx.count ("mixed-in-base"));
- bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
-
- bool string_based (false);
- {
- IsStringBasedType t (string_based);
- t.dispatch (c);
- }
-
- SemanticGraph::Enumeration* enum_base (0);
- {
- IsEnumBasedType t (enum_base);
- t.dispatch (c);
- }
-
- bool facets (false);
- String base; // base type name
- if (c.inherits_p ())
- {
- // Get base name.
- //
- std::wostringstream o;
-
- BaseTypeName base_type (*this, o);
- Traversal::Inherits inherits_type (base_type);
-
- // Cannot use inherits_none here because need the
- // result in a string.
- //
- inherits (c, inherits_type);
-
- base = o.str ();
-
- // See if we have any facets that we need to handle.
- //
- using SemanticGraph::Restricts;
- using SemanticGraph::Fundamental::Decimal;
-
- if (Restricts* r = dynamic_cast<Restricts*> (&c.inherits ()))
- {
- if (!r->facet_empty () &&
- (r->facet_find ("fractionDigits") != r->facet_end () ||
- r->facet_find ("totalDigits") != r->facet_end ()) &&
- ultimate_base (c).is_a<Decimal> ())
- facets = true;
- }
- }
- else
- base = any_type;
-
- os << "// " << name << endl
- << "//" << endl
- << endl;
-
- //
- //
- {
- Member member (*this, name);
- Traversal::Names names_member (member);
- names (c, names_member);
- }
-
- // facets
- //
- if (facets)
- {
- os << "static const ::xsd::cxx::tree::facet _xsd_" << name <<
- "_facet_table[] = "
- << "{";
-
- facet_array_.traverse (c);
-
- os << "{::xsd::cxx::tree::facet::none, 0UL}"
- << "};";
- }
-
- // c-tors
- //
- bool generate_no_base_ctor (false);
- {
- GenerateWithoutBaseCtor t (generate_no_base_ctor);
- t.traverse (c);
- }
-
- bool has_complex_non_op_args (false);
- bool has_poly_non_op_args (false);
- bool complex_poly_args_clash (true);
- {
- HasComplexPolyNonOptArgs t (*this, true,
- has_complex_non_op_args,
- has_poly_non_op_args,
- complex_poly_args_clash);
- t.traverse (c);
- }
-
- // default c-tor
- //
- if (options.generate_default_ctor ())
- {
- bool generate (false);
- {
- GenerateDefaultCtor t (*this, generate, generate_no_base_ctor);
- t.traverse (c);
- }
-
- if (generate)
- {
- os << name << "::" << endl
- << name << " ()" << endl
- << ": " << base << " ()";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- names (c, default_ctor_init_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
- }
-
- // c-tor (base, all-non-optional-members)
- //
- if (options.generate_from_base_ctor ())
- {
- bool generate (false);
- {
- GenerateFromBaseCtor t (*this, generate);
- t.traverse (c);
- }
-
- if (generate)
- {
- bool has_complex_non_op_args (false);
- bool has_poly_non_op_args (false);
- bool complex_poly_args_clash (true);
- {
- HasComplexPolyNonOptArgs t (*this, false,
- has_complex_non_op_args,
- has_poly_non_op_args,
- complex_poly_args_clash);
- t.traverse (c);
- }
-
- String base_arg (
- L"_xsd_" + ename (c.inherits ().base ()) + L"_base");
-
- os << name << "::" << endl
- << name << " (const ";
- inherits (c, inherits_member_);
- os << "& " << base_arg;
- {
- FromBaseCtorArg args (*this, CtorArgType::type, true);
- Traversal::Names args_names (args);
- names (c, args_names);
- }
- os << ")" << endl
- << ": " << base << " (" << base_arg << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- names (c, ctor_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
-
- // If we have any complex arguments in the previous c-tor
- // then also generate the auto_ptr version.
- //
- if (has_complex_non_op_args)
- {
- CtorArgType const at (CtorArgType::complex_auto_ptr);
-
- os << name << "::" << endl
- << name << " (const ";
- inherits (c, inherits_member_);
- os << "& " << base_arg;
- {
- FromBaseCtorArg args (*this, at, true);
- Traversal::Names args_names (args);
- names (c, args_names);
- }
- os << ")" << endl
- << ": " << base << " (" << base_arg << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- {
- CtorMember t (*this, at);
- Traversal::Names n (t);
-
- if (gen_wildcard)
- n >> ctor_any_;
-
- names (c, n);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
- // If we are generating polymorphic code then we also need to
- // provide auto_ptr version for every polymorphic type.
- //
- if (polymorphic &&
- has_poly_non_op_args && !complex_poly_args_clash)
- {
- CtorArgType const at (CtorArgType::poly_auto_ptr);
-
- os << name << "::" << endl
- << name << " (const ";
- inherits (c, inherits_member_);
- os << "& " << base_arg;
- {
- FromBaseCtorArg args (*this, at, true);
- Traversal::Names args_names (args);
- names (c, args_names);
- }
- os << ")" << endl
- << ": " << base << " (" << base_arg << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- {
- CtorMember t (*this, at);
- Traversal::Names n (t);
-
- if (gen_wildcard)
- n >> ctor_any_;
-
- names (c, n);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
- }
- }
-
- // c-tor (all-non-optional-members)
- //
- if (generate_no_base_ctor)
- {
- CtorArgType const at (CtorArgType::type);
-
- os << name << "::" << endl
- << name << " (";
- {
- CtorArgsWithoutBase ctor_args (*this, at, true, true);
- ctor_args.dispatch (c);
- }
- os << ")" << endl
- << ": " << base << " (";
- {
- CtorBase base (*this, at, "");
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- names (c, ctor_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
-
- // If we have any complex arguments in the previous c-tor
- // then also generate the auto_ptr version. One case where
- // this c-tor will be generated is restriction of anyType.
- //
- if (has_complex_non_op_args)
- {
- CtorArgType const at (CtorArgType::complex_auto_ptr);
-
- os << name << "::" << endl
- << name << " (";
- {
- CtorArgsWithoutBase ctor_args (*this, at, true, true);
- ctor_args.dispatch (c);
- }
- os << ")" << endl
- << ": " << base << " (";
- {
- CtorBase base (*this, at, "");
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- {
- CtorMember t (*this, at);
- Traversal::Names n (t);
-
- if (gen_wildcard)
- n >> ctor_any_;
-
- names (c, n);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
- // If we are generating polymorphic code then we also need to
- // provide auto_ptr version for every polymorphic type.
- //
- if (polymorphic &&
- has_poly_non_op_args && !complex_poly_args_clash)
- {
- CtorArgType const at (CtorArgType::poly_auto_ptr);
-
- os << name << "::" << endl
- << name << " (";
- {
- CtorArgsWithoutBase ctor_args (*this, at, true, true);
- ctor_args.dispatch (c);
- }
- os << ")" << endl
- << ": " << base << " (";
- {
- CtorBase base (*this, at, "");
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- {
- CtorMember t (*this, at);
- Traversal::Names n (t);
-
- if (gen_wildcard)
- n >> ctor_any_;
-
- names (c, n);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
- }
-
- if (string_based)
- {
- // We might not have the value type if this enum is customized.
- //
- if (enum_base != 0 && enum_base->context ().count ("value"))
- {
- // c-tor (enum-value, all-non-optional-members)
- //
- CtorArgType const at (CtorArgType::type);
- String base_arg (L"_xsd_" + ename (*enum_base) + L"_base");
-
- os << name << "::" << endl
- << name << " (" << fq_name (*enum_base) << "::" <<
- evalue (*enum_base) << " " << base_arg;
-
- {
- CtorArgsWithoutBase ctor_args (*this, at, true, false);
- ctor_args.dispatch (c);
- }
-
- os << ")" << endl
- << ": " << base << " (";
-
- {
- CtorBase base (*this, at, base_arg);
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
-
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- // Cannot be mixed.
-
- names (c, ctor_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
- CtorArgType const at (CtorArgType::type);
- String base_arg (L"_xsd_" + ename (ultimate_base (c)) + L"_base");
-
- // c-tor (const char*, all-non-optional-members)
- //
- os << name << "::" << endl
- << name << " (const " << char_type << "* " << base_arg;
-
- {
- CtorArgsWithoutBase ctor_args (*this, at, true, false);
- ctor_args.dispatch (c);
- }
-
- os << ")" << endl
- << ": " << base << " (";
-
- {
- CtorBase base (*this, at, base_arg);
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
-
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- // Cannot be mixed.
-
- names (c, ctor_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
-
-
- // c-tor (const std::string&, all-non-optional-members)
- //
- os << name << "::" << endl
- << name << " (const " << string_type << "& " << base_arg;
-
- {
- CtorArgsWithoutBase ctor_args (*this, at, true, false);
- ctor_args.dispatch (c);
- }
-
- os << ")" << endl
- << ": " << base << " (";
-
- {
- CtorBase base (*this, at, base_arg);
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
-
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- // Cannot be mixed.
-
- names (c, ctor_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
- // c-tor (ultimate-base, all-non-optional-members)
- //
- {
- CtorArgType const at (CtorArgType::type);
-
- os << name << "::" << endl
- << name << " (";
-
- String base_arg;
-
- {
- CtorArgs ctor_args (*this, at, base_arg);
- ctor_args.dispatch (c);
- }
-
- os << ")" << endl
- << ": " << base << " (";
-
- {
- CtorBase base (*this, at, base_arg);
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
-
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- names (c, ctor_names_);
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
- // If we have any complex arguments in the previous c-tor
- // then also generate the auto_ptr version.
- //
- if (has_complex_non_op_args)
- {
- CtorArgType const at (CtorArgType::complex_auto_ptr);
- String base_arg;
-
- os << name << "::" << endl
- << name << " (";
-
- {
- CtorArgs ctor_args (*this, at, base_arg);
- ctor_args.dispatch (c);
- }
-
- os << ")" << endl
- << ": " << base << " (";
-
- {
- CtorBase base (*this, at, base_arg);
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
-
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- {
- CtorMember t (*this, at);
- Traversal::Names n (t);
-
- if (gen_wildcard)
- n >> ctor_any_;
-
- names (c, n);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
- // If we are generating polymorphic code then we also need to
- // provide auto_ptr version for every polymorphic type.
- //
- if (polymorphic &&
- has_poly_non_op_args && !complex_poly_args_clash)
- {
- CtorArgType const at (CtorArgType::poly_auto_ptr);
- String base_arg;
-
- os << name << "::" << endl
- << name << " (";
-
- {
- CtorArgs ctor_args (*this, at, base_arg);
- ctor_args.dispatch (c);
- }
-
- os << ")" << endl
- << ": " << base << " (";
-
- {
- CtorBase base (*this, at, base_arg);
- Traversal::Inherits inherits_base (base);
-
- inherits (c, inherits_base);
- }
-
- os << ")";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- {
- CtorMember t (*this, at);
- Traversal::Names n (t);
-
- if (gen_wildcard)
- n >> ctor_any_;
-
- names (c, n);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
- }
-
-
- // copy c-tor
- //
-
- os << name << "::" << endl
- << name << " (const " << name << "& x," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (x, f, c)";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- String const& m (ctx.get<String> ("mixed-member"));
- os << "," << endl
- << " " << m << " (x." << m << ", f, this)";
- }
-
- if (ordered)
- {
- String const& m (ctx.get<String> ("order-member"));
- os << "," << endl
- << " " << m << " (x." << m << ")";
- }
-
- {
- CopyAny copy_any (*this, "x");
- CopyMember copy_member (*this, "x");
- Traversal::Names names;
-
- names >> copy_member;
-
- if (gen_wildcard)
- names >> copy_any;
-
- Complex::names (c, names);
- }
-
- os << "{";
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
- os << "}";
-
- //
- //
- bool he (has<Traversal::Element> (c));
- bool hae (has<Traversal::Any> (c));
-
- bool ha (has<Traversal::Attribute> (c));
- bool haa (has<Traversal::AnyAttribute> (c));
-
- //
- //
- if (!options.suppress_parsing ())
- {
- // c-tor (xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMElement& e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (e, f";
-
- if (he || ha || hae || (haa && gen_wildcard) || mixed)
- os << " | " << flags_type << "::base";
-
- os << ", c)";
-
- if (edom_document_member_p (c))
- {
- os << "," << endl
- << " " << edom_document_member (c) << " (" <<
- "::xsd::cxx::xml::dom::create_document< " << char_type <<
- " > ())";
- }
-
- if (mixed)
- {
- os << "," << endl
- << " " << ctx.get<String> ("mixed-member") << " (this)";
- }
-
- names (c, element_ctor_names_);
-
- os << "{";
-
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);"
- << endl;
-
- bool base_has_el (false), base_has_at (false);
-
- // We are only interested in this information if we are
- // generating our own parse().
- //
- if (he || ha || hae || (haa && gen_wildcard) || mixed)
- {
- if (c.inherits_p ())
- {
- HasParseFunction test (*this, base_has_el, base_has_at);
- test.dispatch (c.inherits ().base ());
- }
- }
-
- //@@ Throw if p is not exhausted at the end.
- //
- if (he || ha || hae || (haa && gen_wildcard) || mixed)
- os << "if ((f & " << flags_type << "::base) == 0)"
- << "{"
- << parser_type << " p (e, " <<
- (he || hae || base_has_el || mixed_p (c) ? "true, " : "false, ") <<
- (mixed_p (c) ? "true, " : "false, ") <<
- (ha || (haa && gen_wildcard) || base_has_at ? "true" : "false")
- << ");"
- << "this->" << unclash (name, "parse") << " (p, f);"
- << "}";
-
- os << "}";
-
- bool simple (true);
- {
- IsSimpleType t (simple);
- t.dispatch (c);
- }
-
- if (simple)
- {
- // c-tor (xercesc::DOMAttr)
- //
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (a, f, c)"
- << "{";
-
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
-
- os << "}";
-
- // c-tor (string const&, xercesc::DOMElement)
- //
- os << name << "::" << endl
- << name << " (const " << string_type << "& s," << endl
- << "const " << xerces_ns << "::DOMElement* e," << endl
- << flags_type << " f," << endl
- << container << "* c)" << endl
- << ": " << base << " (s, e, f, c)"
- << "{";
-
- if (facets)
- os << "this->_facet_table (_xsd_" << name << "_facet_table);";
-
- os << "}";
- }
-
- if (he || ha || hae || (haa && gen_wildcard) || mixed)
- {
- os << "void " << name << "::" << endl
- << unclash (name, "parse") << " (" <<
- parser_type << "& p," << endl
- << flags_type <<
- (he || ha || base_has_el || base_has_at ? " f" : "") << ")"
- << "{";
-
- // Allow the base to parse its part.
- //
- if (base_has_el || base_has_at)
- os << "this->" << base << "::parse (p, f);"
- << endl;
-
- if (he || hae || mixed_p (c))
- {
- bool m (mixed_p (c));
-
- os << "for (; p.more_content (); p.next_content (" <<
- (m ? "true" : "false") << "))"
- << "{";
-
- if (m)
- {
- String const& ma (ctx.get<String> ("mixed-aname"));
- String const& mi (ctx.get<String> ("mixed-ordered-id-name"));
- String const& oa (ctx.get<String> ("order-aname"));
- String const& ot (ctx.get<String> ("order-type"));
-
- os << "if (p.cur_is_text ())"
- << "{"
- << "const " << xerces_ns << "::DOMText& t (" <<
- "p.cur_text ());"
- << "this->" << ma << " ().push_back (" << endl
- << "::xsd::cxx::xml::transcode< " << char_type << " > (" <<
- "t.getData (), t.getLength ()));"
- << "this->" << oa << " ().push_back (" << endl
- << ot << " (" << mi << "," << endl
- << "this->" << ma << " ().size () - 1));"
- << "continue;"
- << "}";
- }
-
- if (he || hae)
- {
- os << "const " << xerces_ns << "::DOMElement& i (" <<
- "p.cur_element ());"
- << "const " << qname_type << " n (" << endl
- << "::xsd::cxx::xml::dom::name< " << char_type << " > (i));"
- << endl;
-
- names (c, names_element_);
- }
-
- os << "break;"
- << "}";
-
- // Make sure all non-optional elements are set.
- //
- names (c, names_element_test_);
- }
-
- if (ha || (haa && gen_wildcard))
- {
- if (base_has_at)
- os << "p.reset_attributes ();"
- << endl;
-
- os << "while (p.more_attributes ())"
- << "{"
- << "const " << xerces_ns << "::DOMAttr& i (" <<
- "p.next_attribute ());"
- << "const " << qname_type << " n (" << endl
- << "::xsd::cxx::xml::dom::name< " << char_type << " > (i));"
- << endl;
-
- names (c, names_attribute_);
-
- // Generate anyAttribute code after all the attributes.
- //
- if (gen_wildcard)
- names (c, names_any_attribute_);
-
-
- // os << "{" // else block
- // @@
- // This doesn't play well with inheritance because we
- // don't expect base's attributes. Also there are other
- // "special" attributes such as xmlns, etc.
- //
- // << "throw ::xsd::cxx::tree::unexpected_attribute ... "
- // << "}";
-
- os << "}"; // while loop
-
- // Make sure all non-optional attributes are set.
- //
- names (c, names_attribute_test_);
- }
-
- os << "}";
- }
- }
-
- // _clone
- //
- if (!(c.abstract_p () ||
- (renamed && polymorphic && polymorphic_p (c))))
- os << name << "* " << name << "::" << endl
- << "_clone (" << flags_type << " f," << endl
- << container << "* c) const"
- << "{"
- << "return new class " << name << " (*this, f, c);"
- << "}";
-
- // operator=
- //
- if (!options.suppress_assignment () &&
- (he || ha || (gen_wildcard && (hae || haa))))
- {
- os << name << "& " << name << "::" << endl
- << "operator= (const " << name << "& x)"
- << "{"
- << "if (this != &x)"
- << "{"
- << "static_cast< " << base << "& > (*this) = x;";
-
- // Note that here we don't assign the DOMDocument that is
- // used to hold wildcard fragments. Each document has its
- // own copy.
-
- // Mixed text content.
- //
- if (mixed)
- {
- String const& m (ctx.get<String> ("mixed-member"));
- os << "this->" << m << " = x." << m << ";";
- }
-
- // Order container.
- //
- if (ordered)
- {
- String const& m (ctx.get<String> ("order-member"));
- os << "this->" << m << " = x." << m << ";";
- }
-
- names (c, assign_names_);
-
- os << "}"
- << "return *this;"
- << "}";
- }
-
- // d-tor
- //
- os << name << "::" << endl
- << "~" << name << " ()"
- << "{"
- << "}";
-
- // Register with type factory map.
- //
- if (polymorphic && polymorphic_p (c) && !c.abstract_p ())
- {
- // Note that we are using the original type name.
- //
- String const& name (ename (c));
-
- // If this type is anonymous but substitutes, then it will
- // be registered as part of the substitution registration.
- //
- if (!anonymous_p (c) && !options.suppress_parsing ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::type_factory_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_type_factory_init (" << endl
- << strlit (c.name ()) << "," << endl
- << strlit (xml_ns_name (c)) << ");"
- << endl;
- }
-
- if ((!anonymous_p (c) || anonymous_substitutes_p (c)) &&
- options.generate_comparison ())
- {
- os << "static" << endl
- << "const ::xsd::cxx::tree::comparison_initializer< " <<
- poly_plate << ", " << char_type << ", " << name << " >" << endl
- << "_xsd_" << name << "_comparison_init;"
- << endl;
- }
- }
-
- // Comparison operators.
- //
- if (options.generate_comparison () &&
- (he || ha || mixed || ordered || !c.inherits_p () ||
- ((hae || haa) && gen_wildcard)))
- {
- bool base_comp (false);
-
- if (c.inherits_p ())
- {
- HasComparisonOperator test (*this, base_comp);
- test.dispatch (c.inherits ().base ());
- }
-
- bool has_body (he || ha || ordered || mixed || base_comp ||
- ((hae || haa) && gen_wildcard));
-
- os << "bool" << endl
- << "operator== (const " << name << "&" <<
- (has_body ? " x" : "") << ", " <<
- "const " << name << "&" << (has_body ? " y" : "") << ")"
- << "{";
-
- if (base_comp)
- os << "if (!(static_cast< const " << base << "& > (x) ==" << endl
- << "static_cast< const " << base << "& > (y)))" << endl
- << "return false;"
- << endl;
-
- {
- Complex::names (c, comparison_names_);
- }
-
- if (mixed)
- {
- String const& an (ctx.get<String> ("mixed-aname"));
- os << "if (!(x." << an << " () == y." << an << " ()))" << endl
- << "return false;"
- << endl;
- }
-
- if (ordered)
- {
- String const& an (ctx.get<String> ("order-aname"));
- os << "if (!(x." << an << " () == y." << an << " ()))" << endl
- << "return false;"
- << endl;
- }
-
- os << "return true;"
- << "}";
-
- os << "bool" << endl
- << "operator!= (const " << name << "& x, " <<
- "const " << name << "& y)"
- << "{"
- << "return !(x == y);"
- << "}";
- }
- }
-
- private:
- Traversal::Inherits inherits_member_;
- MemberTypeName member_name_;
-
- Traversal::Names names_element_;
- Traversal::Names names_element_test_;
-
- Traversal::Names names_attribute_;
- Traversal::Names names_any_attribute_;
- Traversal::Names names_attribute_test_;
-
- Any any_;
- Element element_;
-
- AnyTest any_test_;
- ElementTest element_test_;
-
- Attribute attribute_;
- AttributeTest attribute_test_;
-
- AnyAttribute any_attribute_;
-
- DefaultCtorAnyInit default_ctor_any_init_;
- DefaultCtorMemberInit default_ctor_member_init_;
- Traversal::Names default_ctor_init_names_;
-
- CtorAny ctor_any_;
- CtorMember ctor_member_;
- Traversal::Names ctor_names_;
-
- ElementCtorAny element_ctor_any_;
- ElementCtorMember element_ctor_member_;
- Traversal::Names element_ctor_names_;
-
- AssignAny assign_any_;
- AssignMember assign_member_;
- Traversal::Names assign_names_;
-
- AnyComparison comparison_any_;
- MemberComparison comparison_member_;
- Traversal::Names comparison_names_;
-
- FacetArray facet_array_;
- };
-
-
- // Generate element types and substitution group map entries.
- //
- struct GlobalElement: Traversal::Element,
- GlobalElementBase,
- Context
- {
- GlobalElement (Context& c)
- : GlobalElementBase (c),
- Context (c),
- element_type_ (c.options.generate_element_type ()),
- element_map_ (c.options.generate_element_map ()),
- type_name_ (c)
- {
- belongs_ >> type_name_;
- }
-
- virtual void
- traverse (Type& e)
- {
- SemanticGraph::Type& t (e.type ());
-
- // Check if this element is abstract.
- //
- bool abst;
- {
- SemanticGraph::Complex* tc;
- abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
- tc->abstract_p ();
- }
-
- if (!abst && element_type_ && doc_root_p (e))
- {
- bool fund (false);
- {
- IsFundamentalType test (fund);
- test.dispatch (t);
- }
-
- bool simple (true);
- if (!fund)
- {
- IsSimpleType test (simple);
- test.dispatch (t);
- }
-
- String const& name (ename (e));
- String const& type (etype (e));
- String const& member (emember (e));
-
- os << "// " << name << endl
- << "// " << endl
- << endl;
-
- // Virtual accessors.
- //
- os << "const " << any_type << "* " << name << "::" << endl
- << "_value () const"
- << "{";
-
- if (fund)
- os << "return 0;";
- else
- os << "return &this->" << member << ".get ();";
-
- os << "}";
-
- os << any_type << "* " << name << "::" << endl
- << "_value ()"
- << "{";
-
- if (fund)
- os << "return 0;";
- else
- os << "return &this->" << member << ".get ();";
-
- os << "}";
-
- // default c-tor
- //
- if (options.generate_default_ctor ())
- {
- os << name << "::" << endl
- << name << " ()" << endl
- << ": " << member << " (0)"
- << "{"
- << "}";
- }
-
- // c-tor (value)
- //
- os << name << "::" << endl
- << name << " (const " << type << "& x)" << endl
- << ": " << member << " (x, 0)"
- << "{"
- << "}";
-
-
- // c-tor (auto_ptr<value>)
- //
- if (!simple || (polymorphic && polymorphic_p (t)))
- {
- os << name << "::" << endl
- << name << " (" << auto_ptr << "< " << type << " > p)" << endl
- << ": " << member << " (" <<
- (std >= cxx_version::cxx11 ? "::std::move (p)" : "p") << ", 0)"
- << "{"
- << "}";
- }
-
- // c-tor (xercesc::DOMElement)
- //
- SemanticGraph::Context& ec (e.context ());
- String const& name_member (ec.get<String> ("element-name-member"));
- String const& ns_member (ec.get<String> ("element-ns-member"));
-
- bool parsing (!options.suppress_parsing ());
- if (parsing)
- {
- String const& tr (etraits (e));
-
- os << name << "::" << endl
- << name << " (const " << xerces_ns << "::DOMElement& e, " <<
- flags_type << " f)" << endl
- << ": " << member << " (0)"
- << "{"
- << "const " << qname_type << " n (" << endl
- << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
- << endl
- << "if (n.name () == " << name_member << " && " <<
- "n.namespace_ () == " << ns_member << ")" << endl
- << "this->" << member << ".set (" << tr <<
- "::create (e, f, 0));"
- << "else" << endl
- << "throw ::xsd::cxx::tree::unexpected_element < " <<
- char_type << " > (" << endl
- << "n.name (), n.namespace_ ()," << endl
- << name_member << ", " << ns_member << ");"
- << "}";
- }
-
- // copy c-tor
- //
- os << name << "::" << endl
- << name << " (const " << name << "& x, " <<
- flags_type << " f)" << endl
- << ": " << element_type << " ()," << endl
- << " " << member << " (x." << member << ", f, 0)"
- << "{"
- << "}";
-
- // _clone
- //
- os << name << "* " << name << "::" << endl
- << "_clone (" << flags_type << " f) const"
- << "{"
- << "return new class " << name << " (*this, f);"
- << "}";
-
- // Element name and namespace accessors.
- //
- String const& aname (ec.get<String> ("element-name"));
- String const& ans (ec.get<String> ("element-ns"));
-
- os << "const " << string_type << "& " << name << "::" << endl
- << aname << " ()"
- << "{"
- << "return " << name_member << ";"
- << "}";
-
- os << "const " << string_type << "& " << name << "::" << endl
- << ans << " ()"
- << "{"
- << "return " << ns_member << ";"
- << "}";
-
- os << "const " << string_type << "& " << name << "::" << endl
- << "_name () const"
- << "{"
- << "return " << name_member << ";"
- << "}";
-
- os << "const " << string_type << "& " << name << "::" << endl
- << "_namespace () const"
- << "{"
- << "return " << ns_member << ";"
- << "}";
-
- os << "const " << string_type << " " << name << "::" << endl
- << name_member << " (" << strlit (e.name ()) << ");"
- << endl
- << "const " << string_type << " " << name << "::" << endl
- << ns_member << " (" << strlit (e.namespace_ ().name ()) << ");"
- << endl;
-
- // d-tor
- //
- os << name << "::" << endl
- << "~" << name << " ()"
- << "{"
- << "}";
-
- // Element map registration.
- //
- if (element_map_ && parsing)
- {
- os << "static " << endl
- << "const ::xsd::cxx::tree::parser_init< " << name << ", " <<
- char_type << ", " << any_type << " >" << endl
- << "_xsd_" << name << "_parser_init (" <<
- name << "::" << aname << " (), " <<
- name << "::" << ans << " ());"
- << endl;
- }
- }
-
- if (!abst && polymorphic && e.substitutes_p () &&
- !options.suppress_parsing ())
- {
- String const& name (ename (e));
- Type& r (e.substitutes ().root ());
-
- os << "static" << endl
- << "const ::xsd::cxx::tree::element_factory_initializer< " <<
- poly_plate << ", " << char_type << ", ";
-
- belongs (e, belongs_);
-
- os << " >" << endl
- << "_xsd_" << name << "_element_factory_init (" << endl
- << strlit (r.name ()) << "," << endl
- << strlit (r.namespace_ ().name ()) << "," << endl
- << strlit (e.name ()) << "," << endl
- << strlit (e.namespace_ ().name ()) << ");"
- << endl
- << endl;
- }
- }
-
- private:
- bool element_type_;
- bool element_map_;
- Traversal::Belongs belongs_;
- MemberTypeName type_name_;
- };
- }
-
- void
- generate_tree_source (Context& ctx, size_t first, size_t last)
- {
- if (ctx.options.generate_wildcard ())
- {
- ctx.os << "#include <xsd/cxx/xml/dom/wildcard-source.hxx>" << endl
- << endl;
- }
-
- if (!ctx.options.suppress_parsing ())
- ctx.os << "#include <xsd/cxx/xml/dom/parsing-source.hxx>" << endl
- << endl;
-
- if (ctx.polymorphic)
- {
- bool parsing (!ctx.options.suppress_parsing ());
- bool comparison (ctx.options.generate_comparison ());
-
- if (parsing)
- ctx.os << "#include <xsd/cxx/tree/type-factory-map.hxx>" << endl
- << endl;
-
- if (comparison)
- ctx.os << "#include <xsd/cxx/tree/comparison-map.hxx>" << endl
- << endl;
-
- if (parsing || comparison)
- {
- bool import_maps (ctx.options.import_maps ());
- bool export_maps (ctx.options.export_maps ());
-
- if (import_maps || export_maps)
- {
- ctx.os << "#ifndef XSD_NO_EXPORT" << endl
- << endl
- << "namespace xsd"
- << "{"
- << "namespace cxx"
- << "{"
- << "namespace tree"
- << "{"
- << "#ifdef _MSC_VER" << endl;
-
- if (parsing && export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "type_factory_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (parsing && import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "type_factory_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (comparison && export_maps)
- ctx.os << "template struct __declspec (dllexport) " <<
- "comparison_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (comparison && import_maps)
- ctx.os << "template struct __declspec (dllimport) " <<
- "comparison_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl;
-
- if (parsing)
- ctx.os << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "type_factory_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (comparison)
- ctx.os << "template struct __attribute__ ((visibility(\"default\"))) " <<
- "comparison_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl;
-
- if (parsing)
- ctx.os << "template struct XSD_MAP_VISIBILITY " <<
- "type_factory_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- if (comparison)
- ctx.os << "template struct XSD_MAP_VISIBILITY " <<
- "comparison_plate< " << ctx.poly_plate << ", " <<
- ctx.char_type << " >;";
-
- ctx.os << "#endif" << endl
- << "}" // tree
- << "}" // cxx
- << "}" // xsd
- << "#endif // XSD_NO_EXPORT" << endl
- << endl;
- }
-
- ctx.os << "namespace _xsd"
- << "{";
-
- if (parsing)
- ctx.os << "static" << endl
- << "const ::xsd::cxx::tree::type_factory_plate< " <<
- ctx.poly_plate << ", " << ctx.char_type << " >" << endl
- << "type_factory_plate_init;"
- << endl;
-
- if (comparison)
- ctx.os << "static" << endl
- << "const ::xsd::cxx::tree::comparison_plate< " <<
- ctx.poly_plate << ", " << ctx.char_type << " >" << endl
- << "comparison_plate_init;"
- << endl;
-
- ctx.os << "}";
- }
- }
-
- Traversal::Schema schema;
- Sources sources;
- Traversal::Names names_ns, names;
- Namespace ns (ctx, first, last);
-
- List list (ctx);
- Union union_ (ctx);
- Complex complex (ctx);
- Enumeration enumeration (ctx);
- GlobalElement element (ctx);
-
- schema >> sources >> schema;
- schema >> names_ns >> ns >> names;
-
- names >> list;
- names >> union_;
- names >> complex;
- names >> enumeration;
- names >> element;
-
- schema.dispatch (ctx.schema_root);
- }
- }
-}
diff --git a/xsd/cxx/tree/tree-source.hxx b/xsd/cxx/tree/tree-source.hxx
deleted file mode 100644
index efd6927..0000000
--- a/xsd/cxx/tree/tree-source.hxx
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : xsd/cxx/tree/tree-source.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_TREE_SOURCE_HXX
-#define CXX_TREE_TREE_SOURCE_HXX
-
-#include <cxx/tree/elements.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- void
- generate_tree_source (Context&, size_t first, size_t last);
- }
-}
-
-#endif // CXX_TREE_TREE_SOURCE_HXX
diff --git a/xsd/cxx/tree/validator.cxx b/xsd/cxx/tree/validator.cxx
deleted file mode 100644
index 68febb6..0000000
--- a/xsd/cxx/tree/validator.cxx
+++ /dev/null
@@ -1,671 +0,0 @@
-// file : xsd/cxx/tree/validator.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-#include <iostream>
-
-#include <cxx/tree/validator.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <cxx/tree/elements.hxx>
-
-using namespace std;
-
-namespace CXX
-{
- namespace Tree
- {
- namespace
- {
- class ValidationContext: public Context
- {
- public:
- ValidationContext (SemanticGraph::Schema& root,
- SemanticGraph::Path const& path,
- Tree::options const& ops,
- const WarningSet& disabled_warnings,
- Counts const& counts,
- bool generate_xml_schema,
- bool& valid_)
- : Context (std::wcerr,
- root,
- path,
- ops,
- counts,
- generate_xml_schema,
- 0,
- 0,
- 0,
- 0),
- disabled_warnings_ (disabled_warnings),
- disabled_warnings_all_ (false),
- valid (valid_),
- subst_group_warning_issued (subst_group_warning_issued_),
- subst_group_warning_issued_ (false)
- {
- if (disabled_warnings_.find ("all") != disabled_warnings_.end ())
- disabled_warnings_all_ = true;
- }
-
- public:
- bool
- is_disabled (char const* w)
- {
- return disabled_warnings_all_ ||
- disabled_warnings_.find (w) != disabled_warnings_.end ();
- }
-
- public:
- String
- xpath (SemanticGraph::Nameable& n)
- {
- if (n.is_a<SemanticGraph::Namespace> ())
- return L"<namespace-level>"; // There is a bug if you see this.
-
- if (n.named_p ())
- {
- SemanticGraph::Scope& scope (n.scope ());
-
- if (scope.is_a<SemanticGraph::Namespace> ())
- return n.name ();
-
- return xpath (scope) + L"/" + n.name ();
- }
- else
- {
- return L"(anonymous type for " +
- n.context ().get<String> ("instance-name") + L")";
- }
- }
-
- protected:
- ValidationContext (ValidationContext& c)
- : Context (c),
- disabled_warnings_ (c.disabled_warnings_),
- disabled_warnings_all_ (c.disabled_warnings_all_),
- valid (c.valid),
- subst_group_warning_issued (c.subst_group_warning_issued)
- {
- }
-
- protected:
- const WarningSet& disabled_warnings_;
- bool disabled_warnings_all_;
-
- bool& valid;
-
- bool& subst_group_warning_issued;
- bool subst_group_warning_issued_;
- };
-
-
- //
- //
- struct Any: Traversal::Any, ValidationContext
- {
- Any (ValidationContext& c)
- : ValidationContext (c)
- {
- }
-
- struct Element: Traversal::Element, ValidationContext
- {
- Element (ValidationContext& c, SemanticGraph::Any& any)
- : ValidationContext (c),
- any_ (any),
- ns_ (any.definition_namespace ().name ())
- {
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e))
- return;
-
- using SemanticGraph::Any;
-
- bool q (e.qualified_p ());
- String ns (q ? e.namespace_ ().name () : "");
-
- for (Any::NamespaceIterator i (any_.namespace_begin ());
- i != any_.namespace_end (); ++i)
- {
- bool failed (false);
-
- if (*i == L"##any")
- {
- failed = true;
- }
- else if (*i == L"##other")
- {
- if (ns_)
- {
- // Note that here I assume that ##other does not
- // include names without target namespace. This
- // is not what the spec says but that seems to be
- // the consensus.
- //
- failed = q && ns != ns_;
- }
- else
- {
- // No target namespace.
- //
- failed = q && ns != L"";
- }
- }
- else if (*i == L"##local")
- {
- failed = !q || ns == L"";
- }
- else if (*i == L"##targetNamespace")
- {
- failed = (q && ns_ == ns) || (!q && ns_ == L"");
- }
- else
- {
- failed = q && *i == ns;
- }
-
- if (failed)
- {
- Any& a (any_);
-
- os << a.file () << ":" << a.line () << ":" << a.column ()
- << ": warning T001: namespace '" << *i << "' allows for "
- << "element '" << e.name () << "'" << endl;
-
- os << a.file () << ":" << a.line () << ":" << a.column ()
- << ": warning T001: generated code may not associate element '"
- << e.name () << "' correctly if it appears in place of "
- << "this wildcard" << endl;
-
- os << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: element '" << e.name () << "' is defined "
- << "here" << endl;
- }
- }
- }
-
- private:
- SemanticGraph::Any& any_;
- String ns_;
- };
-
- struct Complex: Traversal::Complex
- {
- Complex ()
- : up_ (true), down_ (true)
- {
- }
-
- virtual void
- post (Type& c)
- {
- // Go down the inheritance hierarchy.
- //
- if (down_)
- {
- bool up = up_;
- up_ = false;
-
- if (c.inherits_p ())
- dispatch (c.inherits ().base ());
-
- up_ = up;
- }
-
- // Go up the inheritance hierarchy.
- //
- if (up_)
- {
- bool down = down_;
- down_ = false;
-
- for (Type::BegetsIterator i (c.begets_begin ());
- i != c.begets_end (); ++i)
- {
- dispatch (i->derived ());
- }
-
- down_ = down;
- }
- }
-
- private:
- bool up_, down_;
- };
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- using SemanticGraph::Compositor;
-
- // Find our complex type.
- //
- Compositor* c (&a.contained_particle ().compositor ());
-
- while(!c->contained_compositor_p ())
- c = &c->contained_particle ().compositor ();
-
- SemanticGraph::Complex& type (
- dynamic_cast<SemanticGraph::Complex&> (
- c->contained_compositor ().container ()));
-
- Complex complex;
- Traversal::Names names;
- Element element (*this, a);
-
- complex >> names >> element;
-
- complex.dispatch (type);
- }
- };
-
-
- //
- //
- struct Traverser: Traversal::Schema,
- Traversal::Complex,
- Traversal::Type,
- Traversal::Element,
- ValidationContext
- {
- Traverser (ValidationContext& c)
- : ValidationContext (c), any_ (c)
- {
- *this >> sources_ >> *this;
- *this >> schema_names_ >> ns_ >> names_;
-
- names_ >> *this >> names_;
-
- // Any
- //
- if (!is_disabled ("T001"))
- {
- *this >> contains_compositor_ >> compositor_ >> contains_particle_;
- contains_particle_ >> compositor_;
- contains_particle_ >> any_;
- }
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- using SemanticGraph::Schema;
-
- traverse (static_cast<SemanticGraph::Type&> (c));
-
- if (c.inherits_p ())
- {
- SemanticGraph::Type& t (c.inherits ().base ());
-
- if (t.named_p () &&
- types_.find (
- t.scope ().name () + L"#" + t.name ()) == types_.end ())
- {
- // Don't worry about types that are in included/imported
- // schemas.
- //
- Schema& s (dynamic_cast<Schema&> (t.scope ().scope ()));
-
- if (&s == &schema_root || sources_p (schema_root, s))
- {
- valid = false;
-
- os << c.file () << ":" << c.line () << ":" << c.column ()
- << ": error: type '" << xpath (c) << "' inherits from "
- << "yet undefined type '" << xpath (t) << "'" << endl;
-
- os << t.file () << ":" << t.line () << ":" << t.column ()
- << ": info: '" << xpath (t) << "' is defined here"
- << endl;
-
- os << c.file () << ":" << c.line () << ":" << c.column ()
- << ": info: inheritance from a yet-undefined type is "
- << "not supported" << endl;
-
- os << c.file () << ":" << c.line () << ":" << c.column ()
- << ": info: re-arrange your schema and try again"
- << endl;
- }
- }
- }
-
- Complex::traverse (c);
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- // This is also used to traverse Complex.
- //
- if (t.named_p ())
- {
- types_.insert (t.scope ().name () + L"#" + t.name ());
- }
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (is_disabled ("T002"))
- return;
-
- // Note that there is no test for generate_p since we want
- // to catch cases when things are not being generated but
- // most likely should have been.
- //
- if (e.substitutes_p () && !polymorphic &&
- !subst_group_warning_issued)
- {
- subst_group_warning_issued = true;
-
- os << e.file () << ":" << e.line () << ":" << e.column ()
- << ": warning T002: substitution groups are used but "
- << "--generate-polymorphic was not specified" << endl;
-
- os << e.file () << ":" << e.line () << ":" << e.column ()
- << ": info: generated code may not be able to handle "
- << "some conforming instances" << endl;
- }
- }
-
- // Return true if root sources s.
- //
- bool
- sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
- {
- using SemanticGraph::Schema;
- using SemanticGraph::Sources;
-
- for (Schema::UsesIterator i (root.uses_begin ());
- i != root.uses_end (); ++i)
- {
- if (i->is_a<Sources> ())
- {
- if (&i->schema () == &s || sources_p (i->schema (), s))
- return true;
- }
- }
-
- return false;
- }
-
- private:
- set<String> types_;
-
- Sources sources_;
-
- Traversal::Names schema_names_;
- Traversal::Namespace ns_;
-
- Traversal::Names names_;
-
- // Any.
- //
- Any any_;
- Traversal::Compositor compositor_;
- Traversal::ContainsParticle contains_particle_;
- Traversal::ContainsCompositor contains_compositor_;
- };
-
-
- struct AnonymousType: Traversal::Schema,
- Traversal::Complex,
- Traversal::Element,
- Traversal::Attribute,
- ValidationContext
- {
- AnonymousType (ValidationContext& c)
- : ValidationContext (c),
- anonymous_error_issued_ (false)
- {
- *this >> sources_ >> *this;
- *this >> schema_names_ >> ns_ >> names_ >> *this;
- *this >> names_;
- }
-
- bool
- traverse_common (SemanticGraph::Member& m)
- {
- SemanticGraph::Type& t (m.type ());
-
- if (!t.named_p ()
- && !t.is_a<SemanticGraph::Fundamental::IdRef> ()
- && !t.is_a<SemanticGraph::Fundamental::IdRefs> ())
- {
- if (!anonymous_error_issued_)
- {
- valid = false;
- anonymous_error_issued_ = true;
-
- wcerr << t.file ()
- << ": error: anonymous types detected"
- << endl;
-
- wcerr << t.file ()
- << ": info: "
- << "anonymous types are not supported in this mapping"
- << endl;
-
- wcerr << t.file ()
- << ": info: consider explicitly naming these types or "
- << "remove the --preserve-anonymous option to "
- << "automatically name them"
- << endl;
-
- if (!options.show_anonymous ())
- wcerr << t.file ()
- << ": info: use --show-anonymous option to see these "
- << "types" << endl;
- }
-
- return true;
- }
-
- return false;
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- if (skip (e)) return;
-
- if (traverse_common (e))
- {
- if (options.show_anonymous ())
- {
- wcerr << e.file () << ":" << e.line () << ":" << e.column ()
- << ": error: element '" << xpath (e) << "' "
- << "is of anonymous type" << endl;
- }
- }
- else
- Traversal::Element::traverse (e);
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- if (traverse_common (a))
- {
- if (options.show_anonymous ())
- {
- wcerr << a.file () << ":" << a.line () << ":" << a.column ()
- << ": error: attribute '" << xpath (a) << "' "
- << "is of anonymous type" << endl;
- }
- }
- else
- Traversal::Attribute::traverse (a);
- }
-
- private:
- bool anonymous_error_issued_;
-
- set<String> types_;
-
- Sources sources_;
-
- Traversal::Names schema_names_;
- Traversal::Namespace ns_;
-
- Traversal::Names names_;
- };
- }
-
- bool Validator::
- validate (options const& ops,
- SemanticGraph::Schema& schema,
- SemanticGraph::Path const& path,
- const WarningSet& disabled_warnings,
- Counts const& counts)
- {
- bool valid (true);
- ValidationContext ctx (
- schema, path, ops, disabled_warnings, counts, false, valid);
-
- //
- //
- bool import_maps (ops.import_maps ());
- bool export_maps (ops.export_maps ());
-
- if (import_maps && export_maps)
- {
- wcerr << "error: --import-maps and --export-maps are "
- << "mutually exclusive" << endl;
-
- return false;
- }
-
- if (import_maps && !ctx.polymorphic)
- {
- wcerr << "error: --import-maps can only be specified together with "
- << "--generate-polymorphic" << endl;
-
- return false;
- }
-
- if (export_maps && !ctx.polymorphic)
- {
- wcerr << "error: --export-maps can only be specified together " <<
- "with --generate-polymorphic" << endl;
-
- return false;
- }
-
- //
- //
- if (ops.char_type () != "char" &&
- ops.char_type () != "wchar_t" &&
- !ctx.is_disabled ("T003"))
- {
- wcerr << "warning T003: unknown base character type '" <<
- ops.char_type ().c_str () << "'" << endl;
- }
-
- //
- //
- NarrowString tn (ops.type_naming ());
-
- if (tn != "knr" && tn != "ucc" && tn != "java")
- {
- wcerr << "error: unknown type naming style specified: '" <<
- tn.c_str () << "'" << endl;
-
- return false;
- }
-
- NarrowString fn (ops.function_naming ());
-
- if (fn != "knr" && fn != "lcc" && fn != "java")
- {
- wcerr << "error: unknown function naming style specified: '" <<
- fn.c_str () << "'" << endl;
-
- return false;
- }
-
- //
- //
- bool element_type (ops.generate_element_type ());
- bool par (!ops.suppress_parsing ());
- bool ser (ops.generate_serialization ());
-
- if (ops.generate_element_map ())
- {
- if (!element_type)
- {
- wcerr << "error: --generate-element-map can only be specified " <<
- "together with --generate-element-type" << endl;
-
- return false;
- }
-
- if (!(par || ser))
- {
- wcerr << "error: --generate-element-map is specified but " <<
- "neither parsing nor serialization code is generated" << endl;
-
- return false;
- }
- }
-
- // Issue a warning if there are more than one global element
- // and we are generating parsing/serialization functions or
- // element types for all of them by default.
- //
-
- if (counts.global_elements > 1 &&
- (element_type || par || ser) &&
- !ops.root_element_first () &&
- !ops.root_element_last () &&
- !ops.root_element_all () &&
- !ops.root_element_none () &&
- ops.root_element ().empty () &&
- !ctx.is_disabled ("T004"))
- {
- wcerr << schema.file () << ": warning T004: generating ";
-
- if (element_type)
- wcerr << "element types";
- else
- {
- wcerr << (par ? "parsing " : "") <<
- (ser ? (par ? "and serialization " : "serialization ") : "") <<
- "functions";
- }
- wcerr << " for " << counts.global_elements << " global elements" <<
- endl;
-
- wcerr << schema.file () << ": info: use --root-element-* options "
- << "to specify document root(s)" << endl;
- }
-
-
- // Test for anonymout types.
- //
- {
- AnonymousType traverser (ctx);
- traverser.dispatch (schema);
- }
-
- // Test the rest.
- //
- if (valid)
- {
- Traverser traverser (ctx);
- traverser.dispatch (schema);
- }
-
- return valid;
-
- // T005 is used in polymorphism-processor.cxx.
- //
- }
- }
-}
diff --git a/xsd/cxx/tree/validator.hxx b/xsd/cxx/tree/validator.hxx
deleted file mode 100644
index 25b36c6..0000000
--- a/xsd/cxx/tree/validator.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-// file : xsd/cxx/tree/validator.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef CXX_TREE_VALIDATOR_HXX
-#define CXX_TREE_VALIDATOR_HXX
-
-#include <cxx/tree/elements.hxx>
-#include <cxx/tree/options.hxx>
-
-#include <xsd.hxx>
-
-namespace CXX
-{
- namespace Tree
- {
- class Validator
- {
- public:
- bool
- validate (options const&,
- SemanticGraph::Schema&,
- SemanticGraph::Path const& tu,
- const WarningSet& disabled_warnings,
- Counts const& counts);
- };
- }
-}
-
-#endif // CXX_TREE_VALIDATOR_HXX
diff --git a/xsd/doc/.gitignore b/xsd/doc/.gitignore
new file mode 100644
index 0000000..7ae560f
--- /dev/null
+++ b/xsd/doc/.gitignore
@@ -0,0 +1,2 @@
+xsd.1
+xsd.xhtml
diff --git a/xsd/doc/buildfile b/xsd/doc/buildfile
new file mode 100644
index 0000000..ccfc060
--- /dev/null
+++ b/xsd/doc/buildfile
@@ -0,0 +1,187 @@
+# file : doc/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+define css: doc
+css{*}: extension = css
+
+define xsd: doc
+xsd{*}: extension = xsd
+
+define xhtml: doc
+xhtml{*}: extension = xhtml
+
+define ps: doc
+ps{*}: extension = ps
+
+define pdf: doc
+pdf{*}: extension = pdf
+
+define html2ps: file
+html2ps{*}: extension = html2ps
+
+define png: doc
+png{*}: extension = png
+
+define svg: file
+svg{*}: extension = svg
+
+import? [metadata] cli = cli%exe{cli}
+
+# Import the html2ps and ps2pdf14 programs only if present on the system. This
+# way a distribution that includes pre-generated files can be built without
+# installing these programs.
+#
+import? html2ps = html2ps%exe{html2ps}
+import? ps2pdf14 = ps2pdf14%exe{ps2pdf14}
+
+./: xsd{custom-literals}
+
+# Note that we include the cli, html2ps, and ps2pdf14 generated files into the
+# distribution and don't remove them when cleaning in src (so that clean
+# results in a state identical to distributed).
+
+# Generate the man pages if the cli program is available and handle (install,
+# distribute, etc) the pre-generated files otherwise, if present.
+#
+if ($cli != [null])
+{
+ ./: {man1 xhtml}{xsd}
+
+ man_topics = $(src_root)/xsd/cxx/cli{options tree/options parser/options}
+
+ man_options = -v project="XSD" \
+ -v version="$version.project_id" \
+ -v copyright="$copyright" \
+ -I $src_root \
+ --stdout \
+ --suppress-undocumented \
+ --exclude-base
+
+ man1{xsd}: $man_topics \
+ man1{xsd-prologue \
+ xsd-tree-header \
+ xsd-parser-header \
+ xsd-epilogue} \
+ $cli
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+ {{
+ diag cli $> : ($<[0]) # @@ TMP: revise
+
+ # Note that the date change doesn't change the script semantics, thus the
+ # variable is defined locally.
+ #
+ date +"%B %Y" | set date
+
+ $cli --generate-man -v date="$date" $man_options \
+ --class CXX::options \
+ --class options \
+ --man-prologue-file $path($<[3]) \
+ $path($<[0]) >$path($>)
+
+ $cli --generate-man -v date="$date" $man_options \
+ --man-prologue-file $path($<[4]) \
+ $path($<[1]) >>$path($>)
+
+ $cli --generate-man -v date="$date" $man_options \
+ --man-prologue-file $path($<[5]) \
+ --man-epilogue-file $path($<[6]) \
+ $path($<[2]) >>$path($>)
+ }}
+
+ xhtml{xsd}: $man_topics \
+ xhtml{xsd-prologue \
+ xsd-tree-header \
+ xsd-parser-header \
+ xsd-epilogue} \
+ css{*} \
+ $cli
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+ {{
+ diag cli $> : ($<[0]) # @@ TMP: revise
+
+ date +"%B %Y" | set date
+
+ $cli --generate-html -v date="$date" $man_options \
+ --class CXX::options \
+ --class options \
+ --html-prologue-file $path($<[3]) \
+ $path($<[0]) >$path($>)
+
+ $cli --generate-html -v date="$date" $man_options \
+ --html-prologue-file $path($<[4]) \
+ $path($<[1]) >>$path($>)
+
+ $cli --generate-html -v date="$date" $man_options \
+ --html-prologue-file $path($<[5]) \
+ --html-epilogue-file $path($<[6]) \
+ $path($<[2]) >>$path($>)
+ }}
+}
+else
+ # Distribute both the pre-generated file (if present) and the sources.
+ #
+ ./: {man1 xhtml}{+xsd xsd-*} css{*}
+
+# Generate the user guide/manual ps/pdf files if the html2ps and ps2pdf14
+# programs are imported and handle (install, distribute, etc) the
+# pre-generated files otherwise, if present.
+#
+for d: cxx/parser/guide/ cxx/tree/guide/ cxx/tree/manual/
+{
+ p = "([dir_path] $path.leaf($path.directory($d)))" # parser, tree
+ l = "([dir_path] $path.leaf($d))" # guide, manual
+ f = "cxx-$p-$l" # cxx-parser-guide, etc
+
+ ./: $d/xhtml{index}: $d/{png svg}{*}
+
+ $d/xhtml{index}: $d/in{index}
+ {
+ in.symbol = '@'
+ }
+
+ if ($html2ps != [null])
+ {
+ ./: $d/ps{$f}: $d/xhtml{index} $d/html2ps{$l} $html2ps
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+ {{
+ diag html2ps $> : ($<[0]) # @@ TMP: revise
+
+ $html2ps -f $path($<[1]) -o $path($>) $path($<[0])
+ }}
+
+ if ($ps2pdf14 != [null])
+ {
+ ./: $d/pdf{$f}: $d/ps{$f} $ps2pdf14
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+ {{
+ diag ps2pdf14 $> : ($<[0]) # @@ TMP: revise
+
+ $ps2pdf14 -dOptimize=true -dEmbedAllFonts=true $path($<[0]) $path($>)
+ }}
+ }
+ else
+ ./: $d/pdf{+$f}
+ }
+ else
+ ./: $d/{ps pdf}{+$f} $d/html2ps{$l}
+
+ $d/html2ps{$l}: $d/in{$l}
+ {
+ in.symbol = '@'
+ }
+}
+
+{man1 xhtml}{xsd-*}: install = false # xsd-prologue, etc
+doc{*}: install.subdirs = true
diff --git a/doc/custom-literals.xsd b/xsd/doc/custom-literals.xsd
index c6f7613..c6f7613 100644
--- a/doc/custom-literals.xsd
+++ b/xsd/doc/custom-literals.xsd
diff --git a/xsd/doc/cxx/.gitignore b/xsd/doc/cxx/.gitignore
new file mode 100644
index 0000000..239cc7f
--- /dev/null
+++ b/xsd/doc/cxx/.gitignore
@@ -0,0 +1,2 @@
+*.ps
+*.pdf
diff --git a/xsd/doc/cxx/parser/guide/.gitignore b/xsd/doc/cxx/parser/guide/.gitignore
new file mode 100644
index 0000000..17828e9
--- /dev/null
+++ b/xsd/doc/cxx/parser/guide/.gitignore
@@ -0,0 +1,2 @@
+index.xhtml
+guide.html2ps
diff --git a/doc/cxx/parser/guide/figure-1.png b/xsd/doc/cxx/parser/guide/figure-1.png
index 15d1723..15d1723 100644
--- a/doc/cxx/parser/guide/figure-1.png
+++ b/xsd/doc/cxx/parser/guide/figure-1.png
Binary files differ
diff --git a/doc/cxx/parser/guide/figure-1.svg b/xsd/doc/cxx/parser/guide/figure-1.svg
index d994a79..d994a79 100644
--- a/doc/cxx/parser/guide/figure-1.svg
+++ b/xsd/doc/cxx/parser/guide/figure-1.svg
diff --git a/xsd/doc/cxx/parser/guide/guide.html2ps.in b/xsd/doc/cxx/parser/guide/guide.html2ps.in
new file mode 100644
index 0000000..8131487
--- /dev/null
+++ b/xsd/doc/cxx/parser/guide/guide.html2ps.in
@@ -0,0 +1,65 @@
+@@html2ps {
+ option {
+ toc: hb;
+ colour: 1;
+ hyphenate: 1;
+ titlepage: 1;
+ }
+
+ datefmt: "%B %Y";
+
+ titlepage {
+ content: "
+<div align=center>
+ <h1><big>C++/Parser Mapping</big></h1>
+ <h1><big>Getting Started Guide</big></h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+</div>
+ <p>Copyright &#169; @copyright@.</p>
+
+ <p>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href='https://www.codesynthesis.com/licenses/fdl-1.2.txt'>GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/index.xhtml'>XHTML</a>,
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.pdf'>PDF</a>, and
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.ps'>PostScript</a>.</p>";
+ }
+
+ toc {
+ indent: 2em;
+ }
+
+ header {
+ odd-right: $H;
+ even-left: $H;
+ }
+
+ footer {
+ odd-left: $D;
+ odd-center: $T;
+ odd-right: $N;
+
+ even-left: $N;
+ even-center: $T;
+ even-right: $D;
+ }
+}
+
+body {
+ font-size: 12pt;
+ text-align: justify;
+}
+
+pre {
+ font-size: 10pt;
+}
diff --git a/xsd/doc/cxx/parser/guide/index.xhtml.in b/xsd/doc/cxx/parser/guide/index.xhtml.in
new file mode 100644
index 0000000..96d06e2
--- /dev/null
+++ b/xsd/doc/cxx/parser/guide/index.xhtml.in
@@ -0,0 +1,4164 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<head>
+ <title>C++/Parser Mapping Getting Started Guide</title>
+
+ <meta name="copyright" content="&#169; @copyright@"/>
+ <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,parser,validation"/>
+ <meta name="description" content="C++/Parser Mapping Getting Started Guide"/>
+
+ <link rel="stylesheet" type="text/css" href="../../../default.css" />
+
+<style type="text/css">
+ pre {
+ padding : 0 0 0 0em;
+ margin : 0em 0em 0em 0;
+
+ font-size : 102%
+ }
+
+ body {
+ min-width: 48em;
+ }
+
+ h1 {
+ font-weight: bold;
+ font-size: 200%;
+ line-height: 1.2em;
+ }
+
+ h2 {
+ font-weight : bold;
+ font-size : 150%;
+
+ padding-top : 0.8em;
+ }
+
+ h3 {
+ font-size : 140%;
+ padding-top : 0.8em;
+ }
+
+ /* Adjust indentation for three levels. */
+ #container {
+ max-width: 48em;
+ }
+
+ #content {
+ padding: 0 0.1em 0 4em;
+ /*background-color: red;*/
+ }
+
+ #content h1 {
+ margin-left: -2.06em;
+ }
+
+ #content h2 {
+ margin-left: -1.33em;
+ }
+
+ /* Title page */
+
+ #titlepage {
+ padding: 2em 0 1em 0;
+ border-bottom: 1px solid black;
+ }
+
+ #titlepage .title {
+ font-weight: bold;
+ font-size: 200%;
+ text-align: center;
+ }
+
+ #titlepage #first-title {
+ padding: 1em 0 0.4em 0;
+ }
+
+ #titlepage #second-title {
+ padding: 0.4em 0 2em 0;
+ }
+
+ /* Lists */
+ ul.list li {
+ padding-top : 0.3em;
+ padding-bottom : 0.3em;
+ }
+
+ ol.steps {
+ padding-left : 1.8em;
+ }
+
+ ol.steps li {
+ padding-top : 0.3em;
+ padding-bottom : 0.3em;
+ }
+
+
+ div.img {
+ text-align: center;
+ padding: 2em 0 2em 0;
+ }
+
+ /* */
+ dl dt {
+ padding : 0.8em 0 0 0;
+ }
+
+ /* Built-in table */
+ #builtin {
+ margin: 2em 0 2em 0;
+
+ border-collapse : collapse;
+ border : 1px solid;
+ border-color : #000000;
+
+ font-size : 11px;
+ line-height : 14px;
+ }
+
+ #builtin th, #builtin td {
+ border: 1px solid;
+ padding : 0.9em 0.9em 0.7em 0.9em;
+ }
+
+ #builtin th {
+ background : #cde8f6;
+ }
+
+ #builtin td {
+ text-align: left;
+ }
+
+ /* XML Schema features table. */
+ #features {
+ margin: 2em 0 2em 0;
+
+ border-collapse : collapse;
+ border : 1px solid;
+ border-color : #000000;
+
+ font-size : 11px;
+ line-height : 14px;
+ }
+
+ #features th, #features td {
+ border: 1px solid;
+ padding : 0.6em 0.6em 0.6em 0.6em;
+ }
+
+ #features th {
+ background : #cde8f6;
+ }
+
+ #features td {
+ text-align: left;
+ }
+
+
+ /* TOC */
+ table.toc {
+ border-style : none;
+ border-collapse : separate;
+ border-spacing : 0;
+
+ margin : 0.2em 0 0.2em 0;
+ padding : 0 0 0 0;
+ }
+
+ table.toc tr {
+ padding : 0 0 0 0;
+ margin : 0 0 0 0;
+ }
+
+ table.toc * td, table.toc * th {
+ border-style : none;
+ margin : 0 0 0 0;
+ vertical-align : top;
+ }
+
+ table.toc * th {
+ font-weight : normal;
+ padding : 0em 0.1em 0em 0;
+ text-align : left;
+ white-space : nowrap;
+ }
+
+ table.toc * table.toc th {
+ padding-left : 1em;
+ }
+
+ table.toc * td {
+ padding : 0em 0 0em 0.7em;
+ text-align : left;
+ }
+</style>
+
+
+</head>
+
+<body>
+<div id="container">
+ <div id="content">
+
+ <div class="noprint">
+
+ <div id="titlepage">
+ <div class="title" id="first-title">C++/Parser Mapping</div>
+ <div class="title" id="second-title">Getting Started Guide</div>
+
+ <p>Copyright &#169; @copyright@.</p>
+
+ <p>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/index.xhtml">XHTML</a>,
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.pdf">PDF</a>, and
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/cxx-parser-guide.ps">PostScript</a>.</p>
+
+ </div>
+
+ <h1>Table of Contents</h1>
+
+ <table class="toc">
+ <tr>
+ <th></th><td><a href="#0">Preface</a>
+ <table class="toc">
+ <tr><th></th><td><a href="#0.1">About This Document</a></td></tr>
+ <tr><th></th><td><a href="#0.2">More Information</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>1</th><td><a href="#1">Introduction</a>
+ <table class="toc">
+ <tr><th>1.1</th><td><a href="#1.1">Mapping Overview</a></td></tr>
+ <tr><th>1.2</th><td><a href="#1.2">Benefits</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>2</th><td><a href="#2">Hello World Example</a>
+ <table class="toc">
+ <tr><th>2.1</th><td><a href="#2.1">Writing XML Document and Schema</a></td></tr>
+ <tr><th>2.2</th><td><a href="#2.2">Translating Schema to C++</a></td></tr>
+ <tr><th>2.3</th><td><a href="#2.3">Implementing Application Logic</a></td></tr>
+ <tr><th>2.4</th><td><a href="#2.4">Compiling and Running</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>3</th><td><a href="#3">Parser Skeletons</a>
+ <table class="toc">
+ <tr><th>3.1</th><td><a href="#3.1">Implementing the Gender Parser</a></td></tr>
+ <tr><th>3.2</th><td><a href="#3.2">Implementing the Person Parser</a></td></tr>
+ <tr><th>3.3</th><td><a href="#3.3">Implementing the People Parser</a></td></tr>
+ <tr><th>3.4</th><td><a href="#3.4">Connecting the Parsers Together</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>4</th><td><a href="#4">Type Maps</a>
+ <table class="toc">
+ <tr><th>4.1</th><td><a href="#4.1">Object Model</a></td></tr>
+ <tr><th>4.2</th><td><a href="#4.2">Type Map File Format</a></td></tr>
+ <tr><th>4.3</th><td><a href="#4.3">Parser Implementations</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>5</th><td><a href="#5">Mapping Configuration</a>
+ <table class="toc">
+ <tr><th>5.1</th><td><a href="#5.1">C++ Standard</a></td></tr>
+ <tr><th>5.2</th><td><a href="#5.2">Character Type and Encoding</a></td></tr>
+ <tr><th>5.3</th><td><a href="#5.3">Underlying XML Parser</a></td></tr>
+ <tr><th>5.4</th><td><a href="#5.4">XML Schema Validation</a></td></tr>
+ <tr><th>5.5</th><td><a href="#5.5">Support for Polymorphism</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>6</th><td><a href="#6">Built-In XML Schema Type Parsers</a>
+ <table class="toc">
+ <tr><th>6.1</th><td><a href="#6.1"><code>QName</code> Parser</a></td></tr>
+ <tr><th>6.2</th><td><a href="#6.2"><code>NMTOKENS</code> and <code>IDREFS</code> Parsers</a></td></tr>
+ <tr><th>6.3</th><td><a href="#6.3"><code>base64Binary</code> and <code>hexBinary</code> Parsers</a></td></tr>
+ <tr><th>6.4</th><td><a href="#6.4">Time Zone Representation</a></td></tr>
+ <tr><th>6.5</th><td><a href="#6.5"><code>date</code> Parser</a></td></tr>
+ <tr><th>6.6</th><td><a href="#6.6"><code>dateTime</code> Parser</a></td></tr>
+ <tr><th>6.7</th><td><a href="#6.7"><code>duration</code> Parser</a></td></tr>
+ <tr><th>6.8</th><td><a href="#6.8"><code>gDay</code> Parser</a></td></tr>
+ <tr><th>6.9</th><td><a href="#6.9"><code>gMonth</code> Parser</a></td></tr>
+ <tr><th>6.10</th><td><a href="#6.10"><code>gMonthDay</code> Parser</a></td></tr>
+ <tr><th>6.11</th><td><a href="#6.11"><code>gYear</code> Parser</a></td></tr>
+ <tr><th>6.12</th><td><a href="#6.12"><code>gYearMonth</code> Parser</a></td></tr>
+ <tr><th>6.13</th><td><a href="#6.13"><code>time</code> Parser</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>7</th><td><a href="#7">Document Parser and Error Handling</a>
+ <table class="toc">
+ <tr><th>7.1</th><td><a href="#7.1">Xerces-C++ Document Parser</a></td></tr>
+ <tr><th>7.2</th><td><a href="#7.2">Expat Document Parser</a></td></tr>
+ <tr><th>7.3</th><td><a href="#7.3">Error Handling</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th></th><td><a href="#A">Appendix A &mdash; Supported XML Schema Constructs</a></td>
+ </tr>
+
+ </table>
+ </div>
+
+ <h1><a name="0">Preface</a></h1>
+
+ <h2><a name="0.1">About This Document</a></h2>
+
+ <p>The goal of this document is to provide you with an understanding of
+ the C++/Parser programming model and allow you to efficiently evaluate
+ XSD against your project's technical requirements. As such, this
+ document is intended for C++ developers and software architects
+ who are looking for an XML processing solution. Prior experience
+ with XML and C++ is required to understand this document. Basic
+ understanding of XML Schema is advantageous but not expected
+ or required.
+ </p>
+
+
+ <h2><a name="0.2">More Information</a></h2>
+
+ <p>Beyond this guide, you may also find the following sources of
+ information useful:</p>
+
+ <ul class="list">
+ <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a></li>
+
+ <li>The <code>cxx/parser/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ contains a collection of examples and a README file with an overview
+ of each example.</li>
+
+ <li>The <code>README</code> file in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ explains how to build the examples.</li>
+
+ <li>The <a href="https://www.codesynthesis.com/mailman/listinfo/xsd-users">xsd-users</a>
+ mailing list is the place to ask technical questions about XSD and the C++/Parser mapping.
+ Furthermore, the <a href="https://www.codesynthesis.com/pipermail/xsd-users/">archives</a>
+ may already have answers to some of your questions.</li>
+
+ </ul>
+
+ <!-- Introduction -->
+
+ <h1><a name="1">1 Introduction</a></h1>
+
+ <p>Welcome to CodeSynthesis XSD and the C++/Parser mapping. XSD is a
+ cross-platform W3C XML Schema to C++ data binding compiler. C++/Parser
+ is a W3C XML Schema to C++ mapping that represents an XML vocabulary
+ as a set of parser skeletons which you can implement to perform XML
+ processing as required by your application logic.
+ </p>
+
+ <h2><a name="1.1">1.1 Mapping Overview</a></h2>
+
+ <p>The C++/Parser mapping provides event-driven, stream-oriented
+ XML parsing, XML Schema validation, and C++ data binding. It was
+ specifically designed and optimized for high performance and
+ small footprint. Based on the static analysis of the schemas, XSD
+ generates compact, highly-optimized hierarchical state machines
+ that combine data extraction, validation, and even dispatching
+ in a single step. As a result, the generated code is typically
+ 2-10 times faster than general-purpose validating XML parsers
+ while maintaining the lowest static and dynamic memory footprints.
+ </p>
+
+ <p>To speed up application development, the C++/Parser mapping
+ can be instructed to generate sample parser implementations
+ and a test driver which can then be filled with the application
+ logic code. The mapping also provides a wide range of
+ mechanisms for controlling and customizing the generated code.</p>
+
+ <p>The next chapter shows how to create a simple application that uses
+ the C++/Parser mapping to parse, validate, and extract data from a
+ simple XML document. The following chapters show how to
+ use the C++/Parser mapping in more detail.</p>
+
+ <h2><a name="1.2">1.2 Benefits</a></h2>
+
+ <p>Traditional XML access APIs such as Document Object Model (DOM)
+ or Simple API for XML (SAX) have a number of drawbacks that
+ make them less suitable for creating robust and maintainable
+ XML processing applications. These drawbacks include:
+ </p>
+
+ <ul class="list">
+ <li>Generic representation of XML in terms of elements, attributes,
+ and text forces an application developer to write a substantial
+ amount of bridging code that identifies and transforms pieces
+ of information encoded in XML to a representation more suitable
+ for consumption by the application logic.</li>
+
+ <li>String-based flow control defers error detection to runtime.
+ It also reduces code readability and maintainability.</li>
+
+ <li>Lack of type safety because the data is represented
+ as text.</li>
+
+ <li>Resulting applications are hard to debug, change, and
+ maintain.</li>
+ </ul>
+
+ <p>In contrast, statically-typed, vocabulary-specific parser
+ skeletons produced by the C++/Parser mapping allow you to
+ operate in your domain terms instead of the generic elements,
+ attributes, and text. Static typing helps catch errors at
+ compile-time rather than at run-time. Automatic code generation
+ frees you for more interesting tasks (such as doing something
+ useful with the information stored in the XML documents) and
+ minimizes the effort needed to adapt your applications to
+ changes in the document structure. To summarize, the C++/Parser
+ mapping has the following key advantages over generic XML
+ access APIs:</p>
+
+ <ul class="list">
+ <li><b>Ease of use.</b> The generated code hides all the complexity
+ associated with recreating the document structure, maintaining the
+ dispatch state, and converting the data from the text representation
+ to data types suitable for manipulation by the application logic.
+ Parser skeletons also provide a convenient mechanism for building
+ custom in-memory representations.</li>
+
+ <li><b>Natural representation.</b> The generated parser skeletons
+ implement parser callbacks as virtual functions with names
+ corresponding to elements and attributes in XML. As a result,
+ you process the XML data using your domain vocabulary instead
+ of generic elements, attributes, and text.
+ </li>
+
+ <li><b>Concise code.</b> With a separate parser skeleton for each
+ XML Schema type, the application implementation is
+ simpler and thus easier to read and understand.</li>
+
+ <li><b>Safety.</b> The XML data is delivered to parser callbacks as
+ statically typed objects. The parser callbacks themselves are virtual
+ functions. This helps catch programming errors at compile-time
+ rather than at runtime.</li>
+
+ <li><b>Maintainability.</b> Automatic code generation minimizes the
+ effort needed to adapt the application to changes in the
+ document structure. With static typing, the C++ compiler
+ can pin-point the places in the application code that need to be
+ changed.</li>
+
+ <li><b>Efficiency.</b> The generated parser skeletons combine
+ data extraction, validation, and even dispatching in a single
+ step. This makes them much more efficient than traditional
+ architectures with separate stages for validation and data
+ extraction/dispatch.</li>
+ </ul>
+
+ <!-- Hello World Parser -->
+
+
+ <h1><a name="2">2 Hello World Example</a></h1>
+
+ <p>In this chapter we will examine how to parse a very simple XML
+ document using the XSD-generated C++/Parser skeletons.
+ The code presented in this chapter is based on the <code>hello</code>
+ example which can be found in the <code>cxx/parser/</code> directory in
+ the <a href="https://cppget.org/xsd-examples">xsd-examples</a>
+ package.</p>
+
+ <h2><a name="2.1">2.1 Writing XML Document and Schema</a></h2>
+
+ <p>First, we need to get an idea about the structure
+ of the XML documents we are going to process. Our
+ <code>hello.xml</code>, for example, could look like this:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;hello>
+
+ &lt;greeting>Hello&lt;/greeting>
+
+ &lt;name>sun&lt;/name>
+ &lt;name>moon&lt;/name>
+ &lt;name>world&lt;/name>
+
+&lt;/hello>
+ </pre>
+
+ <p>Then we can write a description of the above XML in the
+ XML Schema language and save it into <code>hello.xsd</code>:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:complexType name="hello">
+ &lt;xs:sequence>
+ &lt;xs:element name="greeting" type="xs:string"/>
+ &lt;xs:element name="name" type="xs:string" maxOccurs="unbounded"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="hello" type="hello"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>Even if you are not familiar with XML Schema, it
+ should be easy to connect declarations in <code>hello.xsd</code>
+ to elements in <code>hello.xml</code>. The <code>hello</code> type
+ is defined as a sequence of the nested <code>greeting</code> and
+ <code>name</code> elements. Note that the term sequence in XML
+ Schema means that elements should appear in a particular order
+ as opposed to appearing multiple times. The <code>name</code>
+ element has its <code>maxOccurs</code> property set to
+ <code>unbounded</code> which means it can appear multiple times
+ in an XML document. Finally, the globally-defined <code>hello</code>
+ element prescribes the root element for our vocabulary. For an
+ easily-approachable introduction to XML Schema refer to
+ <a href="http://www.w3.org/TR/xmlschema-0/">XML Schema Part 0:
+ Primer</a>.</p>
+
+ <p>The above schema is a specification of our XML vocabulary; it tells
+ everybody what valid documents of our XML-based language should look
+ like. The next step is to compile this schema to generate
+ the object model and parsing functions.</p>
+
+ <h2><a name="2.2">2.2 Translating Schema to C++</a></h2>
+
+ <p>Now we are ready to translate our <code>hello.xsd</code> to C++ parser
+ skeletons. To do this we invoke the XSD compiler from a terminal
+ (UNIX) or a command prompt (Windows):
+ </p>
+
+ <pre class="terminal">
+$ xsd cxx-parser --std c++11 --xml-parser expat hello.xsd
+ </pre>
+
+ <p>The <code>--xml-parser</code> option indicates that we want to
+ use Expat as the underlying XML parser (see <a href="#5.3">Section
+ 5.3, "Underlying XML Parser"</a>). The XSD compiler produces two
+ C++ files: <code>hello-pskel.hxx</code> and <code>hello-pskel.cxx</code>.
+ The following code fragment is taken from <code>hello-pskel.hxx</code>;
+ it should give you an idea about what gets generated:
+ </p>
+
+ <pre class="c++">
+class hello_pskel
+{
+public:
+ // Parser callbacks. Override them in your implementation.
+ //
+ virtual void
+ pre ();
+
+ virtual void
+ greeting (const std::string&amp;);
+
+ virtual void
+ name (const std::string&amp;);
+
+ virtual void
+ post_hello ();
+
+ // Parser construction API.
+ //
+ void
+ greeting_parser (xml_schema::string_pskel&amp;);
+
+ void
+ name_parser (xml_schema::string_pskel&amp;);
+
+ void
+ parsers (xml_schema::string_pskel&amp; /* greeting */,
+ xml_schema::string_pskel&amp; /* name */);
+
+private:
+ ...
+};
+ </pre>
+
+ <p>The first four member functions shown above are called parser
+ callbacks. You would normally override them in your implementation
+ of the parser to do something useful. Let's go through all of
+ them one by one.</p>
+
+ <p>The <code>pre()</code> function is an initialization callback. It is
+ called when a new element of type <code>hello</code> is about
+ to be parsed. You would normally use this function to allocate a new
+ instance of the resulting type or clear accumulators that are used
+ to gather information during parsing. The default implementation
+ of this function does nothing.</p>
+
+ <p>The <code>post_hello()</code> function is a finalization callback. Its
+ name is constructed by adding the parser skeleton name to the
+ <code>post_</code> prefix. The finalization callback is called when
+ parsing of the element is complete and the result, if any, should
+ be returned. Note that in our case the return type of
+ <code>post_hello()</code> is <code>void</code> which means there
+ is nothing to return. More on parser return types later.
+ </p>
+
+ <p>You may be wondering why the finalization callback is called
+ <code>post_hello()</code> instead of <code>post()</code> just
+ like <code>pre()</code>. The reason for this is that
+ finalization callbacks can have different return types and
+ result in function signature clashes across inheritance
+ hierarchies. To prevent this the signatures of finalization
+ callbacks are made unique by adding the type name to their names.</p>
+
+ <p>The <code>greeting()</code> and <code>name()</code> functions are
+ called when the <code>greeting</code> and <code>name</code> elements
+ have been parsed, respectively. Their arguments are of type
+ <code>std::string</code> and contain the data extracted from XML.</p>
+
+ <p>The last three functions are for connecting parsers to each other.
+ For example, there is a predefined parser for built-in XML Schema type
+ <code>string</code> in the XSD runtime. We will be using
+ it to parse the contents of <code>greeting</code> and
+ <code>name</code> elements, as shown in the next section.</p>
+
+ <h2><a name="2.3">2.3 Implementing Application Logic</a></h2>
+
+ <p>At this point we have all the parts we need to do something useful
+ with the information stored in our XML document. The first step is
+ to implement the parser:
+ </p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include "hello-pskel.hxx"
+
+class hello_pimpl: public hello_pskel
+{
+public:
+ virtual void
+ greeting (const std::string&amp; g)
+ {
+ greeting_ = g;
+ }
+
+ virtual void
+ name (const std::string&amp; n)
+ {
+ std::cout &lt;&lt; greeting_ &lt;&lt; ", " &lt;&lt; n &lt;&lt; "!" &lt;&lt; std::endl;
+ }
+
+private:
+ std::string greeting_;
+};
+ </pre>
+
+ <p>We left both <code>pre()</code> and <code>post_hello()</code> with the
+ default implementations; we don't have anything to initialize or
+ return. The rest is pretty straightforward: we store the greeting
+ in a member variable and later, when parsing names, use it to
+ say hello.</p>
+
+ <p>An observant reader my ask what happens if the <code>name</code>
+ element comes before <code>greeting</code>? Don't we need to
+ make sure <code>greeting_</code> was initialized and report
+ an error otherwise? The answer is no, we don't have to do
+ any of this. The <code>hello_pskel</code> parser skeleton
+ performs validation of XML according to the schema from which
+ it was generated. As a result, it will check the order
+ of the <code>greeting</code> and <code>name</code> elements
+ and report an error if it is violated.</p>
+
+ <p>Now it is time to put this parser implementation to work:</p>
+
+ <pre class="c++">
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ // Construct the parser.
+ //
+ xml_schema::string_pimpl string_p;
+ hello_pimpl hello_p;
+
+ hello_p.greeting_parser (string_p);
+ hello_p.name_parser (string_p);
+
+ // Parse the XML instance.
+ //
+ xml_schema::document doc_p (hello_p, "hello");
+
+ hello_p.pre ();
+ doc_p.parse (argv[1]);
+ hello_p.post_hello ();
+ }
+ catch (const xml_schema::exception&amp; e)
+ {
+ cerr &lt;&lt; e &lt;&lt; endl;
+ return 1;
+ }
+}
+ </pre>
+
+ <p>The first part of this code snippet instantiates individual parsers
+ and assembles them into a complete vocabulary parser.
+ <code>xml_schema::string_pimpl</code> is an implementation of a parser
+ for built-in XML Schema type <code>string</code>. It is provided by
+ the XSD runtime along with parsers for other built-in types (for
+ more information on the built-in parsers see <a href="#6">Chapter 6,
+ "Built-In XML Schema Type Parsers"</a>). We use <code>string_pimpl</code>
+ to parse the <code>greeting</code> and <code>name</code> elements as
+ indicated by the calls to <code>greeting_parser()</code> and
+ <code>name_parser()</code>.
+ </p>
+
+ <p>Then we instantiate a document parser (<code>doc_p</code>). The
+ first argument to its constructor is the parser for
+ the root element (<code>hello_p</code> in our case). The
+ second argument is the root element name.
+ </p>
+
+ <p>The final piece is the calls to <code>pre()</code>, <code>parse()</code>,
+ and <code>post_hello()</code>. The call to <code>parse()</code>
+ perform the actual XML parsing while the calls to <code>pre()</code> and
+ <code>post_hello()</code> make sure that the parser for the root
+ element can perform proper initialization and cleanup.</p>
+
+ <p>While our parser implementation and test driver are pretty small and
+ easy to write by hand, for bigger XML vocabularies it can be a
+ substantial effort. To help with this task XSD can automatically
+ generate sample parser implementations and a test driver from your
+ schemas. You can request the generation of a sample implementation with
+ empty function bodies by specifying the <code>--generate-noop-impl</code>
+ option. Or you can generate a sample implementation that prints the
+ data store in XML by using the <code>--generate-print-impl</code>
+ option. To request the generation of a test driver you can use the
+ <code>--generate-test-driver</code> option. For more information
+ on these options refer to the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a>. The <code>'generated'</code> example
+ in the <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ shows the sample implementation generation feature in action.</p>
+
+
+ <h2><a name="2.4">2.4 Compiling and Running</a></h2>
+
+ <p>After saving all the parts from the previous section in
+ <code>driver.cxx</code>, we are ready to compile our first
+ application and run it on the test XML document. On a UNIX
+ system this can be done with the following commands:
+ </p>
+
+ <pre class="terminal">
+$ c++ -std=c++11 -I.../libxsd -c driver.cxx hello-pskel.cxx
+$ c++ -std=c++11 -o driver driver.o hello-pskel.o -lexpat
+$ ./driver hello.xml
+Hello, sun!
+Hello, moon!
+Hello, world!
+ </pre>
+
+ <p>Here <code>.../libxsd</code> represents the path to the
+ <a href="https://cppget.org/libxsd">libxsd</a> package root
+ directory. We can also test the error handling. To test XML
+ well-formedness checking, we can try to parse
+ <code>hello-pskel.hxx</code>:</p>
+
+ <pre class="terminal">
+$ ./driver hello-pskel.hxx
+hello-pskel.hxx:1:0: not well-formed (invalid token)
+ </pre>
+
+ <p>We can also try to parse a valid XML but not from our
+ vocabulary, for example <code>hello.xsd</code>:</p>
+
+ <pre class="terminal">
+$ ./driver hello.xsd
+hello.xsd:2:0: expected element 'hello' instead of
+'http://www.w3.org/2001/XMLSchema#schema'
+ </pre>
+
+
+ <!-- Chapater 3 -->
+
+
+ <h1><a name="3">3 Parser Skeletons</a></h1>
+
+ <p>As we have seen in the previous chapter, the XSD compiler generates
+ a parser skeleton class for each type defined in XML Schema. In
+ this chapter we will take a closer look at different functions
+ that comprise a parser skeleton as well as the way to connect
+ our implementations of these parser skeletons to create a complete
+ parser.</p>
+
+ <p>In this and subsequent chapters we will use the following schema
+ that describes a collection of person records. We save it in
+ <code>people.xsd</code>:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:simpleType name="gender">
+ &lt;xs:restriction base="xs:string">
+ &lt;xs:enumeration value="male"/>
+ &lt;xs:enumeration value="female"/>
+ &lt;/xs:restriction>
+ &lt;/xs:simpleType>
+
+ &lt;xs:complexType name="person">
+ &lt;xs:sequence>
+ &lt;xs:element name="first-name" type="xs:string"/>
+ &lt;xs:element name="last-name" type="xs:string"/>
+ &lt;xs:element name="gender" type="gender"/>
+ &lt;xs:element name="age" type="xs:short"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:complexType name="people">
+ &lt;xs:sequence>
+ &lt;xs:element name="person" type="person" maxOccurs="unbounded"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="people" type="people"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>A sample XML instance to go along with this schema is saved
+ in <code>people.xml</code>:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;people>
+ &lt;person>
+ &lt;first-name>John&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>male&lt;/gender>
+ &lt;age>32&lt;/age>
+ &lt;/person>
+ &lt;person>
+ &lt;first-name>Jane&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>female&lt;/gender>
+ &lt;age>28&lt;/age>
+ &lt;/person>
+&lt;/people>
+ </pre>
+
+ <p>Compiling <code>people.xsd</code> with the XSD compiler results
+ in three parser skeletons being generated: <code>gender_pskel</code>,
+ <code>person_pskel</code>, and <code>people_pskel</code>. We are going
+ to examine and implement each of them in the subsequent sections.</p>
+
+ <h2><a name="3.1">3.1 Implementing the Gender Parser</a></h2>
+
+ <p>The generated <code>gender_pskel</code> parser skeleton looks like
+ this:</p>
+
+ <pre class="c++">
+class gender_pskel: public virtual xml_schema::string_pskel
+{
+public:
+ // Parser callbacks. Override them in your implementation.
+ //
+ virtual void
+ pre ();
+
+ virtual void
+ post_gender ();
+};
+ </pre>
+
+ <p>Notice that <code>gender_pskel</code> inherits from
+ <code>xml_schema::string_skel</code> which is a parser skeleton
+ for built-in XML Schema type <code>string</code> and is
+ predefined in the XSD runtime library. This is an example
+ of the general rule that parser skeletons follow: if a type
+ in XML Schema inherits from another then there will be an
+ equivalent inheritance between the corresponding parser
+ skeleton classes.</p>
+
+ <p>The <code>pre()</code> and <code>post_gender()</code> callbacks
+ should look familiar from the previous chapter. Let's now
+ implement the parser. Our implementation will simply print
+ the gender to <code>cout</code>:</p>
+
+
+ <pre class="c++">
+class gender_pimpl: public gender_pskel,
+ public xml_schema::string_pimpl
+{
+public:
+ virtual void
+ post_gender ()
+ {
+ std::string s = post_string ();
+ cout &lt;&lt; "gender: " &lt;&lt; s &lt;&lt; endl;
+ }
+};
+ </pre>
+
+ <p>While the code is quite short, there is a lot going on. First,
+ notice that we are inheriting from <code>gender_pskel</code> <em>and</em>
+ from <code>xml_schema::string_pimpl</code>. We've encountered
+ <code>xml_schema::string_pimpl</code> already; it is an
+ implementation of the <code>xml_schema::string_pskel</code> parser
+ skeleton for built-in XML Schema type <code>string</code>.</p>
+
+ <p>This is another common theme in the C++/Parser programming model:
+ reusing implementations of the base parsers in the derived ones with
+ the C++ mixin idiom. In our case, <code>string_pimpl</code> will
+ do all the dirty work of extracting the data and we can just get
+ it at the end with the call to <code>post_string()</code>.</p>
+
+ <p>In case you are curious, here is what
+ <code>xml_schema::string_pskel</code> and
+ <code>xml_schema::string_pimpl</code> look like:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class string_pskel: public simple_content
+ {
+ public:
+ virtual std::string
+ post_string () = 0;
+ };
+
+ class string_pimpl: public virtual string_pskel
+ {
+ public:
+ virtual void
+ _pre ();
+
+ virtual void
+ _characters (const xml_schema::ro_string&amp;);
+
+ virtual std::string
+ post_string ();
+
+ protected:
+ std::string str_;
+ };
+}
+ </pre>
+
+ <p>There are three new pieces in this code that we haven't seen yet.
+ They are the <code>simple_content</code> class as well as
+ the <code>_pre()</code> and <code>_characters()</code> functions.
+ The <code>simple_content</code> class is defined in the XSD
+ runtime and is a base class for all parser skeletons that conform
+ to the simple content model in XML Schema. Types with the
+ simple content model cannot have nested elements&mdash;only text
+ and attributes. There is also the <code>complex_content</code>
+ class which corresponds to the complex content mode (types with
+ nested elements, for example, <code>person</code> from
+ <code>people.xsd</code>).</p>
+
+ <p>The <code>_pre()</code> function is a parser callback. Remember we
+ talked about the <code>pre()</code> and <code>post_*()</code> callbacks
+ in the previous chapter? There are actually two more callbacks
+ with similar roles: <code>_pre()</code> and <code>_post ()</code>.
+ As a result, each parser skeleton has four special callbacks:</p>
+
+ <pre class="c++">
+ virtual void
+ pre ();
+
+ virtual void
+ _pre ();
+
+ virtual void
+ _post ();
+
+ virtual void
+ post_name ();
+ </pre>
+
+ <p><code>pre()</code> and <code>_pre()</code> are initialization
+ callbacks. They get called in that order before a new instance of the type
+ is about to be parsed. The difference between <code>pre()</code> and
+ <code>_pre()</code> is conventional: <code>pre()</code> can
+ be completely overridden by a derived parser. The derived
+ parser can also override <code>_pre()</code> but has to always call
+ the original version. This allows you to partition initialization
+ into customizable and required parts.</p>
+
+ <p>Similarly, <code>_post()</code> and <code>post_name()</code> are
+ finalization callbacks with exactly the same semantics:
+ <code>post_name()</code> can be completely overridden by the derived
+ parser while the original <code>_post()</code> should always be called.
+ </p>
+
+ <p>The final bit we need to discuss in this section is the
+ <code>_characters()</code> function. As you might have guessed, it
+ is also a callback. A low-level one that delivers raw character content
+ for the type being parsed. You will seldom need to use this callback
+ directly. Using implementations for the built-in parsers provided by
+ the XSD runtime is usually a simpler and more convenient
+ alternative.</p>
+
+ <p>At this point you might be wondering why some <code>post_*()</code>
+ callbacks, for example <code>post_string()</code>, return some data
+ while others, for example <code>post_gender()</code>, have
+ <code>void</code> as a return type. This is a valid concern
+ and it will be addressed in the next chapter.</p>
+
+ <h2><a name="3.2">3.2 Implementing the Person Parser</a></h2>
+
+ <p>The generated <code>person_pskel</code> parser skeleton looks like
+ this:</p>
+
+ <pre class="c++">
+class person_pskel: public xml_schema::complex_content
+{
+public:
+ // Parser callbacks. Override them in your implementation.
+ //
+ virtual void
+ pre ();
+
+ virtual void
+ first_name (const std::string&amp;);
+
+ virtual void
+ last_name (const std::string&amp;);
+
+ virtual void
+ gender ();
+
+ virtual void
+ age (short);
+
+ virtual void
+ post_person ();
+
+ // Parser construction API.
+ //
+ void
+ first_name_parser (xml_schema::string_pskel&amp;);
+
+ void
+ last_name_parser (xml_schema::string_pskel&amp;);
+
+ void
+ gender_parser (gender_pskel&amp;);
+
+ void
+ age_parser (xml_schema::short_pskel&amp;);
+
+ void
+ parsers (xml_schema::string_pskel&amp; /* first-name */,
+ xml_schema::string_pskel&amp; /* last-name */,
+ gender_pskel&amp; /* gender */,
+ xml_schema::short_pskel&amp; /* age */);
+};
+ </pre>
+
+
+ <p>As you can see, we have a parser callback for each of the nested
+ elements found in the <code>person</code> XML Schema type.
+ The implementation of this parser is straightforward:</p>
+
+ <pre class="c++">
+class person_pimpl: public person_pskel
+{
+public:
+ virtual void
+ first_name (const std::string&amp; n)
+ {
+ cout &lt;&lt; "first: " &lt;&lt; f &lt;&lt; endl;
+ }
+
+ virtual void
+ last_name (const std::string&amp; l)
+ {
+ cout &lt;&lt; "last: " &lt;&lt; l &lt;&lt; endl;
+ }
+
+ virtual void
+ age (short a)
+ {
+ cout &lt;&lt; "age: " &lt;&lt; a &lt;&lt; endl;
+ }
+};
+ </pre>
+
+ <p>Notice that we didn't override the <code>gender()</code> callback
+ because all the printing is done by <code>gender_pimpl</code>.</p>
+
+
+ <h2><a name="3.3">3.3 Implementing the People Parser</a></h2>
+
+ <p>The generated <code>people_pskel</code> parser skeleton looks like
+ this:</p>
+
+ <pre class="c++">
+class people_pskel: public xml_schema::complex_content
+{
+public:
+ // Parser callbacks. Override them in your implementation.
+ //
+ virtual void
+ pre ();
+
+ virtual void
+ person ();
+
+ virtual void
+ post_people ();
+
+ // Parser construction API.
+ //
+ void
+ person_parser (person_pskel&amp;);
+
+ void
+ parsers (person_pskel&amp; /* person */);
+};
+ </pre>
+
+ <p>The <code>person()</code> callback will be called after parsing each
+ <code>person</code> element. While <code>person_pimpl</code> does
+ all the printing, one useful thing we can do in this callback is to
+ print an extra newline after each person record so that our
+ output is more readable:</p>
+
+ <pre class="c++">
+class people_pimpl: public people_pskel
+{
+public:
+ virtual void
+ person ()
+ {
+ cout &lt;&lt; endl;
+ }
+};
+ </pre>
+
+ <p>Now it is time to put everything together.</p>
+
+
+ <h2><a name="3.4">3.4 Connecting the Parsers Together</a></h2>
+
+ <p>At this point we have all the individual parsers implemented
+ and can proceed to assemble them into a complete parser
+ for our XML vocabulary. The first step is to instantiate
+ all the individual parsers that we will need:</p>
+
+ <pre class="c++">
+xml_schema::short_pimpl short_p;
+xml_schema::string_pimpl string_p;
+
+gender_pimpl gender_p;
+person_pimpl person_p;
+people_pimpl people_p;
+ </pre>
+
+ <p>Notice that our schema uses two built-in XML Schema types:
+ <code>string</code> for the <code>first-name</code> and
+ <code>last-name</code> elements as well as <code>short</code>
+ for <code>age</code>. We will use predefined parsers that
+ come with the XSD runtime to handle these types. The next
+ step is to connect all the individual parsers. We do this
+ with the help of functions defined in the parser
+ skeletons and marked with the "Parser Construction API"
+ comment. One way to do it is to connect each individual
+ parser by calling the <code>*_parser()</code> functions:</p>
+
+ <pre class="c++">
+person_p.first_name_parser (string_p);
+person_p.last_name_parser (string_p);
+person_p.gender_parser (gender_p);
+person_p.age_parser (short_p);
+
+people_p.person_parser (person_p);
+ </pre>
+
+ <p>You might be wondering what happens if you do not provide
+ a parser by not calling one of the <code>*_parser()</code> functions.
+ In that case the corresponding XML content will be skipped,
+ including validation. This is an efficient way to ignore parts
+ of the document that you are not interested in.</p>
+
+
+ <p>An alternative, shorter, way to connect the parsers is by using
+ the <code>parsers()</code> functions which connects all the parsers
+ for a given type at once:</p>
+
+ <pre class="c++">
+person_p.parsers (string_p, string_p, gender_p, short_p);
+people_p.parsers (person_p);
+ </pre>
+
+ <p>The following figure illustrates the resulting connections. Notice
+ the correspondence between return types of the <code>post_*()</code>
+ functions and argument types of element callbacks that are connected
+ by the arrows.</p>
+
+ <!-- align=center is needed for html2ps -->
+ <div class="img" align="center"><img src="figure-1.png"/></div>
+
+ <p>The last step is the construction of the document parser and
+ invocation of the complete parser on our sample XML instance:</p>
+
+ <pre class="c++">
+xml_schema::document doc_p (people_p, "people");
+
+people_p.pre ();
+doc_p.parse ("people.xml");
+people_p.post_people ();
+ </pre>
+
+ <p>Let's consider <code>xml_schema::document</code> in
+ more detail. While the exact definition of this class
+ varies depending on the underlying parser selected,
+ here is the common part:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class document
+ {
+ public:
+ document (xml_schema::parser_base&amp;,
+ const std::string&amp; root_element_name,
+ bool polymorphic = false);
+
+ document (xml_schema::parser_base&amp;,
+ const std::string&amp; root_element_namespace,
+ const std::string&amp; root_element_name,
+ bool polymorphic = false);
+
+ void
+ parse (const std::string&amp; file);
+
+ void
+ parse (std::istream&amp;);
+
+ ...
+
+ };
+}
+ </pre>
+
+ <p><code>xml_schema::document</code> is a root parser for
+ the vocabulary. The first argument to its constructors is the
+ parser for the type of the root element (<code>people_impl</code>
+ in our case). Because a type parser is only concerned with
+ the element's content and not with the element's name, we need
+ to specify the root element's name somewhere. That's
+ what is passed as the second and third arguments to the
+ <code>document</code>'s constructors.</p>
+
+ <p>There are also two overloaded <code>parse()</code> functions
+ defined in the <code>document</code> class (there are actually
+ more but the others are specific to the underlying XML parser).
+ The first version parses a local file identified by a name. The
+ second version reads the data from an input stream. For more
+ information on the <code>xml_schema::document</code> class
+ refer to <a href="#7">Chapter 7, "Document Parser and Error
+ Handling"</a>.</p>
+
+ <p>Let's now consider a step-by-step list of actions that happen
+ as we parse through <code>people.xml</code>. The content of
+ <code>people.xml</code> is repeated below for convenience.</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;people>
+ &lt;person>
+ &lt;first-name>John&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>male&lt;/gender>
+ &lt;age>32&lt;/age>
+ &lt;/person>
+ &lt;person>
+ &lt;first-name>Jane&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>female&lt;/gender>
+ &lt;age>28&lt;/age>
+ &lt;/person>
+&lt;/people>
+ </pre>
+
+
+ <ol class="steps">
+ <li><code>people_p.pre()</code> is called from
+ <code>main()</code>. We did not provide any implementation
+ for this callback so this call is a no-op.</li>
+
+ <li><code>doc_p.parse("people.xml")</code> is called from
+ <code>main()</code>. The parser opens the file and starts
+ parsing its content.</li>
+
+ <li>The parser encounters the root element. <code>doc_p</code>
+ verifies that the root element is correct and calls
+ <code>_pre()</code> on <code>people_p</code> which is also
+ a no-op. Parsing is now delegated to <code>people_p</code>.</li>
+
+ <li>The parser encounters the <code>person</code> element.
+ <code>people_p</code> determines that <code>person_p</code>
+ is responsible for parsing this element. <code>pre()</code>
+ and <code>_pre()</code> callbacks are called on <code>person_p</code>.
+ Parsing is now delegated to <code>person_p</code>.</li>
+
+ <li>The parser encounters the <code>first-name</code> element.
+ <code>person_p</code> determines that <code>string_p</code>
+ is responsible for parsing this element. <code>pre()</code>
+ and <code>_pre()</code> callbacks are called on <code>string_p</code>.
+ Parsing is now delegated to <code>string_p</code>.</li>
+
+ <li>The parser encounters character content consisting of
+ <code>"John"</code>. The <code>_characters()</code> callback is
+ called on <code>string_p</code>.</li>
+
+ <li>The parser encounters the end of <code>first-name</code>
+ element. The <code>_post()</code> and <code>post_string()</code>
+ callbacks are called on <code>string_p</code>. The
+ <code>first_name()</code> callback is called on <code>person_p</code>
+ with the return value of <code>post_string()</code>. The
+ <code>first_name()</code> implementation prints
+ <code>"first: John"</code> to <code>cout</code>.
+ Parsing is now returned to <code>person_p</code>.</li>
+
+ <li>Steps analogous to 5-7 are performed for the <code>last-name</code>,
+ <code>gender</code>, and <code>age</code> elements.</li>
+
+ <li>The parser encounters the end of <code>person</code>
+ element. The <code>_post()</code> and <code>post_person()</code>
+ callbacks are called on <code>person_p</code>. The
+ <code>person()</code> callback is called on <code>people_p</code>.
+ The <code>person()</code> implementation prints a new line
+ to <code>cout</code>. Parsing is now returned to
+ <code>people_p</code>.</li>
+
+ <li>Steps 4-9 are performed for the second <code>person</code>
+ element.</li>
+
+ <li>The parser encounters the end of <code>people</code>
+ element. The <code>_post()</code> callback is called on
+ <code>people_p</code>. The <code>doc_p.parse("people.xml")</code>
+ call returns to <code>main()</code>.</li>
+
+ <li><code>people_p.post_people()</code> is called from
+ <code>main()</code> which is a no-op.</li>
+
+ </ol>
+
+
+ <!-- Chpater 4 -->
+
+
+ <h1><a name="4">4 Type Maps</a></h1>
+
+ <p>There are many useful things you can do inside parser callbacks as they
+ are right now. There are, however, times when you want to propagate
+ some information from one parser to another or to the caller of the
+ parser. One common task that would greatly benefit from such a
+ possibility is building a tree-like in-memory object model of the
+ data stored in XML. During execution, each individual sub-parser
+ would create a sub-tree and return it to its <em>parent</em> parser
+ which can then incorporate this sub-tree into the whole tree.</p>
+
+ <p>In this chapter we will discuss the mechanisms offered by the
+ C++/Parser mapping for returning information from individual
+ parsers and see how to use them to build an object model
+ of our people vocabulary.</p>
+
+ <h2><a name="4.1">4.1 Object Model</a></h2>
+
+ <p>An object model for our person record example could
+ look like this (saved in the <code>people.hxx</code> file):</p>
+
+ <pre class="c++">
+#include &lt;string>
+#include &lt;vector>
+
+enum gender
+{
+ male,
+ female
+};
+
+class person
+{
+public:
+ person (const std::string&amp; first,
+ const std::string&amp; last,
+ ::gender gender,
+ short age)
+ : first_ (first), last_ (last),
+ gender_ (gender), age_ (age)
+ {
+ }
+
+ const std::string&amp;
+ first () const
+ {
+ return first_;
+ }
+
+ const std::string&amp;
+ last () const
+ {
+ return last_;
+ }
+
+ ::gender
+ gender () const
+ {
+ return gender_;
+ }
+
+ short
+ age () const
+ {
+ return age_;
+ }
+
+private:
+ std::string first_;
+ std::string last_;
+ ::gender gender_;
+ short age_;
+};
+
+typedef std::vector&lt;person> people;
+ </pre>
+
+ <p>While it is clear which parser is responsible for which part of
+ the object model, it is not exactly clear how, for
+ example, <code>gender_pimpl</code> will deliver <code>gender</code>
+ to <code>person_pimpl</code>. You might have noticed that
+ <code>string_pimpl</code> manages to deliver its value to the
+ <code>first_name()</code> callback of <code>person_pimpl</code>. Let's
+ see how we can utilize the same mechanism to propagate our
+ own data.</p>
+
+ <p>There is a way to tell the XSD compiler that you want to
+ exchange data between parsers. More precisely, for each
+ type defined in XML Schema, you can tell the compiler two things.
+ First, the return type of the <code>post_*()</code> callback
+ in the parser skeleton generated for this type. And, second,
+ the argument type for callbacks corresponding to elements and
+ attributes of this type. For example, for XML Schema type
+ <code>gender</code> we can specify the return type for
+ <code>post_gender()</code> in the <code>gender_pskel</code>
+ skeleton and the argument type for the <code>gender()</code> callback
+ in the <code>person_pskel</code> skeleton. As you might have guessed,
+ the generated code will then pass the return value from the
+ <code>post_*()</code> callback as an argument to the element or
+ attribute callback.</p>
+
+ <p>The way to tell the XSD compiler about these XML Schema to
+ C++ mappings is with type map files. Here is a simple type
+ map for the <code>gender</code> type from the previous paragraph:</p>
+
+ <pre class="type-map">
+include "people.hxx";
+gender ::gender ::gender;
+ </pre>
+
+ <p>The first line indicates that the generated code must include
+ <code>people.hxx</code> in order to get the definition for the
+ <code>gender</code> type. The second line specifies that both
+ argument and return types for the <code>gender</code>
+ XML Schema type should be the <code>::gender</code> C++ enum
+ (we use fully-qualified C++ names to avoid name clashes).
+ The next section will describe the type map format in detail.
+ We save this type map in <code>people.map</code> and
+ then translate our schemas with the <code>--type-map</code>
+ option to let the XSD compiler know about our type map:</p>
+
+ <pre class="terminal">
+$ xsd cxx-parser --std c++11 --type-map people.map people.xsd
+ </pre>
+
+ <p>If we now look at the generated <code>people-pskel.hxx</code>,
+ we will see the following changes in the <code>gender_pskel</code> and
+ <code>person_pskel</code> skeletons:</p>
+
+ <pre class="c++">
+#include "people.hxx"
+
+class gender_pskel: public virtual xml_schema::string_pskel
+{
+ virtual ::gender
+ post_gender () = 0;
+
+ ...
+};
+
+class person_pskel: public xml_schema::complex_content
+{
+ virtual void
+ gender (::gender);
+
+ ...
+};
+ </pre>
+
+ <p>Notice that <code>#include "people.hxx"</code> was added to
+ the generated header file from the type map to provide the
+ definition for the <code>gender</code> enum.</p>
+
+ <h2><a name="4.2">4.2 Type Map File Format</a></h2>
+
+ <p>Type map files are used to define a mapping between XML Schema
+ and C++ types. The compiler uses this information
+ to determine return types of <code>post_*()</code>
+ callbacks in parser skeletons corresponding to XML Schema
+ types as well as argument types for callbacks corresponding
+ to elements and attributes of these types.</p>
+
+ <p>The compiler has a set of predefined mapping rules that map
+ the built-in XML Schema types to suitable C++ types (discussed
+ below) and all other types to <code>void</code>.
+ By providing your own type maps you can override these predefined
+ rules. The format of the type map file is presented below:
+ </p>
+
+ <pre class="type-map">
+namespace &lt;schema-namespace> [&lt;cxx-namespace>]
+{
+ (include &lt;file-name>;)*
+ ([type] &lt;schema-type> &lt;cxx-ret-type> [&lt;cxx-arg-type>];)*
+}
+ </pre>
+
+ <p>Both <code><i>&lt;schema-namespace></i></code> and
+ <code><i>&lt;schema-type></i></code> are regex patterns while
+ <code><i>&lt;cxx-namespace></i></code>,
+ <code><i>&lt;cxx-ret-type></i></code>, and
+ <code><i>&lt;cxx-arg-type></i></code> are regex pattern
+ substitutions. All names can be optionally enclosed in
+ <code>" "</code>, for example, to include white-spaces.</p>
+
+ <p><code><i>&lt;schema-namespace></i></code> determines XML
+ Schema namespace. Optional <code><i>&lt;cxx-namespace></i></code>
+ is prefixed to every C++ type name in this namespace declaration.
+ <code><i>&lt;cxx-ret-type></i></code> is a C++ type name that is
+ used as a return type for the <code>post_*()</code> callback.
+ Optional <code><i>&lt;cxx-arg-type></i></code> is an argument
+ type for callbacks corresponding to elements and attributes
+ of this type. If <code><i>&lt;cxx-arg-type></i></code> is not
+ specified, it defaults to <code><i>&lt;cxx-ret-type></i></code>
+ if <code><i>&lt;cxx-ret-type></i></code> ends with <code>*</code> or
+ <code>&amp;</code> (that is, it is a pointer or a reference) and
+ <code>const&nbsp;<i>&lt;cxx-ret-type></i>&amp;</code>
+ otherwise.
+ <code><i>&lt;file-name></i></code> is a file name either in the
+ <code>" "</code> or <code>&lt; ></code> format
+ and is added with the <code>#include</code> directive to
+ the generated code.</p>
+
+ <p>The <code><b>#</b></code> character starts a comment that ends
+ with a new line or end of file. To specify a name that contains
+ <code><b>#</b></code> enclose it in <code><b>" "</b></code>.
+ For example:</p>
+
+ <pre>
+namespace http://www.example.com/xmlns/my my
+{
+ include "my.hxx";
+
+ # Pass apples by value.
+ #
+ apple apple;
+
+ # Pass oranges as pointers.
+ #
+ orange orange_t*;
+}
+ </pre>
+
+ <p>In the example above, for the
+ <code>http://www.example.com/xmlns/my#orange</code>
+ XML Schema type, the <code>my::orange_t*</code> C++ type will
+ be used as both return and argument types.</p>
+
+ <p>Several namespace declarations can be specified in a single
+ file. The namespace declaration can also be completely
+ omitted to map types in a schema without a namespace. For
+ instance:</p>
+
+ <pre class="type-map">
+include "my.hxx";
+apple apple;
+
+namespace http://www.example.com/xmlns/my
+{
+ orange "const orange_t*";
+}
+ </pre>
+
+ <p>The compiler has a number of predefined mapping rules for
+ the built-in XML Schema types which can be presented as the
+ following map files. The string-based XML Schema types are
+ mapped to either <code>std::string</code> or
+ <code>std::wstring</code> depending on the character type
+ selected (see <a href="#5.2"> Section 5.2, "Character Type and
+ Encoding"</a> for more information). The binary XML Schema
+ types are mapped to either <code>std::unique_ptr&lt;xml_schema::buffer></code>
+ or <code>std::auto_ptr&lt;xml_schema::buffer></code>
+ depending on the C++ standard selected (C++11 or C++98,
+ respectively; refer to the <code>--std</code> XSD compiler
+ command line option for details).</p>
+
+ <pre class="type-map">
+namespace http://www.w3.org/2001/XMLSchema
+{
+ boolean bool bool;
+
+ byte "signed char" "signed char";
+ unsignedByte "unsigned char" "unsigned char";
+
+ short short short;
+ unsignedShort "unsigned short" "unsigned short";
+
+ int int int;
+ unsignedInt "unsigned int" "unsigned int";
+
+ long "long long" "long long";
+ unsignedLong "unsigned long long" "unsigned long long";
+
+ integer "long long" "long long";
+
+ negativeInteger "long long" "long long";
+ nonPositiveInteger "long long" "long long";
+
+ positiveInteger "unsigned long long" "unsigned long long";
+ nonNegativeInteger "unsigned long long" "unsigned long long";
+
+ float float float;
+ double double double;
+ decimal double double;
+
+ string std::string;
+ normalizedString std::string;
+ token std::string;
+ Name std::string;
+ NMTOKEN std::string;
+ NCName std::string;
+ ID std::string;
+ IDREF std::string;
+ language std::string;
+ anyURI std::string;
+
+ NMTOKENS xml_schema::string_sequence;
+ IDREFS xml_schema::string_sequence;
+
+ QName xml_schema::qname;
+
+ base64Binary std::[auto|unique]_ptr&lt;xml_schema::buffer>
+ std::[auto|unique]_ptr&lt;xml_schema::buffer>;
+ hexBinary std::[auto|unique]_ptr&lt;xml_schema::buffer>
+ std::[auto|unique]_ptr&lt;xml_schema::buffer>;
+
+ date xml_schema::date;
+ dateTime xml_schema::date_time;
+ duration xml_schema::duration;
+ gDay xml_schema::gday;
+ gMonth xml_schema::gmonth;
+ gMonthDay xml_schema::gmonth_day;
+ gYear xml_schema::gyear;
+ gYearMonth xml_schema::gyear_month;
+ time xml_schema::time;
+}
+ </pre>
+
+ <p>For more information about the mapping of the built-in XML Schema types
+ to C++ types refer to <a href="#6">Chapter 6, "Built-In XML Schema Type
+ Parsers"</a>. The last predefined rule maps anything that wasn't
+ mapped by previous rules to <code>void</code>:</p>
+
+ <pre class="type-map">
+namespace .*
+{
+ .* void void;
+}
+ </pre>
+
+
+ <p>When you provide your own type maps with the
+ <code>--type-map</code> option, they are evaluated first. This
+ allows you to selectively override any of the predefined rules.
+ Note also that if you change the mapping
+ of a built-in XML Schema type then it becomes your responsibility
+ to provide the corresponding parser skeleton and implementation
+ in the <code>xml_schema</code> namespace. You can include the
+ custom definitions into the generated header file using the
+ <code>--hxx-prologue-*</code> options.</p>
+
+ <h2><a name="4.3">4.3 Parser Implementations</a></h2>
+
+ <p>With the knowledge from the previous section, we can proceed
+ with creating a type map that maps types in the <code>people.xsd</code>
+ schema to our object model classes in
+ <code>people.hxx</code>. In fact, we already have the beginning
+ of our type map file in <code>people.map</code>. Let's extend
+ it with the rest of the types:</p>
+
+ <pre class="type-map">
+include "people.hxx";
+
+gender ::gender ::gender;
+person ::person;
+people ::people;
+ </pre>
+
+ <p>There are a few things to note about this type map. We did not
+ provide the argument types for <code>person</code> and
+ <code>people</code> because the default constant reference is
+ exactly what we need. We also did not provide any mappings
+ for built-in XML Schema types <code>string</code> and
+ <code>short</code> because they are handled by the predefined
+ rules and we are happy with the result. Note also that
+ all C++ types are fully qualified. This is done to avoid
+ potential name conflicts in the generated code. Now we can
+ recompile our schema and move on to implementing the parsers:</p>
+
+ <pre class="terminal">
+$ xsd cxx-parser --std c++11 --xml-parser expat --type-map people.map \
+ people.xsd
+ </pre>
+
+ <p>Here is the implementation of our three parsers in full. One
+ way to save typing when implementing your own parsers is
+ to open the generated code and copy the signatures of parser
+ callbacks into your code. Or you could always auto generate the
+ sample implementations and fill them with your code.</p>
+
+
+ <pre class="c++">
+#include "people-pskel.hxx"
+
+class gender_pimpl: public gender_pskel,
+ public xml_schema::string_pimpl
+{
+public:
+ virtual ::gender
+ post_gender ()
+ {
+ return post_string () == "male" ? male : female;
+ }
+};
+
+class person_pimpl: public person_pskel
+{
+public:
+ virtual void
+ first_name (const std::string&amp; f)
+ {
+ first_ = f;
+ }
+
+ virtual void
+ last_name (const std::string&amp; l)
+ {
+ last_ = l;
+ }
+
+ virtual void
+ gender (::gender g)
+ {
+ gender_ = g;
+ }
+
+ virtual void
+ age (short a)
+ {
+ age_ = a;
+ }
+
+ virtual ::person
+ post_person ()
+ {
+ return ::person (first_, last_, gender_, age_);
+ }
+
+private:
+ std::string first_;
+ std::string last_;
+ ::gender gender_;
+ short age_;
+};
+
+class people_pimpl: public people_pskel
+{
+public:
+ virtual void
+ person (const ::person&amp; p)
+ {
+ people_.push_back (p);
+ }
+
+ virtual ::people
+ post_people ()
+ {
+ ::people r;
+ r.swap (people_);
+ return r;
+ }
+
+private:
+ ::people people_;
+};
+ </pre>
+
+ <p>This code fragment should look familiar by now. Just note that
+ all the <code>post_*()</code> callbacks now have return types instead
+ of <code>void</code>. Here is the implementation of the test
+ driver for this example:</p>
+
+ <pre class="c++">
+#include &lt;iostream>
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ // Construct the parser.
+ //
+ xml_schema::short_pimpl short_p;
+ xml_schema::string_pimpl string_p;
+
+ gender_pimpl gender_p;
+ person_pimpl person_p;
+ people_pimpl people_p;
+
+ person_p.parsers (string_p, string_p, gender_p, short_p);
+ people_p.parsers (person_p);
+
+ // Parse the document to obtain the object model.
+ //
+ xml_schema::document doc_p (people_p, "people");
+
+ people_p.pre ();
+ doc_p.parse (argv[1]);
+ people ppl = people_p.post_people ();
+
+ // Print the object model.
+ //
+ for (people::iterator i (ppl.begin ()); i != ppl.end (); ++i)
+ {
+ cout &lt;&lt; "first: " &lt;&lt; i->first () &lt;&lt; endl
+ &lt;&lt; "last: " &lt;&lt; i->last () &lt;&lt; endl
+ &lt;&lt; "gender: " &lt;&lt; (i->gender () == male ? "male" : "female") &lt;&lt; endl
+ &lt;&lt; "age: " &lt;&lt; i->age () &lt;&lt; endl
+ &lt;&lt; endl;
+ }
+}
+ </pre>
+
+ <p>The parser creation and assembly part is exactly the same as in
+ the previous chapter. The parsing part is a bit different:
+ <code>post_people()</code> now has a return value which is the
+ complete object model. We store it in the
+ <code>ppl</code> variable. The last bit of the code simply iterates
+ over the <code>people</code> vector and prints the information
+ for each person. We save the last two code fragments to
+ <code>driver.cxx</code> and proceed to compile and test
+ our new application:</p>
+
+
+ <pre class="terminal">
+$ c++ -std=c++11 -I.../libxsd -c driver.cxx people-pskel.cxx
+$ c++ -std=c++11 -o driver driver.o people-pskel.o -lexpat
+$ ./driver people.xml
+first: John
+last: Doe
+gender: male
+age: 32
+
+first: Jane
+last: Doe
+gender: female
+age: 28
+ </pre>
+
+
+ <!-- Mapping Configuration -->
+
+
+ <h1><a name="5">5 Mapping Configuration</a></h1>
+
+ <p>The C++/Parser mapping has a number of configuration parameters that
+ determine the overall properties and behavior of the generated code.
+ Configuration parameters are specified with the XSD command line
+ options and include the C++ standard, the character type that is used
+ by the generated code, the underlying XML parser, whether the XML Schema
+ validation is performed in the generated code, and support for XML Schema
+ polymorphism. This chapter describes these configuration
+ parameters in more detail. For more ways to configure the generated
+ code refer to the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a>.
+ </p>
+
+ <h2><a name="5.1">5.1 C++ Standard</a></h2>
+
+ <p>The C++/Parser mapping provides support for ISO/IEC C++ 2011 (C++11)
+ and ISO/IEC C++ 1998/2003 (C++98). To select the C++ standard for the
+ generated code we use the <code>--std</code> XSD compiler command
+ line option. While the majority of the examples in this guide use
+ C++11, the document explains the C++11/98 usage difference and so
+ they can easily be converted to C++98.</p>
+
+ <h2><a name="5.2">5.2 Character Type and Encoding</a></h2>
+
+ <p>The C++/Parser mapping has built-in support for two character types:
+ <code>char</code> and <code>wchar_t</code>. You can select the
+ character type with the <code>--char-type</code> command line
+ option. The default character type is <code>char</code>. The
+ string-based built-in XML Schema types are returned as either
+ <code>std::string</code> or <code>std::wstring</code> depending
+ on the character type selected.</p>
+
+ <p>Another aspect of the mapping that depends on the character type
+ is character encoding. For the <code>char</code> character type
+ the default encoding is UTF-8. Other supported encodings are
+ ISO-8859-1, Xerces-C++ Local Code Page (LPC), as well as
+ custom encodings. You can select which encoding should be used
+ in the object model with the <code>--char-encoding</code> command
+ line option.</p>
+
+ <p>For the <code>wchar_t</code> character type the encoding is
+ automatically selected between UTF-16 and UTF-32/UCS-4 depending
+ on the size of the <code>wchar_t</code> type. On some platforms
+ (for example, Windows with Visual C++ and AIX with IBM XL C++)
+ <code>wchar_t</code> is 2 bytes long. For these platforms the
+ encoding is UTF-16. On other platforms <code>wchar_t</code> is 4 bytes
+ long and UTF-32/UCS-4 is used.</p>
+
+ <p>Note also that the character encoding that is used in the object model
+ is independent of the encodings used in input and output XML. In fact,
+ all three (object mode, input XML, and output XML) can have different
+ encodings.</p>
+
+ <h2><a name="5.3">5.3 Underlying XML Parser</a></h2>
+
+ <p>The C++/Parser mapping can be used with either Xerces-C++ or Expat
+ as the underlying XML parser. You can select the XML parser with
+ the <code>--xml-parser</code> command line option. Valid values
+ for this option are <code>xerces</code> and <code>expat</code>.
+ The default XML parser is Xerces-C++.</p>
+
+ <p>The generated code is identical for both parsers except for the
+ <code>xml_schema::document</code> class in which some of the
+ <code>parse()</code> functions are parser-specific as described
+ in <a href="#7">Chapter 7, "Document Parser and Error Handling"</a>.</p>
+
+
+ <h2><a name="5.4">5.4 XML Schema Validation</a></h2>
+
+ <p>The C++/Parser mapping provides support for validating a
+ commonly-used subset of W3C XML Schema in the generated code.
+ For the list of supported XML Schema constructs refer to
+ <a href="#A">Appendix A, "Supported XML Schema Constructs"</a>.</p>
+
+ <p>By default validation in the generated code is disabled if
+ the underlying XML parser is validating (Xerces-C++) and
+ enabled otherwise (Expat). See <a href="#5.3">Section 5.3,
+ "Underlying XML Parser"</a> for more information about
+ the underlying XML parser. You can override the default
+ behavior with the <code>--generate-validation</code>
+ and <code>--suppress-validation</code> command line options.</p>
+
+
+ <h2><a name="5.5">5.5 Support for Polymorphism</a></h2>
+
+ <p>By default the XSD compiler generates non-polymorphic code. If your
+ vocabulary uses XML Schema polymorphism in the form of <code>xsi:type</code>
+ and/or substitution groups, then you will need to compile your schemas
+ with the <code>--generate-polymorphic</code> option to produce
+ polymorphism-aware code as well as pass <code>true</code> as the last
+ argument to the <code>xml_schema::document</code>'s constructors.</p>
+
+ <p>When using the polymorphism-aware generated code, you can specify
+ several parsers for a single element by passing a parser map
+ instead of an individual parser to the parser connection function
+ for the element. One of the parsers will then be looked up and used
+ depending on the <code>xsi:type</code> attribute value or an element
+ name from a substitution group. Consider the following schema as an
+ example:</p>
+
+ <pre class="xml">
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:complexType name="person">
+ &lt;xs:sequence>
+ &lt;xs:element name="name" type="xs:string"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;!-- substitution group root -->
+ &lt;xs:element name="person" type="person"/>
+
+ &lt;xs:complexType name="superman">
+ &lt;xs:complexContent>
+ &lt;xs:extension base="person">
+ &lt;xs:attribute name="can-fly" type="xs:boolean"/>
+ &lt;/xs:extension>
+ &lt;/xs:complexContent>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="superman"
+ type="superman"
+ substitutionGroup="person"/>
+
+ &lt;xs:complexType name="batman">
+ &lt;xs:complexContent>
+ &lt;xs:extension base="superman">
+ &lt;xs:attribute name="wing-span" type="xs:unsignedInt"/>
+ &lt;/xs:extension>
+ &lt;/xs:complexContent>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="batman"
+ type="batman"
+ substitutionGroup="superman"/>
+
+ &lt;xs:complexType name="supermen">
+ &lt;xs:sequence>
+ &lt;xs:element ref="person" maxOccurs="unbounded"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="supermen" type="supermen"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>Conforming XML documents can use the <code>superman</code>
+ and <code>batman</code> types in place of the <code>person</code>
+ type either by specifying the type with the <code>xsi:type</code>
+ attributes or by using the elements from the substitution
+ group, for instance:</p>
+
+
+ <pre class="xml">
+&lt;supermen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ &lt;person>
+ &lt;name>John Doe&lt;/name>
+ &lt;/person>
+
+ &lt;superman can-fly="false">
+ &lt;name>James "007" Bond&lt;/name>
+ &lt;/superman>
+
+ &lt;superman can-fly="true" wing-span="10" xsi:type="batman">
+ &lt;name>Bruce Wayne&lt;/name>
+ &lt;/superman>
+
+&lt;/supermen>
+ </pre>
+
+ <p>To print the data stored in such XML documents we can implement
+ the parsers as follows:</p>
+
+ <pre class="c++">
+class person_pimpl: public virtual person_pskel
+{
+public:
+ virtual void
+ pre ()
+ {
+ cout &lt;&lt; "starting to parse person" &lt;&lt; endl;
+ }
+
+ virtual void
+ name (const std::string&amp; v)
+ {
+ cout &lt;&lt; "name: " &lt;&lt; v &lt;&lt; endl;
+ }
+
+ virtual void
+ post_person ()
+ {
+ cout &lt;&lt; "finished parsing person" &lt;&lt; endl;
+ }
+};
+
+class superman_pimpl: public virtual superman_pskel,
+ public person_pimpl
+{
+public:
+ virtual void
+ pre ()
+ {
+ cout &lt;&lt; "starting to parse superman" &lt;&lt; endl;
+ }
+
+ virtual void
+ can_fly (bool v)
+ {
+ cout &lt;&lt; "can-fly: " &lt;&lt; v &lt;&lt; endl;
+ }
+
+ virtual void
+ post_person ()
+ {
+ post_superman ();
+ }
+
+ virtual void
+ post_superman ()
+ {
+ cout &lt;&lt; "finished parsing superman" &lt;&lt; endl
+ }
+};
+
+class batman_pimpl: public virtual batman_pskel,
+ public superman_pimpl
+{
+public:
+ virtual void
+ pre ()
+ {
+ cout &lt;&lt; "starting to parse batman" &lt;&lt; endl;
+ }
+
+ virtual void
+ wing_span (unsigned int v)
+ {
+ cout &lt;&lt; "wing-span: " &lt;&lt; v &lt;&lt; endl;
+ }
+
+ virtual void
+ post_superman ()
+ {
+ post_batman ();
+ }
+
+ virtual void
+ post_batman ()
+ {
+ cout &lt;&lt; "finished parsing batman" &lt;&lt; endl;
+ }
+};
+ </pre>
+
+ <p>Note that because the derived type parsers (<code>superman_pskel</code>
+ and <code>batman_pskel</code>) are called via the <code>person_pskel</code>
+ interface, we have to override the <code>post_person()</code>
+ virtual function in <code>superman_pimpl</code> to call
+ <code>post_superman()</code> and the <code>post_superman()</code>
+ virtual function in <code>batman_pimpl</code> to call
+ <code>post_batman()</code>.</p>
+
+ <p>The following code fragment shows how to connect the parsers together.
+ Notice that for the <code>person</code> element in the <code>supermen_p</code>
+ parser we specify a parser map instead of a specific parser and we pass
+ <code>true</code> as the last argument to the document parser constructor
+ to indicate that we are parsing potentially-polymorphic XML documents:</p>
+
+ <pre class="c++">
+int
+main (int argc, char* argv[])
+{
+ // Construct the parser.
+ //
+ xml_schema::string_pimpl string_p;
+ xml_schema::boolean_pimpl boolean_p;
+ xml_schema::unsigned_int_pimpl unsigned_int_p;
+
+ person_pimpl person_p;
+ superman_pimpl superman_p;
+ batman_pimpl batman_p;
+
+ xml_schema::parser_map_impl person_map;
+ supermen_pimpl supermen_p;
+
+ person_p.parsers (string_p);
+ superman_p.parsers (string_p, boolean_p);
+ batman_p.parsers (string_p, boolean_p, unsigned_int_p);
+
+ // Here we are specifying a parser map which containes several
+ // parsers that can be used to parse the person element.
+ //
+ person_map.insert (person_p);
+ person_map.insert (superman_p);
+ person_map.insert (batman_p);
+
+ supermen_p.person_parser (person_map);
+
+ // Parse the XML document. The last argument to the document's
+ // constructor indicates that we are parsing polymorphic XML
+ // documents.
+ //
+ xml_schema::document doc_p (supermen_p, "supermen", true);
+
+ supermen_p.pre ();
+ doc_p.parse (argv[1]);
+ supermen_p.post_supermen ();
+}
+ </pre>
+
+ <p>When polymorphism-aware code is generated, each element's
+ <code>*_parser()</code> function is overloaded to also accept
+ an object of the <code>xml_schema::parser_map</code> type.
+ For example, the <code>supermen_pskel</code> class from the
+ above example looks like this:</p>
+
+ <pre class="c++">
+class supermen_pskel: public xml_schema::parser_complex_content
+{
+public:
+
+ ...
+
+ // Parser construction API.
+ //
+ void
+ parsers (person_pskel&amp;);
+
+ // Individual element parsers.
+ //
+ void
+ person_parser (person_pskel&amp;);
+
+ void
+ person_parser (const xml_schema::parser_map&amp;);
+
+ ...
+};
+ </pre>
+
+ <p>Note that you can specify both the individual (static) parser and
+ the parser map. The individual parser will be used when the static
+ element type and the dynamic type of the object being parsed are
+ the same. This is the case, for example, when there is no
+ <code>xsi:type</code> attribute and the element hasn't been
+ substituted. Because the individual parser for an element is
+ cached and no map lookup is necessary, it makes sense to specify
+ both the individual parser and the parser map when most of the
+ objects being parsed are of the static type and optimal
+ performance is important. The following code fragment shows
+ how to change the above example to set both the individual
+ parser and the parser map:</p>
+
+ <pre class="c++">
+int
+main (int argc, char* argv[])
+{
+ ...
+
+ person_map.insert (superman_p);
+ person_map.insert (batman_p);
+
+ supermen_p.person_parser (person_p);
+ supermen_p.person_parser (person_map);
+
+ ...
+}
+ </pre>
+
+
+ <p>The <code>xml_schema::parser_map</code> interface and the
+ <code>xml_schema::parser_map_impl</code> default implementation
+ are presented below:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class parser_map
+ {
+ public:
+ virtual parser_base*
+ find (const ro_string* type) const = 0;
+ };
+
+ class parser_map_impl: public parser_map
+ {
+ public:
+ void
+ insert (parser_base&amp;);
+
+ virtual parser_base*
+ find (const ro_string* type) const;
+
+ private:
+ parser_map_impl (const parser_map_impl&amp;);
+
+ parser_map_impl&amp;
+ operator= (const parser_map_impl&amp;);
+
+ ...
+ };
+}
+ </pre>
+
+ <p>The <code>type</code> argument in the <code>find()</code> virtual
+ function is the type name and namespace from the xsi:type attribute
+ (the namespace prefix is resolved to the actual XML namespace)
+ or the type of an element from the substitution group in the form
+ <code>"&lt;name>&nbsp;&lt;namespace>"</code> with the space and the
+ namespace part absent if the type does not have a namespace.
+ You can obtain a parser's dynamic type in the same format
+ using the <code>_dynamic_type()</code> function. The static
+ type can be obtained by calling the static <code>_static_type()</code>
+ function, for example <code>person_pskel::_static_type()</code>.
+ Both functions return a C string (<code>const char*</code> or
+ <code>const wchar_t*</code>, depending on the character type
+ used) which is valid for as long as the application is running.
+ The following example shows how we can implement our own parser
+ map using <code>std::map</code>:</p>
+
+
+ <pre class="c++">
+#include &lt;map>
+#include &lt;string>
+
+class parser_map: public xml_schema::parser_map
+{
+public:
+ void
+ insert (xml_schema::parser_base&amp; p)
+ {
+ map_[p._dynamic_type ()] = &amp;p;
+ }
+
+ virtual xml_schema::parser_base*
+ find (const xml_schema::ro_string* type) const
+ {
+ map::const_iterator i = map_.find (type);
+ return i != map_.end () ? i->second : 0;
+ }
+
+private:
+ typedef std::map&lt;std::string, xml_schema::parser_base*> map;
+ map map_;
+};
+ </pre>
+
+ <p>Most of code presented in this section is taken from the
+ <code>polymorphism</code> example which can be found in the
+ <code>cxx/parser/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package.
+ Handling of <code>xsi:type</code> and substitution groups when used on
+ root elements requires a number of special actions as shown in
+ the <code>polyroot</code> example.</p>
+
+
+ <!-- Built-in XML Schema Type Parsers -->
+
+
+ <h1><a name="6">6 Built-In XML Schema Type Parsers</a></h1>
+
+ <p>The XSD runtime provides parser implementations for all built-in
+ XML Schema types as summarized in the following table. Declarations
+ for these types are automatically included into each generated
+ header file. As a result you don't need to include any headers
+ to gain access to these parser implementations. Note that some
+ parsers return either <code>std::string</code> or
+ <code>std::wstring</code> depending on the character type selected.</p>
+
+ <!-- border="1" is necessary for html2ps -->
+ <table id="builtin" border="1">
+ <tr>
+ <th>XML Schema type</th>
+ <th>Parser implementation in the <code>xml_schema</code> namespace</th>
+ <th>Parser return type</th>
+ </tr>
+
+ <tr>
+ <th colspan="3">anyType and anySimpleType types</th>
+ </tr>
+ <tr>
+ <td><code>anyType</code></td>
+ <td><code>any_type_pimpl</code></td>
+ <td><code>void</code></td>
+ </tr>
+ <tr>
+ <td><code>anySimpleType</code></td>
+ <td><code>any_simple_type_pimpl</code></td>
+ <td><code>void</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">fixed-length integral types</th>
+ </tr>
+ <!-- 8-bit -->
+ <tr>
+ <td><code>byte</code></td>
+ <td><code>byte_pimpl</code></td>
+ <td><code>signed&nbsp;char</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedByte</code></td>
+ <td><code>unsigned_byte_pimpl</code></td>
+ <td><code>unsigned&nbsp;char</code></td>
+ </tr>
+
+ <!-- 16-bit -->
+ <tr>
+ <td><code>short</code></td>
+ <td><code>short_pimpl</code></td>
+ <td><code>short</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedShort</code></td>
+ <td><code>unsigned_short_pimpl</code></td>
+ <td><code>unsigned&nbsp;short</code></td>
+ </tr>
+
+ <!-- 32-bit -->
+ <tr>
+ <td><code>int</code></td>
+ <td><code>int_pimpl</code></td>
+ <td><code>int</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedInt</code></td>
+ <td><code>unsigned_int_pimpl</code></td>
+ <td><code>unsigned&nbsp;int</code></td>
+ </tr>
+
+ <!-- 64-bit -->
+ <tr>
+ <td><code>long</code></td>
+ <td><code>long_pimpl</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedLong</code></td>
+ <td><code>unsigned_long_pimpl</code></td>
+ <td><code>unsigned&nbsp;long&nbsp;long</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">arbitrary-length integral types</th>
+ </tr>
+ <tr>
+ <td><code>integer</code></td>
+ <td><code>integer_pimpl</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>nonPositiveInteger</code></td>
+ <td><code>non_positive_integer_pimpl</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>nonNegativeInteger</code></td>
+ <td><code>non_negative_integer_pimpl</code></td>
+ <td><code>unsigned long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>positiveInteger</code></td>
+ <td><code>positive_integer_pimpl</code></td>
+ <td><code>unsigned long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>negativeInteger</code></td>
+ <td><code>negative_integer_pimpl</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">boolean types</th>
+ </tr>
+ <tr>
+ <td><code>boolean</code></td>
+ <td><code>boolean_pimpl</code></td>
+ <td><code>bool</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">fixed-precision floating-point types</th>
+ </tr>
+ <tr>
+ <td><code>float</code></td>
+ <td><code>float_pimpl</code></td>
+ <td><code>float</code></td>
+ </tr>
+ <tr>
+ <td><code>double</code></td>
+ <td><code>double_pimpl</code></td>
+ <td><code>double</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">arbitrary-precision floating-point types</th>
+ </tr>
+ <tr>
+ <td><code>decimal</code></td>
+ <td><code>decimal_pimpl</code></td>
+ <td><code>double</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">string-based types</th>
+ </tr>
+ <tr>
+ <td><code>string</code></td>
+ <td><code>string_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+ <tr>
+ <td><code>normalizedString</code></td>
+ <td><code>normalized_string_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+ <tr>
+ <td><code>token</code></td>
+ <td><code>token_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+ <tr>
+ <td><code>Name</code></td>
+ <td><code>name_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+ <tr>
+ <td><code>NMTOKEN</code></td>
+ <td><code>nmtoken_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+ <tr>
+ <td><code>NCName</code></td>
+ <td><code>ncname_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+
+ <tr>
+ <td><code>language</code></td>
+ <td><code>language_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">qualified name</th>
+ </tr>
+ <tr>
+ <td><code>QName</code></td>
+ <td><code>qname_pimpl</code></td>
+ <td><code>xml_schema::qname</code><br/><a href="#6.1">Section 6.1,
+ "<code>QName</code> Parser"</a></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">ID/IDREF types</th>
+ </tr>
+ <tr>
+ <td><code>ID</code></td>
+ <td><code>id_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+ <tr>
+ <td><code>IDREF</code></td>
+ <td><code>idref_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">list types</th>
+ </tr>
+ <tr>
+ <td><code>NMTOKENS</code></td>
+ <td><code>nmtokens_pimpl</code></td>
+ <td><code>xml_schema::string_sequence</code><br/><a href="#6.2">Section
+ 6.2, "<code>NMTOKENS</code> and <code>IDREFS</code> Parsers"</a></td>
+ </tr>
+ <tr>
+ <td><code>IDREFS</code></td>
+ <td><code>idrefs_pimpl</code></td>
+ <td><code>xml_schema::string_sequence</code><br/><a href="#6.2">Section
+ 6.2, "<code>NMTOKENS</code> and <code>IDREFS</code> Parsers"</a></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">URI types</th>
+ </tr>
+ <tr>
+ <td><code>anyURI</code></td>
+ <td><code>uri_pimpl</code></td>
+ <td><code>std::string</code> or <code>std::wstring</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">binary types</th>
+ </tr>
+ <tr>
+ <td><code>base64Binary</code></td>
+ <td><code>base64_binary_pimpl</code></td>
+ <td><code>std::[auto|unique]_ptr&lt; xml_schema::buffer></code><br/>
+ <a href="#6.3">Section 6.3, "<code>base64Binary</code> and
+ <code>hexBinary</code> Parsers"</a></td>
+ </tr>
+ <tr>
+ <td><code>hexBinary</code></td>
+ <td><code>hex_binary_pimpl</code></td>
+ <td><code>std::[auto|unique]_ptr&lt; xml_schema::buffer></code><br/>
+ <a href="#6.3">Section 6.3, "<code>base64Binary</code> and
+ <code>hexBinary</code> Parsers"</a></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">date/time types</th>
+ </tr>
+ <tr>
+ <td><code>date</code></td>
+ <td><code>date_pimpl</code></td>
+ <td><code>xml_schema::date</code><br/><a href="#6.5">Section 6.5,
+ "<code>date</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>dateTime</code></td>
+ <td><code>date_time_pimpl</code></td>
+ <td><code>xml_schema::date_time</code><br/><a href="#6.6">Section 6.6,
+ "<code>dateTime</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>duration</code></td>
+ <td><code>duration_pimpl</code></td>
+ <td><code>xml_schema::duration</code><br/><a href="#6.7">Section 6.7,
+ "<code>duration</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>gDay</code></td>
+ <td><code>gday_pimpl</code></td>
+ <td><code>xml_schema::gday</code><br/><a href="#6.8">Section 6.8,
+ "<code>gDay</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>gMonth</code></td>
+ <td><code>gmonth_pimpl</code></td>
+ <td><code>xml_schema::gmonth</code><br/><a href="#6.9">Section 6.9,
+ "<code>gMonth</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>gMonthDay</code></td>
+ <td><code>gmonth_day_pimpl</code></td>
+ <td><code>xml_schema::gmonth_day</code><br/><a href="#6.10">Section 6.10,
+ "<code>gMonthDay</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>gYear</code></td>
+ <td><code>gyear_pimpl</code></td>
+ <td><code>xml_schema::gyear</code><br/><a href="#6.11">Section 6.11,
+ "<code>gYear</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>gYearMonth</code></td>
+ <td><code>gyear_month_pimpl</code></td>
+ <td><code>xml_schema::gyear_month</code><br/><a href="#6.12">Section
+ 6.12, "<code>gYearMonth</code> Parser"</a></td>
+ </tr>
+ <tr>
+ <td><code>time</code></td>
+ <td><code>time_pimpl</code></td>
+ <td><code>xml_schema::time</code><br/><a href="#6.13">Section 6.13,
+ "<code>time</code> Parser"</a></td>
+ </tr>
+
+ </table>
+
+ <h2><a name="6.1">6.1 <code>QName</code> Parser</a></h2>
+
+ <p>The return type of the <code>qname_pimpl</code> parser implementation
+ is <code>xml_schema::qname</code> which represents an XML qualified
+ name. Its interface is presented below.
+ Note that the <code>std::string</code> type in the interface becomes
+ <code>std::wstring</code> if the selected character type is
+ <code>wchar_t</code>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class qname
+ {
+ public:
+ explicit
+ qname (const std::string&amp; name);
+ qname (const std::string&amp; prefix, const std::string&amp; name);
+
+ const std::string&amp;
+ prefix () const;
+
+ void
+ prefix (const std::string&amp;);
+
+ const std::string&amp;
+ name () const;
+
+ void
+ name (const std::string&amp;);
+ };
+
+ bool
+ operator== (const qname&amp;, const qname&amp;);
+
+ bool
+ operator!= (const qname&amp;, const qname&amp;);
+}
+ </pre>
+
+
+ <h2><a name="6.2">6.2 <code>NMTOKENS</code> and <code>IDREFS</code> Parsers</a></h2>
+
+ <p>The return type of the <code>nmtokens_pimpl</code> and
+ <code>idrefs_pimpl</code> parser implementations is
+ <code>xml_schema::string_sequence</code> which represents a
+ sequence of strings. Its interface is presented below.
+ Note that the <code>std::string</code> type in the interface becomes
+ <code>std::wstring</code> if the selected character type is
+ <code>wchar_t</code>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class string_sequence: public std::vector&lt;std::string>
+ {
+ public:
+ string_sequence ();
+
+ explicit
+ string_sequence (std::vector&lt;std::string>::size_type n,
+ const std::string&amp; x = std::string ());
+
+ template &lt;typename I>
+ string_sequence (const I&amp; begin, const I&amp; end);
+ };
+
+ bool
+ operator== (const string_sequence&amp;, const string_sequence&amp;);
+
+ bool
+ operator!= (const string_sequence&amp;, const string_sequence&amp;);
+}
+ </pre>
+
+
+ <h2><a name="6.3">6.3 <code>base64Binary</code> and <code>hexBinary</code> Parsers</a></h2>
+
+ <p>The return type of the <code>base64_binary_pimpl</code> and
+ <code>hex_binary_pimpl</code> parser implementations is either
+ <code>std::unique_ptr&lt;xml_schema::buffer></code> (C++11) or
+ <code>std::auto_ptr&lt;xml_schema::buffer></code> (C++98),
+ depending on the C++ standard selected (<code>--std</code> XSD
+ compiler option). The <code>xml_schema::buffer</code> type
+ represents a binary buffer and its interface is presented below.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class buffer
+ {
+ public:
+ typedef std::size_t size_t;
+
+ class bounds {}; // Out of bounds exception.
+
+ public:
+ explicit
+ buffer (size_t size = 0);
+ buffer (size_t size, size_t capacity);
+ buffer (const void* data, size_t size);
+ buffer (const void* data, size_t size, size_t capacity);
+ buffer (void* data,
+ size_t size,
+ size_t capacity,
+ bool assume_ownership);
+
+ public:
+ buffer (const buffer&amp;);
+
+ buffer&amp;
+ operator= (const buffer&amp;);
+
+ void
+ swap (buffer&amp;);
+
+ public:
+ size_t
+ capacity () const;
+
+ bool
+ capacity (size_t);
+
+ public:
+ size_t
+ size () const;
+
+ bool
+ size (size_t);
+
+ public:
+ const char*
+ data () const;
+
+ char*
+ data ();
+
+ const char*
+ begin () const;
+
+ char*
+ begin ();
+
+ const char*
+ end () const;
+
+ char*
+ end ();
+ };
+
+ bool
+ operator== (const buffer&amp;, const buffer&amp;);
+
+ bool
+ operator!= (const buffer&amp;, const buffer&amp;);
+}
+ </pre>
+
+ <p>If the <code>assume_ownership</code> argument to the constructor
+ is <code>true</code>, the instance assumes the ownership of the
+ memory block pointed to by the <code>data</code> argument and will
+ eventually release it by calling <code>operator delete()</code>. The
+ <code>capacity()</code> and <code>size()</code> modifier functions
+ return <code>true</code> if the underlying buffer has moved.
+ </p>
+
+ <p>The <code>bounds</code> exception is thrown if the constructor
+ arguments violate the <code>(size&nbsp;&lt;=&nbsp;capacity)</code>
+ constraint.</p>
+
+
+ <h2><a name="6.4">6.4 Time Zone Representation</a></h2>
+
+ <p>The <code>date</code>, <code>dateTime</code>, <code>gDay</code>,
+ <code>gMonth</code>, <code>gMonthDay</code>, <code>gYear</code>,
+ <code>gYearMonth</code>, and <code>time</code> XML Schema built-in
+ types all include an optional time zone component. The following
+ <code>xml_schema::time_zone</code> base class is used to represent
+ this information:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class time_zone
+ {
+ public:
+ time_zone ();
+ time_zone (short hours, short minutes);
+
+ bool
+ zone_present () const;
+
+ void
+ zone_reset ();
+
+ short
+ zone_hours () const;
+
+ void
+ zone_hours (short);
+
+ short
+ zone_minutes () const;
+
+ void
+ zone_minutes (short);
+ };
+
+ bool
+ operator== (const time_zone&amp;, const time_zone&amp;);
+
+ bool
+ operator!= (const time_zone&amp;, const time_zone&amp;);
+}
+ </pre>
+
+ <p>The <code>zone_present()</code> accessor function returns <code>true</code>
+ if the time zone is specified. The <code>zone_reset()</code> modifier
+ function resets the time zone object to the <em>not specified</em>
+ state. If the time zone offset is negative then both hours and
+ minutes components are represented as negative integers.</p>
+
+
+ <h2><a name="6.5">6.5 <code>date</code> Parser</a></h2>
+
+ <p>The return type of the <code>date_pimpl</code> parser implementation
+ is <code>xml_schema::date</code> which represents a year, a day, and a month
+ with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class date
+ {
+ public:
+ date (int year, unsigned short month, unsigned short day);
+ date (int year, unsigned short month, unsigned short day,
+ short zone_hours, short zone_minutes);
+
+ int
+ year () const;
+
+ void
+ year (int);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+ };
+
+ bool
+ operator== (const date&amp;, const date&amp;);
+
+ bool
+ operator!= (const date&amp;, const date&amp;);
+}
+ </pre>
+
+ <h2><a name="6.6">6.6 <code>dateTime</code> Parser</a></h2>
+
+ <p>The return type of the <code>date_time_pimpl</code> parser implementation
+ is <code>xml_schema::date_time</code> which represents a year, a month, a day,
+ hours, minutes, and seconds with an optional time zone. Its interface
+ is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class date_time
+ {
+ public:
+ date_time (int year, unsigned short month, unsigned short day,
+ unsigned short hours, unsigned short minutes,
+ double seconds);
+
+ date_time (int year, unsigned short month, unsigned short day,
+ unsigned short hours, unsigned short minutes,
+ double seconds, short zone_hours, short zone_minutes);
+
+ int
+ year () const;
+
+ void
+ year (int);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+
+ unsigned short
+ hours () const;
+
+ void
+ hours (unsigned short);
+
+ unsigned short
+ minutes () const;
+
+ void
+ minutes (unsigned short);
+
+ double
+ seconds () const;
+
+ void
+ seconds (double);
+ };
+
+ bool
+ operator== (const date_time&amp;, const date_time&amp;);
+
+ bool
+ operator!= (const date_time&amp;, const date_time&amp;);
+}
+ </pre>
+
+ <h2><a name="6.7">6.7 <code>duration</code> Parser</a></h2>
+
+ <p>The return type of the <code>duration_pimpl</code> parser implementation
+ is <code>xml_schema::duration</code> which represents a potentially
+ negative duration in the form of years, months, days, hours, minutes,
+ and seconds. Its interface is presented below.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class duration
+ {
+ public:
+ duration (bool negative,
+ unsigned int years, unsigned int months, unsigned int days,
+ unsigned int hours, unsigned int minutes, double seconds);
+
+ bool
+ negative () const;
+
+ void
+ negative (bool);
+
+ unsigned int
+ years () const;
+
+ void
+ years (unsigned int);
+
+ unsigned int
+ months () const;
+
+ void
+ months (unsigned int);
+
+ unsigned int
+ days () const;
+
+ void
+ days (unsigned int);
+
+ unsigned int
+ hours () const;
+
+ void
+ hours (unsigned int);
+
+ unsigned int
+ minutes () const;
+
+ void
+ minutes (unsigned int);
+
+ double
+ seconds () const;
+
+ void
+ seconds (double);
+ };
+
+ bool
+ operator== (const duration&amp;, const duration&amp;);
+
+ bool
+ operator!= (const duration&amp;, const duration&amp;);
+}
+ </pre>
+
+
+ <h2><a name="6.8">6.8 <code>gDay</code> Parser</a></h2>
+
+ <p>The return type of the <code>gday_pimpl</code> parser implementation
+ is <code>xml_schema::gday</code> which represents a day of the month with
+ an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class gday
+ {
+ public:
+ explicit
+ gday (unsigned short day);
+ gday (unsigned short day, short zone_hours, short zone_minutes);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+ };
+
+ bool
+ operator== (const gday&amp;, const gday&amp;);
+
+ bool
+ operator!= (const gday&amp;, const gday&amp;);
+}
+ </pre>
+
+ <h2><a name="6.9">6.9 <code>gMonth</code> Parser</a></h2>
+
+ <p>The return type of the <code>gmonth_pimpl</code> parser implementation
+ is <code>xml_schema::gmonth</code> which represents a month of the year
+ with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class gmonth
+ {
+ public:
+ explicit
+ gmonth (unsigned short month);
+ gmonth (unsigned short month, short zone_hours, short zone_minutes);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+ };
+
+ bool
+ operator== (const gmonth&amp;, const gmonth&amp;);
+
+ bool
+ operator!= (const gmonth&amp;, const gmonth&amp;);
+}
+ </pre>
+
+ <h2><a name="6.10">6.10 <code>gMonthDay</code> Parser</a></h2>
+
+ <p>The return type of the <code>gmonth_day_pimpl</code> parser implementation
+ is <code>xml_schema::gmonth_day</code> which represents a day and a month
+ of the year with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class gmonth_day
+ {
+ public:
+ gmonth_day (unsigned short month, unsigned short day);
+ gmonth_day (unsigned short month, unsigned short day,
+ short zone_hours, short zone_minutes);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+ };
+
+ bool
+ operator== (const gmonth_day&amp;, const gmonth_day&amp;);
+
+ bool
+ operator!= (const gmonth_day&amp;, const gmonth_day&amp;);
+}
+ </pre>
+
+ <h2><a name="6.11">6.11 <code>gYear</code> Parser</a></h2>
+
+ <p>The return type of the <code>gyear_pimpl</code> parser implementation
+ is <code>xml_schema::gyear</code> which represents a year with
+ an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class gyear
+ {
+ public:
+ explicit
+ gyear (int year);
+ gyear (int year, short zone_hours, short zone_minutes);
+
+ int
+ year () const;
+
+ void
+ year (int);
+ };
+
+ bool
+ operator== (const gyear&amp;, const gyear&amp;);
+
+ bool
+ operator!= (const gyear&amp;, const gyear&amp;);
+}
+ </pre>
+
+ <h2><a name="6.12">6.12 <code>gYearMonth</code> Parser</a></h2>
+
+ <p>The return type of the <code>gyear_month_pimpl</code> parser implementation
+ is <code>xml_schema::gyear_month</code> which represents a year and a month
+ with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class gyear_month
+ {
+ public:
+ gyear_month (int year, unsigned short month);
+ gyear_month (int year, unsigned short month,
+ short zone_hours, short zone_minutes);
+
+ int
+ year () const;
+
+ void
+ year (int);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+ };
+
+ bool
+ operator== (const gyear_month&amp;, const gyear_month&amp;);
+
+ bool
+ operator!= (const gyear_month&amp;, const gyear_month&amp;);
+}
+ </pre>
+
+
+ <h2><a name="6.13">6.13 <code>time</code> Parser</a></h2>
+
+ <p>The return type of the <code>time_pimpl</code> parser implementation
+ is <code>xml_schema::time</code> which represents hours, minutes,
+ and seconds with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#6.4">Section 6.4, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class time
+ {
+ public:
+ time (unsigned short hours, unsigned short minutes, double seconds);
+ time (unsigned short hours, unsigned short minutes, double seconds,
+ short zone_hours, short zone_minutes);
+
+ unsigned short
+ hours () const;
+
+ void
+ hours (unsigned short);
+
+ unsigned short
+ minutes () const;
+
+ void
+ minutes (unsigned short);
+
+ double
+ seconds () const;
+
+ void
+ seconds (double);
+ };
+
+ bool
+ operator== (const time&amp;, const time&amp;);
+
+ bool
+ operator!= (const time&amp;, const time&amp;);
+}
+ </pre>
+
+
+ <!-- Error Handling -->
+
+
+ <h1><a name="7">7 Document Parser and Error Handling</a></h1>
+
+ <p>In this chapter we will discuss the <code>xml_schema::document</code>
+ type as well as the error handling mechanisms provided by the mapping
+ in more detail. As mentioned in <a href="#3.4">Section 3.4,
+ "Connecting the Parsers Together"</a>, the interface of
+ <code>xml_schema::document</code> depends on the underlying XML
+ parser selected (<a href="#5.3">Section 5.3, "Underlying XML
+ Parser"</a>). The following sections describe the
+ <code>document</code> type interface for Xerces-C++ and
+ Expat as underlying parsers.</p>
+
+ <h2><a name="7.1">7.1 Xerces-C++ Document Parser</a></h2>
+
+ <p>When Xerces-C++ is used as the underlying XML parser, the
+ <code>document</code> type has the following interface. Note that
+ if the character type is <code>wchar_t</code>, then the string type
+ in the interface becomes <code>std::wstring</code>
+ (see <a href="#5.2">Section 5.2, "Character Type and Encoding"</a>).</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class parser_base;
+ class error_handler;
+
+ class flags
+ {
+ public:
+ // Do not validate XML documents with the Xerces-C++ validator.
+ //
+ static const unsigned long dont_validate;
+
+ // Do not initialize the Xerces-C++ runtime.
+ //
+ static const unsigned long dont_initialize;
+
+ // Disable handling of subsequent imports for the same namespace
+ // in Xerces-C++ 3.1.0 and later.
+ //
+ static const unsigned long no_multiple_imports;
+ };
+
+ class properties
+ {
+ public:
+ // Add a location for a schema with a target namespace.
+ //
+ void
+ schema_location (const std::string&amp; namespace_,
+ const std::string&amp; location);
+
+ // Add a location for a schema without a target namespace.
+ //
+ void
+ no_namespace_schema_location (const std::string&amp; location);
+ };
+
+ class document
+ {
+ public:
+ document (parser_base&amp; root,
+ const std::string&amp; root_element_name,
+ bool polymorphic = false);
+
+ document (parser_base&amp; root,
+ const std::string&amp; root_element_namespace,
+ const std::string&amp; root_element_name,
+ bool polymorphic = false);
+
+ public:
+ // Parse URI or a local file.
+ //
+ void
+ parse (const std::string&amp; uri,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse URI or a local file with a user-provided error_handler
+ // object.
+ //
+ void
+ parse (const std::string&amp; uri,
+ error_handler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse URI or a local file with a user-provided ErrorHandler
+ // object. Note that you must initialize the Xerces-C++ runtime
+ // before calling this function.
+ //
+ void
+ parse (const std::string&amp; uri,
+ xercesc::ErrorHandler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse URI or a local file using a user-provided SAX2XMLReader
+ // object. Note that you must initialize the Xerces-C++ runtime
+ // before calling this function.
+ //
+ void
+ parse (const std::string&amp; uri,
+ xercesc::SAX2XMLReader&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ public:
+ // Parse std::istream.
+ //
+ void
+ parse (std::istream&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with a user-provided error_handler object.
+ //
+ void
+ parse (std::istream&amp;,
+ error_handler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with a user-provided ErrorHandler object.
+ // Note that you must initialize the Xerces-C++ runtime before
+ // calling this function.
+ //
+ void
+ parse (std::istream&amp;,
+ xercesc::ErrorHandler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream using a user-provided SAX2XMLReader object.
+ // Note that you must initialize the Xerces-C++ runtime before
+ // calling this function.
+ //
+ void
+ parse (std::istream&amp;,
+ xercesc::SAX2XMLReader&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ public:
+ // Parse std::istream with a system id.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with a system id and a user-provided
+ // error_handler object.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ error_handler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with a system id and a user-provided
+ // ErrorHandler object. Note that you must initialize the
+ // Xerces-C++ runtime before calling this function.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ xercesc::ErrorHandler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with a system id using a user-provided
+ // SAX2XMLReader object. Note that you must initialize the
+ // Xerces-C++ runtime before calling this function.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ xercesc::SAX2XMLReader&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ public:
+ // Parse std::istream with system and public ids.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with system and public ids and a user-provided
+ // error_handler object.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id,
+ error_handler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with system and public ids and a user-provided
+ // ErrorHandler object. Note that you must initialize the Xerces-C++
+ // runtime before calling this function.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id,
+ xercesc::ErrorHandler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse std::istream with system and public ids using a user-
+ // provided SAX2XMLReader object. Note that you must initialize
+ // the Xerces-C++ runtime before calling this function.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id,
+ xercesc::SAX2XMLReader&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ public:
+ // Parse InputSource. Note that you must initialize the Xerces-C++
+ // runtime before calling this function.
+ //
+ void
+ parse (const xercesc::InputSource&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse InputSource with a user-provided error_handler object.
+ // Note that you must initialize the Xerces-C++ runtime before
+ // calling this function.
+ //
+ void
+ parse (const xercesc::InputSource&amp;,
+ error_handler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse InputSource with a user-provided ErrorHandler object.
+ // Note that you must initialize the Xerces-C++ runtime before
+ // calling this function.
+ //
+ void
+ parse (const xercesc::InputSource&amp;,
+ xercesc::ErrorHandler&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+
+ // Parse InputSource using a user-provided SAX2XMLReader object.
+ // Note that you must initialize the Xerces-C++ runtime before
+ // calling this function.
+ //
+ void
+ parse (const xercesc::InputSource&amp;,
+ xercesc::SAX2XMLReader&amp;,
+ flags = 0,
+ const properties&amp; = properties ());
+ };
+}
+ </pre>
+
+ <p>The <code>document</code> class is a root parser for
+ the vocabulary. The first argument to its constructors is the
+ parser for the type of the root element. The <code>parser_base</code>
+ class is the base type for all parser skeletons. The second and
+ third arguments to the <code>document</code>'s constructors are
+ the root element's name and namespace. The last argument,
+ <code>polymorphic</code>, specifies whether the XML documents
+ being parsed use polymorphism. For more information on support
+ for XML Schema polymorphism in the C++/Parser mapping refer
+ to <a href="#5.5">Section 5.5, "Support for Polymorphism"</a>.</p>
+
+ <p>The rest of the <code>document</code> interface consists of overloaded
+ <code>parse()</code> functions. The last two arguments in each of these
+ functions are <code>flags</code> and <code>properties</code>. The
+ <code>flags</code> argument allows you to modify the default behavior
+ of the parsing functions. The <code>properties</code> argument allows
+ you to override the schema location attributes specified in XML
+ documents. Note that the schema location paths are relative to an
+ XML document unless they are complete URIs. For example if you want
+ to use a local schema file then you will need to use a URI in the
+ form <code>file:///absolute/path/to/your/schema</code>.</p>
+
+ <p>A number of overloaded <code>parse()</code> functions have the
+ <code>system_id</code> and <code>public_id</code> arguments. The
+ system id is a <em>system</em> identifier of the resources being
+ parsed (for example, URI or a full file path). The public id is a
+ <em>public</em> identifier of the resource (for example, an
+ application-specific name or a relative file path). The system id
+ is used to resolve relative paths (for example, schema paths). In
+ diagnostics messages the public id is used if it is available.
+ Otherwise the system id is used.</p>
+
+ <p>The error handling mechanisms employed by the <code>document</code>
+ parser are described in <a href="#7.3">Section 7.3, "Error
+ Handling"</a>.</p>
+
+ <h2><a name="7.2">7.2 Expat Document Parser</a></h2>
+
+ <p>When Expat is used as the underlying XML parser, the
+ <code>document</code> type has the following interface. Note that
+ if the character type is <code>wchar_t</code>, then the string type
+ in the interface becomes <code>std::wstring</code>
+ (see <a href="#5.2">Section 5.2, "Character Type and Encoding"</a>).</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class parser_base;
+ class error_handler;
+
+ class document
+ {
+ public:
+ document (parser_base&amp;,
+ const std::string&amp; root_element_name,
+ bool polymorphic = false);
+
+ document (parser_base&amp;,
+ const std::string&amp; root_element_namespace,
+ const std::string&amp; root_element_name,
+ bool polymorphic = false);
+
+ public:
+ // Parse a local file. The file is accessed with std::ifstream
+ // in binary mode. The std::ios_base::failure exception is used
+ // to report io errors (badbit and failbit).
+ void
+ parse (const std::string&amp; file);
+
+ // Parse a local file with a user-provided error_handler
+ // object. The file is accessed with std::ifstream in binary
+ // mode. The std::ios_base::failure exception is used to report
+ // io errors (badbit and failbit).
+ //
+ void
+ parse (const std::string&amp; file, error_handler&amp;);
+
+ public:
+ // Parse std::istream.
+ //
+ void
+ parse (std::istream&amp;);
+
+ // Parse std::istream with a user-provided error_handler object.
+ //
+ void
+ parse (std::istream&amp;, error_handler&amp;);
+
+ // Parse std::istream with a system id.
+ //
+ void
+ parse (std::istream&amp;, const std::string&amp; system_id);
+
+ // Parse std::istream with a system id and a user-provided
+ // error_handler object.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ error_handler&amp;);
+
+ // Parse std::istream with system and public ids.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id);
+
+ // Parse std::istream with system and public ids and a user-provided
+ // error_handler object.
+ //
+ void
+ parse (std::istream&amp;,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id,
+ error_handler&amp;);
+
+ public:
+ // Parse a chunk of input. You can call these functions multiple
+ // times with the last call having the last argument true.
+ //
+ void
+ parse (const void* data, std::size_t size, bool last);
+
+ void
+ parse (const void* data, std::size_t size, bool last,
+ error_handler&amp;);
+
+ void
+ parse (const void* data, std::size_t size, bool last,
+ const std::string&amp; system_id);
+
+ void
+ parse (const void* data, std::size_t size, bool last,
+ const std::string&amp; system_id,
+ error_handler&amp;);
+
+ void
+ parse (const void* data, std::size_t size, bool last,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id);
+
+ void
+ parse (const void* data, std::size_t size, bool last,
+ const std::string&amp; system_id,
+ const std::string&amp; public_id,
+ error_handler&amp;);
+
+ public:
+ // Low-level Expat-specific parsing API.
+ //
+ void
+ parse_begin (XML_Parser);
+
+ void
+ parse_begin (XML_Parser, const std::string&amp; public_id);
+
+ void
+ parse_begin (XML_Parser, error_handler&amp;);
+
+ void
+ parse_begin (XML_Parser,
+ const std::string&amp; public_id,
+ error_handler&amp;);
+ void
+ parse_end ();
+ };
+}
+ </pre>
+
+ <p>The <code>document</code> class is a root parser for
+ the vocabulary. The first argument to its constructors is the
+ parser for the type of the root element. The <code>parser_base</code>
+ class is the base type for all parser skeletons. The second and
+ third arguments to the <code>document</code>'s constructors are
+ the root element's name and namespace. The last argument,
+ <code>polymorphic</code>, specifies whether the XML documents
+ being parsed use polymorphism. For more information on support
+ for XML Schema polymorphism in the C++/Parser mapping refer
+ to <a href="#5.5">Section 5.5, "Support for Polymorphism"</a>.</p>
+
+ <p>A number of overloaded <code>parse()</code> functions have the
+ <code>system_id</code> and <code>public_id</code> arguments. The
+ system id is a <em>system</em> identifier of the resources being
+ parsed (for example, URI or a full file path). The public id is a
+ <em>public</em> identifier of the resource (for example, an
+ application-specific name or a relative file path). The system id
+ is used to resolve relative paths. In diagnostics messages the
+ public id is used if it is available. Otherwise the system id
+ is used.</p>
+
+ <p>The <code>parse_begin()</code> and <code>parse_end()</code> functions
+ present a low-level, Expat-specific parsing API for maximum control.
+ A typical use-case would look like this (pseudo-code):</p>
+
+ <pre class="c++">
+xxx_pimpl root_p;
+document doc_p (root_p, "root");
+
+root_p.pre ();
+doc_p.parse_begin (xml_parser, "file.xml");
+
+while (more_data_to_parse)
+{
+ // Call XML_Parse or XML_ParseBuffer.
+
+ if (status == XML_STATUS_ERROR)
+ break;
+}
+
+// Call parse_end even in case of an error to translate
+// XML and Schema errors to exceptions or error_handler
+// calls.
+//
+doc.parse_end ();
+result_type result (root_p.post_xxx ());
+ </pre>
+
+ <p>Note that if your vocabulary uses XML namespaces, the
+ <code>XML_ParserCreateNS()</code> functions should be used to create
+ the XML parser. Space (<code>XML_Char (' ')</code>) should be used
+ as a separator (the second argument to <code>XML_ParserCreateNS()</code>).
+ </p>
+
+ <p>The error handling mechanisms employed by the <code>document</code>
+ parser are described in <a href="#7.3">Section 7.3, "Error
+ Handling"</a>.</p>
+
+
+ <h2><a name="7.3">7.3 Error Handling</a></h2>
+
+ <p>There are three categories of errors that can result from running
+ a parser on an XML document: System, XML, and Application.
+ The System category contains memory allocation and file/stream
+ operation errors. The XML category covers XML parsing and
+ well-formedness checking as well as XML Schema validation errors.
+ Finally, the Application category is for application logic errors
+ that you may want to propagate from parser implementations to the
+ caller of the parser.
+ </p>
+
+ <p>The System errors are mapped to the standard exceptions. The
+ out of memory condition is indicated by throwing an instance
+ of <code>std::bad_alloc</code>. The stream operation errors
+ are reported either by throwing an instance of
+ <code>std::ios_base::failure</code> if exceptions are enabled
+ or by setting the stream state.</p>
+
+ <p>Note that if you are parsing <code>std::istream</code> on
+ which exceptions are not enabled, then you will need to
+ check the stream state before calling the <code>post()</code>
+ callback, as shown in the following example:</p>
+
+ <pre class="c++">
+int
+main (int argc, char* argv[])
+{
+ ...
+
+ std::ifstream ifs (argv[1]);
+
+ if (ifs.fail ())
+ {
+ cerr &lt;&lt; argv[1] &lt;&lt; ": unable to open" &lt;&lt; endl;
+ return 1;
+ }
+
+ root_p.pre ();
+ doc_p.parse (ifs);
+
+ if (ifs.fail ())
+ {
+ cerr &lt;&lt; argv[1] &lt;&lt; ": io failure" &lt;&lt; endl;
+ return 1;
+ }
+
+ result_type result (root_p.post_xxx ());
+}
+ </pre>
+
+ <p>The above example can be rewritten to use exceptions
+ as shown below:</p>
+
+ <pre class="c++">
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ ...
+
+ std::ifstream ifs;
+ ifs.exceptions (std::ifstream::badbit | std::ifstream::failbit);
+ ifs.open (argv[1]);
+
+ root_p.pre ();
+ doc_p.parse (ifs);
+ result_type result (root_p.post_xxx ());
+ }
+ catch (const std::ifstream::failure&amp;)
+ {
+ cerr &lt;&lt; argv[1] &lt;&lt; ": unable to open or io failure" &lt;&lt; endl;
+ return 1;
+ }
+}
+ </pre>
+
+
+ <p>For reporting application errors from parsing callbacks, you
+ can throw any exceptions of your choice. They are propagated to
+ the caller of the parser without any alterations.</p>
+
+ <p>The XML errors can be reported either by throwing the
+ <code>xml_schema::parsing</code> exception or by a callback
+ to the <code>xml_schema::error_handler</code> object (and
+ <code>xercesc::ErrorHandler</code> object in case of Xerces-C++).</p>
+
+ <p>The <code>xml_schema::parsing</code> exception contains
+ a list of warnings and errors that were accumulated during
+ parsing. Note that this exception is thrown only if there
+ was an error. This makes it impossible to obtain warnings
+ from an otherwise successful parsing using this mechanism.
+ The following listing shows the definition of
+ <code>xml_schema::parsing</code> exception. Note that if the
+ character type is <code>wchar_t</code>, then the string type
+ and output stream type in the definition become
+ <code>std::wstring</code> and <code>std::wostream</code>,
+ respectively (see <a href="#5.2">Section 5.2, "Character Type
+ and Encoding"</a>).</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class exception: public std::exception
+ {
+ protected:
+ virtual void
+ print (std::ostream&amp;) const = 0;
+ };
+
+ inline std::ostream&amp;
+ operator&lt;&lt; (std::ostream&amp; os, const exception&amp; e)
+ {
+ e.print (os);
+ return os;
+ }
+
+
+ class severity
+ {
+ public:
+ enum value
+ {
+ warning,
+ error
+ };
+ };
+
+
+ class error
+ {
+ public:
+ error (xml_schema::severity,
+ const std::string&amp; id,
+ unsigned long line,
+ unsigned long column,
+ const std::string&amp; message);
+
+ xml_schema::severity
+ severity () const;
+
+ const std::string&amp;
+ id () const;
+
+ unsigned long
+ line () const;
+
+ unsigned long
+ column () const;
+
+ const std::string&amp;
+ message () const;
+ };
+
+ std::ostream&amp;
+ operator&lt;&lt; (std::ostream&amp;, const error&amp;);
+
+
+ class diagnostics: public std::vector&lt;error>
+ {
+ };
+
+ std::ostream&amp;
+ operator&lt;&lt; (std::ostream&amp;, const diagnostics&amp;);
+
+
+ class parsing: public exception
+ {
+ public:
+ parsing ();
+ parsing (const xml_schema::diagnostics&amp;);
+
+ const xml_schema::diagnostics&amp;
+ diagnostics () const;
+
+ virtual const char*
+ what () const throw ();
+
+ protected:
+ virtual void
+ print (std::ostream&amp;) const;
+ };
+}
+ </pre>
+
+ <p>The following example shows how we can catch and print this
+ exception. The code will print diagnostics messages one per line
+ in case of an error.</p>
+
+ <pre class="c++">
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ // Parse.
+ }
+ catch (const xml_schema::parsing&amp; e)
+ {
+ cerr &lt;&lt; e &lt;&lt; endl;
+ return 1;
+ }
+}
+ </pre>
+
+ <p>With the <code>error_handler</code> approach the diagnostics
+ messages are delivered as parsing progresses. The following
+ listing presents the definition of the <code>error_handler</code>
+ interface. Note that if the character type is <code>wchar_t</code>,
+ then the string type in the interface becomes <code>std::wstring</code>
+ (see <a href="#5.2">Section 5.2, "Character Type and Encoding"</a>).</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class error_handler
+ {
+ public:
+ class severity
+ {
+ public:
+ enum value
+ {
+ warning,
+ error,
+ fatal
+ };
+ };
+
+ virtual bool
+ handle (const std::string&amp; id,
+ unsigned long line,
+ unsigned long column,
+ severity,
+ const std::string&amp; message) = 0;
+ };
+}
+ </pre>
+
+ <p>The return value of the <code>handle()</code> function indicates whether
+ parsing should continue if possible. The error with the fatal severity
+ level terminates the parsing process regardless of the returned value.
+ At the end of the parsing process with an error that was reported via
+ the <code>error_handler</code> object, an empty
+ <code>xml_schema::parsing</code> exception is thrown to indicate
+ the failure to the caller. You can alter this behavior by throwing
+ your own exception from the <code>handle()</code> function.</p>
+
+
+ <!-- Appendix A -->
+
+
+ <h1><a name="A">Appendix A &mdash; Supported XML Schema Constructs</a></h1>
+
+ <p>The C++/Parser mapping supports validation of the following W3C XML
+ Schema constructs in the generated code.</p>
+
+ <!-- border="1" is necessary for html2ps -->
+ <table id="features" border="1">
+ <tr><th>Construct</th><th>Notes</th></tr>
+ <tr><th colspan="2">Structure</th></tr>
+
+ <tr><td>element</td><td></td></tr>
+ <tr><td>attribute</td><td></td></tr>
+
+ <tr><td>any</td><td></td></tr>
+ <tr><td>anyAttribute</td><td></td></tr>
+
+ <tr><td>all</td><td></td></tr>
+ <tr><td>sequence</td><td></td></tr>
+ <tr><td>choice</td><td></td></tr>
+
+ <tr><td>complex type, empty content</td><td></td></tr>
+ <tr><td>complex type, mixed content</td><td></td></tr>
+ <tr><td>complex type, simple content extension</td><td></td></tr>
+ <tr><td>complex type, simple content restriction</td>
+ <td>Simple type facets are not validated.</td></tr>
+ <tr><td>complex type, complex content extension</td><td></td></tr>
+ <tr><td>complex type, complex content restriction</td><td></td></tr>
+
+ <tr><td>list</td><td></td></tr>
+
+ <tr><th colspan="2">Datatypes</th></tr>
+
+ <tr><td>byte</td><td></td></tr>
+ <tr><td>unsignedByte</td><td></td></tr>
+ <tr><td>short</td><td></td></tr>
+ <tr><td>unsignedShort</td><td></td></tr>
+ <tr><td>int</td><td></td></tr>
+ <tr><td>unsignedInt</td><td></td></tr>
+ <tr><td>long</td><td></td></tr>
+ <tr><td>unsignedLong</td><td></td></tr>
+ <tr><td>integer</td><td></td></tr>
+ <tr><td>nonPositiveInteger</td><td></td></tr>
+ <tr><td>nonNegativeInteger</td><td></td></tr>
+ <tr><td>positiveInteger</td><td></td></tr>
+ <tr><td>negativeInteger</td><td></td></tr>
+
+ <tr><td>boolean</td><td></td></tr>
+
+ <tr><td>float</td><td></td></tr>
+ <tr><td>double</td><td></td></tr>
+ <tr><td>decimal</td><td></td></tr>
+
+ <tr><td>string</td><td></td></tr>
+ <tr><td>normalizedString</td><td></td></tr>
+ <tr><td>token</td><td></td></tr>
+ <tr><td>Name</td><td></td></tr>
+ <tr><td>NMTOKEN</td><td></td></tr>
+ <tr><td>NCName</td><td></td></tr>
+ <tr><td>language</td><td></td></tr>
+ <tr><td>anyURI</td><td></td></tr>
+
+ <tr><td>ID</td><td>Identity constraint is not enforced.</td></tr>
+ <tr><td>IDREF</td><td>Identity constraint is not enforced.</td></tr>
+
+ <tr><td>NMTOKENS</td><td></td></tr>
+ <tr><td>IDREFS</td><td>Identity constraint is not enforced.</td></tr>
+
+ <tr><td>QName</td><td></td></tr>
+
+ <tr><td>base64Binary</td><td></td></tr>
+ <tr><td>hexBinary</td><td></td></tr>
+
+ <tr><td>date</td><td></td></tr>
+ <tr><td>dateTime</td><td></td></tr>
+ <tr><td>duration</td><td></td></tr>
+ <tr><td>gDay</td><td></td></tr>
+ <tr><td>gMonth</td><td></td></tr>
+ <tr><td>gMonthDay</td><td></td></tr>
+ <tr><td>gYear</td><td></td></tr>
+ <tr><td>gYearMonth</td><td></td></tr>
+ <tr><td>time</td><td></td></tr>
+ </table>
+
+
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/xsd/doc/cxx/tree/guide/.gitignore b/xsd/doc/cxx/tree/guide/.gitignore
new file mode 100644
index 0000000..17828e9
--- /dev/null
+++ b/xsd/doc/cxx/tree/guide/.gitignore
@@ -0,0 +1,2 @@
+index.xhtml
+guide.html2ps
diff --git a/xsd/doc/cxx/tree/guide/guide.html2ps.in b/xsd/doc/cxx/tree/guide/guide.html2ps.in
new file mode 100644
index 0000000..461ffde
--- /dev/null
+++ b/xsd/doc/cxx/tree/guide/guide.html2ps.in
@@ -0,0 +1,65 @@
+@@html2ps {
+ option {
+ toc: hb;
+ colour: 1;
+ hyphenate: 1;
+ titlepage: 1;
+ }
+
+ datefmt: "%B %Y";
+
+ titlepage {
+ content: "
+<div align=center>
+ <h1><big>C++/Tree Mapping</big></h1>
+ <h1><big>Getting Started Guide</big></h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+</div>
+ <p>Copyright &#169; @copyright@.</p>
+
+ <p>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href='https://www.codesynthesis.com/licenses/fdl-1.2.txt'>GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/index.xhtml'>XHTML</a>,
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-parser-guide.pdf'>PDF</a>, and
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-parser-guide.ps'>PostScript</a>.</p>";
+ }
+
+ toc {
+ indent: 2em;
+ }
+
+ header {
+ odd-right: $H;
+ even-left: $H;
+ }
+
+ footer {
+ odd-left: $D;
+ odd-center: $T;
+ odd-right: $N;
+
+ even-left: $N;
+ even-center: $T;
+ even-right: $D;
+ }
+}
+
+body {
+ font-size: 12pt;
+ text-align: justify;
+}
+
+pre {
+ font-size: 10pt;
+}
diff --git a/xsd/doc/cxx/tree/guide/index.xhtml.in b/xsd/doc/cxx/tree/guide/index.xhtml.in
new file mode 100644
index 0000000..b704e50
--- /dev/null
+++ b/xsd/doc/cxx/tree/guide/index.xhtml.in
@@ -0,0 +1,2738 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<head>
+ <title>C++/Tree Mapping Getting Started Guide</title>
+
+ <meta name="copyright" content="&#169; @copyright@"/>
+ <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,parsing,serialization,validation"/>
+ <meta name="description" content="C++/Tree Mapping Getting Started Guide"/>
+
+ <link rel="stylesheet" type="text/css" href="../../../default.css" />
+
+<style type="text/css">
+ pre {
+ padding : 0 0 0 0em;
+ margin : 0em 0em 0em 0;
+
+ font-size : 102%
+ }
+
+ body {
+ min-width: 48em;
+ }
+
+ h1 {
+ font-weight: bold;
+ font-size: 200%;
+ line-height: 1.2em;
+ }
+
+ h2 {
+ font-weight : bold;
+ font-size : 150%;
+
+ padding-top : 0.8em;
+ }
+
+ h3 {
+ font-size : 140%;
+ padding-top : 0.8em;
+ }
+
+ /* Adjust indentation for three levels. */
+ #container {
+ max-width: 48em;
+ }
+
+ #content {
+ padding: 0 0.1em 0 4em;
+ /*background-color: red;*/
+ }
+
+ #content h1 {
+ margin-left: -2.06em;
+ }
+
+ #content h2 {
+ margin-left: -1.33em;
+ }
+
+ /* Title page */
+
+ #titlepage {
+ padding: 2em 0 1em 0;
+ border-bottom: 1px solid black;
+ }
+
+ #titlepage .title {
+ font-weight: bold;
+ font-size: 200%;
+ text-align: center;
+ }
+
+ #titlepage #first-title {
+ padding: 1em 0 0.4em 0;
+ }
+
+ #titlepage #second-title {
+ padding: 0.4em 0 2em 0;
+ }
+
+ /* Lists */
+ ul.list li {
+ padding-top : 0.3em;
+ padding-bottom : 0.3em;
+ }
+
+ div.img {
+ text-align: center;
+ padding: 2em 0 2em 0;
+ }
+
+ /* */
+ dl dt {
+ padding : 0.8em 0 0 0;
+ }
+
+ /* Built-in table */
+ #builtin {
+ margin: 2em 0 2em 0;
+
+ border-collapse : collapse;
+ border : 1px solid;
+ border-color : #000000;
+
+ font-size : 11px;
+ line-height : 14px;
+ }
+
+ #builtin th, #builtin td {
+ border: 1px solid;
+ padding : 0.9em 0.9em 0.7em 0.9em;
+ }
+
+ #builtin th {
+ background : #cde8f6;
+ }
+
+ #builtin td {
+ text-align: left;
+ }
+
+ /* TOC */
+ table.toc {
+ border-style : none;
+ border-collapse : separate;
+ border-spacing : 0;
+
+ margin : 0.2em 0 0.2em 0;
+ padding : 0 0 0 0;
+ }
+
+ table.toc tr {
+ padding : 0 0 0 0;
+ margin : 0 0 0 0;
+ }
+
+ table.toc * td, table.toc * th {
+ border-style : none;
+ margin : 0 0 0 0;
+ vertical-align : top;
+ }
+
+ table.toc * th {
+ font-weight : normal;
+ padding : 0em 0.1em 0em 0;
+ text-align : left;
+ white-space : nowrap;
+ }
+
+ table.toc * table.toc th {
+ padding-left : 1em;
+ }
+
+ table.toc * td {
+ padding : 0em 0 0em 0.7em;
+ text-align : left;
+ }
+</style>
+
+
+</head>
+
+<body>
+<div id="container">
+ <div id="content">
+
+ <div class="noprint">
+
+ <div id="titlepage">
+ <div class="title" id="first-title">C++/Tree Mapping</div>
+ <div class="title" id="second-title">Getting Started Guide</div>
+
+ <p>Copyright &#169; @copyright@.</p>
+
+ <p>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/index.xhtml">XHTML</a>,
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-tree-guide.pdf">PDF</a>, and
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/cxx-tree-guide.ps">PostScript</a>.</p>
+
+ </div>
+
+ <h1>Table of Contents</h1>
+
+ <table class="toc">
+ <tr>
+ <th></th><td><a href="#0">Preface</a>
+ <table class="toc">
+ <tr><th></th><td><a href="#0.1">About This Document</a></td></tr>
+ <tr><th></th><td><a href="#0.2">More Information</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>1</th><td><a href="#1">Introduction</a>
+ <table class="toc">
+ <tr><th>1.1</th><td><a href="#1.1">Mapping Overview</a></td></tr>
+ <tr><th>1.2</th><td><a href="#1.2">Benefits</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>2</th><td><a href="#2">Hello World Example</a>
+ <table class="toc">
+ <tr><th>2.1</th><td><a href="#2.1">Writing XML Document and Schema</a></td></tr>
+ <tr><th>2.2</th><td><a href="#2.2">Translating Schema to C++</a></td></tr>
+ <tr><th>2.3</th><td><a href="#2.3">Implementing Application Logic</a></td></tr>
+ <tr><th>2.4</th><td><a href="#2.4">Compiling and Running</a></td></tr>
+ <tr><th>2.5</th><td><a href="#2.5">Adding Serialization</a></td></tr>
+ <tr><th>2.6</th><td><a href="#2.6">Selecting Naming Convention</a></td></tr>
+ <tr><th>2.7</th><td><a href="#2.7">Generating Documentation</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>3</th><td><a href="#3">Overall Mapping Configuration</a>
+ <table class="toc">
+ <tr><th>3.1</th><td><a href="#3.1">C++ Standard</a></td></tr>
+ <tr><th>3.2</th><td><a href="#3.2">Character Type and Encoding</a></td></tr>
+ <tr><th>3.3</th><td><a href="#3.3">Support for Polymorphism </a></td></tr>
+ <tr><th>3.4</th><td><a href="#3.4">Namespace Mapping</a></td></tr>
+ <tr><th>3.5</th><td><a href="#3.5">Thread Safety</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>4</th><td><a href="#4">Working with Object Models</a>
+ <table class="toc">
+ <tr><th>4.1</th><td><a href="#4.1">Attribute and Element Cardinalities</a></td></tr>
+ <tr><th>4.2</th><td><a href="#4.2">Accessing the Object Model</a></td></tr>
+ <tr><th>4.3</th><td><a href="#4.3">Modifying the Object Model</a></td></tr>
+ <tr><th>4.4</th><td><a href="#4.4">Creating the Object Model from Scratch</a></td></tr>
+ <tr><th>4.5</th><td><a href="#4.5">Mapping for the Built-in XML Schema Types</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>5</th><td><a href="#5">Parsing</a>
+ <table class="toc">
+ <tr><th>5.1</th><td><a href="#5.1">XML Schema Validation and Searching</a></td></tr>
+ <tr><th>5.2</th><td><a href="#5.2">Error Handling</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>6</th><td><a href="#6">Serialization</a>
+ <table class="toc">
+ <tr><th>6.1</th><td><a href="#6.1">Namespace and Schema Information</a></td></tr>
+ <tr><th>6.2</th><td><a href="#6.2">Error Handling</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ </table>
+ </div>
+
+ <h1><a name="0">Preface</a></h1>
+
+ <h2><a name="0.1">About This Document</a></h2>
+
+ <p>The goal of this document is to provide you with an understanding of
+ the C++/Tree programming model and allow you to efficiently evaluate
+ XSD against your project's technical requirements. As such, this
+ document is intended for C++ developers and software architects
+ who are looking for an XML processing solution. For a more in-depth
+ description of the C++/Tree mapping refer to the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/">C++/Tree
+ Mapping User Manual</a>.</p>
+
+ <p>Prior experience with XML and C++ is required to understand this
+ document. Basic understanding of XML Schema is advantageous but
+ not expected or required.
+ </p>
+
+
+ <h2><a name="0.2">More Information</a></h2>
+
+ <p>Beyond this guide, you may also find the following sources of
+ information useful:</p>
+
+ <ul class="list">
+ <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/">C++/Tree
+ Mapping User Manual</a></li>
+
+ <li><a href="http://wiki.codesynthesis.com/Tree/Customization_guide">C++/Tree
+ Mapping Customization Guide</a></li>
+
+ <li><a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree
+ Mapping Frequently Asked Questions (FAQ)</a></li>
+
+ <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a></li>
+
+ <li>The <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ contains a collection of examples and a README file with an overview
+ of each example.</li>
+
+ <li>The <code>README</code> file in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ explains how to build the examples.</li>
+
+ <li>The <a href="https://www.codesynthesis.com/mailman/listinfo/xsd-users">xsd-users</a>
+ mailing list is the place to ask technical questions about XSD and the C++/Parser mapping.
+ Furthermore, the <a href="https://www.codesynthesis.com/pipermail/xsd-users/">archives</a>
+ may already have answers to some of your questions.</li>
+ </ul>
+
+ <!-- Introduction -->
+
+ <h1><a name="1">1 Introduction</a></h1>
+
+ <p>Welcome to CodeSynthesis XSD and the C++/Tree mapping. XSD is a
+ cross-platform W3C XML Schema to C++ data binding compiler. C++/Tree
+ is a W3C XML Schema to C++ mapping that represents the data stored
+ in XML as a statically-typed, vocabulary-specific object model.
+ </p>
+
+ <h2><a name="1.1">1.1 Mapping Overview</a></h2>
+
+ <p>Based on a formal description of an XML vocabulary (schema), the
+ C++/Tree mapping produces a tree-like data structure suitable for
+ in-memory processing. The core of the mapping consists of C++
+ classes that constitute the object model and are derived from
+ types defined in XML Schema as well as XML parsing and
+ serialization code.</p>
+
+ <p>Besides the core features, C++/Tree provide a number of additional
+ mapping elements that can be useful in some applications. These
+ include serialization and extraction to/from formats others than
+ XML, such as unstructured text (useful for debugging) and binary
+ representations such as XDR and CDR for high-speed data processing
+ as well as automatic documentation generation. The C++/Tree mapping
+ also provides a wide range of mechanisms for controlling and
+ customizing the generated code.</p>
+
+ <p>A typical application that uses C++/Tree for XML processing usually
+ performs the following three steps: it first reads (parses) an XML
+ document to an in-memory object model, it then performs some useful
+ computations on that object model which may involve modification
+ of the model, and finally it may write (serialize) the modified
+ object model back to XML.</p>
+
+ <p>The next chapter presents a simple application that performs these
+ three steps. The following chapters show how to use the C++/Tree
+ mapping in more detail.</p>
+
+ <h2><a name="1.2">1.2 Benefits</a></h2>
+
+ <p>Traditional XML access APIs such as Document Object Model (DOM)
+ or Simple API for XML (SAX) have a number of drawbacks that
+ make them less suitable for creating robust and maintainable
+ XML processing applications. These drawbacks include:
+ </p>
+
+ <ul class="list">
+ <li>Generic representation of XML in terms of elements, attributes,
+ and text forces an application developer to write a substantial
+ amount of bridging code that identifies and transforms pieces
+ of information encoded in XML to a representation more suitable
+ for consumption by the application logic.</li>
+
+ <li>String-based flow control defers error detection to runtime.
+ It also reduces code readability and maintainability.</li>
+
+ <li>Lack of type safety because the data is represented as text.</li>
+
+ <li>Resulting applications are hard to debug, change, and
+ maintain.</li>
+ </ul>
+
+ <p>In contrast, statically-typed, vocabulary-specific object model
+ produced by the C++/Tree mapping allows you to operate in your
+ domain terms instead of the generic elements, attributes, and
+ text. Static typing helps catch errors at compile-time rather
+ than at run-time. Automatic code generation frees you for more
+ interesting tasks (such as doing something useful with the
+ information stored in the XML documents) and minimizes the
+ effort needed to adapt your applications to changes in the
+ document structure. To summarize, the C++/Tree object model has
+ the following key advantages over generic XML access APIs:</p>
+
+ <ul class="list">
+ <li><b>Ease of use.</b> The generated code hides all the complexity
+ associated with parsing and serializing XML. This includes navigating
+ the structure and converting between the text representation and
+ data types suitable for manipulation by the application
+ logic.</li>
+
+ <li><b>Natural representation.</b> The object representation allows
+ you to access the XML data using your domain vocabulary instead
+ of generic elements, attributes, and text.</li>
+
+ <li><b>Concise code.</b> With the object representation the
+ application implementation is simpler and thus easier
+ to read and understand.</li>
+
+ <li><b>Safety.</b> The generated object model is statically
+ typed and uses functions instead of strings to access the
+ information. This helps catch programming errors at compile-time
+ rather than at runtime.</li>
+
+ <li><b>Maintainability.</b> Automatic code generation minimizes the
+ effort needed to adapt the application to changes in the
+ document structure. With static typing, the C++ compiler
+ can pin-point the places in the client code that need to be
+ changed.</li>
+
+ <li><b>Compatibility.</b> Sequences of elements are represented in
+ the object model as containers conforming to the standard C++
+ sequence requirements. This makes it possible to use standard
+ C++ algorithms on the object representation and frees you from
+ learning yet another container interface, as is the case with
+ DOM.</li>
+
+ <li><b>Efficiency.</b> If the application makes repetitive use
+ of the data extracted from XML, then the C++/Tree object model
+ is more efficient because the navigation is performed using
+ function calls rather than string comparisons and the XML
+ data is extracted only once. Furthermore, the runtime memory
+ usage is reduced due to more efficient data storage
+ (for instance, storing numeric data as integers instead of
+ strings) as well as the static knowledge of cardinality
+ constraints.</li>
+ </ul>
+
+
+ <!-- Hello World Parser -->
+
+
+ <h1><a name="2">2 Hello World Example</a></h1>
+
+ <p>In this chapter we will examine how to parse, access, modify, and
+ serialize a very simple XML document using the XSD-generated
+ C++/Tree object model. The code presented in this chapter is
+ based on the <code>hello</code> example which can be found in
+ the <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package.</p>
+
+ <h2><a name="2.1">2.1 Writing XML Document and Schema</a></h2>
+
+ <p>First, we need to get an idea about the structure
+ of the XML documents we are going to process. Our
+ <code>hello.xml</code>, for example, could look like this:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;hello>
+
+ &lt;greeting>Hello&lt;/greeting>
+
+ &lt;name>sun&lt;/name>
+ &lt;name>moon&lt;/name>
+ &lt;name>world&lt;/name>
+
+&lt;/hello>
+ </pre>
+
+ <p>Then we can write a description of the above XML in the
+ XML Schema language and save it into <code>hello.xsd</code>:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:complexType name="hello_t">
+ &lt;xs:sequence>
+ &lt;xs:element name="greeting" type="xs:string"/>
+ &lt;xs:element name="name" type="xs:string" maxOccurs="unbounded"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="hello" type="hello_t"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>Even if you are not familiar with XML Schema, it
+ should be easy to connect declarations in <code>hello.xsd</code>
+ to elements in <code>hello.xml</code>. The <code>hello_t</code> type
+ is defined as a sequence of the nested <code>greeting</code> and
+ <code>name</code> elements. Note that the term sequence in XML
+ Schema means that elements should appear in a particular order
+ as opposed to appearing multiple times. The <code>name</code>
+ element has its <code>maxOccurs</code> property set to
+ <code>unbounded</code> which means it can appear multiple times
+ in an XML document. Finally, the globally-defined <code>hello</code>
+ element prescribes the root element for our vocabulary. For an
+ easily-approachable introduction to XML Schema refer to
+ <a href="http://www.w3.org/TR/xmlschema-0/">XML Schema Part 0:
+ Primer</a>.</p>
+
+ <p>The above schema is a specification of our XML vocabulary; it tells
+ everybody what valid documents of our XML-based language should look
+ like. We can also update our <code>hello.xml</code> to include the
+ information about the schema so that XML parsers can validate
+ our document:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ &lt;greeting>Hello&lt;/greeting>
+
+ &lt;name>sun&lt;/name>
+ &lt;name>moon&lt;/name>
+ &lt;name>world&lt;/name>
+
+&lt;/hello>
+ </pre>
+
+
+ <p>The next step is to compile the schema to generate the object
+ model and parsing functions.</p>
+
+ <h2><a name="2.2">2.2 Translating Schema to C++</a></h2>
+
+ <p>Now we are ready to translate our <code>hello.xsd</code> to C++.
+ To do this we invoke the XSD compiler from a terminal (UNIX) or
+ a command prompt (Windows):
+ </p>
+
+ <pre class="terminal">
+$ xsd cxx-tree --std c++11 hello.xsd
+ </pre>
+
+ <p>The XSD compiler produces two C++ files: <code>hello.hxx</code> and
+ <code>hello.cxx</code>. The following code fragment is taken from
+ <code>hello.hxx</code>; it should give you an idea about what gets
+ generated:
+ </p>
+
+ <pre class="c++">
+class hello_t
+{
+public:
+ // greeting
+ //
+ typedef xml_schema::string greeting_type;
+
+ const greeting_type&amp;
+ greeting () const;
+
+ greeting_type&amp;
+ greeting ();
+
+ void
+ greeting (const greeting_type&amp; x);
+
+ // name
+ //
+ typedef xml_schema::string name_type;
+ typedef xsd::sequence&lt;name_type> name_sequence;
+ typedef name_sequence::iterator name_iterator;
+ typedef name_sequence::const_iterator name_const_iterator;
+
+ const name_sequence&amp;
+ name () const;
+
+ name_sequence&amp;
+ name ();
+
+ void
+ name (const name_sequence&amp; s);
+
+ // Constructor.
+ //
+ hello_t (const greeting_type&amp;);
+
+ ...
+
+};
+
+std::unique_ptr&lt;hello_t>
+hello (const std::string&amp; uri);
+
+std::unique_ptr&lt;hello_t>
+hello (std::istream&amp;);
+ </pre>
+
+ <p>The <code>hello_t</code> C++ class corresponds to the
+ <code>hello_t</code> XML Schema type. For each element
+ in this type a set of C++ type definitions as well as
+ accessor and modifier functions are generated inside the
+ <code>hello_t</code> class. Note that the type definitions
+ and member functions for the <code>greeting</code> and
+ <code>name</code> elements are different because of the
+ cardinality differences between these two elements
+ (<code>greeting</code> is a required single element and
+ <code>name</code> is a sequence of elements).</p>
+
+ <p>The <code>xml_schema::string</code> type used in the type
+ definitions is a C++ class provided by the XSD runtime
+ that corresponds to built-in XML Schema type
+ <code>string</code>. The <code>xml_schema::string</code>
+ is based on <code>std::string</code> and can be used as
+ such. Similarly, the <code>sequence</code> class template
+ that is used in the <code>name_sequence</code> type
+ definition is based on and has the same interface as
+ <code>std::vector</code>. The mapping between the built-in
+ XML Schema types and C++ types is described in more detail in
+ <a href="#4.5">Section 4.5, "Mapping for the Built-in XML Schema
+ Types"</a>. The <code>hello_t</code> class also includes a
+ constructor with an initializer for the required
+ <code>greeting</code> element as its argument.</p>
+
+ <p>The <code>hello</code> overloaded global functions correspond
+ to the <code>hello</code> global element in XML Schema. A
+ global element in XML Schema is a valid document root.
+ By default XSD generated a set of parsing functions for each
+ global element defined in XML Schema (this can be overridden
+ with the <code>--root-element-*</code> options). Parsing
+ functions return a dynamically allocated object model as an
+ automatic pointer. The actual pointer used depends on the
+ C++ standard selected. For C++11 it is <code>std::unique_ptr</code>
+ as shown above. For C++98 it is <code>std::auto_ptr</code>.
+ For example, if we modify our XSD compiler invocation to
+ select C++98:</p>
+
+ <pre class="terminal">
+$ xsd cxx-tree hello.xsd
+ </pre>
+
+ <p>Then the parsing function signatures will become:</p>
+
+ <pre class="c++">
+std::auto_ptr&lt;hello_t>
+hello (const std::string&amp; uri);
+
+std::auto_ptr&lt;hello_t>
+hello (std::istream&amp;);
+ </pre>
+
+ <p>For more information on parsing functions see <a href="#5">Chapter 5,
+ "Parsing"</a>.</p>
+
+ <h2><a name="2.3">2.3 Implementing Application Logic</a></h2>
+
+ <p>At this point we have all the parts we need to do something useful
+ with the information stored in our XML document:
+ </p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include "hello.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ unique_ptr&lt;hello_t> h (hello (argv[1]));
+
+ for (hello_t::name_const_iterator i (h->name ().begin ());
+ i != h->name ().end ();
+ ++i)
+ {
+ cerr &lt;&lt; h->greeting () &lt;&lt; ", " &lt;&lt; *i &lt;&lt; "!" &lt;&lt; endl;
+ }
+ }
+ catch (const xml_schema::exception&amp; e)
+ {
+ cerr &lt;&lt; e &lt;&lt; endl;
+ return 1;
+ }
+}
+ </pre>
+
+ <p>The first part of our application calls one of the parsing
+ functions to parser an XML file specified in the command line.
+ We then use the returned object model to iterate over names
+ and print a greeting line for each of them. Finally, we
+ catch and print the <code>xml_schema::exception</code>
+ exception in case something goes wrong. This exception
+ is the root of the exception hierarchy used by the
+ XSD-generated code.
+ </p>
+
+
+ <h2><a name="2.4">2.4 Compiling and Running</a></h2>
+
+ <p>After saving our application from the previous section in
+ <code>driver.cxx</code>, we are ready to compile our first
+ program and run it on the test XML document. On a UNIX
+ system this can be done with the following commands:
+ </p>
+
+ <pre class="terminal">
+$ c++ -std=c++11 -I.../libxsd -c driver.cxx hello.cxx
+$ c++ -std=c++11 -o driver driver.o hello.o -lxerces-c
+$ ./driver hello.xml
+Hello, sun!
+Hello, moon!
+Hello, world!
+ </pre>
+
+ <p>Here <code>.../libxsd</code> represents the path to the
+ <a href="https://cppget.org/libxsd">libxsd</a> package root
+ directory. Note also that we are required to link our
+ application with the Xerces-C++ library because the generated
+ code uses it as the underlying XML parser.</p>
+
+ <h2><a name="2.5">2.5 Adding Serialization</a></h2>
+
+ <p>While parsing and accessing the XML data may be everything
+ you need, there are applications that require creating new
+ or modifying existing XML documents. By default XSD does
+ not produce serialization code. We will need to request
+ it with the <code>--generate-serialization</code> options:</p>
+
+ <pre class="terminal">
+$ xsd cxx-tree --std c++11 --generate-serialization hello.xsd
+ </pre>
+
+ <p>If we now examine the generated <code>hello.hxx</code> file,
+ we will find a set of overloaded serialization functions,
+ including the following version:</p>
+
+ <pre class="c++">
+void
+hello (std::ostream&amp;,
+ const hello_t&amp;,
+ const xml_schema::namespace_infomap&amp; =
+ xml_schema::namespace_infomap ());
+
+ </pre>
+
+ <p>Just like with parsing functions, XSD generates serialization
+ functions for each global element unless instructed otherwise
+ with one of the <code>--root-element-*</code> options. For more
+ information on serialization functions see <a href="#6">Chapter 6,
+ "Serialization"</a>.</p>
+
+ <p>We first examine an application that modifies an existing
+ object model and serializes it back to XML:</p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include "hello.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ unique_ptr&lt;hello_t> h (hello (argv[1]));
+
+ // Change the greeting phrase.
+ //
+ h->greeting ("Hi");
+
+ // Add another entry to the name sequence.
+ //
+ h->name ().push_back ("mars");
+
+ // Serialize the modified object model to XML.
+ //
+ xml_schema::namespace_infomap map;
+ map[""].name = "";
+ map[""].schema = "hello.xsd";
+
+ hello (cout, *h, map);
+ }
+ catch (const xml_schema::exception&amp; e)
+ {
+ cerr &lt;&lt; e &lt;&lt; endl;
+ return 1;
+ }
+}
+ </pre>
+
+ <p>First, our application parses an XML document and obtains its
+ object model as in the previous example. Then it changes the
+ greeting string and adds another entry to the list of names.
+ Finally, it serializes the object model back to XML by calling
+ the serialization function.</p>
+
+ <p>The first argument we pass to the serialization function is
+ <code>cout</code> which results in the XML being written to
+ the standard output for us to inspect. We could have also
+ written the result to a file or memory buffer by creating an
+ instance of <code>std::ofstream</code> or <code>std::ostringstream</code>
+ and passing it instead of <code>cout</code>. The second argument is the
+ object model we want to serialize. The final argument is an optional
+ namespace information map for our vocabulary. It captures information
+ such as namespaces, namespace prefixes to which they should be mapped,
+ and schemas associated with these namespaces. If we don't provide
+ this argument then generic namespace prefixes (<code>p1</code>,
+ <code>p2</code>, etc.) will be automatically assigned to XML namespaces
+ and no schema information will be added to the resulting document
+ (see <a href="#6">Chapter 6, "Serialization"</a> for details).
+ In our case, the prefix (map key) and namespace name are empty
+ because our vocabulary does not use XML namespaces.</p>
+
+ <p>If we now compile and run this application we will see the
+ output as shown in the following listing:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ &lt;greeting>Hi&lt;/greeting>
+
+ &lt;name>sun&lt;/name>
+ &lt;name>moon&lt;/name>
+ &lt;name>world&lt;/name>
+ &lt;name>mars&lt;/name>
+
+&lt;/hello>
+ </pre>
+
+ <p>We can also create and serialize an object model from scratch
+ as shown in the following example:</p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include &lt;fstream>
+#include "hello.hxx"
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ try
+ {
+ hello_t h ("Hi");
+
+ hello_t::name_sequence&amp; ns (h.name ());
+
+ ns.push_back ("Jane");
+ ns.push_back ("John");
+
+ // Serialize the object model to XML.
+ //
+ xml_schema::namespace_infomap map;
+ map[""].name = "";
+ map[""].schema = "hello.xsd";
+
+ std::ofstream ofs (argv[1]);
+ hello (ofs, h, map);
+ }
+ catch (const xml_schema::exception&amp; e)
+ {
+ cerr &lt;&lt; e &lt;&lt; endl;
+ return 1;
+ }
+}
+ </pre>
+
+ <p>In this example we used the generated constructor to create
+ an instance of type <code>hello_t</code>. To reduce typing,
+ we obtained a reference to the name sequence which we then
+ used to add a few names. The serialization part is identical
+ to the previous example except this time we are writing to
+ a file. If we compile and run this program, it produces the
+ following XML file:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;hello xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="hello.xsd">
+
+ &lt;greeting>Hi&lt;/greeting>
+
+ &lt;name>Jane&lt;/name>
+ &lt;name>John&lt;/name>
+
+&lt;/hello>
+ </pre>
+
+ <h2><a name="2.6">2.6 Selecting Naming Convention</a></h2>
+
+ <p>By default XSD uses the so-called K&amp;R (Kernighan and Ritchie)
+ identifier naming convention in the generated code. In this
+ convention both type and function names are in lower case and
+ words are separated by underscores. If your application code or
+ schemas use a different notation, you may want to change the
+ naming convention used in the generated code for consistency.
+ XSD supports a set of widely-used naming conventions
+ that you can select with the <code>--type-naming</code> and
+ <code>--function-naming</code> options. You can also further
+ refine one of the predefined conventions or create a completely
+ custom naming scheme by using the <code>--*-regex</code> options.</p>
+
+ <p>As an example, let's assume that our "Hello World" application
+ uses the so-called upper-camel-case naming convention for types
+ (that is, each word in a type name is capitalized) and the K&amp;R
+ convention for function names. Since K&amp;R is the default
+ convention for both type and function names, we only need to
+ change the type naming scheme:</p>
+
+ <pre class="terminal">
+$ xsd cxx-tree --std c++11 --type-naming ucc hello.xsd
+ </pre>
+
+ <p>The <code>ucc</code> argument to the <code>--type-naming</code>
+ options stands for upper-camel-case. If we now examine the
+ generated <code>hello.hxx</code>, we will see the following
+ changes compared to the declarations shown in the previous
+ sections:</p>
+
+ <pre class="c++">
+class Hello_t
+{
+public:
+ // greeting
+ //
+ typedef xml_schema::String GreetingType;
+
+ const GreetingType&amp;
+ greeting () const;
+
+ GreetingType&amp;
+ greeting ();
+
+ void
+ greeting (const GreetingType&amp; x);
+
+ // name
+ //
+ typedef xml_schema::String NameType;
+ typedef xsd::sequence&lt;NameType> NameSequence;
+ typedef NameSequence::iterator NameIterator;
+ typedef NameSequence::const_iterator NameConstIterator;
+
+ const NameSequence&amp;
+ name () const;
+
+ NameSequence&amp;
+ name ();
+
+ void
+ name (const NameSequence&amp; s);
+
+ // Constructor.
+ //
+ Hello_t (const GreetingType&amp;);
+
+ ...
+
+};
+
+std::unique_ptr&lt;Hello_t>
+hello (const std::string&amp; uri);
+
+std::unique_ptr&lt;Hello_t>
+hello (std::istream&amp;);
+ </pre>
+
+ <p>Notice that the type names in the <code>xml_schema</code> namespace,
+ for example <code>xml_schema::String</code>, now also use the
+ upper-camel-case naming convention. The only thing that we may
+ be unhappy about in the above code is the <code>_t</code>
+ suffix in <code>Hello_t</code>. If we are not in a position
+ to change the schema, we can <em>touch-up</em> the <code>ucc</code>
+ convention with a custom translation rule using the
+ <code>--type-regex</code> option:</p>
+
+ <pre class="terminal">
+$ xsd cxx-tree --std c++11 --type-naming ucc \
+ --type-regex '/ (.+)_t/\u$1/' hello.xsd
+ </pre>
+
+ <p>This results in the following changes to the generated code:</p>
+
+ <pre class="c++">
+class Hello
+{
+public:
+ // greeting
+ //
+ typedef xml_schema::String GreetingType;
+
+ const GreetingType&amp;
+ greeting () const;
+
+ GreetingType&amp;
+ greeting ();
+
+ void
+ greeting (const GreetingType&amp; x);
+
+ // name
+ //
+ typedef xml_schema::String NameType;
+ typedef xsd::sequence&lt;NameType> NameSequence;
+ typedef NameSequence::iterator NameIterator;
+ typedef NameSequence::const_iterator NameConstIterator;
+
+ const NameSequence&amp;
+ name () const;
+
+ NameSequence&amp;
+ name ();
+
+ void
+ name (const NameSequence&amp; s);
+
+ // Constructor.
+ //
+ Hello (const GreetingType&amp;);
+
+ ...
+
+};
+
+std::unique_ptr&lt;Hello>
+hello (const std::string&amp; uri);
+
+std::unique_ptr&lt;Hello>
+hello (std::istream&amp;);
+ </pre>
+
+ <p>For more detailed information on the <code>--type-naming</code>,
+ <code>--function-naming</code>, <code>--type-regex</code>, and
+ other <code>--*-regex</code> options refer to the NAMING
+ CONVENTION section in the <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a>.</p>
+
+ <h2><a name="2.7">2.7 Generating Documentation</a></h2>
+
+ <p>While our object model is quite simple, real-world vocabularies
+ can be quite complex with hundreds of types, elements, and
+ attributes. For such vocabularies figuring out which types
+ provide which member functions by studying the generated
+ source code or schemas can be a daunting task. To provide
+ application developers with a more accessible way of
+ understanding the generated object models, the XSD compiler
+ can be instructed to produce source code with documentation
+ comments in the Doxygen format. Then the source code can be
+ processed with the <a href="http://www.doxygen.org">Doxygen</a>
+ documentation system to extract this information and produce
+ documentation in various formats.
+ </p>
+
+ <p>In this section we will see how to generate documentation
+ for our "Hello World" vocabulary. To showcase the full power
+ of the XSD documentation facilities, we will first document
+ our schema. The XSD compiler will then transfer
+ this information from the schema to the generated code and
+ then to the object model documentation. Note that the
+ documentation in the schema is not required for XSD to
+ generate useful documentation. Below you will find
+ our <code>hello.xsd</code> with added documentation:</p>
+
+ <pre class="xml">
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:complexType name="hello_t">
+
+ &lt;xs:annotation>
+ &lt;xs:documentation>
+ The hello_t type consists of a greeting phrase and a
+ collection of names to which this greeting applies.
+ &lt;/xs:documentation>
+ &lt;/xs:annotation>
+
+ &lt;xs:sequence>
+
+ &lt;xs:element name="greeting" type="xs:string">
+ &lt;xs:annotation>
+ &lt;xs:documentation>
+ The greeting element contains the greeting phrase
+ for this hello object.
+ &lt;/xs:documentation>
+ &lt;/xs:annotation>
+ &lt;/xs:element>
+
+ &lt;xs:element name="name" type="xs:string" maxOccurs="unbounded">
+ &lt;xs:annotation>
+ &lt;xs:documentation>
+ The name elements contains names to be greeted.
+ &lt;/xs:documentation>
+ &lt;/xs:annotation>
+ &lt;/xs:element>
+
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="hello" type="hello_t">
+ &lt;xs:annotation>
+ &lt;xs:documentation>
+ The hello element is a root of the Hello XML vocabulary.
+ Every conforming document should start with this element.
+ &lt;/xs:documentation>
+ &lt;/xs:annotation>
+ &lt;/xs:element>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>The first step in obtaining the documentation is to recompile
+ our schema with the <code>--generate-doxygen</code> option:</p>
+
+ <pre class="terminal">
+$ xsd cxx-tree --std c++11 --generate-serialization --generate-doxygen \
+ hello.xsd
+ </pre>
+
+ <p>Now the generated <code>hello.hxx</code> file contains comments
+ in the Doxygen format. The next step is to process this file
+ with the Doxygen documentation system. If your project does
+ not use Doxygen then you first need to create a configuration
+ file for your project:</p>
+
+ <pre class="terminal">
+$ doxygen -g hello.doxygen
+ </pre>
+
+ <p>You only need to perform this step once. Now we can generate
+ the documentation by executing the following command in the
+ directory with the generated source code:</p>
+
+ <pre class="terminal">
+$ doxygen hello.doxygen
+ </pre>
+
+ <p>While the generated documentation can be useful as is, we can
+ go one step further and link (using the Doxygen tags mechanism)
+ the documentation for our object model with the documentation
+ for the XSD runtime library which defines C++ classes for the
+ built-in XML Schema types. This way we can seamlessly browse
+ between documentation for the <code>hello_t</code> class which
+ is generated by the XSD compiler and the <code>xml_schema::string</code>
+ class which is defined in the XSD runtime library. The Doxygen
+ configuration file for the XSD runtime is provided with the XSD
+ distribution.</p>
+
+ <p>You can view the result of the steps described in this section
+ on the <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/hello/html/annotated.html">Hello
+ Example Documentation</a> page.</p>
+
+ <!-- Chapater 3 -->
+
+
+ <h1><a name="3">3 Overall Mapping Configuration</a></h1>
+
+ <p>The C++/Tree mapping has a number of configuration parameters that
+ determine the overall properties and behavior of the generated code.
+ Configuration parameters are specified with the XSD command line
+ options. This chapter describes configuration aspects that are most
+ commonly encountered by application developers. These include: the
+ C++ standard, the character type that is used by the generated code,
+ handling of vocabularies that use XML Schema polymorphism, XML Schema
+ to C++ namespace mapping, and thread safety. For more ways to configure
+ the generated code refer to the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a>.
+ </p>
+
+ <h2><a name="3.1">3.1 C++ Standard</a></h2>
+
+ <p>The C++/Tree mapping provides support for ISO/IEC C++ 2011 (C++11)
+ and ISO/IEC C++ 1998/2003 (C++98). To select the C++ standard for the
+ generated code we use the <code>--std</code> XSD compiler command
+ line option. While the majority of the examples in this guide use
+ C++11, the document explains the C++11/98 usage difference and so
+ they can easily be converted to C++98.</p>
+
+ <h2><a name="3.2">3.2 Character Type and Encoding</a></h2>
+
+ <p>The C++/Tree mapping has built-in support for two character types:
+ <code>char</code> and <code>wchar_t</code>. You can select the
+ character type with the <code>--char-type</code> command line
+ option. The default character type is <code>char</code>. The
+ character type affects all string and string-based types that
+ are used in the mapping. These include the string-based built-in
+ XML Schema types, exception types, stream types, etc.</p>
+
+ <p>Another aspect of the mapping that depends on the character type
+ is character encoding. For the <code>char</code> character type
+ the default encoding is UTF-8. Other supported encodings are
+ ISO-8859-1, Xerces-C++ Local Code Page (LPC), as well as
+ custom encodings. You can select which encoding should be used
+ in the object model with the <code>--char-encoding</code> command
+ line option.</p>
+
+ <p>For the <code>wchar_t</code> character type the encoding is
+ automatically selected between UTF-16 and UTF-32/UCS-4 depending
+ on the size of the <code>wchar_t</code> type. On some platforms
+ (for example, Windows with Visual C++ and AIX with IBM XL C++)
+ <code>wchar_t</code> is 2 bytes long. For these platforms the
+ encoding is UTF-16. On other platforms <code>wchar_t</code> is 4 bytes
+ long and UTF-32/UCS-4 is used.</p>
+
+ <p>Note also that the character encoding that is used in the object model
+ is independent of the encodings used in input and output XML. In fact,
+ all three (object mode, input XML, and output XML) can have different
+ encodings.</p>
+
+ <h2><a name="3.3">3.3 Support for Polymorphism</a></h2>
+
+ <p>By default XSD generates non-polymorphic code. If your vocabulary
+ uses XML Schema polymorphism in the form of <code>xsi:type</code>
+ and/or substitution groups, then you will need to compile
+ your schemas with the <code>--generate-polymorphic</code> option
+ to produce polymorphism-aware code. For more information on
+ working with polymorphic object models, refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.11">Section 2.11,
+ "Mapping for <code>xsi:type</code> and Substitution Groups"</a> in
+ the C++/Tree Mapping User Manual.</p>
+
+ <h2><a name="3.4">3.4 Namespace Mapping</a></h2>
+
+ <p>XSD maps XML namespaces specified in the <code>targetNamespace</code>
+ attribute in XML Schema to one or more nested C++ namespaces. By
+ default, a namespace URI is mapped to a sequence of C++ namespace
+ names by removing the protocol and host parts and splitting the
+ rest into a sequence of names with <code>'/'</code> as the name
+ separator.</p>
+
+ <p>The default mapping of namespace URIs to C++ namespaces
+ can be altered using the <code>--namespace-map</code> and
+ <code>--namespace-regex</code> compiler options. For example,
+ to map namespace URI <code>https://www.codesynthesis.com/my</code> to
+ C++ namespace <code>cs::my</code>, we can use the following option:</p>
+
+ <pre class="terminal">
+--namespace-map https://www.codesynthesis.com/my=cs::my
+ </pre>
+
+ <p>A vocabulary without a namespace is mapped to the global scope. This
+ also can be altered with the above options by using an empty name
+ for the XML namespace:</p>
+
+ <pre class="terminal">
+--namespace-map =cs
+ </pre>
+
+ <h2><a name="3.5">3.5 Thread Safety</a></h2>
+
+ <p>XSD-generated code is thread-safe in the sense that you can
+ use different instantiations of the object model in several
+ threads concurrently. This is possible due to the generated
+ code not relying on any writable global variables. If you need
+ to share the same object between several threads then you will
+ need to provide some form of synchronization. One approach would
+ be to use the generated code customization mechanisms to embed
+ synchronization primitives into the generated C++ classes. For more
+ information on generated code customization refer to the
+ <a href="http://wiki.codesynthesis.com/Tree/Customization_guide">C++/Tree
+ Mapping Customization Guide</a>.</p>
+
+ <p>If you also would like to call parsing and/or serialization
+ functions from several threads potentially concurrently, then
+ you will need to make sure the Xerces-C++ runtime is initialized
+ and terminated only once. The easiest way to do this is to
+ initialize/terminate Xerces-C++ from <code>main()</code> when
+ there are no threads yet/anymore:</p>
+
+ <pre class="c++">
+#include &lt;xercesc/util/PlatformUtils.hpp>
+
+int
+main ()
+{
+ xercesc::XMLPlatformUtils::Initialize ();
+
+ {
+ // Start/terminate threads and parse/serialize here.
+ }
+
+ xercesc::XMLPlatformUtils::Terminate ();
+}
+ </pre>
+
+ <p>Because you initialize the Xerces-C++ runtime yourself you should
+ also pass the <code>xml_schema::flags::dont_initialize</code> flag
+ to parsing and serialization functions. See <a href="#5">Chapter 5,
+ "Parsing"</a> and <a href="#6">Chapter 6, "Serialization"</a> for
+ more information.</p>
+
+
+ <!-- Chapater 4 -->
+
+
+ <h1><a name="4">4 Working with Object Models</a></h1>
+
+ <p>As we have seen in the previous chapters, the XSD compiler generates
+ a C++ class for each type defined in XML Schema. Together these classes
+ constitute an object model for an XML vocabulary. In this chapter we
+ will take a closer look at different elements that comprise an
+ object model class as well as how to create, access, and modify
+ object models.</p>
+
+ <p>In this and subsequent chapters we will use the following schema
+ that describes a collection of person records. We save it in
+ <code>people.xsd</code>:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:simpleType name="gender_t">
+ &lt;xs:restriction base="xs:string">
+ &lt;xs:enumeration value="male"/>
+ &lt;xs:enumeration value="female"/>
+ &lt;/xs:restriction>
+ &lt;/xs:simpleType>
+
+ &lt;xs:complexType name="person_t">
+ &lt;xs:sequence>
+ &lt;xs:element name="first-name" type="xs:string"/>
+ &lt;xs:element name="middle-name" type="xs:string" minOccurs="0"/>
+ &lt;xs:element name="last-name" type="xs:string"/>
+ &lt;xs:element name="gender" type="gender_t"/>
+ &lt;xs:element name="age" type="xs:short"/>
+ &lt;/xs:sequence>
+ &lt;xs:attribute name="id" type="xs:unsignedInt" use="required"/>
+ &lt;/xs:complexType>
+
+ &lt;xs:complexType name="people_t">
+ &lt;xs:sequence>
+ &lt;xs:element name="person" type="person_t" maxOccurs="unbounded"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="people" type="people_t"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>A sample XML instance to go along with this schema is saved
+ in <code>people.xml</code>:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="people.xsd">
+
+ &lt;person id="1">
+ &lt;first-name>John&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>male&lt;/gender>
+ &lt;age>32&lt;/age>
+ &lt;/person>
+
+ &lt;person id="2">
+ &lt;first-name>Jane&lt;/first-name>
+ &lt;middle-name>Mary&lt;/middle-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>female&lt;/gender>
+ &lt;age>28&lt;/age>
+ &lt;/person>
+
+&lt;/people>
+ </pre>
+
+ <p>Compiling <code>people.xsd</code> with the XSD compiler results
+ in three generated C++ classes: <code>gender_t</code>,
+ <code>person_t</code>, and <code>people_t</code>.
+ The <code>gender_t</code> class is modelled after the C++
+ <code>enum</code> type. Its definition is presented below:</p>
+
+ <pre class="c++">
+class gender_t: public xml_schema::string
+{
+public:
+ enum value
+ {
+ male,
+ female
+ };
+
+ gender_t (value);
+ gender_t (const xml_schema::string&amp;);
+
+ gender_t&amp;
+ operator= (value);
+
+ operator value () const;
+};
+ </pre>
+
+ <p>The following listing shows how we can use this type:</p>
+
+ <pre class="c++">
+gender_t m (gender_t::male);
+gender_t f ("female");
+
+if (m == "female" || f == gender_t::male)
+{
+ ...
+}
+
+switch (m)
+{
+case gender_t::male:
+ {
+ ...
+ }
+case gender_t::female:
+ {
+ ...
+ }
+}
+ </pre>
+
+ <p>The other two classes will be examined in detail in the subsequent
+ sections.</p>
+
+ <h2><a name="4.1">4.1 Attribute and Element Cardinalities</a></h2>
+
+ <p>As we have seen in the previous chapters, XSD generates a different
+ set of type definitions and member functions for elements with
+ different cardinalities. The C++/Tree mapping divides all the possible
+ element and attribute cardinalities into three cardinality classes:
+ <em>one</em>, <em>optional</em>, and <em>sequence</em>.</p>
+
+ <p>The <em>one</em> cardinality class covers all elements that should
+ occur exactly once as well as required attributes. In our
+ example, the <code>first-name</code>, <code>last-name</code>,
+ <code>gender</code>, and <code>age</code> elements as well as
+ the <code>id</code> attribute belong to this cardinality class.
+ The following code fragment shows type definitions as well as the
+ accessor and modifier functions that are generated for the
+ <code>gender</code> element in the <code>person_t</code> class:</p>
+
+ <pre class="c++">
+class person_t
+{
+ // gender
+ //
+ typedef gender_t gender_type;
+
+ const gender_type&amp;
+ gender () const;
+
+ gender_type&amp;
+ gender ();
+
+ void
+ gender (const gender_type&amp;);
+};
+ </pre>
+
+ <p>The <code>gender_type</code> type is an alias for the element's type.
+ The first two accessor functions return read-only (constant) and
+ read-write references to the element's value, respectively. The
+ modifier function sets the new value for the element.</p>
+
+ <p>The <em>optional</em> cardinality class covers all elements that
+ can occur zero or one time as well as optional attributes. In our
+ example, the <code>middle-name</code> element belongs to this
+ cardinality class. The following code fragment shows the type
+ definitions as well as the accessor and modifier functions that
+ are generated for this element in the <code>person_t</code> class:</p>
+
+ <pre class="c++">
+class person_t
+{
+ // middle-name
+ //
+ typedef xml_schema::string middle_name_type;
+ typedef xsd::optional&lt;middle_name_type> middle_name_optional;
+
+ const middle_name_optional&amp;
+ middle_name () const;
+
+ middle_name_optional&amp;
+ middle_name ();
+
+ void
+ middle_name (const middle_name_type&amp;);
+
+ void
+ middle_name (const middle_name_optional&amp;);
+};
+ </pre>
+
+ <p>As with the <code>gender</code> element, <code>middle_name_type</code>
+ is an alias for the element's type. The <code>middle_name_optional</code>
+ type is a container for the element's optional value. It can be queried
+ for the presence of the value using the <code>present()</code> function.
+ The value itself can be retrieved using the <code>get()</code>
+ accessor and set using the <code>set()</code> modifier. The container
+ can be reverted to the value not present state with the call to the
+ <code>reset()</code> function. The following example shows how we
+ can use this container:</p>
+
+ <pre class="c++">
+person_t::middle_name_optional n ("John");
+
+if (n.present ())
+{
+ cout &lt;&lt; n.get () &lt;&lt; endl;
+}
+
+n.set ("Jane");
+n.reset ();
+ </pre>
+
+
+ <p>Unlike the <em>one</em> cardinality class, the accessor functions
+ for the <em>optional</em> class return read-only (constant) and
+ read-write references to the container instead of the element's
+ value directly. The modifier functions set the new value for the
+ element.</p>
+
+ <p>Finally, the <em>sequence</em> cardinality class covers all elements
+ that can occur more than once. In our example, the
+ <code>person</code> element in the <code>people_t</code> type
+ belongs to this cardinality class. The following code fragment shows
+ the type definitions as well as the accessor and modifier functions
+ that are generated for this element in the <code>people_t</code>
+ class:</p>
+
+ <pre class="c++">
+class people_t
+{
+ // person
+ //
+ typedef person_t person_type;
+ typedef xsd::sequence&lt;person_type> person_sequence;
+ typedef person_sequence::iterator person_iterator;
+ typedef person_sequence::const_iterator person_const_iterator;
+
+ const person_sequence&amp;
+ person () const;
+
+ person_sequence&amp;
+ person ();
+
+ void
+ person (const person_sequence&amp;);
+};
+ </pre>
+
+ <p>Identical to the other cardinality classes, <code>person_type</code>
+ is an alias for the element's type. The <code>person_sequence</code>
+ type is a sequence container for the element's values. It is based
+ on and has the same interface as <code>std::vector</code> and
+ therefore can be used in similar ways. The <code>person_iterator</code>
+ and <code>person_const_iterator</code> types are read-only
+ (constant) and read-write iterators for the <code>person_sequence</code>
+ container.</p>
+
+ <p>Similar to the <em>optional</em> cardinality class, the
+ accessor functions for the <em>sequence</em> class return
+ read-only (constant) and read-write references to the sequence
+ container. The modifier functions copies the entries from
+ the passed sequence.</p>
+
+ <p>C++/Tree is a "flattening" mapping in a sense that many levels of
+ nested compositors (<code>choice</code> and <code>sequence</code>),
+ all potentially with their own cardinalities, are in the end mapped
+ to a flat set of elements with one of the three cardinality classes
+ discussed above. While this results in a simple and easy to use API
+ for most types, in certain cases, the order of elements in the actual
+ XML documents is not preserved once parsed into the object model. To
+ overcome this limitation we can mark certain schema types, for which
+ content order is not sufficiently preserved, as ordered. For more
+ information on this functionality refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.8.4">Section
+ 2.8.4, "Element Order"</a> in the C++/Tree Mapping User Manual.</p>
+
+ <p>For complex schemas with many levels of nested compositors
+ (<code>choice</code> and <code>sequence</code>) it can also
+ be hard to deduce the cardinality class of a particular element.
+ The generated Doxygen documentation can greatly help with
+ this task. For each element and attribute the documentation
+ clearly identifies its cardinality class. Alternatively, you
+ can study the generated header files to find out the cardinality
+ class of a particular attribute or element.</p>
+
+ <p>In the next sections we will examine how to access and modify
+ information stored in an object model using accessor and modifier
+ functions described in this section.</p>
+
+ <h2><a name="4.2">4.2 Accessing the Object Model</a></h2>
+
+ <p>In this section we will learn how to get to the information
+ stored in the object model for our person records vocabulary.
+ The following application accesses and prints the contents
+ of the <code>people.xml</code> file:</p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include "people.hxx"
+
+using namespace std;
+
+int
+main ()
+{
+ unique_ptr&lt;people_t> ppl (people ("people.xml"));
+
+ // Iterate over individual person records.
+ //
+ people_t::person_sequence&amp; ps (ppl->person ());
+
+ for (people_t::person_iterator i (ps.begin ()); i != ps.end (); ++i)
+ {
+ person_t&amp; p (*i);
+
+ // Print names: first-name and last-name are required elements,
+ // middle-name is optional.
+ //
+ cout &lt;&lt; "name: " &lt;&lt; p.first_name () &lt;&lt; " ";
+
+ if (p.middle_name ().present ())
+ cout &lt;&lt; p.middle_name ().get () &lt;&lt; " ";
+
+ cout &lt;&lt; p.last_name () &lt;&lt; endl;
+
+ // Print gender, age, and id which are all required.
+ //
+ cout &lt;&lt; "gender: " &lt;&lt; p.gender () &lt;&lt; endl
+ &lt;&lt; "age: " &lt;&lt; p.age () &lt;&lt; endl
+ &lt;&lt; "id: " &lt;&lt; p.id () &lt;&lt; endl
+ &lt;&lt; endl;
+ }
+}
+ </pre>
+
+ <p>This code shows common patterns of accessing elements and attributes
+ with different cardinality classes. For the sequence element
+ (<code>person</code> in <code>people_t</code>) we first obtain a
+ reference to the container and then iterate over individual
+ records. The values of elements and attributes with the
+ <em>one</em> cardinality class (<code>first-name</code>,
+ <code>last-name</code>, <code>gender</code>, <code>age</code>,
+ and <code>id</code>) can be obtained directly by calling the
+ corresponding accessor functions. For the optional element
+ <code>middle-name</code> we first check if the value is present
+ and only then call <code>get()</code> to retrieve it.</p>
+
+ <p>Note that when we want to reduce typing by creating a variable
+ representing a fragment of the object model that we are currently
+ working with (<code>ps</code> and <code>p</code> above), we obtain
+ a reference to that fragment instead of making a potentially
+ expensive copy. This is generally a good rule to follow when
+ creating high-performance applications.</p>
+
+ <p>If we run the above application on our sample
+ <code>people.xml</code>, the output looks as follows:</p>
+
+ <pre class="terminal">
+name: John Doe
+gender: male
+age: 32
+id: 1
+
+name: Jane Mary Doe
+gender: female
+age: 28
+id: 2
+ </pre>
+
+
+ <h2><a name="4.3">4.3 Modifying the Object Model</a></h2>
+
+ <p>In this section we will learn how to modify the information
+ stored in the object model for our person records vocabulary.
+ The following application changes the contents of the
+ <code>people.xml</code> file:</p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include "people.hxx"
+
+using namespace std;
+
+int
+main ()
+{
+ unique_ptr&lt;people_t> ppl (people ("people.xml"));
+
+ // Iterate over individual person records and increment
+ // the age.
+ //
+ people_t::person_sequence&amp; ps (ppl->person ());
+
+ for (people_t::person_iterator i (ps.begin ()); i != ps.end (); ++i)
+ {
+ // Alternative way: i->age ()++;
+ //
+ i->age (i->age () + 1);
+ }
+
+ // Add middle-name to the first record and remove it from
+ // the second.
+ //
+ person_t&amp; john (ps[0]);
+ person_t&amp; jane (ps[1]);
+
+ john.middle_name ("Mary");
+ jane.middle_name ().reset ();
+
+ // Add another John record.
+ //
+ ps.push_back (john);
+
+ // Serialize the modified object model to XML.
+ //
+ xml_schema::namespace_infomap map;
+ map[""].name = "";
+ map[""].schema = "people.xsd";
+
+ people (cout, *ppl, map);
+}
+ </pre>
+
+ <p>The first modification the above application performs is iterating
+ over person records and incrementing the age value. This code
+ fragment shows how to modify the value of a required attribute
+ or element. The next modification shows how to set a new value
+ for the optional <code>middle-name</code> element as well
+ as clear its value. Finally the example adds a copy of the
+ John Doe record to the <code>person</code> element sequence.</p>
+
+ <p>Note that in this case using references for the <code>ps</code>,
+ <code>john</code>, and <code>jane</code> variables is no longer
+ a performance improvement but a requirement for the application
+ to function correctly. If we hadn't used references, all our changes
+ would have been made on copies without affecting the object model.</p>
+
+ <p>If we run the above application on our sample <code>people.xml</code>,
+ the output looks as follows:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0"?>
+&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="people.xsd">
+
+ &lt;person id="1">
+ &lt;first-name>John&lt;/first-name>
+ &lt;middle-name>Mary&lt;/middle-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>male&lt;/gender>
+ &lt;age>33&lt;/age>
+ &lt;/person>
+
+ &lt;person id="2">
+ &lt;first-name>Jane&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>female&lt;/gender>
+ &lt;age>29&lt;/age>
+ &lt;/person>
+
+ &lt;person id="1">
+ &lt;first-name>John&lt;/first-name>
+ &lt;middle-name>Mary&lt;/middle-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>male&lt;/gender>
+ &lt;age>33&lt;/age>
+ &lt;/person>
+
+&lt;/people>
+ </pre>
+
+
+ <h2><a name="4.4">4.4 Creating the Object Model from Scratch</a></h2>
+
+ <p>In this section we will learn how to create a new object model
+ for our person records vocabulary. The following application
+ recreates the content of the original <code>people.xml</code>
+ file:</p>
+
+ <pre class="c++">
+#include &lt;iostream>
+#include "people.hxx"
+
+using namespace std;
+
+int
+main ()
+{
+ people_t ppl;
+ people_t::person_sequence&amp; ps (ppl.person ());
+
+ // Add the John Doe record.
+ //
+ ps.push_back (
+ person_t ("John", // first-name
+ "Doe", // last-name
+ gender_t::male, // gender
+ 32, // age
+ 1));
+
+ // Add the Jane Doe record.
+ //
+ ps.push_back (
+ person_t ("Jane", // first-name
+ "Doe", // last-name
+ gender_t::female, // gender
+ 28, // age
+ 2)); // id
+
+ // Add middle name to the Jane Doe record.
+ //
+ person_t&amp; jane (ps.back ());
+ jane.middle_name ("Mary");
+
+ // Serialize the object model to XML.
+ //
+ xml_schema::namespace_infomap map;
+ map[""].name = "";
+ map[""].schema = "people.xsd";
+
+ people (cout, ppl, map);
+}
+ </pre>
+
+ <p>The only new part in the above application is the calls
+ to the <code>people_t</code> and <code>person_t</code>
+ constructors. As a general rule, for each C++ class
+ XSD generates a constructor with initializers
+ for each element and attribute belonging to the <em>one</em>
+ cardinality class. For our vocabulary, the following
+ constructors are generated:</p>
+
+ <pre class="c++">
+class person_t
+{
+ person_t (const first_name_type&amp;,
+ const last_name_type&amp;,
+ const gender_type&amp;,
+ const age_type&amp;,
+ const id_type&amp;);
+};
+
+class people_t
+{
+ people_t ();
+};
+ </pre>
+
+ <p>Note also that we set the <code>middle-name</code> element
+ on the Jane Doe record by obtaining a reference to that record
+ in the object model and setting the <code>middle-name</code>
+ value on it. This is a general rule that should be followed
+ in order to obtain the best performance: if possible,
+ direct modifications to the object model should be preferred
+ to modifications on temporaries with subsequent copying. The
+ following code fragment shows a semantically equivalent but
+ slightly slower version:</p>
+
+ <pre class="c++">
+// Add the Jane Doe record.
+//
+person_t jane ("Jane", // first-name
+ "Doe", // last-name
+ gender_t::female, // gender
+ 28, // age
+ 2); // id
+
+jane.middle_name ("Mary");
+
+ps.push_back (jane);
+ </pre>
+
+ <p>We can also go one step further to reduce copying and improve
+ the performance of our application by using the non-copying
+ <code>push_back()</code> function which assumes ownership
+ of the passed objects:</p>
+
+ <pre class="c++">
+// Add the Jane Doe record. C++11 version
+//
+unique_ptr&lt;person_t> jane_p (
+ new person_t ("Jane", // first-name
+ "Doe", // last-name
+ gender_t::female, // gender
+ 28, // age
+ 2)); // id
+ps.push_back (std::move (jane_p)); // assumes ownership
+
+// Add the John Doe record. C++98 version.
+//
+auto_ptr&lt;person_t> john_p (
+ new person_t ("John", // first-name
+ "Doe", // last-name
+ gender_t::male, // gender
+ 32, // age
+ 1));
+ps.push_back (john_p); // assumes ownership
+ </pre>
+
+ <p>For more information on the non-copying modifier functions refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.8">Section
+ 2.8, "Mapping for Local Elements and Attributes"</a> in the C++/Tree Mapping
+ User Manual. The above application produces the following output:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="people.xsd">
+
+ &lt;person id="1">
+ &lt;first-name>John&lt;/first-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>male&lt;/gender>
+ &lt;age>32&lt;/age>
+ &lt;/person>
+
+ &lt;person id="2">
+ &lt;first-name>Jane&lt;/first-name>
+ &lt;middle-name>Mary&lt;/middle-name>
+ &lt;last-name>Doe&lt;/last-name>
+ &lt;gender>female&lt;/gender>
+ &lt;age>28&lt;/age>
+ &lt;/person>
+
+&lt;/people>
+ </pre>
+
+ <h2><a name="4.5">4.5 Mapping for the Built-in XML Schema Types</a></h2>
+
+ <p>Our person record vocabulary uses several built-in XML Schema
+ types: <code>string</code>, <code>short</code>, and
+ <code>unsignedInt</code>. Until now we haven't talked about
+ the mapping of built-in XML Schema types to C++ types and how
+ to work with them. This section provides an overview
+ of the built-in types. For more detailed information refer
+ to <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.5">Section
+ 2.5, "Mapping for Built-in Data Types"</a> in the C++/Tree Mapping
+ User Manual.</p>
+
+ <p>In XML Schema, built-in types are defined in the XML Schema namespace.
+ By default, the C++/Tree mapping maps this namespace to C++
+ namespace <code>xml_schema</code> (this mapping can be altered
+ with the <code>--namespace-map</code> option). The following table
+ summarizes the mapping of XML Schema built-in types to C++ types:</p>
+
+ <!-- border="1" is necessary for html2ps -->
+ <table id="builtin" border="1">
+ <tr>
+ <th>XML Schema type</th>
+ <th>Alias in the <code>xml_schema</code> namespace</th>
+ <th>C++ type</th>
+ </tr>
+
+ <tr>
+ <th colspan="3">fixed-length integral types</th>
+ </tr>
+ <!-- 8-bit -->
+ <tr>
+ <td><code>byte</code></td>
+ <td><code>byte</code></td>
+ <td><code>signed&nbsp;char</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedByte</code></td>
+ <td><code>unsigned_byte</code></td>
+ <td><code>unsigned&nbsp;char</code></td>
+ </tr>
+
+ <!-- 16-bit -->
+ <tr>
+ <td><code>short</code></td>
+ <td><code>short_</code></td>
+ <td><code>short</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedShort</code></td>
+ <td><code>unsigned_short</code></td>
+ <td><code>unsigned&nbsp;short</code></td>
+ </tr>
+
+ <!-- 32-bit -->
+ <tr>
+ <td><code>int</code></td>
+ <td><code>int_</code></td>
+ <td><code>int</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedInt</code></td>
+ <td><code>unsigned_int</code></td>
+ <td><code>unsigned&nbsp;int</code></td>
+ </tr>
+
+ <!-- 64-bit -->
+ <tr>
+ <td><code>long</code></td>
+ <td><code>long_</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedLong</code></td>
+ <td><code>unsigned_long</code></td>
+ <td><code>unsigned&nbsp;long&nbsp;long</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">arbitrary-length integral types</th>
+ </tr>
+ <tr>
+ <td><code>integer</code></td>
+ <td><code>integer</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>nonPositiveInteger</code></td>
+ <td><code>non_positive_integer</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>nonNegativeInteger</code></td>
+ <td><code>non_negative_integer</code></td>
+ <td><code>unsigned long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>positiveInteger</code></td>
+ <td><code>positive_integer</code></td>
+ <td><code>unsigned long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>negativeInteger</code></td>
+ <td><code>negative_integer</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">boolean types</th>
+ </tr>
+ <tr>
+ <td><code>boolean</code></td>
+ <td><code>boolean</code></td>
+ <td><code>bool</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">fixed-precision floating-point types</th>
+ </tr>
+ <tr>
+ <td><code>float</code></td>
+ <td><code>float_</code></td>
+ <td><code>float</code></td>
+ </tr>
+ <tr>
+ <td><code>double</code></td>
+ <td><code>double_</code></td>
+ <td><code>double</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">arbitrary-precision floating-point types</th>
+ </tr>
+ <tr>
+ <td><code>decimal</code></td>
+ <td><code>decimal</code></td>
+ <td><code>double</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">string types</th>
+ </tr>
+ <tr>
+ <td><code>string</code></td>
+ <td><code>string</code></td>
+ <td>type derived from <code>std::basic_string</code></td>
+ </tr>
+ <tr>
+ <td><code>normalizedString</code></td>
+ <td><code>normalized_string</code></td>
+ <td>type derived from <code>string</code></td>
+ </tr>
+ <tr>
+ <td><code>token</code></td>
+ <td><code>token</code></td>
+ <td>type&nbsp;derived&nbsp;from&nbsp;<code>normalized_string</code></td>
+ </tr>
+ <tr>
+ <td><code>Name</code></td>
+ <td><code>name</code></td>
+ <td>type derived from <code>token</code></td>
+ </tr>
+ <tr>
+ <td><code>NMTOKEN</code></td>
+ <td><code>nmtoken</code></td>
+ <td>type derived from <code>token</code></td>
+ </tr>
+ <tr>
+ <td><code>NMTOKENS</code></td>
+ <td><code>nmtokens</code></td>
+ <td>type derived from <code>sequence&lt;nmtoken></code></td>
+ </tr>
+ <tr>
+ <td><code>NCName</code></td>
+ <td><code>ncname</code></td>
+ <td>type derived from <code>name</code></td>
+ </tr>
+ <tr>
+ <td><code>language</code></td>
+ <td><code>language</code></td>
+ <td>type derived from <code>token</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">qualified name</th>
+ </tr>
+ <tr>
+ <td><code>QName</code></td>
+ <td><code>qname</code></td>
+ <td><code>xml_schema::qname</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">ID/IDREF types</th>
+ </tr>
+ <tr>
+ <td><code>ID</code></td>
+ <td><code>id</code></td>
+ <td>type derived from <code>ncname</code></td>
+ </tr>
+ <tr>
+ <td><code>IDREF</code></td>
+ <td><code>idref</code></td>
+ <td>type derived from <code>ncname</code></td>
+ </tr>
+ <tr>
+ <td><code>IDREFS</code></td>
+ <td><code>idrefs</code></td>
+ <td>type derived from <code>sequence&lt;idref></code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">URI types</th>
+ </tr>
+ <tr>
+ <td><code>anyURI</code></td>
+ <td><code>uri</code></td>
+ <td>type derived from <code>std::basic_string</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">binary types</th>
+ </tr>
+ <tr>
+ <td><code>base64Binary</code></td>
+ <td><code>base64_binary</code></td>
+ <td><code>xml_schema::base64_binary</code></td>
+ </tr>
+ <tr>
+ <td><code>hexBinary</code></td>
+ <td><code>hex_binary</code></td>
+ <td><code>xml_schema::hex_binary</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">date/time types</th>
+ </tr>
+ <tr>
+ <td><code>date</code></td>
+ <td><code>date</code></td>
+ <td><code>xml_schema::date</code></td>
+ </tr>
+ <tr>
+ <td><code>dateTime</code></td>
+ <td><code>date_time</code></td>
+ <td><code>xml_schema::date_time</code></td>
+ </tr>
+ <tr>
+ <td><code>duration</code></td>
+ <td><code>duration</code></td>
+ <td><code>xml_schema::duration</code></td>
+ </tr>
+ <tr>
+ <td><code>gDay</code></td>
+ <td><code>gday</code></td>
+ <td><code>xml_schema::gday</code></td>
+ </tr>
+ <tr>
+ <td><code>gMonth</code></td>
+ <td><code>gmonth</code></td>
+ <td><code>xml_schema::gmonth</code></td>
+ </tr>
+ <tr>
+ <td><code>gMonthDay</code></td>
+ <td><code>gmonth_day</code></td>
+ <td><code>xml_schema::gmonth_day</code></td>
+ </tr>
+ <tr>
+ <td><code>gYear</code></td>
+ <td><code>gyear</code></td>
+ <td><code>xml_schema::gyear</code></td>
+ </tr>
+ <tr>
+ <td><code>gYearMonth</code></td>
+ <td><code>gyear_month</code></td>
+ <td><code>xml_schema::gyear_month</code></td>
+ </tr>
+ <tr>
+ <td><code>time</code></td>
+ <td><code>time</code></td>
+ <td><code>xml_schema::time</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">entity types</th>
+ </tr>
+ <tr>
+ <td><code>ENTITY</code></td>
+ <td><code>entity</code></td>
+ <td>type derived from <code>name</code></td>
+ </tr>
+ <tr>
+ <td><code>ENTITIES</code></td>
+ <td><code>entities</code></td>
+ <td>type derived from <code>sequence&lt;entity></code></td>
+ </tr>
+ </table>
+
+ <p>As you can see from the table above a number of built-in
+ XML Schema types are mapped to fundamental C++ types such
+ as <code>int</code> or <code>bool</code>. All string-based
+ XML Schema types are mapped to C++ types that are derived
+ from either <code>std::string</code> or
+ <code>std::wstring</code>, depending on the character
+ type selected. For access and modification purposes these
+ types can be treated as <code>std::string</code>. A number
+ of built-in types, such as <code>qname</code>, the binary
+ types, and the date/time types do not have suitable
+ fundamental or standard C++ types to map to. As a result,
+ these types are implemented from scratch in the XSD runtime.
+ For more information on their interfaces refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.5">Section
+ 2.5, "Mapping for Built-in Data Types"</a> in the C++/Tree Mapping
+ User Manual.</p>
+
+
+ <!-- Chapater 5 -->
+
+
+ <h1><a name="5">5 Parsing</a></h1>
+
+ <p>We have already seen how to parse XML to an object model in this guide
+ before. In this chapter we will discuss the parsing topic in more
+ detail.</p>
+
+ <p>By default, the C++/Tree mapping provides a total of 14 overloaded
+ parsing functions. They differ in the input methods used to
+ read XML as well as the error reporting mechanisms. It is also possible
+ to generate types for root elements instead of parsing and serialization
+ functions. This may be useful if your XML vocabulary has multiple
+ root elements. For more information on element types refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.9">Section
+ 2.9, "Mapping for Global Elements"</a> in the C++/Tree Mapping User
+ Manual.</p>
+
+
+ <p>In this section we will discuss the most commonly used versions of
+ the parsing functions. For a comprehensive description of parsing
+ refer to <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#3">Chapter
+ 3, "Parsing"</a> in the C++/Tree Mapping User Manual. For the <code>people</code>
+ global element from our person record vocabulary, we will concentrate
+ on the following three parsing functions:</p>
+
+ <pre class="c++">
+std::[unique|auto]_ptr&lt;people_t>
+people (const std::string&amp; uri,
+ xml_schema::flags f = 0,
+ const xml_schema::properties&amp; p = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;people_t>
+people (std::istream&amp; is,
+ xml_schema::flags f = 0,
+ const xml_schema::properties&amp; p = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;people_t>
+people (std::istream&amp; is,
+ const std::string&amp; resource_id,
+ xml_schema::flags f = 0,
+ const xml_schema::properties&amp; p = ::xml_schema::properties ());
+ </pre>
+
+ <p>The first function parses a local file or a URI. We have already
+ used this parsing function in the previous chapters. The second
+ and third functions read XML from a standard input stream. The
+ last function also requires a resource id. This id is used to
+ identify the XML document being parser in diagnostics messages
+ as well as to resolve relative paths to other documents (for example,
+ schemas) that might be referenced from the XML document.</p>
+
+ <p>The last two arguments to all three parsing functions are parsing
+ flags and properties. The flags argument provides a number of ways
+ to fine-tune the parsing process. The properties argument allows
+ to pass additional information to the parsing functions. We will
+ use these two arguments in <a href="#5.1">Section 5.1, "XML Schema
+ Validation and Searching"</a> below. All three functions return
+ the object model as either <code>std::unique_ptr</code> (C++11) or
+ <code>std::auto_ptr</code> (C++98), depending on the C++ standard
+ selected (<code>--std</code> XSD compiler option). The following
+ example shows how we can use the above parsing functions:</p>
+
+ <pre class="c++">
+using std::unique_ptr;
+
+// Parse a local file or URI.
+//
+unique_ptr&lt;people_t> p1 (people ("people.xml"));
+unique_ptr&lt;people_t> p2 (people ("http://example.com/people.xml"));
+
+// Parse a local file via ifstream.
+//
+std::ifstream ifs ("people.xml");
+unique_ptr&lt;people_t> p3 (people (ifs, "people.xml"));
+
+// Parse an XML string.
+//
+std::string str ("..."); // XML in a string.
+std::istringstream iss (str);
+unique_ptr&lt;people_t> p4 (people (iss));
+ </pre>
+
+
+ <h2><a name="5.1">5.1 XML Schema Validation and Searching</a></h2>
+
+ <p>The C++/Tree mapping relies on the underlying Xerces-C++ XML
+ parser for full XML document validation. The XML Schema
+ validation is enabled by default and can be disabled by
+ passing the <code>xml_schema::flags::dont_validate</code>
+ flag to the parsing functions, for example:</p>
+
+ <pre class="c++">
+unique_ptr&lt;people_t> p (
+ people ("people.xml", xml_schema::flags::dont_validate));
+ </pre>
+
+ <p>Even when XML Schema validation is disabled, the generated
+ code still performs a number of checks to prevent
+ construction of an inconsistent object model (for example, an
+ object model with missing required attributes or elements).</p>
+
+ <p>When XML Schema validation is enabled, the XML parser needs
+ to locate a schema to validate against. There are several
+ methods to provide the schema location information to the
+ parser. The easiest and most commonly used method is to
+ specify schema locations in the XML document itself
+ with the <code>schemaLocation</code> or
+ <code>noNamespaceSchemaLocation</code> attributes, for example:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="people.xsd"
+ xsi:schemaLocation="http://www.w3.org/XML/1998/namespace xml.xsd">
+ </pre>
+
+ <p>As you might have noticed, we used this method in all the sample XML
+ documents presented in this guide up until now. Note that the
+ schema locations specified with these two attributes are relative
+ to the document's path unless they are absolute URIs (that is
+ start with <code>http://</code>, <code>file://</code>, etc.).
+ In particular, if you specify just file names as your schema
+ locations, as we did above, then the schemas should reside in
+ the same directory as the XML document itself.</p>
+
+ <p>Another method of providing the schema location information
+ is via the <code>xml_schema::properties</code> argument, as
+ shown in the following example:</p>
+
+ <pre class="c++">
+xml_schema::properties props;
+props.no_namespace_schema_location ("people.xsd");
+props.schema_location ("http://www.w3.org/XML/1998/namespace", "xml.xsd");
+
+unique_ptr&lt;people_t> p (people ("people.xml", 0, props));
+ </pre>
+
+ <p>The schema locations provided with this method overrides
+ those specified in the XML document. As with the previous
+ method, the schema locations specified this way are
+ relative to the document's path unless they are absolute URIs.
+ In particular, if you want to use local schemas that are
+ not related to the document being parsed, then you will
+ need to use the <code>file://</code> URI. The following
+ example shows how to use schemas that reside in the current
+ working directory:</p>
+
+ <pre class="c++">
+#include &lt;unistd.h> // getcwd
+#include &lt;limits.h> // PATH_MAX
+
+char cwd[PATH_MAX];
+if (getcwd (cwd, PATH_MAX) == 0)
+{
+ // Buffer too small?
+}
+
+xml_schema::properties props;
+
+props.no_namespace_schema_location (
+ "file:///" + std::string (cwd) + "/people.xsd");
+
+props.schema_location (
+ "http://www.w3.org/XML/1998/namespace",
+ "file:///" + std::string (cwd) + "/xml.xsd");
+
+unique_ptr&lt;people_t> p (people ("people.xml", 0, props));
+ </pre>
+
+ <p>A third method is the most useful if you are planning to parse
+ several XML documents of the same vocabulary. In that case
+ it may be beneficial to pre-parse and cache the schemas in
+ the XML parser which can then be used to parse all documents
+ without re-parsing the schemas. For more information on
+ this method refer to the <code>caching</code> example in the
+ <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package.
+ It is also possible to convert the schemas into a pre-compiled
+ binary representation and embed this representation directly into
+ the application executable. With this approach your application can
+ perform XML Schema validation without depending on any external
+ schema files. For more information on how to achieve this refer to
+ the <code>embedded</code> example in the <code>cxx/tree/</code>
+ directory in the <a href="https://cppget.org/xsd-examples">xsd-examples</a>
+ package.</p>
+
+ <p>When the XML parser cannot locate a schema for the
+ XML document, the validation fails and XML document
+ elements and attributes for which schema definitions could
+ not be located are reported in the diagnostics. For
+ example, if we remove the <code>noNamespaceSchemaLocation</code>
+ attribute in <code>people.xml</code> from the previous chapter,
+ then we will get the following diagnostics if we try to parse
+ this file with validation enabled:</p>
+
+ <pre class="terminal">
+people.xml:2:63 error: no declaration found for element 'people'
+people.xml:4:18 error: no declaration found for element 'person'
+people.xml:4:18 error: attribute 'id' is not declared for element 'person'
+people.xml:5:17 error: no declaration found for element 'first-name'
+people.xml:6:18 error: no declaration found for element 'middle-name'
+people.xml:7:16 error: no declaration found for element 'last-name'
+people.xml:8:13 error: no declaration found for element 'gender'
+people.xml:9:10 error: no declaration found for element 'age'
+ </pre>
+
+ <h2><a name="5.2">5.2 Error Handling</a></h2>
+
+ <p>The parsing functions offer a number of ways to handle error conditions
+ with the C++ exceptions being the most commonly used mechanism. All
+ C++/Tree exceptions derive from common base <code>xml_schema::exception</code>
+ which in turn derives from <code>std::exception</code>. The easiest
+ way to uniformly handle all possible C++/Tree exceptions and print
+ detailed information about the error is to catch and print
+ <code>xml_schema::exception</code>, as shown in the following
+ example:</p>
+
+ <pre class="c++">
+try
+{
+ unique_ptr&lt;people_t> p (people ("people.xml"));
+}
+catch (const xml_schema::exception&amp; e)
+{
+ cerr &lt;&lt; e &lt;&lt; endl;
+}
+ </pre>
+
+ <p>Each individual C++/Tree exception also allows you to obtain
+ error details programmatically. For example, the
+ <code>xml_schema::parsing</code> exception is thrown when
+ the XML parsing and validation in the underlying XML parser
+ fails. It encapsulates various diagnostics information
+ such as the file name, line and column numbers, as well as the
+ error or warning message for each entry. For more information
+ about this and other exceptions that can be thrown during
+ parsing, refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#3.3">Section
+ 3.3, "Error Handling"</a> in the C++/Tree Mapping
+ User Manual.</p>
+
+ <p>Note that if you are parsing <code>std::istream</code> on which
+ exceptions are not enabled, then you will need to check the
+ stream state after the call to the parsing function in order
+ to detect any possible stream failures, for example:</p>
+
+ <pre class="c++">
+std::ifstream ifs ("people.xml");
+
+if (ifs.fail ())
+{
+ cerr &lt;&lt; "people.xml: unable to open" &lt;&lt; endl;
+ return 1;
+}
+
+unique_ptr&lt;people_t> p (people (ifs, "people.xml"));
+
+if (ifs.fail ())
+{
+ cerr &lt;&lt; "people.xml: read error" &lt;&lt; endl;
+ return 1;
+}
+ </pre>
+
+ <p>The above example can be rewritten to use exceptions as
+ shown below:</p>
+
+ <pre class="c++">
+try
+{
+ std::ifstream ifs;
+ ifs.exceptions (std::ifstream::badbit | std::ifstream::failbit);
+ ifs.open ("people.xml");
+
+ unique_ptr&lt;people_t> p (people (ifs, "people.xml"));
+}
+catch (const std::ifstream::failure&amp;)
+{
+ cerr &lt;&lt; "people.xml: unable to open or read error" &lt;&lt; endl;
+ return 1;
+}
+ </pre>
+
+
+ <!-- Chapater 6 -->
+
+
+ <h1><a name="6">6 Serialization</a></h1>
+
+ <p>We have already seen how to serialize an object model back to XML
+ in this guide before. In this chapter we will discuss the
+ serialization topic in more detail.</p>
+
+ <p>By default, the C++/Tree mapping provides a total of 8 overloaded
+ serialization functions. They differ in the output methods used to write
+ XML as well as the error reporting mechanisms. It is also possible to
+ generate types for root elements instead of parsing and serialization
+ functions. This may be useful if your XML vocabulary has multiple
+ root elements. For more information on element types refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.9">Section
+ 2.9, "Mapping for Global Elements"</a> in the C++/Tree Mapping User
+ Manual.</p>
+
+
+ <p>In this section we will discuss the most commonly
+ used version of serialization functions. For a comprehensive description
+ of serialization refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#4">Chapter
+ 4, "Serialization"</a> in the C++/Tree Mapping User Manual. For the
+ <code>people</code> global element from our person record vocabulary,
+ we will concentrate on the following serialization function:</p>
+
+ <pre class="c++">
+void
+people (std::ostream&amp; os,
+ const people_t&amp; x,
+ const xml_schema::namespace_infomap&amp; map =
+ xml_schema::namespace_infomap (),
+ const std::string&amp; encoding = "UTF-8",
+ xml_schema::flags f = 0);
+ </pre>
+
+ <p>This function serializes the object model passed as the second
+ argument to the standard output stream passed as the first
+ argument. The third argument is a namespace information map
+ which we will discuss in more detail in the next section.
+ The fourth argument is a character encoding that the resulting
+ XML document should be in. Possible valid values for this
+ argument are "US-ASCII", "ISO8859-1", "UTF-8", "UTF-16BE",
+ "UTF-16LE", "UCS-4BE", and "UCS-4LE". Finally, the flags
+ argument allows fine-tuning of the serialization process.
+ The following example shows how we can use the above serialization
+ function:</p>
+
+ <pre class="c++">
+people_t&amp; p = ...
+
+xml_schema::namespace_infomap map;
+map[""].schema = "people.xsd";
+
+// Serialize to stdout.
+//
+people (std::cout, p, map);
+
+// Serialize to a file.
+//
+std::ofstream ofs ("people.xml");
+people (ofs, p, map);
+
+// Serialize to a string.
+//
+std::ostringstream oss;
+people (oss, p, map);
+std::string xml (oss.str ());
+ </pre>
+
+
+ <h2><a name="6.1">6.1 Namespace and Schema Information</a></h2>
+
+ <p>While XML serialization can be done just from the object
+ model alone, it is often desirable to assign meaningful
+ prefixes to XML namespaces used in the vocabulary as
+ well as to provide the schema location information.
+ This is accomplished by passing the namespace information
+ map to the serialization function. The key in this map is
+ a namespace prefix that should be assigned to an XML namespace
+ specified in the <code>name</code> variable of the
+ map value. You can also assign an optional schema location for
+ this namespace in the <code>schema</code> variable. Based
+ on each key-value entry in this map, the serialization
+ function adds two attributes to the resulting XML document:
+ the namespace-prefix mapping attribute and schema location
+ attribute. The empty prefix indicates that the namespace
+ should be mapped without a prefix. For example, the following
+ map:</p>
+
+ <pre class="c++">
+xml_schema::namespace_infomap map;
+
+map[""].name = "http://www.example.com/example";
+map[""].schema = "example.xsd";
+
+map["x"].name = "http://www.w3.org/XML/1998/namespace";
+map["x"].schema = "xml.xsd";
+ </pre>
+
+ <p>Results in the following XML document:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;example
+ xmlns="http://www.example.com/example"
+ xmlns:x="http://www.w3.org/XML/1998/namespace"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.example.com/example example.xsd
+ http://www.w3.org/XML/1998/namespace xml.xsd">
+ </pre>
+
+ <p>The empty namespace indicates that the vocabulary has no target
+ namespace. For example, the following map results in only the
+ <code>noNamespaceSchemaLocation</code> attribute being added:</p>
+
+ <pre class="c++">
+xml_schema::namespace_infomap map;
+
+map[""].name = "";
+map[""].schema = "example.xsd";
+ </pre>
+
+ <h2><a name="6.2">6.2 Error Handling</a></h2>
+
+ <p>Similar to the parsing functions, the serialization functions offer a
+ number of ways to handle error conditions with the C++ exceptions being
+ the most commonly used mechanisms. As with parsing, the easiest way to
+ uniformly handle all possible serialization exceptions and print
+ detailed information about the error is to catch and print
+ <code>xml_schema::exception</code>:</p>
+
+ <pre class="c++">
+try
+{
+ people_t&amp; p = ...
+
+ xml_schema::namespace_infomap map;
+ map[""].schema = "people.xsd";
+
+ people (std::cout, p, map));
+}
+catch (const xml_schema::exception&amp; e)
+{
+ cerr &lt;&lt; e &lt;&lt; endl;
+}
+ </pre>
+
+ <p>The most commonly encountered serialization exception is
+ <code>xml_schema::serialization</code>. It is thrown
+ when the XML serialization in the underlying XML writer
+ fails. It encapsulates various diagnostics information
+ such as the file name, line and column numbers, as well as the
+ error or warning message for each entry. For more information
+ about this and other exceptions that can be thrown during
+ serialization, refer to
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#4.4">Section
+ 4.4, "Error Handling"</a> in the C++/Tree Mapping
+ User Manual.</p>
+
+ <p>Note that if you are serializing to <code>std::ostream</code> on
+ which exceptions are not enabled, then you will need to check the
+ stream state after the call to the serialization function in order
+ to detect any possible stream failures, for example:</p>
+
+ <pre class="c++">
+std::ofstream ofs ("people.xml");
+
+if (ofs.fail ())
+{
+ cerr &lt;&lt; "people.xml: unable to open" &lt;&lt; endl;
+ return 1;
+}
+
+people (ofs, p, map));
+
+if (ofs.fail ())
+{
+ cerr &lt;&lt; "people.xml: write error" &lt;&lt; endl;
+ return 1;
+}
+ </pre>
+
+ <p>The above example can be rewritten to use exceptions as
+ shown below:</p>
+
+ <pre class="c++">
+try
+{
+ std::ofstream ofs;
+ ofs.exceptions (std::ofstream::badbit | std::ofstream::failbit);
+ ofs.open ("people.xml");
+
+ people (ofs, p, map));
+}
+catch (const std::ofstream::failure&amp;)
+{
+ cerr &lt;&lt; "people.xml: unable to open or write error" &lt;&lt; endl;
+ return 1;
+}
+ </pre>
+
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/xsd/doc/cxx/tree/manual/.gitignore b/xsd/doc/cxx/tree/manual/.gitignore
new file mode 100644
index 0000000..39e8d48
--- /dev/null
+++ b/xsd/doc/cxx/tree/manual/.gitignore
@@ -0,0 +1,2 @@
+index.xhtml
+manual.html2ps
diff --git a/xsd/doc/cxx/tree/manual/index.xhtml.in b/xsd/doc/cxx/tree/manual/index.xhtml.in
new file mode 100644
index 0000000..5a7240a
--- /dev/null
+++ b/xsd/doc/cxx/tree/manual/index.xhtml.in
@@ -0,0 +1,6826 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<head>
+ <title>C++/Tree Mapping User Manual</title>
+
+ <meta name="copyright" content="&#169; @copyright@"/>
+ <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,tree,serialization,guide,manual,examples"/>
+ <meta name="description" content="C++/Tree Mapping User Manual"/>
+ <meta name="revision" content="4.1.0"/>
+
+ <link rel="stylesheet" type="text/css" href="../../../default.css" />
+
+<style type="text/css">
+ pre {
+ padding : 0 0 0 0em;
+ margin : 0em 0em 0em 0;
+
+ font-size : 102%
+ }
+
+ body {
+ min-width: 48em;
+ }
+
+ h1 {
+ font-weight: bold;
+ font-size: 200%;
+ }
+
+ h2 {
+ font-weight : bold;
+ font-size : 150%;
+
+ padding-top : 0.8em;
+ }
+
+ h3 {
+ font-size : 130%;
+ padding-top : 0.8em;
+ }
+
+ /* Adjust indentation for three levels. */
+ #container {
+ max-width: 48em;
+ }
+
+ #content {
+ padding: 0 0.1em 0 4em;
+ /*background-color: red;*/
+ }
+
+ #content h1 {
+ margin-left: -2.06em;
+ }
+
+ #content h2 {
+ margin-left: -1.33em;
+ }
+
+ /* Title page */
+
+ #titlepage {
+ padding: 2em 0 1em 0;
+ border-bottom: 1px solid black;
+ }
+
+ #titlepage #title {
+ font-weight: bold;
+ font-size: 200%;
+ text-align: center;
+ padding: 1em 0 2em 0;
+ }
+
+ /* Lists */
+ ul.list li {
+ padding-top : 0.3em;
+ padding-bottom : 0.3em;
+ }
+
+
+ /* Built-in table */
+ #builtin {
+ margin: 2em 0 2em 0;
+
+ border-collapse : collapse;
+ border : 1px solid;
+ border-color : #000000;
+
+ font-size : 11px;
+ line-height : 14px;
+ }
+
+ #builtin th, #builtin td {
+ border: 1px solid;
+ padding : 0.9em 0.9em 0.7em 0.9em;
+ }
+
+ #builtin th {
+ background : #cde8f6;
+ }
+
+ #builtin td {
+ text-align: left;
+ }
+
+
+ /* default-fixed */
+ #default-fixed {
+ margin: 2em 0 2em 0;
+
+ border-collapse : collapse;
+ border : 1px solid;
+ border-color : #000000;
+
+ font-size : 11px;
+ line-height : 14px;
+ }
+
+ #default-fixed th, #default-fixed td {
+ border: 1px solid;
+ padding : 0.9em 0.9em 0.7em 0.9em;
+ }
+
+ #default-fixed th {
+ background : #cde8f6;
+ }
+
+ #default-fixed td {
+ text-align: center;
+ }
+
+
+ /* */
+ dl dt {
+ padding : 0.8em 0 0 0;
+ }
+
+
+ /* TOC */
+ table.toc {
+ border-style : none;
+ border-collapse : separate;
+ border-spacing : 0;
+
+ margin : 0.2em 0 0.2em 0;
+ padding : 0 0 0 0;
+ }
+
+ table.toc tr {
+ padding : 0 0 0 0;
+ margin : 0 0 0 0;
+ }
+
+ table.toc * td, table.toc * th {
+ border-style : none;
+ margin : 0 0 0 0;
+ vertical-align : top;
+ }
+
+ table.toc * th {
+ font-weight : normal;
+ padding : 0em 0.1em 0em 0;
+ text-align : left;
+ white-space : nowrap;
+ }
+
+ table.toc * table.toc th {
+ padding-left : 1em;
+ }
+
+ table.toc * td {
+ padding : 0em 0 0em 0.7em;
+ text-align : left;
+ }
+</style>
+
+
+</head>
+
+<body>
+<div id="container">
+ <div id="content">
+
+ <div class="noprint">
+
+ <div id="titlepage">
+ <div id="title">C++/Tree Mapping User Manual</div>
+
+ <p>Copyright &#169; @copyright@.</p>
+
+ <p>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href="https://www.codesynthesis.com/licenses/fdl-1.2.txt">GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/index.xhtml">XHTML</a>,
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf">PDF</a>, and
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps">PostScript</a>.</p>
+ </div>
+
+ <h1>Table of Contents</h1>
+
+ <table class="toc">
+ <tr>
+ <th></th><td><a href="#0">Preface</a>
+ <table class="toc">
+ <tr><th></th><td><a href="#0.1">About This Document</a></td></tr>
+ <tr><th></th><td><a href="#0.2">More Information</a></td></tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>1</th><td><a href="#1">Introduction</a></td>
+ </tr>
+
+ <tr>
+ <th>2</th><td><a href="#2">C++/Tree Mapping</a>
+ <table class="toc">
+ <tr>
+ <th>2.1</th><td><a href="#2.1">Preliminary Information</a>
+ <table class="toc">
+ <tr><th>2.1.1</th><td><a href="#2.1.1">C++ Standard</a></td></tr>
+ <tr><th>2.1.2</th><td><a href="#2.1.2">Identifiers</a></td></tr>
+ <tr><th>2.1.3</th><td><a href="#2.1.3">Character Type and Encoding</a></td></tr>
+ <tr><th>2.1.4</th><td><a href="#2.1.4">XML Schema Namespace</a></td></tr>
+ <tr><th>2.1.5</th><td><a href="#2.1.5">Anonymous Types</a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.2</th><td><a href="#2.2">Error Handling</a>
+ <table class="toc">
+ <tr><th>2.2.1</th><td><a href="#2.2.1"><code>xml_schema::duplicate_id</code></a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.3</th><td><a href="#2.3">Mapping for <code>import</code> and <code>include</code></a>
+ <table class="toc">
+ <tr><th>2.3.1</th><td><a href="#2.3.1">Import</a></td></tr>
+ <tr><th>2.3.2</th><td><a href="#2.3.2">Inclusion with Target Namespace</a></td></tr>
+ <tr><th>2.3.3</th><td><a href="#2.3.3">Inclusion without Target Namespace</a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.4</th><td><a href="#2.4">Mapping for Namespaces</a></td>
+ </tr>
+ <tr>
+ <th>2.5</th><td><a href="#2.5">Mapping for Built-in Data Types</a>
+ <table class="toc">
+ <tr><th>2.5.1</th><td><a href="#2.5.1">Inheritance from Built-in Data Types</a></td></tr>
+ <tr><th>2.5.2</th><td><a href="#2.5.2">Mapping for <code>anyType</code></a></td></tr>
+ <tr><th>2.5.3</th><td><a href="#2.5.3">Mapping for <code>anySimpleType</code></a></td></tr>
+ <tr><th>2.5.4</th><td><a href="#2.5.4">Mapping for <code>QName</code></a></td></tr>
+ <tr><th>2.5.5</th><td><a href="#2.5.5">Mapping for <code>IDREF</code></a></td></tr>
+ <tr><th>2.5.6</th><td><a href="#2.5.6">Mapping for <code>base64Binary</code> and <code>hexBinary</code></a></td></tr>
+ <tr><th>2.5.7</th><td><a href="#2.5.7">Time Zone Representation</a></td></tr>
+ <tr><th>2.5.8</th><td><a href="#2.5.8">Mapping for <code>date</code></a></td></tr>
+ <tr><th>2.5.9</th><td><a href="#2.5.9">Mapping for <code>dateTime</code></a></td></tr>
+ <tr><th>2.5.10</th><td><a href="#2.5.10">Mapping for <code>duration</code></a></td></tr>
+ <tr><th>2.5.11</th><td><a href="#2.5.11">Mapping for <code>gDay</code></a></td></tr>
+ <tr><th>2.5.12</th><td><a href="#2.5.12">Mapping for <code>gMonth</code></a></td></tr>
+ <tr><th>2.5.13</th><td><a href="#2.5.13">Mapping for <code>gMonthDay</code></a></td></tr>
+ <tr><th>2.5.14</th><td><a href="#2.5.14">Mapping for <code>gYear</code></a></td></tr>
+ <tr><th>2.5.15</th><td><a href="#2.5.15">Mapping for <code>gYearMonth</code></a></td></tr>
+ <tr><th>2.5.16</th><td><a href="#2.5.16">Mapping for <code>time</code></a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.6</th><td><a href="#2.6">Mapping for Simple Types</a>
+ <table class="toc">
+ <tr><th>2.6.1</th><td><a href="#2.6.1">Mapping for Derivation by Restriction</a></td></tr>
+ <tr><th>2.6.2</th><td><a href="#2.6.2">Mapping for Enumerations</a></td></tr>
+ <tr><th>2.6.3</th><td><a href="#2.6.3">Mapping for Derivation by List</a></td></tr>
+ <tr><th>2.6.4</th><td><a href="#2.6.4">Mapping for Derivation by Union</a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.7</th><td><a href="#2.7">Mapping for Complex Types</a>
+ <table class="toc">
+ <tr><th>2.7.1</th><td><a href="#2.7.1">Mapping for Derivation by Extension</a></td></tr>
+ <tr><th>2.7.2</th><td><a href="#2.7.2">Mapping for Derivation by Restriction</a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.8</th><td><a href="#2.8">Mapping for Local Elements and Attributes</a>
+ <table class="toc">
+ <tr><th>2.8.1</th><td><a href="#2.8.1">Mapping for Members with the One Cardinality Class</a></td></tr>
+ <tr><th>2.8.2</th><td><a href="#2.8.2">Mapping for Members with the Optional Cardinality Class</a></td></tr>
+ <tr><th>2.8.3</th><td><a href="#2.8.3">Mapping for Members with the Sequence Cardinality Class</a></td></tr>
+ <tr><th>2.8.4</th><td><a href="#2.8.4">Element Order</a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.9</th><td><a href="#2.9">Mapping for Global Elements</a>
+ <table class="toc">
+ <tr><th>2.9.1</th><td><a href="#2.9.1">Element Types</a></td></tr>
+ <tr><th>2.9.2</th><td><a href="#2.9.2">Element Map</a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.10</th><td><a href="#2.10">Mapping for Global Attributes</a></td>
+ </tr>
+ <tr>
+ <th>2.11</th><td><a href="#2.11">Mapping for <code>xsi:type</code> and Substitution Groups</a></td>
+ </tr>
+ <tr>
+ <th>2.12</th><td><a href="#2.12">Mapping for <code>any</code> and <code>anyAttribute</code></a>
+ <table class="toc">
+ <tr><th>2.12.1</th><td><a href="#2.12.1">Mapping for <code>any</code> with the One Cardinality Class</a></td></tr>
+ <tr><th>2.12.2</th><td><a href="#2.12.2">Mapping for <code>any</code> with the Optional Cardinality Class</a></td></tr>
+ <tr><th>2.12.3</th><td><a href="#2.12.3">Mapping for <code>any</code> with the Sequence Cardinality Class</a></td></tr>
+ <tr><th>2.12.4</th><td><a href="#2.12.4">Element Wildcard Order</a></td></tr>
+ <tr><th>2.12.5</th><td><a href="#2.12.5">Mapping for <code>anyAttribute</code></a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>2.13</th><td><a href="#2.13">Mapping for Mixed Content Models</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>3</th><td><a href="#3">Parsing</a>
+ <table class="toc">
+ <tr>
+ <th>3.1</th><td><a href="#3.1">Initializing the Xerces-C++ Runtime</a></td>
+ </tr>
+ <tr>
+ <th>3.2</th><td><a href="#3.2">Flags and Properties</a></td>
+ </tr>
+ <tr>
+ <th>3.3</th><td><a href="#3.3">Error Handling</a>
+ <table class="toc">
+ <tr><th>3.3.1</th><td><a href="#3.3.1"><code>xml_schema::parsing</code></a></td></tr>
+ <tr><th>3.3.2</th><td><a href="#3.3.2"><code>xml_schema::expected_element</code></a></td></tr>
+ <tr><th>3.3.3</th><td><a href="#3.3.3"><code>xml_schema::unexpected_element</code></a></td></tr>
+ <tr><th>3.3.4</th><td><a href="#3.3.4"><code>xml_schema::expected_attribute</code></a></td></tr>
+ <tr><th>3.3.5</th><td><a href="#3.3.5"><code>xml_schema::unexpected_enumerator</code></a></td></tr>
+ <tr><th>3.3.6</th><td><a href="#3.3.6"><code>xml_schema::expected_text_content</code></a></td></tr>
+ <tr><th>3.3.7</th><td><a href="#3.3.7"><code>xml_schema::no_type_info</code></a></td></tr>
+ <tr><th>3.3.8</th><td><a href="#3.3.8"><code>xml_schema::not_derived</code></a></td></tr>
+ <tr><th>3.3.9</th><td><a href="#3.3.9"><code>xml_schema::not_prefix_mapping</code></a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>3.4</th><td><a href="#3.4">Reading from a Local File or URI</a></td>
+ </tr>
+ <tr>
+ <th>3.5</th><td><a href="#3.5">Reading from <code>std::istream</code></a></td>
+ </tr>
+ <tr>
+ <th>3.6</th><td><a href="#3.6">Reading from <code>xercesc::InputSource</code></a></td>
+ </tr>
+ <tr>
+ <th>3.7</th><td><a href="#3.7">Reading from DOM</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>4</th><td><a href="#4">Serialization</a>
+ <table class="toc">
+ <tr>
+ <th>4.1</th><td><a href="#4.1">Initializing the Xerces-C++ Runtime</a></td>
+ </tr>
+ <tr>
+ <th>4.2</th><td><a href="#4.2">Namespace Infomap and Character Encoding</a></td>
+ </tr>
+ <tr>
+ <th>4.3</th><td><a href="#4.3">Flags</a></td>
+ </tr>
+ <tr>
+ <th>4.4</th><td><a href="#4.4">Error Handling</a>
+ <table class="toc">
+ <tr><th>4.4.1</th><td><a href="#4.4.1"><code>xml_schema::serialization</code></a></td></tr>
+ <tr><th>4.4.2</th><td><a href="#4.4.2"><code>xml_schema::unexpected_element</code></a></td></tr>
+ <tr><th>4.4.3</th><td><a href="#4.4.3"><code>xml_schema::no_type_info</code></a></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>4.5</th><td><a href="#4.5">Serializing to <code>std::ostream</code></a></td>
+ </tr>
+ <tr>
+ <th>4.6</th><td><a href="#4.6">Serializing to <code>xercesc::XMLFormatTarget</code></a></td>
+ </tr>
+ <tr>
+ <th>4.7</th><td><a href="#4.7">Serializing to DOM</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th>5</th><td><a href="#5">Additional Functionality</a>
+ <table class="toc">
+ <tr>
+ <th>5.1</th><td><a href="#5.1">DOM Association</a></td>
+ </tr>
+ <tr>
+ <th>5.2</th><td><a href="#5.2">Binary Serialization</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <th></th><td><a href="#A">Appendix A &mdash; Default and Fixed Values</a></td>
+ </tr>
+
+ </table>
+ </div>
+
+ <h1><a name="0">Preface</a></h1>
+
+ <h2><a name="0.1">About This Document</a></h2>
+
+ <p>This document describes the mapping of W3C XML Schema
+ to the C++ programming language as implemented by
+ <a href="https://www.codesynthesis.com/products/xsd">CodeSynthesis
+ XSD</a> - an XML Schema to C++ data binding compiler. The mapping
+ represents information stored in XML instance documents as a
+ statically-typed, tree-like in-memory data structure and is
+ called C++/Tree.
+ </p>
+
+ <p>Revision 4.1.0<br/> <!-- Remember to change revision in other places -->
+ This revision of the manual describes the C++/Tree
+ mapping as implemented by CodeSynthesis XSD version 4.1.0.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/index.xhtml">XHTML</a>,
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf">PDF</a>, and
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps">PostScript</a>.</p>
+
+ <h2><a name="0.2">More Information</a></h2>
+
+ <p>Beyond this manual, you may also find the following sources of
+ information useful:</p>
+
+ <ul class="list">
+ <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/">C++/Tree
+ Mapping Getting Started Guide</a></li>
+
+ <li><a href="http://wiki.codesynthesis.com/Tree/Customization_guide">C++/Tree
+ Mapping Customization Guide</a></li>
+
+ <li><a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree
+ Mapping Frequently Asked Questions (FAQ)</a></li>
+
+ <li><a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a></li>
+
+ <li>The <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ contains a collection of examples and a README file with an overview
+ of each example.</li>
+
+ <li>The <code>README</code> file in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a> package
+ explains how to build the examples.</li>
+
+ <li>The <a href="https://www.codesynthesis.com/mailman/listinfo/xsd-users">xsd-users</a>
+ mailing list is a place to ask questions. Furthermore the
+ <a href="https://www.codesynthesis.com/pipermail/xsd-users/">archives</a>
+ may already have answers to some of your questions.</li>
+ </ul>
+
+
+ <h1><a name="1">1 Introduction</a></h1>
+
+ <p>C++/Tree is a W3C XML Schema to C++ mapping that represents the
+ data stored in XML as a statically-typed, vocabulary-specific
+ object model. Based on a formal description of an XML vocabulary
+ (schema), the C++/Tree mapping produces a tree-like data structure
+ suitable for in-memory processing as well as XML parsing and
+ serialization code.</p>
+
+ <p>A typical application that processes XML documents usually
+ performs the following three steps: it first reads (parses) an XML
+ instance document to an object model, it then performs
+ some useful computations on that model which may involve
+ modification of the model, and finally it may write (serialize)
+ the modified object model back to XML.
+ </p>
+
+ <p>The C++/Tree mapping consists of C++ types that represent the
+ given vocabulary (<a href="#2">Chapter 2, "C++/Tree Mapping"</a>),
+ a set of parsing functions that convert XML documents to
+ a tree-like in-memory data structure (<a href="#3">Chapter 3,
+ "Parsing"</a>), and a set of serialization functions that convert
+ the object model back to XML (<a href="#4">Chapter 4,
+ "Serialization"</a>). Furthermore, the mapping provides a number
+ of additional features, such as DOM association and binary
+ serialization, that can be useful in some applications
+ (<a href="#5">Chapter 5, "Additional Functionality"</a>).
+ </p>
+
+
+ <!-- Chapter 2 -->
+
+
+ <h1><a name="2">2 C++/Tree Mapping</a></h1>
+
+ <h2><a name="2.1">2.1 Preliminary Information</a></h2>
+
+ <h3><a name="2.1.1">2.1.1 C++ Standard</a></h3>
+
+ <p>The C++/Tree mapping provides support for ISO/IEC C++ 2011 (C++11)
+ and ISO/IEC C++ 1998/2003 (C++98). To select the C++ standard for the
+ generated code we use the <code>--std</code> XSD compiler command
+ line option. While the majority of the examples in this guide use
+ C++11, the document explains the C++11/98 usage difference and so
+ they can easily be converted to C++98.</p>
+
+ <h3><a name="2.1.2">2.1.2 Identifiers</a></h3>
+
+ <p>XML Schema names may happen to be reserved C++ keywords or contain
+ characters that are illegal in C++ identifiers. To avoid C++ compilation
+ problems, such names are changed (escaped) when mapped to C++. If an
+ XML Schema name is a C++ keyword, the "_" suffix is added to it. All
+ character of an XML Schema name that are not allowed in C++ identifiers
+ are replaced with "_".
+ </p>
+
+ <p>For example, XML Schema name <code>try</code> will be mapped to
+ C++ identifier <code>try_</code>. Similarly, XML Schema name
+ <code>strange.na-me</code> will be mapped to C++ identifier
+ <code>strange_na_me</code>.
+ </p>
+
+ <p>Furthermore, conflicts between type names and function names in the
+ same scope are resolved using name escaping. Such conflicts include
+ both a global element (which is mapped to a set of parsing and/or
+ serialization functions or element types, see <a href="#2.9">Section
+ 2.9, "Mapping for Global Elements"</a>) and a global type sharing the
+ same name as well as a local element or attribute inside a type having
+ the same name as the type itself.</p>
+
+ <p>For example, if we had a global type <code>catalog</code>
+ and a global element with the same name then the type would be
+ mapped to a C++ class with name <code>catalog</code> while the
+ parsing functions corresponding to the global element would have
+ their names escaped as <code>catalog_</code>.
+ </p>
+
+ <p>By default the mapping uses the so-called K&amp;R (Kernighan and
+ Ritchie) identifier naming convention which is also used throughout
+ this manual. In this convention both type and function names are in
+ lower case and words are separated by underscores. If your application
+ code or schemas use a different notation, you may want to change the
+ naming convention used by the mapping for consistency.
+ The compiler supports a set of widely-used naming conventions
+ that you can select with the <code>--type-naming</code> and
+ <code>--function-naming</code> options. You can also further
+ refine one of the predefined conventions or create a completely
+ custom naming scheme by using the <code>--*-regex</code> options.
+ For more detailed information on these options refer to the NAMING
+ CONVENTION section in the <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a>.</p>
+
+ <h3><a name="2.1.3">2.1.3 Character Type and Encoding</a></h3>
+
+ <p>The code that implements the mapping, depending on the
+ <code>--char-type</code> option, is generated using either
+ <code>char</code> or <code>wchar_t</code> as the character
+ type. In this document code samples use symbol <code>C</code>
+ to refer to the character type you have selected when translating
+ your schemas, for example <code>std::basic_string&lt;C></code>.
+ </p>
+
+ <p>Another aspect of the mapping that depends on the character type
+ is character encoding. For the <code>char</code> character type
+ the default encoding is UTF-8. Other supported encodings are
+ ISO-8859-1, Xerces-C++ Local Code Page (LPC), as well as
+ custom encodings and can be selected with the
+ <code>--char-encoding</code> command line option.</p>
+
+ <p>For the <code>wchar_t</code> character type the encoding is
+ automatically selected between UTF-16 and UTF-32/UCS-4 depending
+ on the size of the <code>wchar_t</code> type. On some platforms
+ (for example, Windows with Visual C++ and AIX with IBM XL C++)
+ <code>wchar_t</code> is 2 bytes long. For these platforms the
+ encoding is UTF-16. On other platforms <code>wchar_t</code> is 4 bytes
+ long and UTF-32/UCS-4 is used.</p>
+
+ <h3><a name="2.1.4">2.1.4 XML Schema Namespace</a></h3>
+
+ <p>The mapping relies on some predefined types, classes, and functions
+ that are logically defined in the XML Schema namespace reserved for
+ the XML Schema language (<code>http://www.w3.org/2001/XMLSchema</code>).
+ By default, this namespace is mapped to C++ namespace
+ <code>xml_schema</code>. It is automatically accessible
+ from a C++ compilation unit that includes a header file generated
+ from an XML Schema definition.
+ </p>
+
+ <p>Note that, if desired, the default mapping of this namespace can be
+ changed as described in <a href="#2.4">Section 2.4, "Mapping for
+ Namespaces"</a>.
+ </p>
+
+
+ <h3><a name="2.1.5">2.1.5 Anonymous Types</a></h3>
+
+ <p>For the purpose of code generation, anonymous types defined in
+ XML Schema are automatically assigned names that are derived
+ from enclosing attributes and elements. Otherwise, such types
+ follows standard mapping rules for simple and complex type
+ definitions (see <a href="#2.6">Section 2.6, "Mapping for Simple Types"</a>
+ and <a href="#2.7">Section 2.7, "Mapping for Complex Types"</a>).
+ For example, in the following schema fragment:
+ </p>
+
+ <pre class="xml">
+&lt;element name="object">
+ &lt;complexType>
+ ...
+ &lt;/complexType>
+&lt;/element>
+ </pre>
+
+ <p>The anonymous type defined inside element <code>object</code> will
+ be given name <code>object</code>. The compiler has a number of
+ options that control the process of anonymous type naming. For more
+ information refer to the <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a>.</p>
+
+
+ <h2><a name="2.2">2.2 Error Handling</a></h2>
+
+ <p>The mapping uses the C++ exception handling mechanism as a primary way
+ of reporting error conditions. All exceptions that are specified in
+ this mapping derive from <code>xml_schema::exception</code> which
+ itself is derived from <code>std::exception</code>:
+ </p>
+
+ <pre class="c++">
+struct exception: virtual std::exception
+{
+ friend
+ std::basic_ostream&lt;C>&amp;
+ operator&lt;&lt; (std::basic_ostream&lt;C>&amp; os, const exception&amp; e)
+ {
+ e.print (os);
+ return os;
+ }
+
+protected:
+ virtual void
+ print (std::basic_ostream&lt;C>&amp;) const = 0;
+};
+ </pre>
+
+ <p>The exception hierarchy supports "virtual" <code>operator&lt;&lt;</code>
+ which allows you to obtain diagnostics corresponding to the thrown
+ exception using the base exception interface. For example:</p>
+
+ <pre class="c++">
+try
+{
+ ...
+}
+catch (const xml_schema::exception&amp; e)
+{
+ cerr &lt;&lt; e &lt;&lt; endl;
+}
+ </pre>
+
+ <p>The following sub-sections describe exceptions thrown by the
+ types that constitute the object model.
+ <a href="#3.3">Section 3.3, "Error Handling"</a> of
+ <a href="#3">Chapter 3, "Parsing"</a> describes exceptions
+ and error handling mechanisms specific to the parsing functions.
+ <a href="#4.4">Section 4.4, "Error Handling"</a> of
+ <a href="#4">Chapter 4, "Serialization"</a> describes exceptions
+ and error handling mechanisms specific to the serialization functions.
+ </p>
+
+
+ <h3><a name="2.2.1">2.2.1 <code>xml_schema::duplicate_id</code></a></h3>
+
+ <pre class="c++">
+struct duplicate_id: virtual exception
+{
+ duplicate_id (const std::basic_string&lt;C>&amp; id);
+
+ const std::basic_string&lt;C>&amp;
+ id () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::duplicate_id</code> is thrown when
+ a conflicting instance of <code>xml_schema::id</code> (see
+ <a href="#2.5">Section 2.5, "Mapping for Built-in Data Types"</a>)
+ is added to a tree. The offending ID value can be obtained using
+ the <code>id</code> function.
+ </p>
+
+ <h2><a name="2.3">2.3 Mapping for <code>import</code> and <code>include</code></a></h2>
+
+ <h3><a name="2.3.1">2.3.1 Import</a></h3>
+
+ <p>The XML Schema <code>import</code> element is mapped to the C++
+ Preprocessor <code>#include</code> directive. The value of
+ the <code>schemaLocation</code> attribute is used to derive
+ the name of the header file that appears in the <code>#include</code>
+ directive. For instance:
+ </p>
+
+ <pre class="xml">
+&lt;import namespace="https://www.codesynthesis.com/test"
+ schemaLocation="test.xsd"/>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+#include "test.hxx"
+ </pre>
+
+ <p>Note that you will need to compile imported schemas separately
+ in order to produce corresponding header files.</p>
+
+ <h3><a name="2.3.2">2.3.2 Inclusion with Target Namespace</a></h3>
+
+ <p>The XML Schema <code>include</code> element which refers to a schema
+ with a target namespace or appears in a schema without a target namespace
+ follows the same mapping rules as the <code>import</code> element,
+ see <a href="#2.3.1">Section 2.3.1, "Import"</a>.
+ </p>
+
+ <h3><a name="2.3.3">2.3.3 Inclusion without Target Namespace</a></h3>
+
+ <p>For the XML Schema <code>include</code> element which refers to a schema
+ without a target namespace and appears in a schema with a target
+ namespace (such inclusion sometimes called "chameleon inclusion"),
+ declarations and definitions from the included schema are generated
+ in-line in the namespace of the including schema as if they were
+ declared and defined there verbatim. For example, consider the
+ following two schemas:
+ </p>
+
+ <pre class="xml">
+&lt;-- common.xsd -->
+&lt;schema>
+ &lt;complexType name="type">
+ ...
+ &lt;/complexType>
+&lt;/schema>
+
+&lt;-- test.xsd -->
+&lt;schema targetNamespace="https://www.codesynthesis.com/test">
+ &lt;include schemaLocation="common.xsd"/>
+&lt;/schema>
+ </pre>
+
+ <p>The fragment of interest from the generated header file for
+ <code>text.xsd</code> would look like this:</p>
+
+ <pre class="c++">
+// test.hxx
+namespace test
+{
+ class type
+ {
+ ...
+ };
+}
+ </pre>
+
+ <h2><a name="2.4">2.4 Mapping for Namespaces</a></h2>
+
+ <p>An XML Schema namespace is mapped to one or more nested C++
+ namespaces. XML Schema namespaces are identified by URIs.
+ By default, a namespace URI is mapped to a sequence of
+ C++ namespace names by removing the protocol and host parts
+ and splitting the rest into a sequence of names with '<code>/</code>'
+ as the name separator. For instance:
+ </p>
+
+ <pre class="xml">
+&lt;schema targetNamespace="https://www.codesynthesis.com/system/test">
+ ...
+&lt;/schema>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+namespace system
+{
+ namespace test
+ {
+ ...
+ }
+}
+ </pre>
+
+ <p>The default mapping of namespace URIs to C++ namespace names can be
+ altered using the <code>--namespace-map</code> and
+ <code>--namespace-regex</code> options. See the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a> for more information.
+ </p>
+
+ <h2><a name="2.5">2.5 Mapping for Built-in Data Types</a></h2>
+
+ <p>The mapping of XML Schema built-in data types to C++ types is
+ summarized in the table below.</p>
+
+ <!-- border="1" is necessary for html2ps -->
+ <table id="builtin" border="1">
+ <tr>
+ <th>XML Schema type</th>
+ <th>Alias in the <code>xml_schema</code> namespace</th>
+ <th>C++ type</th>
+ </tr>
+
+ <tr>
+ <th colspan="3">anyType and anySimpleType types</th>
+ </tr>
+ <tr>
+ <td><code>anyType</code></td>
+ <td><code>type</code></td>
+ <td><a href="#2.5.2">Section 2.5.2, "Mapping for <code>anyType</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>anySimpleType</code></td>
+ <td><code>simple_type</code></td>
+ <td><a href="#2.5.3">Section 2.5.3, "Mapping for <code>anySimpleType</code>"</a></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">fixed-length integral types</th>
+ </tr>
+ <!-- 8-bit -->
+ <tr>
+ <td><code>byte</code></td>
+ <td><code>byte</code></td>
+ <td><code>signed&nbsp;char</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedByte</code></td>
+ <td><code>unsigned_byte</code></td>
+ <td><code>unsigned&nbsp;char</code></td>
+ </tr>
+
+ <!-- 16-bit -->
+ <tr>
+ <td><code>short</code></td>
+ <td><code>short_</code></td>
+ <td><code>short</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedShort</code></td>
+ <td><code>unsigned_short</code></td>
+ <td><code>unsigned&nbsp;short</code></td>
+ </tr>
+
+ <!-- 32-bit -->
+ <tr>
+ <td><code>int</code></td>
+ <td><code>int_</code></td>
+ <td><code>int</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedInt</code></td>
+ <td><code>unsigned_int</code></td>
+ <td><code>unsigned&nbsp;int</code></td>
+ </tr>
+
+ <!-- 64-bit -->
+ <tr>
+ <td><code>long</code></td>
+ <td><code>long_</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>unsignedLong</code></td>
+ <td><code>unsigned_long</code></td>
+ <td><code>unsigned&nbsp;long&nbsp;long</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">arbitrary-length integral types</th>
+ </tr>
+ <tr>
+ <td><code>integer</code></td>
+ <td><code>integer</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>nonPositiveInteger</code></td>
+ <td><code>non_positive_integer</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>nonNegativeInteger</code></td>
+ <td><code>non_negative_integer</code></td>
+ <td><code>unsigned long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>positiveInteger</code></td>
+ <td><code>positive_integer</code></td>
+ <td><code>unsigned long&nbsp;long</code></td>
+ </tr>
+ <tr>
+ <td><code>negativeInteger</code></td>
+ <td><code>negative_integer</code></td>
+ <td><code>long&nbsp;long</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">boolean types</th>
+ </tr>
+ <tr>
+ <td><code>boolean</code></td>
+ <td><code>boolean</code></td>
+ <td><code>bool</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">fixed-precision floating-point types</th>
+ </tr>
+ <tr>
+ <td><code>float</code></td>
+ <td><code>float_</code></td>
+ <td><code>float</code></td>
+ </tr>
+ <tr>
+ <td><code>double</code></td>
+ <td><code>double_</code></td>
+ <td><code>double</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">arbitrary-precision floating-point types</th>
+ </tr>
+ <tr>
+ <td><code>decimal</code></td>
+ <td><code>decimal</code></td>
+ <td><code>double</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">string types</th>
+ </tr>
+ <tr>
+ <td><code>string</code></td>
+ <td><code>string</code></td>
+ <td>type derived from <code>std::basic_string</code></td>
+ </tr>
+ <tr>
+ <td><code>normalizedString</code></td>
+ <td><code>normalized_string</code></td>
+ <td>type derived from <code>string</code></td>
+ </tr>
+ <tr>
+ <td><code>token</code></td>
+ <td><code>token</code></td>
+ <td>type&nbsp;derived&nbsp;from&nbsp;<code>normalized_string</code></td>
+ </tr>
+ <tr>
+ <td><code>Name</code></td>
+ <td><code>name</code></td>
+ <td>type derived from <code>token</code></td>
+ </tr>
+ <tr>
+ <td><code>NMTOKEN</code></td>
+ <td><code>nmtoken</code></td>
+ <td>type derived from <code>token</code></td>
+ </tr>
+ <tr>
+ <td><code>NMTOKENS</code></td>
+ <td><code>nmtokens</code></td>
+ <td>type derived from <code>sequence&lt;nmtoken></code></td>
+ </tr>
+ <tr>
+ <td><code>NCName</code></td>
+ <td><code>ncname</code></td>
+ <td>type derived from <code>name</code></td>
+ </tr>
+ <tr>
+ <td><code>language</code></td>
+ <td><code>language</code></td>
+ <td>type derived from <code>token</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">qualified name</th>
+ </tr>
+ <tr>
+ <td><code>QName</code></td>
+ <td><code>qname</code></td>
+ <td><a href="#2.5.4">Section 2.5.4, "Mapping for <code>QName</code>"</a></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">ID/IDREF types</th>
+ </tr>
+ <tr>
+ <td><code>ID</code></td>
+ <td><code>id</code></td>
+ <td>type derived from <code>ncname</code></td>
+ </tr>
+ <tr>
+ <td><code>IDREF</code></td>
+ <td><code>idref</code></td>
+ <td><a href="#2.5.5">Section 2.5.5, "Mapping for <code>IDREF</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>IDREFS</code></td>
+ <td><code>idrefs</code></td>
+ <td>type derived from <code>sequence&lt;idref></code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">URI types</th>
+ </tr>
+ <tr>
+ <td><code>anyURI</code></td>
+ <td><code>uri</code></td>
+ <td>type derived from <code>std::basic_string</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">binary types</th>
+ </tr>
+ <tr>
+ <td><code>base64Binary</code></td>
+ <td><code>base64_binary</code></td>
+ <td rowspan="2"><a href="#2.5.6">Section 2.5.6, "Mapping for
+ <code>base64Binary</code> and <code>hexBinary</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>hexBinary</code></td>
+ <td><code>hex_binary</code></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">date/time types</th>
+ </tr>
+ <tr>
+ <td><code>date</code></td>
+ <td><code>date</code></td>
+ <td><a href="#2.5.8">Section 2.5.8, "Mapping for
+ <code>date</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>dateTime</code></td>
+ <td><code>date_time</code></td>
+ <td><a href="#2.5.9">Section 2.5.9, "Mapping for
+ <code>dateTime</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>duration</code></td>
+ <td><code>duration</code></td>
+ <td><a href="#2.5.10">Section 2.5.10, "Mapping for
+ <code>duration</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>gDay</code></td>
+ <td><code>gday</code></td>
+ <td><a href="#2.5.11">Section 2.5.11, "Mapping for
+ <code>gDay</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>gMonth</code></td>
+ <td><code>gmonth</code></td>
+ <td><a href="#2.5.12">Section 2.5.12, "Mapping for
+ <code>gMonth</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>gMonthDay</code></td>
+ <td><code>gmonth_day</code></td>
+ <td><a href="#2.5.13">Section 2.5.13, "Mapping for
+ <code>gMonthDay</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>gYear</code></td>
+ <td><code>gyear</code></td>
+ <td><a href="#2.5.14">Section 2.5.14, "Mapping for
+ <code>gYear</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>gYearMonth</code></td>
+ <td><code>gyear_month</code></td>
+ <td><a href="#2.5.15">Section 2.5.15, "Mapping for
+ <code>gYearMonth</code>"</a></td>
+ </tr>
+ <tr>
+ <td><code>time</code></td>
+ <td><code>time</code></td>
+ <td><a href="#2.5.16">Section 2.5.16, "Mapping for
+ <code>time</code>"</a></td>
+ </tr>
+
+ <tr>
+ <th colspan="3">entity types</th>
+ </tr>
+ <tr>
+ <td><code>ENTITY</code></td>
+ <td><code>entity</code></td>
+ <td>type derived from <code>name</code></td>
+ </tr>
+ <tr>
+ <td><code>ENTITIES</code></td>
+ <td><code>entities</code></td>
+ <td>type derived from <code>sequence&lt;entity></code></td>
+ </tr>
+ </table>
+
+ <p>All XML Schema built-in types are mapped to C++ classes that are
+ derived from the <code>xml_schema::simple_type</code> class except
+ where the mapping is to a fundamental C++ type.</p>
+
+ <p>The <code>sequence</code> class template is defined in an
+ implementation-specific namespace. It conforms to the
+ sequence interface as defined by the ISO/ANSI Standard for
+ C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences").
+ Practically, this means that you can treat such a sequence
+ as if it was <code>std::vector</code>. One notable extension
+ to the standard interface that is available only for
+ sequences of non-fundamental C++ types is the addition of
+ the overloaded <code>push_back</code> and <code>insert</code>
+ member functions which instead of the constant reference
+ to the element type accept automatic pointer (<code>std::unique_ptr</code>
+ or <code>std::auto_ptr</code>, depending on the C++ standard
+ selected) to the element type. These functions assume ownership
+ of the pointed to object and reset the passed automatic pointer.
+ </p>
+
+ <h3><a name="2.5.1">2.5.1 Inheritance from Built-in Data Types</a></h3>
+
+ <p>In cases where the mapping calls for an inheritance from a built-in
+ type which is mapped to a fundamental C++ type, a proxy type is
+ used instead of the fundamental C++ type (C++ does not allow
+ inheritance from fundamental types). For instance:</p>
+
+ <pre class="xml">
+&lt;simpleType name="my_int">
+ &lt;restriction base="int"/>
+&lt;/simpleType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class my_int: public fundamental_base&lt;int>
+{
+ ...
+};
+ </pre>
+
+ <p>The <code>fundamental_base</code> class template provides a close
+ emulation (though not exact) of a fundamental C++ type.
+ It is defined in an implementation-specific namespace and has the
+ following interface:</p>
+
+ <pre class="c++">
+template &lt;typename X>
+class fundamental_base: public simple_type
+{
+public:
+ fundamental_base ();
+ fundamental_base (X)
+ fundamental_base (const fundamental_base&amp;)
+
+public:
+ fundamental_base&amp;
+ operator= (const X&amp;);
+
+public:
+ operator const X &amp; () const;
+ operator X&amp; ();
+
+ template &lt;typename Y>
+ operator Y () const;
+
+ template &lt;typename Y>
+ operator Y ();
+};
+ </pre>
+
+ <h3><a name="2.5.2">2.5.2 Mapping for <code>anyType</code></a></h3>
+
+ <p>The XML Schema <code>anyType</code> built-in data type is mapped to the
+ <code>xml_schema::type</code> C++ class:</p>
+
+ <pre class="c++">
+class type
+{
+public:
+ virtual
+ ~type ();
+
+ type ();
+ type (const type&amp;);
+
+ type&amp;
+ operator= (const type&amp;);
+
+ virtual type*
+ _clone () const;
+
+ // anyType DOM content.
+ //
+public:
+ typedef element_optional dom_content_optional;
+
+ const dom_content_optional&amp;
+ dom_content () const;
+
+ dom_content_optional&amp;
+ dom_content ();
+
+ void
+ dom_content (const xercesc::DOMElement&amp;);
+
+ void
+ dom_content (xercesc::DOMElement*);
+
+ void
+ dom_content (const dom_content_optional&amp;);
+
+ const xercesc::DOMDocument&amp;
+ dom_content_document () const;
+
+ xercesc::DOMDocument&amp;
+ dom_content_document ();
+
+ bool
+ null_content () const;
+
+ // DOM association.
+ //
+public:
+ const xercesc::DOMNode*
+ _node () const;
+
+ xercesc::DOMNode*
+ _node ();
+};
+ </pre>
+
+ <p>When <code>xml_schema::type</code> is used to create an instance
+ (as opposed to being a base of a derived type), it represents
+ the XML Schema <code>anyType</code> type. <code>anyType</code>
+ allows any attributes and any content in any order. In the
+ C++/Tree mapping this content can be represented as a DOM
+ fragment, similar to XML Schema wildcards (<a href="#2.12">Section
+ 2.12, "Mapping for <code>any</code> and
+ <code>anyAttribute</code>"</a>).</p>
+
+ <p>To enable automatic extraction of <code>anyType</code> content
+ during parsing, the <code>--generate-any-type</code> option must be
+ specified. Because the DOM API is used to access such content, the
+ Xerces-C++ runtime should be initialized by the application prior to
+ parsing and should remain initialized for the lifetime of objects
+ with the DOM content. For more information on the Xerces-C++ runtime
+ initialization see <a href="#3.1">Section 3.1, "Initializing the
+ Xerces-C++ Runtime"</a>.</p>
+
+ <p>The DOM content is stored as the optional DOM element container
+ and the DOM content accessors and modifiers presented above are
+ identical to those generated for an optional element wildcard.
+ Refer to <a href="#2.12.2">Section 2.12.2, "Mapping for <code>any</code>
+ with the Optional Cardinality Class"</a> for details on their
+ semantics.</p>
+
+ <p>The <code>dom_content_document()</code> function returns the
+ DOM document used to store the raw XML content corresponding
+ to the <code>anyType</code> instance. It is equivalent to the
+ <code>dom_document()</code> function generated for types
+ with wildcards.</p>
+
+ <p>The <code>null_content()</code> accessor is an optimization function
+ that allows us to check for the lack of content without actually
+ creating its empty representation, that is, empty DOM document for
+ <code>anyType</code> or empty string for <code>anySimpleType</code>
+ (see the following section for details on <code>anySimpleType</code>).</p>
+
+ <p>For more information on DOM association refer to
+ <a href="#5.1">Section 5.1, "DOM Association"</a>.</p>
+
+ <h3><a name="2.5.3">2.5.3 Mapping for <code>anySimpleType</code></a></h3>
+
+ <p>The XML Schema <code>anySimpleType</code> built-in data type is mapped
+ to the <code>xml_schema::simple_type</code> C++ class:</p>
+
+ <pre class="c++">
+class simple_type: public type
+{
+public:
+ simple_type ();
+ simple_type (const C*);
+ simple_type (const std::basic_string&lt;C>&amp;);
+
+ simple_type (const simple_type&amp;);
+
+ simple_type&amp;
+ operator= (const simple_type&amp;);
+
+ virtual simple_type*
+ _clone () const;
+
+ // anySimpleType text content.
+ //
+public:
+ const std::basic_string&lt;C>&amp;
+ text_content () const;
+
+ std::basic_string&lt;C>&amp;
+ text_content ();
+
+ void
+ text_content (const std::basic_string&lt;C>&amp;);
+};
+ </pre>
+
+ <p>When <code>xml_schema::simple_type</code> is used to create an instance
+ (as opposed to being a base of a derived type), it represents
+ the XML Schema <code>anySimpleType</code> type. <code>anySimpleType</code>
+ allows any simple content. In the C++/Tree mapping this content can
+ be represented as a string and accessed or modified with the
+ <code>text_content()</code> functions shown above.</p>
+
+ <h3><a name="2.5.4">2.5.4 Mapping for <code>QName</code></a></h3>
+
+ <p>The XML Schema <code>QName</code> built-in data type is mapped to the
+ <code>xml_schema::qname</code> C++ class:</p>
+
+ <pre class="c++">
+class qname: public simple_type
+{
+public:
+ qname (const ncname&amp;);
+ qname (const uri&amp;, const ncname&amp;);
+ qname (const qname&amp;);
+
+public:
+ qname&amp;
+ operator= (const qname&amp;);
+
+public:
+ virtual qname*
+ _clone () const;
+
+public:
+ bool
+ qualified () const;
+
+ const uri&amp;
+ namespace_ () const;
+
+ const ncname&amp;
+ name () const;
+};
+ </pre>
+
+ <p>The <code>qualified</code> accessor function can be used to determine
+ if the name is qualified.</p>
+
+ <h3><a name="2.5.5">2.5.5 Mapping for <code>IDREF</code></a></h3>
+
+ <p>The XML Schema <code>IDREF</code> built-in data type is mapped to the
+ <code>xml_schema::idref</code> C++ class. This class implements the
+ smart pointer C++ idiom:</p>
+
+ <pre class="c++">
+class idref: public ncname
+{
+public:
+ idref (const C* s);
+ idref (const C* s, std::size_t n);
+ idref (std::size_t n, C c);
+ idref (const std::basic_string&lt;C>&amp;);
+ idref (const std::basic_string&lt;C>&amp;,
+ std::size_t pos,
+ std::size_t n = npos);
+
+public:
+ idref (const idref&amp;);
+
+public:
+ virtual idref*
+ _clone () const;
+
+public:
+ idref&amp;
+ operator= (C c);
+
+ idref&amp;
+ operator= (const C* s);
+
+ idref&amp;
+ operator= (const std::basic_string&lt;C>&amp;)
+
+ idref&amp;
+ operator= (const idref&amp;);
+
+public:
+ const type*
+ operator-> () const;
+
+ type*
+ operator-> ();
+
+ const type&amp;
+ operator* () const;
+
+ type&amp;
+ operator* ();
+
+ const type*
+ get () const;
+
+ type*
+ get ();
+
+ // Conversion to bool.
+ //
+public:
+ typedef void (idref::*bool_convertible)();
+ operator bool_convertible () const;
+};
+ </pre>
+
+ <p>The object, <code>idref</code> instance refers to, is the immediate
+ container of the matching <code>id</code> instance. For example,
+ with the following instance document and schema:
+ </p>
+
+
+ <pre class="xml">
+&lt;!-- test.xml -->
+&lt;root>
+ &lt;object id="obj-1" text="hello"/>
+ &lt;reference>obj-1&lt;/reference>
+&lt;/root>
+
+&lt;!-- test.xsd -->
+&lt;schema>
+ &lt;complexType name="object_type">
+ &lt;attribute name="id" type="ID"/>
+ &lt;attribute name="text" type="string"/>
+ &lt;/complexType>
+
+ &lt;complexType name="root_type">
+ &lt;sequence>
+ &lt;element name="object" type="object_type"/>
+ &lt;element name="reference" type="IDREF"/>
+ &lt;/sequence>
+ &lt;/complexType>
+
+ &lt;element name="root" type="root_type"/>
+&lt;/schema>
+ </pre>
+
+ <p>The <code>ref</code> instance in the code below will refer to
+ an object of type <code>object_type</code>:</p>
+
+ <pre class="c++">
+root_type&amp; root = ...;
+xml_schema::idref&amp; ref (root.reference ());
+object_type&amp; obj (dynamic_cast&lt;object_type&amp;> (*ref));
+cout &lt;&lt; obj.text () &lt;&lt; endl;
+ </pre>
+
+ <p>The smart pointer interface of the <code>idref</code> class always
+ returns a pointer or reference to <code>xml_schema::type</code>.
+ This means that you will need to manually cast such pointer or
+ reference to its real (dynamic) type before you can use it (unless
+ all you need is the base interface provided by
+ <code>xml_schema::type</code>). As a special extension to the XML
+ Schema language, the mapping supports static typing of <code>idref</code>
+ references by employing the <code>refType</code> extension attribute.
+ The following example illustrates this mechanism:
+ </p>
+
+ <pre class="xml">
+&lt;!-- test.xsd -->
+&lt;schema
+ xmlns:xse="https://www.codesynthesis.com/xmlns/xml-schema-extension">
+
+ ...
+
+ &lt;element name="reference" type="IDREF" xse:refType="object_type"/>
+
+ ...
+
+&lt;/schema>
+ </pre>
+
+ <p>With this modification we do not need to do manual casting anymore:
+ </p>
+
+ <pre class="c++">
+root_type&amp; root = ...;
+root_type::reference_type&amp; ref (root.reference ());
+object_type&amp; obj (*ref);
+cout &lt;&lt; ref->text () &lt;&lt; endl;
+ </pre>
+
+
+ <h3><a name="2.5.6">2.5.6 Mapping for <code>base64Binary</code> and
+ <code>hexBinary</code></a></h3>
+
+ <p>The XML Schema <code>base64Binary</code> and <code>hexBinary</code>
+ built-in data types are mapped to the
+ <code>xml_schema::base64_binary</code> and
+ <code>xml_schema::hex_binary</code> C++ classes, respectively. The
+ <code>base64_binary</code> and <code>hex_binary</code> classes
+ support a simple buffer abstraction by inheriting from the
+ <code>xml_schema::buffer</code> class:
+ </p>
+
+ <pre class="c++">
+class bounds: public virtual exception
+{
+public:
+ virtual const char*
+ what () const throw ();
+};
+
+class buffer
+{
+public:
+ typedef std::size_t size_t;
+
+public:
+ buffer (size_t size = 0);
+ buffer (size_t size, size_t capacity);
+ buffer (const void* data, size_t size);
+ buffer (const void* data, size_t size, size_t capacity);
+ buffer (void* data,
+ size_t size,
+ size_t capacity,
+ bool assume_ownership);
+
+public:
+ buffer (const buffer&amp;);
+
+ buffer&amp;
+ operator= (const buffer&amp;);
+
+ void
+ swap (buffer&amp;);
+
+public:
+ size_t
+ capacity () const;
+
+ bool
+ capacity (size_t);
+
+public:
+ size_t
+ size () const;
+
+ bool
+ size (size_t);
+
+public:
+ const char*
+ data () const;
+
+ char*
+ data ();
+
+ const char*
+ begin () const;
+
+ char*
+ begin ();
+
+ const char*
+ end () const;
+
+ char*
+ end ();
+};
+ </pre>
+
+ <p>The last overloaded constructor reuses an existing data buffer instead
+ of making a copy. If the <code>assume_ownership</code> argument is
+ <code>true</code>, the instance assumes ownership of the
+ memory block pointed to by the <code>data</code> argument and will
+ eventually release it by calling <code>operator delete</code>. The
+ <code>capacity</code> and <code>size</code> modifier functions return
+ <code>true</code> if the underlying buffer has moved.
+ </p>
+
+ <p>The <code>bounds</code> exception is thrown if the constructor
+ arguments violate the <code>(size&nbsp;&lt;=&nbsp;capacity)</code>
+ constraint.</p>
+
+ <p>The <code>base64_binary</code> and <code>hex_binary</code> classes
+ support the <code>buffer</code> interface and perform automatic
+ decoding/encoding from/to the Base64 and Hex formats, respectively:
+ </p>
+
+ <pre class="c++">
+class base64_binary: public simple_type, public buffer
+{
+public:
+ base64_binary (size_t size = 0);
+ base64_binary (size_t size, size_t capacity);
+ base64_binary (const void* data, size_t size);
+ base64_binary (const void* data, size_t size, size_t capacity);
+ base64_binary (void* data,
+ size_t size,
+ size_t capacity,
+ bool assume_ownership);
+
+public:
+ base64_binary (const base64_binary&amp;);
+
+ base64_binary&amp;
+ operator= (const base64_binary&amp;);
+
+ virtual base64_binary*
+ _clone () const;
+
+public:
+ std::basic_string&lt;C>
+ encode () const;
+};
+ </pre>
+
+ <pre class="c++">
+class hex_binary: public simple_type, public buffer
+{
+public:
+ hex_binary (size_t size = 0);
+ hex_binary (size_t size, size_t capacity);
+ hex_binary (const void* data, size_t size);
+ hex_binary (const void* data, size_t size, size_t capacity);
+ hex_binary (void* data,
+ size_t size,
+ size_t capacity,
+ bool assume_ownership);
+
+public:
+ hex_binary (const hex_binary&amp;);
+
+ hex_binary&amp;
+ operator= (const hex_binary&amp;);
+
+ virtual hex_binary*
+ _clone () const;
+
+public:
+ std::basic_string&lt;C>
+ encode () const;
+};
+ </pre>
+
+
+ <h2><a name="2.5.7">2.5.7 Time Zone Representation</a></h2>
+
+ <p>The <code>date</code>, <code>dateTime</code>, <code>gDay</code>,
+ <code>gMonth</code>, <code>gMonthDay</code>, <code>gYear</code>,
+ <code>gYearMonth</code>, and <code>time</code> XML Schema built-in
+ types all include an optional time zone component. The following
+ <code>xml_schema::time_zone</code> base class is used to represent
+ this information:</p>
+
+ <pre class="c++">
+class time_zone
+{
+public:
+ time_zone ();
+ time_zone (short hours, short minutes);
+
+ bool
+ zone_present () const;
+
+ void
+ zone_reset ();
+
+ short
+ zone_hours () const;
+
+ void
+ zone_hours (short);
+
+ short
+ zone_minutes () const;
+
+ void
+ zone_minutes (short);
+};
+
+bool
+operator== (const time_zone&amp;, const time_zone&amp;);
+
+bool
+operator!= (const time_zone&amp;, const time_zone&amp;);
+ </pre>
+
+ <p>The <code>zone_present()</code> accessor function returns <code>true</code>
+ if the time zone is specified. The <code>zone_reset()</code> modifier
+ function resets the time zone object to the <em>not specified</em>
+ state. If the time zone offset is negative then both hours and
+ minutes components are represented as negative integers.</p>
+
+
+ <h2><a name="2.5.8">2.5.8 Mapping for <code>date</code></a></h2>
+
+ <p>The XML Schema <code>date</code> built-in data type is mapped to the
+ <code>xml_schema::date</code> C++ class which represents a year, a day,
+ and a month with an optional time zone. Its interface is presented
+ below. For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+class date: public simple_type, public time_zone
+{
+public:
+ date (int year, unsigned short month, unsigned short day);
+ date (int year, unsigned short month, unsigned short day,
+ short zone_hours, short zone_minutes);
+
+public:
+ date (const date&amp;);
+
+ date&amp;
+ operator= (const date&amp;);
+
+ virtual date*
+ _clone () const;
+
+public:
+ int
+ year () const;
+
+ void
+ year (int);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+};
+
+bool
+operator== (const date&amp;, const date&amp;);
+
+bool
+operator!= (const date&amp;, const date&amp;);
+ </pre>
+
+ <h2><a name="2.5.9">2.5.9 Mapping for <code>dateTime</code></a></h2>
+
+ <p>The XML Schema <code>dateTime</code> built-in data type is mapped to the
+ <code>xml_schema::date_time</code> C++ class which represents a year, a month,
+ a day, hours, minutes, and seconds with an optional time zone. Its interface
+ is presented below. For more information on the base
+ <code>xml_schema::time_zone</code> class refer to <a href="#2.5.7">Section
+ 2.5.7, "Time Zone Representation"</a>.</p>
+
+ <pre class="c++">
+class date_time: public simple_type, public time_zone
+{
+public:
+ date_time (int year, unsigned short month, unsigned short day,
+ unsigned short hours, unsigned short minutes,
+ double seconds);
+
+ date_time (int year, unsigned short month, unsigned short day,
+ unsigned short hours, unsigned short minutes,
+ double seconds, short zone_hours, short zone_minutes);
+public:
+ date_time (const date_time&amp;);
+
+ date_time&amp;
+ operator= (const date_time&amp;);
+
+ virtual date_time*
+ _clone () const;
+
+public:
+ int
+ year () const;
+
+ void
+ year (int);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+
+ unsigned short
+ hours () const;
+
+ void
+ hours (unsigned short);
+
+ unsigned short
+ minutes () const;
+
+ void
+ minutes (unsigned short);
+
+ double
+ seconds () const;
+
+ void
+ seconds (double);
+};
+
+bool
+operator== (const date_time&amp;, const date_time&amp;);
+
+bool
+operator!= (const date_time&amp;, const date_time&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.10">2.5.10 Mapping for <code>duration</code></a></h2>
+
+ <p>The XML Schema <code>duration</code> built-in data type is mapped to the
+ <code>xml_schema::duration</code> C++ class which represents a potentially
+ negative duration in the form of years, months, days, hours, minutes,
+ and seconds. Its interface is presented below.</p>
+
+ <pre class="c++">
+class duration: public simple_type
+{
+public:
+ duration (bool negative,
+ unsigned int years, unsigned int months, unsigned int days,
+ unsigned int hours, unsigned int minutes, double seconds);
+public:
+ duration (const duration&amp;);
+
+ duration&amp;
+ operator= (const duration&amp;);
+
+ virtual duration*
+ _clone () const;
+
+public:
+ bool
+ negative () const;
+
+ void
+ negative (bool);
+
+ unsigned int
+ years () const;
+
+ void
+ years (unsigned int);
+
+ unsigned int
+ months () const;
+
+ void
+ months (unsigned int);
+
+ unsigned int
+ days () const;
+
+ void
+ days (unsigned int);
+
+ unsigned int
+ hours () const;
+
+ void
+ hours (unsigned int);
+
+ unsigned int
+ minutes () const;
+
+ void
+ minutes (unsigned int);
+
+ double
+ seconds () const;
+
+ void
+ seconds (double);
+};
+
+bool
+operator== (const duration&amp;, const duration&amp;);
+
+bool
+operator!= (const duration&amp;, const duration&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.11">2.5.11 Mapping for <code>gDay</code></a></h2>
+
+ <p>The XML Schema <code>gDay</code> built-in data type is mapped to the
+ <code>xml_schema::gday</code> C++ class which represents a day of the
+ month with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+class gday: public simple_type, public time_zone
+{
+public:
+ explicit
+ gday (unsigned short day);
+ gday (unsigned short day, short zone_hours, short zone_minutes);
+
+public:
+ gday (const gday&amp;);
+
+ gday&amp;
+ operator= (const gday&amp;);
+
+ virtual gday*
+ _clone () const;
+
+public:
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+};
+
+bool
+operator== (const gday&amp;, const gday&amp;);
+
+bool
+operator!= (const gday&amp;, const gday&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.12">2.5.12 Mapping for <code>gMonth</code></a></h2>
+
+ <p>The XML Schema <code>gMonth</code> built-in data type is mapped to the
+ <code>xml_schema::gmonth</code> C++ class which represents a month of the
+ year with an optional time zone. Its interface is presented below.
+ For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+class gmonth: public simple_type, public time_zone
+{
+public:
+ explicit
+ gmonth (unsigned short month);
+ gmonth (unsigned short month,
+ short zone_hours, short zone_minutes);
+
+public:
+ gmonth (const gmonth&amp;);
+
+ gmonth&amp;
+ operator= (const gmonth&amp;);
+
+ virtual gmonth*
+ _clone () const;
+
+public:
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+};
+
+bool
+operator== (const gmonth&amp;, const gmonth&amp;);
+
+bool
+operator!= (const gmonth&amp;, const gmonth&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.13">2.5.13 Mapping for <code>gMonthDay</code></a></h2>
+
+ <p>The XML Schema <code>gMonthDay</code> built-in data type is mapped to the
+ <code>xml_schema::gmonth_day</code> C++ class which represents a day and
+ a month of the year with an optional time zone. Its interface is presented
+ below. For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+class gmonth_day: public simple_type, public time_zone
+{
+public:
+ gmonth_day (unsigned short month, unsigned short day);
+ gmonth_day (unsigned short month, unsigned short day,
+ short zone_hours, short zone_minutes);
+
+public:
+ gmonth_day (const gmonth_day&amp;);
+
+ gmonth_day&amp;
+ operator= (const gmonth_day&amp;);
+
+ virtual gmonth_day*
+ _clone () const;
+
+public:
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+
+ unsigned short
+ day () const;
+
+ void
+ day (unsigned short);
+};
+
+bool
+operator== (const gmonth_day&amp;, const gmonth_day&amp;);
+
+bool
+operator!= (const gmonth_day&amp;, const gmonth_day&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.14">2.5.14 Mapping for <code>gYear</code></a></h2>
+
+ <p>The XML Schema <code>gYear</code> built-in data type is mapped to the
+ <code>xml_schema::gyear</code> C++ class which represents a year with
+ an optional time zone. Its interface is presented below. For more
+ information on the base <code>xml_schema::time_zone</code> class refer
+ to <a href="#2.5.7">Section 2.5.7, "Time Zone Representation"</a>.</p>
+
+ <pre class="c++">
+class gyear: public simple_type, public time_zone
+{
+public:
+ explicit
+ gyear (int year);
+ gyear (int year, short zone_hours, short zone_minutes);
+
+public:
+ gyear (const gyear&amp;);
+
+ gyear&amp;
+ operator= (const gyear&amp;);
+
+ virtual gyear*
+ _clone () const;
+
+public:
+ int
+ year () const;
+
+ void
+ year (int);
+};
+
+bool
+operator== (const gyear&amp;, const gyear&amp;);
+
+bool
+operator!= (const gyear&amp;, const gyear&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.15">2.5.15 Mapping for <code>gYearMonth</code></a></h2>
+
+ <p>The XML Schema <code>gYearMonth</code> built-in data type is mapped to
+ the <code>xml_schema::gyear_month</code> C++ class which represents
+ a year and a month with an optional time zone. Its interface is presented
+ below. For more information on the base <code>xml_schema::time_zone</code>
+ class refer to <a href="#2.5.7">Section 2.5.7, "Time Zone
+ Representation"</a>.</p>
+
+ <pre class="c++">
+class gyear_month: public simple_type, public time_zone
+{
+public:
+ gyear_month (int year, unsigned short month);
+ gyear_month (int year, unsigned short month,
+ short zone_hours, short zone_minutes);
+public:
+ gyear_month (const gyear_month&amp;);
+
+ gyear_month&amp;
+ operator= (const gyear_month&amp;);
+
+ virtual gyear_month*
+ _clone () const;
+
+public:
+ int
+ year () const;
+
+ void
+ year (int);
+
+ unsigned short
+ month () const;
+
+ void
+ month (unsigned short);
+};
+
+bool
+operator== (const gyear_month&amp;, const gyear_month&amp;);
+
+bool
+operator!= (const gyear_month&amp;, const gyear_month&amp;);
+ </pre>
+
+
+ <h2><a name="2.5.16">2.5.16 Mapping for <code>time</code></a></h2>
+
+ <p>The XML Schema <code>time</code> built-in data type is mapped to
+ the <code>xml_schema::time</code> C++ class which represents hours,
+ minutes, and seconds with an optional time zone. Its interface is
+ presented below. For more information on the base
+ <code>xml_schema::time_zone</code> class refer to
+ <a href="#2.5.7">Section 2.5.7, "Time Zone Representation"</a>.</p>
+
+ <pre class="c++">
+class time: public simple_type, public time_zone
+{
+public:
+ time (unsigned short hours, unsigned short minutes, double seconds);
+ time (unsigned short hours, unsigned short minutes, double seconds,
+ short zone_hours, short zone_minutes);
+
+public:
+ time (const time&amp;);
+
+ time&amp;
+ operator= (const time&amp;);
+
+ virtual time*
+ _clone () const;
+
+public:
+ unsigned short
+ hours () const;
+
+ void
+ hours (unsigned short);
+
+ unsigned short
+ minutes () const;
+
+ void
+ minutes (unsigned short);
+
+ double
+ seconds () const;
+
+ void
+ seconds (double);
+};
+
+bool
+operator== (const time&amp;, const time&amp;);
+
+bool
+operator!= (const time&amp;, const time&amp;);
+ </pre>
+
+
+ <!-- Mapping for Simple Types -->
+
+ <h2><a name="2.6">2.6 Mapping for Simple Types</a></h2>
+
+ <p>An XML Schema simple type is mapped to a C++ class with the same
+ name as the simple type. The class defines a public copy constructor,
+ a public copy assignment operator, and a public virtual
+ <code>_clone</code> function. The <code>_clone</code> function is
+ declared <code>const</code>, does not take any arguments, and returns
+ a pointer to a complete copy of the instance allocated in the free
+ store. The <code>_clone</code> function shall be used to make copies
+ when static type and dynamic type of the instance may differ (see
+ <a href="#2.11">Section 2.11, "Mapping for <code>xsi:type</code>
+ and Substitution Groups"</a>). For instance:</p>
+
+ <pre class="xml">
+&lt;simpleType name="object">
+ ...
+&lt;/simpleType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: ...
+{
+public:
+ object (const object&amp;);
+
+public:
+ object&amp;
+ operator= (const object&amp;);
+
+public:
+ virtual object*
+ _clone () const;
+
+ ...
+
+};
+ </pre>
+
+ <p>The base class specification and the rest of the class definition
+ depend on the type of derivation used to define the simple type. </p>
+
+
+ <h3><a name="2.6.1">2.6.1 Mapping for Derivation by Restriction</a></h3>
+
+ <p>XML Schema derivation by restriction is mapped to C++ public
+ inheritance. The base type of the restriction becomes the base
+ type for the resulting C++ class. In addition to the members described
+ in <a href="#2.6">Section 2.6, "Mapping for Simple Types"</a>, the
+ resulting C++ class defines a public constructor with the base type
+ as its single argument. For instance:</p>
+
+ <pre class="xml">
+&lt;simpleType name="object">
+ &lt;restriction base="base">
+ ...
+ &lt;/restriction>
+&lt;/simpleType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public base
+{
+public:
+ object (const base&amp;);
+ object (const object&amp;);
+
+public:
+ object&amp;
+ operator= (const object&amp;);
+
+public:
+ virtual object*
+ _clone () const;
+};
+ </pre>
+
+
+ <h3><a name="2.6.2">2.6.2 Mapping for Enumerations</a></h3>
+
+<p>XML Schema restriction by enumeration is mapped to a C++ class
+ with semantics similar to C++ <code>enum</code>. Each XML Schema
+ enumeration element is mapped to a C++ enumerator with the
+ name derived from the <code>value</code> attribute and defined
+ in the class scope. In addition to the members
+ described in <a href="#2.6">Section 2.6, "Mapping for Simple Types"</a>,
+ the resulting C++ class defines a public constructor that can be called
+ with one of the enumerators as its single argument, a public constructor
+ that can be called with enumeration's base value as its single
+ argument, a public assignment operator that can be used to assign the
+ value of one of the enumerators, and a public implicit conversion
+ operator to the underlying C++ enum type.</p>
+
+<p>Furthermore, for string-based enumeration types, the resulting C++
+ class defines a public constructor with a single argument of type
+ <code>const C*</code> and a public constructor with a single
+ argument of type <code>const std::basic_string&lt;C>&amp;</code>.
+ For instance:</p>
+
+ <pre class="xml">
+&lt;simpleType name="color">
+ &lt;restriction base="string">
+ &lt;enumeration value="red"/>
+ &lt;enumeration value="green"/>
+ &lt;enumeration value="blue"/>
+ &lt;/restriction>
+&lt;/simpleType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class color: public xml_schema::string
+{
+public:
+ enum value
+ {
+ red,
+ green,
+ blue
+ };
+
+public:
+ color (value);
+ color (const C*);
+ color (const std::basic_string&lt;C>&amp;);
+ color (const xml_schema::string&amp;);
+ color (const color&amp;);
+
+public:
+ color&amp;
+ operator= (value);
+
+ color&amp;
+ operator= (const color&amp;);
+
+public:
+ virtual color*
+ _clone () const;
+
+public:
+ operator value () const;
+};
+ </pre>
+
+ <h3><a name="2.6.3">2.6.3 Mapping for Derivation by List</a></h3>
+
+ <p>XML Schema derivation by list is mapped to C++ public
+ inheritance from <code>xml_schema::simple_type</code>
+ (<a href="#2.5.3">Section 2.5.3, "Mapping for
+ <code>anySimpleType</code>"</a>) and a suitable sequence type.
+ The list item type becomes the element type of the sequence.
+ In addition to the members described in <a href="#2.6">Section 2.6,
+ "Mapping for Simple Types"</a>, the resulting C++ class defines
+ a public default constructor, a public constructor
+ with the first argument of type <code>size_type</code> and
+ the second argument of list item type that creates
+ a list object with the specified number of copies of the specified
+ element value, and a public constructor with the two arguments
+ of an input iterator type that creates a list object from an
+ iterator range. For instance:
+ </p>
+
+ <pre class="xml">
+&lt;simpleType name="int_list">
+ &lt;list itemType="int"/>
+&lt;/simpleType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class int_list: public simple_type,
+ public sequence&lt;int>
+{
+public:
+ int_list ();
+ int_list (size_type n, int x);
+
+ template &lt;typename I>
+ int_list (const I&amp; begin, const I&amp; end);
+ int_list (const int_list&amp;);
+
+public:
+ int_list&amp;
+ operator= (const int_list&amp;);
+
+public:
+ virtual int_list*
+ _clone () const;
+};
+ </pre>
+
+ <p>The <code>sequence</code> class template is defined in an
+ implementation-specific namespace. It conforms to the
+ sequence interface as defined by the ISO/ANSI Standard for
+ C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences").
+ Practically, this means that you can treat such a sequence
+ as if it was <code>std::vector</code>. One notable extension
+ to the standard interface that is available only for
+ sequences of non-fundamental C++ types is the addition of
+ the overloaded <code>push_back</code> and <code>insert</code>
+ member functions which instead of the constant reference
+ to the element type accept automatic pointer (<code>std::unique_ptr</code>
+ or <code>std::auto_ptr</code>, depending on the C++ standard
+ selected) to the element type. These functions assume ownership
+ of the pointed to object and reset the passed automatic pointer.
+ </p>
+
+ <h3><a name="2.6.4">2.6.4 Mapping for Derivation by Union</a></h3>
+
+ <p>XML Schema derivation by union is mapped to C++ public
+ inheritance from <code>xml_schema::simple_type</code>
+ (<a href="#2.5.3">Section 2.5.3, "Mapping for
+ <code>anySimpleType</code>"</a>) and <code>std::basic_string&lt;C></code>.
+ In addition to the members described in <a href="#2.6">Section 2.6,
+ "Mapping for Simple Types"</a>, the resulting C++ class defines a
+ public constructor with a single argument of type <code>const C*</code>
+ and a public constructor with a single argument of type
+ <code>const std::basic_string&lt;C>&amp;</code>. For instance:
+ </p>
+
+ <pre class="xml">
+&lt;simpleType name="int_string_union">
+ &lt;xsd:union memberTypes="xsd:int xsd:string"/>
+&lt;/simpleType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class int_string_union: public simple_type,
+ public std::basic_string&lt;C>
+{
+public:
+ int_string_union (const C*);
+ int_string_union (const std::basic_string&lt;C>&amp;);
+ int_string_union (const int_string_union&amp;);
+
+public:
+ int_string_union&amp;
+ operator= (const int_string_union&amp;);
+
+public:
+ virtual int_string_union*
+ _clone () const;
+};
+ </pre>
+
+ <h2><a name="2.7">2.7 Mapping for Complex Types</a></h2>
+
+ <p>An XML Schema complex type is mapped to a C++ class with the same
+ name as the complex type. The class defines a public copy constructor,
+ a public copy assignment operator, and a public virtual
+ <code>_clone</code> function. The <code>_clone</code> function is
+ declared <code>const</code>, does not take any arguments, and returns
+ a pointer to a complete copy of the instance allocated in the free
+ store. The <code>_clone</code> function shall be used to make copies
+ when static type and dynamic type of the instance may differ (see
+ <a href="#2.11">Section 2.11, "Mapping for <code>xsi:type</code>
+ and Substitution Groups"</a>).</p>
+
+ <p>Additionally, the resulting C++ class
+ defines two public constructors that take an initializer for each
+ member of the complex type and all its base types that belongs to
+ the One cardinality class (see <a href="#2.8">Section 2.8, "Mapping
+ for Local Elements and Attributes"</a>). In the first constructor,
+ the arguments are passed as constant references and the newly created
+ instance is initialized with copies of the passed objects. In the
+ second constructor, arguments that are complex types (that is,
+ they themselves contain elements or attributes) are passed as
+ either <code>std::unique_ptr</code> (C++11) or <code>std::auto_ptr</code>
+ (C++98), depending on the C++ standard selected. In this case the newly
+ created instance is directly initialized with and assumes ownership
+ of the pointed to objects and the <code>std::[unique|auto]_ptr</code>
+ arguments are reset to <code>0</code>. For instance:</p>
+
+ <pre class="xml">
+&lt;complexType name="complex">
+ &lt;sequence>
+ &lt;element name="a" type="int"/>
+ &lt;element name="b" type="string"/>
+ &lt;/sequence>
+&lt;/complexType>
+
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="s-one" type="boolean"/>
+ &lt;element name="c-one" type="complex"/>
+ &lt;element name="optional" type="int" minOccurs="0"/>
+ &lt;element name="sequence" type="string" maxOccurs="unbounded"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class complex: public xml_schema::type
+{
+public:
+ object (const int&amp; a, const xml_schema::string&amp; b);
+ object (const complex&amp;);
+
+public:
+ object&amp;
+ operator= (const complex&amp;);
+
+public:
+ virtual complex*
+ _clone () const;
+
+ ...
+
+};
+
+class object: public xml_schema::type
+{
+public:
+ object (const bool&amp; s_one, const complex&amp; c_one);
+ object (const bool&amp; s_one, std::[unique|auto]_ptr&lt;complex> c_one);
+ object (const object&amp;);
+
+public:
+ object&amp;
+ operator= (const object&amp;);
+
+public:
+ virtual object*
+ _clone () const;
+
+ ...
+
+};
+ </pre>
+
+ <p>Notice that the generated <code>complex</code> class does not
+ have the second (<code>std::[unique|auto]_ptr</code>) version of the
+ constructor since all its required members are of simple types.</p>
+
+ <p>If an XML Schema complex type has an ultimate base which is an XML
+ Schema simple type then the resulting C++ class also defines a public
+ constructor that takes an initializer for the base type as well as
+ for each member of the complex type and all its base types that
+ belongs to the One cardinality class. For instance:</p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;simpleContent>
+ &lt;extension base="date">
+ &lt;attribute name="lang" type="language" use="required"/>
+ &lt;/extension>
+ &lt;/simpleContent>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::string
+{
+public:
+ object (const xml_schema::language&amp; lang);
+
+ object (const xml_schema::date&amp; base,
+ const xml_schema::language&amp; lang);
+
+ ...
+
+};
+ </pre>
+
+ <p>Furthermore, for string-based XML Schema complex types, the resulting C++
+ class also defines two public constructors with the first arguments
+ of type <code>const C*</code> and <code>std::basic_string&lt;C>&amp;</code>,
+ respectively, followed by arguments for each member of the complex
+ type and all its base types that belongs to the One cardinality
+ class. For enumeration-based complex types the resulting C++
+ class also defines a public constructor with the first arguments
+ of the underlying enum type followed by arguments for each member
+ of the complex type and all its base types that belongs to the One
+ cardinality class. For instance:</p>
+
+ <pre class="xml">
+&lt;simpleType name="color">
+ &lt;restriction base="string">
+ &lt;enumeration value="red"/>
+ &lt;enumeration value="green"/>
+ &lt;enumeration value="blue"/>
+ &lt;/restriction>
+&lt;/simpleType>
+
+&lt;complexType name="object">
+ &lt;simpleContent>
+ &lt;extension base="color">
+ &lt;attribute name="lang" type="language" use="required"/>
+ &lt;/extension>
+ &lt;/simpleContent>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class color: public xml_schema::string
+{
+public:
+ enum value
+ {
+ red,
+ green,
+ blue
+ };
+
+public:
+ color (value);
+ color (const C*);
+ color (const std::basic_string&lt;C>&amp;);
+
+ ...
+
+};
+
+class object: color
+{
+public:
+ object (const color&amp; base,
+ const xml_schema::language&amp; lang);
+
+ object (const color::value&amp; base,
+ const xml_schema::language&amp; lang);
+
+ object (const C* base,
+ const xml_schema::language&amp; lang);
+
+ object (const std::basic_string&lt;C>&amp; base,
+ const xml_schema::language&amp; lang);
+
+ ...
+
+};
+ </pre>
+
+ <p>Additional constructors can be requested with the
+ <code>--generate-default-ctor</code> and
+ <code>--generate-from-base-ctor</code> options. See the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a> for details.</p>
+
+ <p>If an XML Schema complex type is not explicitly derived from any type,
+ the resulting C++ class is derived from <code>xml_schema::type</code>.
+ In cases where an XML Schema complex type is defined using derivation
+ by extension or restriction, the resulting C++ base class specification
+ depends on the type of derivation and is described in the subsequent
+ sections.
+ </p>
+
+ <p>The mapping for elements and attributes that are defined in a complex
+ type is described in <a href="#2.8">Section 2.8, "Mapping for Local
+ Elements and Attributes"</a>.
+ </p>
+
+ <h3><a name="2.7.1">2.7.1 Mapping for Derivation by Extension</a></h3>
+
+ <p>XML Schema derivation by extension is mapped to C++ public
+ inheritance. The base type of the extension becomes the base
+ type for the resulting C++ class.
+ </p>
+
+ <h3><a name="2.7.2">2.7.2 Mapping for Derivation by Restriction</a></h3>
+
+ <p>XML Schema derivation by restriction is mapped to C++ public
+ inheritance. The base type of the restriction becomes the base
+ type for the resulting C++ class. XML Schema elements and
+ attributes defined within restriction do not result in any
+ definitions in the resulting C++ class. Instead, corresponding
+ (unrestricted) definitions are inherited from the base class.
+ In the future versions of this mapping, such elements and
+ attributes may result in redefinitions of accessors and
+ modifiers to reflect their restricted semantics.
+ </p>
+
+ <!-- 2.8 Mapping for Local Elements and Attributes -->
+
+ <h2><a name="2.8">2.8 Mapping for Local Elements and Attributes</a></h2>
+
+ <p>XML Schema element and attribute definitions are called local
+ if they appear within a complex type definition, an element group
+ definition, or an attribute group definitions.
+ </p>
+
+ <p>Local XML Schema element and attribute definitions have the same
+ C++ mapping. Therefore, in this section, local elements and
+ attributes are collectively called members.
+ </p>
+
+ <p>While there are many different member cardinality combinations
+ (determined by the <code>use</code> attribute for attributes and
+ the <code>minOccurs</code> and <code>maxOccurs</code> attributes
+ for elements), the mapping divides all possible cardinality
+ combinations into three cardinality classes:
+ </p>
+
+ <dl>
+ <dt><i>one</i></dt>
+ <dd>attributes: <code>use == "required"</code></dd>
+ <dd>attributes: <code>use == "optional"</code> and has default or fixed value</dd>
+ <dd>elements: <code>minOccurs == "1"</code> and <code>maxOccurs == "1"</code></dd>
+
+ <dt><i>optional</i></dt>
+ <dd>attributes: <code>use == "optional"</code> and doesn't have default or fixed value</dd>
+ <dd>elements: <code>minOccurs == "0"</code> and <code>maxOccurs == "1"</code></dd>
+
+ <dt><i>sequence</i></dt>
+ <dd>elements: <code>maxOccurs > "1"</code></dd>
+ </dl>
+
+ <p>An optional attribute with a default or fixed value acquires this value
+ if the attribute hasn't been specified in an instance document (see
+ <a href="#A">Appendix A, "Default and Fixed Values"</a>). This
+ mapping places such optional attributes to the One cardinality
+ class.</p>
+
+ <p>A member is mapped to a set of public type definitions
+ (<code>typedef</code>s) and a set of public accessor and modifier
+ functions. Type definitions have names derived from the member's
+ name. The accessor and modifier functions have the same name as the
+ member. For example:
+ </p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="member" type="string"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ typedef xml_schema::string member_type;
+
+ const member_type&amp;
+ member () const;
+
+ ...
+
+};
+ </pre>
+
+ <p>In addition, if a member has a default or fixed value, a static
+ accessor function is generated that returns this value. For
+ example:</p>
+
+<pre class="xml">
+&lt;complexType name="object">
+ &lt;attribute name="data" type="string" default="test"/>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ typedef xml_schema::string data_type;
+
+ const data_type&amp;
+ data () const;
+
+ static const data_type&amp;
+ data_default_value ();
+
+ ...
+
+};
+ </pre>
+
+ <p>Names and semantics of type definitions for the member as well
+ as signatures of the accessor and modifier functions depend on
+ the member's cardinality class and are described in the following
+ sub-sections.
+ </p>
+
+
+ <h3><a name="2.8.1">2.8.1 Mapping for Members with the One Cardinality Class</a></h3>
+
+ <p>For the One cardinality class, the type definitions consist of
+ an alias for the member's type with the name created by appending
+ the <code>_type</code> suffix to the member's name.
+ </p>
+
+ <p>The accessor functions come in constant and non-constant versions.
+ The constant accessor function returns a constant reference to the
+ member and can be used for read-only access. The non-constant
+ version returns an unrestricted reference to the member and can
+ be used for read-write access.
+ </p>
+
+ <p>The first modifier function expects an argument of type reference to
+ constant of the member's type. It makes a deep copy of its argument.
+ Except for member's types that are mapped to fundamental C++ types,
+ the second modifier function is provided that expects an argument
+ of type automatic pointer (<code>std::unique_ptr</code> or
+ <code>std::auto_ptr</code>, depending on the C++ standard selected)
+ to the member's type. It assumes ownership of the pointed to object
+ and resets the passed automatic pointer. For instance:</p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="member" type="string"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Type definitions.
+ //
+ typedef xml_schema::string member_type;
+
+ // Accessors.
+ //
+ const member_type&amp;
+ member () const;
+
+ member_type&amp;
+ member ();
+
+ // Modifiers.
+ //
+ void
+ member (const member_type&amp;);
+
+ void
+ member (std::[unique|auto]_ptr&lt;member_type>);
+ ...
+
+};
+ </pre>
+
+ <p>In addition, if requested by specifying the <code>--generate-detach</code>
+ option and only for members of non-fundamental C++ types, the mapping
+ provides a detach function that returns an automatic pointer to the
+ member's type, for example:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ ...
+
+ std::[unique|auto]_ptr&lt;member_type>
+ detach_member ();
+ ...
+
+};
+ </pre>
+
+ <p>This function detaches the value from the tree leaving the member
+ value uninitialized. Accessing such an uninitialized value prior to
+ re-initializing it results in undefined behavior.</p>
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o)
+{
+ using xml_schema::string;
+
+ string s (o.member ()); // get
+ object::member_type&amp; sr (o.member ()); // get
+
+ o.member ("hello"); // set, deep copy
+ o.member () = "hello"; // set, deep copy
+
+ // C++11 version.
+ //
+ std::unique_ptr&lt;string> p (new string ("hello"));
+ o.member (std::move (p)); // set, assumes ownership
+ p = o.detach_member (); // detach, member is uninitialized
+ o.member (std::move (p)); // re-attach
+
+ // C++98 version.
+ //
+ std::auto_ptr&lt;string> p (new string ("hello"));
+ o.member (p); // set, assumes ownership
+ p = o.detach_member (); // detach, member is uninitialized
+ o.member (p); // re-attach
+}
+ </pre>
+
+
+<h3><a name="2.8.2">2.8.2 Mapping for Members with the Optional Cardinality Class</a></h3>
+
+ <p>For the Optional cardinality class, the type definitions consist of
+ an alias for the member's type with the name created by appending
+ the <code>_type</code> suffix to the member's name and an alias for
+ the container type with the name created by appending the
+ <code>_optional</code> suffix to the member's name.
+ </p>
+
+ <p>Unlike accessor functions for the One cardinality class, accessor
+ functions for the Optional cardinality class return references to
+ corresponding containers rather than directly to members. The
+ accessor functions come in constant and non-constant versions.
+ The constant accessor function returns a constant reference to
+ the container and can be used for read-only access. The non-constant
+ version returns an unrestricted reference to the container
+ and can be used for read-write access.
+ </p>
+
+ <p>The modifier functions are overloaded for the member's
+ type and the container type. The first modifier function
+ expects an argument of type reference to constant of the
+ member's type. It makes a deep copy of its argument.
+ Except for member's types that are mapped to fundamental C++ types,
+ the second modifier function is provided that expects an argument
+ of type automatic pointer (<code>std::unique_ptr</code> or
+ <code>std::auto_ptr</code>, depending on the C++ standard selected)
+ to the member's type. It assumes ownership of the pointed to object
+ and resets the passed automatic pointer. The last modifier function
+ expects an argument of type reference to constant of the container
+ type. It makes a deep copy of its argument. For instance:
+ </p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="member" type="string" minOccurs="0"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Type definitions.
+ //
+ typedef xml_schema::string member_type;
+ typedef optional&lt;member_type> member_optional;
+
+ // Accessors.
+ //
+ const member_optional&amp;
+ member () const;
+
+ member_optional&amp;
+ member ();
+
+ // Modifiers.
+ //
+ void
+ member (const member_type&amp;);
+
+ void
+ member (std::[unique|auto]_ptr&lt;member_type>);
+
+ void
+ member (const member_optional&amp;);
+
+ ...
+
+};
+ </pre>
+
+
+ <p>The <code>optional</code> class template is defined in an
+ implementation-specific namespace and has the following
+ interface. The <code>[unique|auto]_ptr</code>-based constructor
+ and modifier function are only available if the template
+ argument is not a fundamental C++ type.
+ </p>
+
+ <pre class="c++">
+template &lt;typename X>
+class optional
+{
+public:
+ optional ();
+
+ // Makes a deep copy.
+ //
+ explicit
+ optional (const X&amp;);
+
+ // Assumes ownership.
+ //
+ explicit
+ optional (std::[unique|auto]_ptr&lt;X>);
+
+ optional (const optional&amp;);
+
+public:
+ optional&amp;
+ operator= (const X&amp;);
+
+ optional&amp;
+ operator= (const optional&amp;);
+
+ // Pointer-like interface.
+ //
+public:
+ const X*
+ operator-> () const;
+
+ X*
+ operator-> ();
+
+ const X&amp;
+ operator* () const;
+
+ X&amp;
+ operator* ();
+
+ typedef void (optional::*bool_convertible) ();
+ operator bool_convertible () const;
+
+ // Get/set interface.
+ //
+public:
+ bool
+ present () const;
+
+ const X&amp;
+ get () const;
+
+ X&amp;
+ get ();
+
+ // Makes a deep copy.
+ //
+ void
+ set (const X&amp;);
+
+ // Assumes ownership.
+ //
+ void
+ set (std::[unique|auto]_ptr&lt;X>);
+
+ // Detach and return the contained value.
+ //
+ std::[unique|auto]_ptr&lt;X>
+ detach ();
+
+ void
+ reset ();
+};
+
+template &lt;typename X>
+bool
+operator== (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
+
+template &lt;typename X>
+bool
+operator!= (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
+
+template &lt;typename X>
+bool
+operator&lt; (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
+
+template &lt;typename X>
+bool
+operator> (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
+
+template &lt;typename X>
+bool
+operator&lt;= (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
+
+template &lt;typename X>
+bool
+operator>= (const optional&lt;X>&amp;, const optional&lt;X>&amp;);
+ </pre>
+
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o)
+{
+ using xml_schema::string;
+
+ if (o.member ().present ()) // test
+ {
+ string&amp; s (o.member ().get ()); // get
+ o.member ("hello"); // set, deep copy
+ o.member ().set ("hello"); // set, deep copy
+ o.member ().reset (); // reset
+ }
+
+ // Same as above but using pointer notation:
+ //
+ if (o.member ()) // test
+ {
+ string&amp; s (*o.member ()); // get
+ o.member ("hello"); // set, deep copy
+ *o.member () = "hello"; // set, deep copy
+ o.member ().reset (); // reset
+ }
+
+ // C++11 version.
+ //
+ std::unique_ptr&lt;string> p (new string ("hello"));
+ o.member (std::move (p)); // set, assumes ownership
+
+ p.reset (new string ("hello"));
+ o.member ().set (std::move (p)); // set, assumes ownership
+
+ p = o.member ().detach (); // detach, member is reset
+ o.member ().set (std::move (p)); // re-attach
+
+ // C++98 version.
+ //
+ std::auto_ptr&lt;string> p (new string ("hello"));
+ o.member (p); // set, assumes ownership
+
+ p = new string ("hello");
+ o.member ().set (p); // set, assumes ownership
+
+ p = o.member ().detach (); // detach, member is reset
+ o.member ().set (p); // re-attach
+}
+ </pre>
+
+
+ <h3><a name="2.8.3">2.8.3 Mapping for Members with the Sequence Cardinality Class</a></h3>
+
+ <p>For the Sequence cardinality class, the type definitions consist of an
+ alias for the member's type with the name created by appending
+ the <code>_type</code> suffix to the member's name, an alias of
+ the container type with the name created by appending the
+ <code>_sequence</code> suffix to the member's name, an alias of
+ the iterator type with the name created by appending the
+ <code>_iterator</code> suffix to the member's name, and an alias
+ of the constant iterator type with the name created by appending the
+ <code>_const_iterator</code> suffix to the member's name.
+ </p>
+
+ <p>The accessor functions come in constant and non-constant versions.
+ The constant accessor function returns a constant reference to the
+ container and can be used for read-only access. The non-constant
+ version returns an unrestricted reference to the container and can
+ be used for read-write access.
+ </p>
+
+ <p>The modifier function expects an argument of type reference to
+ constant of the container type. The modifier function
+ makes a deep copy of its argument. For instance:
+ </p>
+
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="member" type="string" minOccurs="unbounded"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Type definitions.
+ //
+ typedef xml_schema::string member_type;
+ typedef sequence&lt;member_type> member_sequence;
+ typedef member_sequence::iterator member_iterator;
+ typedef member_sequence::const_iterator member_const_iterator;
+
+ // Accessors.
+ //
+ const member_sequence&amp;
+ member () const;
+
+ member_sequence&amp;
+ member ();
+
+ // Modifier.
+ //
+ void
+ member (const member_sequence&amp;);
+
+ ...
+
+};
+ </pre>
+
+ <p>The <code>sequence</code> class template is defined in an
+ implementation-specific namespace. It conforms to the
+ sequence interface as defined by the ISO/ANSI Standard for
+ C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences").
+ Practically, this means that you can treat such a sequence
+ as if it was <code>std::vector</code>. Two notable extensions
+ to the standard interface that are available only for
+ sequences of non-fundamental C++ types are the addition of
+ the overloaded <code>push_back</code> and <code>insert</code>
+ as well as the <code>detach_back</code> and <code>detach</code>
+ member functions. The additional <code>push_back</code> and
+ <code>insert</code> functions accept an automatic pointer
+ (<code>std::unique_ptr</code> or <code>std::auto_ptr</code>,
+ depending on the C++ standard selected) to the
+ element type instead of the constant reference. They assume
+ ownership of the pointed to object and reset the passed
+ automatic pointer. The <code>detach_back</code> and
+ <code>detach</code> functions detach the element
+ value from the sequence container and, by default, remove
+ the element from the sequence. These additional functions
+ have the following signatures:</p>
+
+ <pre class="c++">
+template &lt;typename X>
+class sequence
+{
+public:
+ ...
+
+ void
+ push_back (std::[unique|auto]_ptr&lt;X>)
+
+ iterator
+ insert (iterator position, std::[unique|auto]_ptr&lt;X>)
+
+ std::[unique|auto]_ptr&lt;X>
+ detach_back (bool pop = true);
+
+ iterator
+ detach (iterator position,
+ std::[unique|auto]_ptr&lt;X>&amp; result,
+ bool erase = true)
+
+ ...
+}
+ </pre>
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o)
+{
+ using xml_schema::string;
+
+ object::member_sequence&amp; s (o.member ());
+
+ // Iteration.
+ //
+ for (object::member_iterator i (s.begin ()); i != s.end (); ++i)
+ {
+ string&amp; value (*i);
+ }
+
+ // Modification.
+ //
+ s.push_back ("hello"); // deep copy
+
+ // C++11 version.
+ //
+ std::unique_ptr&lt;string> p (new string ("hello"));
+ s.push_back (std::move (p)); // assumes ownership
+ p = s.detach_back (); // detach and pop
+ s.push_back (std::move (p)); // re-append
+
+ // C++98 version.
+ //
+ std::auto_ptr&lt;string> p (new string ("hello"));
+ s.push_back (p); // assumes ownership
+ p = s.detach_back (); // detach and pop
+ s.push_back (p); // re-append
+
+ // Setting a new container.
+ //
+ object::member_sequence n;
+ n.push_back ("one");
+ n.push_back ("two");
+ o.member (n); // deep copy
+}
+ </pre>
+
+ <h3><a name="2.8.4">2.8.4 Element Order</a></h3>
+
+ <p>C++/Tree is a "flattening" mapping in a sense that many levels of
+ nested compositors (<code>choice</code> and <code>sequence</code>),
+ all potentially with their own cardinalities, are in the end mapped
+ to a flat set of elements with one of the three cardinality classes
+ discussed in the previous sections. While this results in a simple
+ and easy to use API for most types, in certain cases, the order of
+ elements in the actual XML documents is not preserved once parsed
+ into the object model. And sometimes such order has
+ application-specific significance. As an example, consider a schema
+ that defines a batch of bank transactions:</p>
+
+ <pre class="xml">
+&lt;complexType name="withdraw">
+ &lt;sequence>
+ &lt;element name="account" type="unsignedInt"/>
+ &lt;element name="amount" type="unsignedInt"/>
+ &lt;/sequence>
+&lt;/complexType>
+
+&lt;complexType name="deposit">
+ &lt;sequence>
+ &lt;element name="account" type="unsignedInt"/>
+ &lt;element name="amount" type="unsignedInt"/>
+ &lt;/sequence>
+&lt;/complexType>
+
+&lt;complexType name="batch">
+ &lt;choice minOccurs="0" maxOccurs="unbounded">
+ &lt;element name="withdraw" type="withdraw"/>
+ &lt;element name="deposit" type="deposit"/>
+ &lt;/choice>
+&lt;/complexType>
+ </pre>
+
+ <p>The batch can contain any number of transactions in any order
+ but the order of transactions in each actual batch is significant.
+ For instance, consider what could happen if we reorder the
+ transactions and apply all the withdrawals before deposits.</p>
+
+ <p>For the <code>batch</code> schema type defined above the default
+ C++/Tree mapping will produce a C++ class that contains a pair of
+ sequence containers, one for each of the two elements. While this
+ will capture the content (transactions), the order of this content
+ as it appears in XML will be lost. Also, if we try to serialize the
+ batch we just loaded back to XML, all the withdrawal transactions
+ will appear before deposits.</p>
+
+ <p>To overcome this limitation of a flattening mapping, C++/Tree
+ allows us to mark certain XML Schema types, for which content
+ order is important, as ordered.</p>
+
+ <p>There are several command line options that control which
+ schema types are treated as ordered. To make an individual
+ type ordered, we use the <code>--ordered-type</code> option,
+ for example:</p>
+
+ <pre class="term">
+--ordered-type batch
+ </pre>
+
+ <p>To automatically treat all the types that are derived from an ordered
+ type also ordered, we use the <code>--ordered-type-derived</code>
+ option. This is primarily useful if you would like to iterate
+ over the complete hierarchy's content using the content order
+ sequence (discussed below).</p>
+
+ <p>Ordered types are also useful for handling mixed content. To
+ automatically mark all the types with mixed content as ordered
+ we use the <code>--ordered-type-mixed</code> option. For more
+ information on handling mixed content see <a href="#2.13">Section
+ 2.13, "Mapping for Mixed Content Models"</a>.</p>
+
+ <p>Finally, we can mark all the types in the schema we are
+ compiling with the <code>--ordered-type-all</code> option.
+ You should only resort to this option if all the types in
+ your schema truly suffer from the loss of content
+ order since, as we will discuss shortly, ordered types
+ require extra effort to access and, especially, modify.
+ See the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a> for more information on
+ these options.</p>
+
+ <p>Once a type is marked ordered, C++/Tree alters its mapping
+ in several ways. Firstly, for each local element, element
+ wildcard (<a href="#2.12.4">Section 2.12.4, "Element Wildcard
+ Order"</a>), and mixed content text (<a href="#2.13">Section
+ 2.13, "Mapping for Mixed Content Models"</a>) in this type, a
+ content id constant is generated. Secondly, an addition sequence
+ is added to the class that captures the content order. Here
+ is how the mapping of our <code>batch</code> class changes
+ once we make it ordered:</p>
+
+ <pre class="c++">
+class batch: public xml_schema::type
+{
+public:
+ // withdraw
+ //
+ typedef withdraw withdraw_type;
+ typedef sequence&lt;withdraw_type> withdraw_sequence;
+ typedef withdraw_sequence::iterator withdraw_iterator;
+ typedef withdraw_sequence::const_iterator withdraw_const_iterator;
+
+ static const std::size_t withdraw_id = 1;
+
+ const withdraw_sequence&amp;
+ withdraw () const;
+
+ withdraw_sequence&amp;
+ withdraw ();
+
+ void
+ withdraw (const withdraw_sequence&amp;);
+
+ // deposit
+ //
+ typedef deposit deposit_type;
+ typedef sequence&lt;deposit_type> deposit_sequence;
+ typedef deposit_sequence::iterator deposit_iterator;
+ typedef deposit_sequence::const_iterator deposit_const_iterator;
+
+ static const std::size_t deposit_id = 2;
+
+ const deposit_sequence&amp;
+ deposit () const;
+
+ deposit_sequence&amp;
+ deposit ();
+
+ void
+ deposit (const deposit_sequence&amp;);
+
+ // content_order
+ //
+ typedef xml_schema::content_order content_order_type;
+ typedef std::vector&lt;content_order_type> content_order_sequence;
+ typedef content_order_sequence::iterator content_order_iterator;
+ typedef content_order_sequence::const_iterator content_order_const_iterator;
+
+ const content_order_sequence&amp;
+ content_order () const;
+
+ content_order_sequence&amp;
+ content_order ();
+
+ void
+ content_order (const content_order_sequence&amp;);
+
+ ...
+};
+ </pre>
+
+ <p>Notice the <code>withdraw_id</code> and <code>deposit_id</code>
+ content ids as well as the extra <code>content_order</code>
+ sequence that does not correspond to any element in the
+ schema definition. The other changes to the mapping for ordered
+ types has to do with XML parsing and serialization code. During
+ parsing the content order is captured in the <code>content_order</code>
+ sequence while during serialization this sequence is used to
+ determine the order in which content is serialized. The
+ <code>content_order</code> sequence is also copied during
+ copy construction and assigned during copy assignment. It is also
+ taken into account during comparison.</p>
+
+ <p>The entry type of the <code>content_order</code> sequence is the
+ <code>xml_schema::content_order</code> type that has the following
+ interface:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ struct content_order
+ {
+ content_order (std::size_t id, std::size_t index = 0);
+
+ std::size_t id;
+ std::size_t index;
+ };
+
+ bool
+ operator== (const content_order&amp;, const content_order&amp;);
+
+ bool
+ operator!= (const content_order&amp;, const content_order&amp;);
+
+ bool
+ operator&lt; (const content_order&amp;, const content_order&amp;);
+}
+ </pre>
+
+ <p>The <code>content_order</code> sequence describes the order of
+ content (elements, including wildcards, as well as mixed content
+ text). Each entry in this sequence consists of the content id
+ (for example, <code>withdraw_id</code> or <code>deposit_id</code>
+ in our case) as well as, for elements of the sequence cardinality
+ class, an index into the corresponding sequence container (the
+ index is unused for the one and optional cardinality classes).
+ For example, in our case, if the content id is <code>withdraw_id</code>,
+ then the index will point into the <code>withdraw</code> element
+ sequence.</p>
+
+ <p>With all this information we can now examine how to iterate over
+ transaction in the batch in content order:</p>
+
+ <pre class="c++">
+batch&amp; b = ...
+
+for (batch::content_order_const_iterator i (b.content_order ().begin ());
+ i != b.content_order ().end ();
+ ++i)
+{
+ switch (i->id)
+ {
+ case batch::withdraw_id:
+ {
+ const withdraw&amp; t (b.withdraw ()[i->index]);
+ cerr &lt;&lt; t.account () &lt;&lt; " withdraw " &lt;&lt; t.amount () &lt;&lt; endl;
+ break;
+ }
+ case batch::deposit_id:
+ {
+ const deposit&amp; t (b.deposit ()[i->index]);
+ cerr &lt;&lt; t.account () &lt;&lt; " deposit " &lt;&lt; t.amount () &lt;&lt; endl;
+ break;
+ }
+ default:
+ {
+ assert (false); // Unknown content id.
+ }
+ }
+}
+ </pre>
+
+ <p>If we serialized our batch back to XML, we would also see that the
+ order of transactions in the output is exactly the same as in the
+ input rather than all the withdrawals first followed by all the
+ deposits.</p>
+
+ <p>The most complex aspect of working with ordered types is
+ modifications. Now we not only need to change the content,
+ but also remember to update the order information corresponding
+ to this change. As a first example, we add a deposit transaction
+ to the batch:</p>
+
+ <pre class="c++">
+using xml_schema::content_order;
+
+batch::deposit_sequence&amp; d (b.deposit ());
+batch::withdraw_sequence&amp; w (b.withdraw ());
+batch::content_order_sequence&amp; co (b.content_order ());
+
+d.push_back (deposit (123456789, 100000));
+co.push_back (content_order (batch::deposit_id, d.size () - 1));
+ </pre>
+
+ <p>In the above example we first added the content (deposit
+ transaction) and then updated the content order information
+ by adding an entry with <code>deposit_id</code> content
+ id and the index of the just added deposit transaction.</p>
+
+ <p>Removing the last transaction can be easy if we know which
+ transaction (deposit or withdrawal) is last:</p>
+
+ <pre class="c++">
+d.pop_back ();
+co.pop_back ();
+ </pre>
+
+ <p>If, however, we do not know which transaction is last, then
+ things get a bit more complicated:</p>
+
+ <pre class="c++">
+switch (co.back ().id)
+{
+case batch::withdraw_id:
+ {
+ d.pop_back ();
+ break;
+ }
+case batch::deposit_id:
+ {
+ w.pop_back ();
+ break;
+ }
+}
+
+co.pop_back ();
+ </pre>
+
+ <p>The following example shows how to add a transaction at the
+ beginning of the batch:</p>
+
+ <pre class="c++">
+w.push_back (withdraw (123456789, 100000));
+co.insert (co.begin (),
+ content_order (batch::withdraw_id, w.size () - 1));
+ </pre>
+
+ <p>Note also that when we merely modify the content of one
+ of the elements in place, we do not need to update its
+ order since it doesn't change. For example, here is how
+ we can change the amount in the first withdrawal:</p>
+
+ <pre class="c++">
+w[0].amount (10000);
+ </pre>
+
+ <p>For the complete working code shown in this section refer to the
+ <code>order/element</code> example in the
+ <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a>
+ package.</p>
+
+ <p>If both the base and derived types are ordered, then the
+ content order sequence is only added to the base and the content
+ ids are unique within the whole hierarchy. In this case
+ the content order sequence for the derived type contains
+ ordering information for both base and derived content.</p>
+
+ <p>In some applications we may need to perform more complex
+ content processing. For example, in our case, we may need
+ to remove all the withdrawal transactions. The default
+ container, <code>std::vector</code>, is not particularly
+ suitable for such operations. What may be required by
+ some applications is a multi-index container that not
+ only allows us to iterate in content order similar to
+ <code>std::vector</code> but also search by the content
+ id as well as the content id and index pair.</p>
+
+ <p>While C++/Tree does not provide this functionality by
+ default, it allows us to specify a custom container
+ type for content order with the <code>--order-container</code>
+ command line option. The only requirement from the
+ generated code side for such a container is to provide
+ the <code>vector</code>-like <code>push_back()</code>,
+ <code>size()</code>, and const iteration interfaces.</p>
+
+ <p>As an example, here is how we can use the Boost Multi-Index
+ container for content order. First we create the
+ <code>content-order-container.hxx</code> header with the
+ following definition:</p>
+
+ <pre class="c++">
+#ifndef CONTENT_ORDER_CONTAINER
+#define CONTENT_ORDER_CONTAINER
+
+#include &lt;cstddef> // std::size_t
+
+#include &lt;boost/multi_index_container.hpp>
+#include &lt;boost/multi_index/member.hpp>
+#include &lt;boost/multi_index/identity.hpp>
+#include &lt;boost/multi_index/ordered_index.hpp>
+#include &lt;boost/multi_index/random_access_index.hpp>
+
+struct by_id {};
+struct by_id_index {};
+
+template &lt;typename T>
+using content_order_container =
+ boost::multi_index::multi_index_container&lt;
+ T,
+ boost::multi_index::indexed_by&lt;
+ boost::multi_index::random_access&lt;>,
+ boost::multi_index::ordered_unique&lt;
+ boost::multi_index::tag&lt;by_id_index>,
+ boost::multi_index::identity&lt;T>
+ >,
+ boost::multi_index::ordered_non_unique&lt;
+ boost::multi_index::tag&lt;by_id>,
+ boost::multi_index::member&lt;T, std::size_t, &amp;T::id>
+ >
+ >
+ >;
+
+#endif
+ </pre>
+
+ <p>Next we add the following two XSD compiler options to include
+ this header into every generated header file and to use the
+ custom container type (see the XSD compiler command line manual
+ for more information on shell quoting for the first option):</p>
+
+ <pre class="term">
+--hxx-prologue '#include "content-order-container.hxx"'
+--order-container content_order_container
+ </pre>
+
+ <p>With these changes we can now use the multi-index functionality,
+ for example, to search for a specific content id:</p>
+
+ <pre class="c++">
+typedef batch::content_order_sequence::index&lt;by_id>::type id_set;
+typedef id_set::iterator id_iterator;
+
+const id_set&amp; ids (b.content_order ().get&lt;by_id> ());
+
+std::pair&lt;id_iterator, id_iterator> r (
+ ids.equal_range (std::size_t (batch::deposit_id));
+
+for (id_iterator i (r.first); i != r.second; ++i)
+{
+ const deposit&amp; t (b.deposit ()[i->index]);
+ cerr &lt;&lt; t.account () &lt;&lt; " deposit " &lt;&lt; t.amount () &lt;&lt; endl;
+}
+ </pre>
+
+ <h2><a name="2.9">2.9 Mapping for Global Elements</a></h2>
+
+ <p>An XML Schema element definition is called global if it appears
+ directly under the <code>schema</code> element.
+ A global element is a valid root of an instance document. By
+ default, a global element is mapped to a set of overloaded
+ parsing and, optionally, serialization functions with the
+ same name as the element. It is also possible to generate types
+ for root elements instead of parsing and serialization functions.
+ This is primarily useful to distinguish object models with the
+ same root type but with different root elements. See
+ <a href="#2.9.1">Section 2.9.1, "Element Types"</a> for details.
+ It is also possible to request the generation of an element map
+ which allows uniform parsing and serialization of multiple root
+ elements. See <a href="#2.9.2">Section 2.9.2, "Element Map"</a>
+ for details.
+ </p>
+
+ <p>The parsing functions read XML instance documents and return
+ corresponding object models as an automatic pointer
+ (<code>std::unique_ptr</code> or <code>std::auto_ptr</code>,
+ depending on the C++ standard selected). Their signatures
+ have the following pattern (<code>type</code> denotes
+ element's type and <code>name</code> denotes element's
+ name):
+ </p>
+
+ <pre class="c++">
+std::[unique|auto]_ptr&lt;type>
+name (....);
+ </pre>
+
+ <p>The process of parsing, including the exact signatures of the parsing
+ functions, is the subject of <a href="#3">Chapter 3, "Parsing"</a>.
+ </p>
+
+ <p>The serialization functions write object models back to XML instance
+ documents. Their signatures have the following pattern:
+ </p>
+
+ <pre class="c++">
+void
+name (&lt;stream type>&amp;, const type&amp;, ....);
+ </pre>
+
+ <p>The process of serialization, including the exact signatures of the
+ serialization functions, is the subject of <a href="#4">Chapter 4,
+ "Serialization"</a>.
+ </p>
+
+
+ <h3><a name="2.9.1">2.9.1 Element Types</a></h3>
+
+ <p>The generation of element types is requested with the
+ <code>--generate-element-type</code> option. With this option
+ each global element is mapped to a C++ class with the
+ same name as the element. Such a class is derived from
+ <code>xml_schema::element_type</code> and contains the same set
+ of type definitions, constructors, and member function as would a
+ type containing a single element with the One cardinality class
+ named <code>"value"</code>. In addition, the element type also
+ contains a set of member functions for accessing the element
+ name and namespace as well as its value in a uniform manner.
+ For example:</p>
+
+ <pre class="xml">
+&lt;complexType name="type">
+ &lt;sequence>
+ ...
+ &lt;/sequence>
+&lt;/complexType>
+
+&lt;element name="root" type="type"/>
+ </pre>
+
+<p>is mapped to:</p>
+
+ <pre class="c++">
+class type
+{
+ ...
+};
+
+class root: public xml_schema::element_type
+{
+public:
+ // Element value.
+ //
+ typedef type value_type;
+
+ const value_type&amp;
+ value () const;
+
+ value_type&amp;
+ value ();
+
+ void
+ value (const value_type&amp;);
+
+ void
+ value (std::[unique|auto]_ptr&lt;value_type>);
+
+ // Constructors.
+ //
+ root (const value_type&amp;);
+
+ root (std::[unique|auto]_ptr&lt;value_type>);
+
+ root (const xercesc::DOMElement&amp;, xml_schema::flags = 0);
+
+ root (const root&amp;, xml_schema::flags = 0);
+
+ virtual root*
+ _clone (xml_schema::flags = 0) const;
+
+ // Element name and namespace.
+ //
+ static const std::string&amp;
+ name ();
+
+ static const std::string&amp;
+ namespace_ ();
+
+ virtual const std::string&amp;
+ _name () const;
+
+ virtual const std::string&amp;
+ _namespace () const;
+
+ // Element value as xml_schema::type.
+ //
+ virtual const xml_schema::type*
+ _value () const;
+
+ virtual xml_schema::type*
+ _value ();
+};
+
+void
+operator&lt;&lt; (xercesc::DOMElement&amp;, const root&amp;);
+ </pre>
+
+ <p>The <code>xml_schema::element_type</code> class is a common
+ base type for all element types and is defined as follows:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class element_type
+ {
+ public:
+ virtual
+ ~element_type ();
+
+ virtual element_type*
+ _clone (flags f = 0) const = 0;
+
+ virtual const std::basic_string&lt;C>&amp;
+ _name () const = 0;
+
+ virtual const std::basic_string&lt;C>&amp;
+ _namespace () const = 0;
+
+ virtual xml_schema::type*
+ _value () = 0;
+
+ virtual const xml_schema::type*
+ _value () const = 0;
+ };
+}
+ </pre>
+
+ <p>The <code>_value()</code> member function returns a pointer to
+ the element value or 0 if the element is of a fundamental C++
+ type and therefore is not derived from <code>xml_schema::type</code>.
+ </p>
+
+ <p>Unlike parsing and serialization functions, element types
+ are only capable of parsing and serializing from/to a
+ <code>DOMElement</code> object. This means that the application
+ will need to perform its own XML-to-DOM parsing and DOM-to-XML
+ serialization. The following section describes a mechanism
+ provided by the mapping to uniformly parse and serialize
+ multiple root elements.</p>
+
+
+ <h3><a name="2.9.2">2.9.2 Element Map</a></h3>
+
+ <p>When element types are generated for root elements it is also
+ possible to request the generation of an element map with the
+ <code>--generate-element-map</code> option. The element map
+ allows uniform parsing and serialization of multiple root
+ elements via the common <code>xml_schema::element_type</code>
+ base type. The <code>xml_schema::element_map</code> class is
+ defined as follows:</p>
+
+ <pre class="c++">
+namespace xml_schema
+{
+ class element_map
+ {
+ public:
+ static std::[unique|auto]_ptr&lt;xml_schema::element_type>
+ parse (const xercesc::DOMElement&amp;, flags = 0);
+
+ static void
+ serialize (xercesc::DOMElement&amp;, const element_type&amp;);
+ };
+}
+ </pre>
+
+ <p>The <code>parse()</code> function creates the corresponding
+ element type object based on the element name and namespace
+ and returns it as an automatic pointer (<code>std::unique_ptr</code>
+ or <code>std::auto_ptr</code>, depending on the C++ standard
+ selected) to <code>xml_schema::element_type</code>.
+ The <code>serialize()</code> function serializes the passed element
+ object to <code>DOMElement</code>. Note that in case of
+ <code>serialize()</code>, the <code>DOMElement</code> object
+ should have the correct name and namespace. If no element type is
+ available for an element, both functions throw the
+ <code>xml_schema::no_element_info</code> exception:</p>
+
+ <pre class="c++">
+struct no_element_info: virtual exception
+{
+ no_element_info (const std::basic_string&lt;C>&amp; element_name,
+ const std::basic_string&lt;C>&amp; element_namespace);
+
+ const std::basic_string&lt;C>&amp;
+ element_name () const;
+
+ const std::basic_string&lt;C>&amp;
+ element_namespace () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The application can discover the actual type of the element
+ object returned by <code>parse()</code> either using
+ <code>dynamic_cast</code> or by comparing element names and
+ namespaces. The following code fragments illustrate how the
+ element map can be used:</p>
+
+ <pre class="c++">
+// Parsing.
+//
+DOMElement&amp; e = ... // Parse XML to DOM.
+
+unique_ptr&lt;xml_schema::element_type> r (
+ xml_schema::element_map::parse (e));
+
+if (root1 r1 = dynamic_cast&lt;root1*> (r.get ()))
+{
+ ...
+}
+else if (r->_name == root2::name () &amp;&amp;
+ r->_namespace () == root2::namespace_ ())
+{
+ root2&amp; r2 (static_cast&lt;root2&amp;> (*r));
+
+ ...
+}
+ </pre>
+
+ <pre class="c++">
+// Serialization.
+//
+xml_schema::element_type&amp; r = ...
+
+string name (r._name ());
+string ns (r._namespace ());
+
+DOMDocument&amp; doc = ... // Create a new DOMDocument with name and ns.
+DOMElement&amp; e (*doc->getDocumentElement ());
+
+xml_schema::element_map::serialize (e, r);
+
+// Serialize DOMDocument to XML.
+ </pre>
+
+ <!-- -->
+
+ <h2><a name="2.10">2.10 Mapping for Global Attributes</a></h2>
+
+ <p>An XML Schema attribute definition is called global if it appears
+ directly under the <code>schema</code> element. A global
+ attribute does not have any mapping.
+ </p>
+
+ <!--
+ When it is referenced from
+ a local attribute definition (using the <code>ref</code> attribute)
+ it is treated as a local attribute (see Section 2.8, "Mapping for
+ Local Elements and Attributes").
+ -->
+
+ <h2><a name="2.11">2.11 Mapping for <code>xsi:type</code> and Substitution
+ Groups</a></h2>
+
+ <p>The mapping provides optional support for the XML Schema polymorphism
+ features (<code>xsi:type</code> and substitution groups) which can
+ be requested with the <code>--generate-polymorphic</code> option.
+ When used, the dynamic type of a member may be different from
+ its static type. Consider the following schema definition and
+ instance document:
+ </p>
+
+ <pre class="xml">
+&lt;!-- test.xsd -->
+&lt;schema>
+ &lt;complexType name="base">
+ &lt;attribute name="text" type="string"/>
+ &lt;/complexType>
+
+ &lt;complexType name="derived">
+ &lt;complexContent>
+ &lt;extension base="base">
+ &lt;attribute name="extra-text" type="string"/>
+ &lt;/extension>
+ &lt;/complexContent>
+ &lt;/complexType>
+
+ &lt;complexType name="root_type">
+ &lt;sequence>
+ &lt;element name="item" type="base" maxOccurs="unbounded"/>
+ &lt;/sequence>
+ &lt;/complexType>
+
+ &lt;element name="root" type="root_type"/>
+&lt;/schema>
+
+&lt;!-- test.xml -->
+&lt;root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ &lt;item text="hello"/>
+ &lt;item text="hello" extra-text="world" xsi:type="derived"/>
+&lt;/root>
+ </pre>
+
+ <p>In the resulting object model, the container for
+ the <code>root::item</code> member will have two elements:
+ the first element's type will be <code>base</code> while
+ the second element's (dynamic) type will be
+ <code>derived</code>. This can be discovered using the
+ <code>dynamic_cast</code> operator as shown in the following
+ example:
+ </p>
+
+ <pre class="c++">
+void
+f (root&amp; r)
+{
+ for (root::item_const_iterator i (r.item ().begin ());
+ i != r.item ().end ()
+ ++i)
+ {
+ if (derived* d = dynamic_cast&lt;derived*> (&amp;(*i)))
+ {
+ // derived
+ }
+ else
+ {
+ // base
+ }
+ }
+}
+ </pre>
+
+ <p>The <code>_clone</code> virtual function should be used instead of
+ copy constructors to make copies of members that might use
+ polymorphism:
+ </p>
+
+ <pre class="c++">
+void
+f (root&amp; r)
+{
+ for (root::item_const_iterator i (r.item ().begin ());
+ i != r.item ().end ()
+ ++i)
+ {
+ std::unique_ptr&lt;base> c (i->_clone ());
+ }
+}
+ </pre>
+
+ <p>The mapping can often automatically determine which types are
+ polymorphic based on the substitution group declarations. However,
+ if your XML vocabulary is not using substitution groups or if
+ substitution groups are defined in a separate schema, then you will
+ need to use the <code>--polymorphic-type</code> option to specify
+ which types are polymorphic. When using this option you only need
+ to specify the root of a polymorphic type hierarchy and the mapping
+ will assume that all the derived types are also polymorphic.
+ Also note that you need to specify this option when compiling every
+ schema file that references the polymorphic type. Consider the following
+ two schemas as an example:</p>
+
+ <pre class="xml">
+&lt;!-- base.xsd -->
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;xs:complexType name="base">
+ &lt;xs:sequence>
+ &lt;xs:element name="b" type="xs:int"/>
+ &lt;/xs:sequence>
+ &lt;/xs:complexType>
+
+ &lt;!-- substitution group root -->
+ &lt;xs:element name="base" type="base"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <pre class="xml">
+&lt;!-- derived.xsd -->
+&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ &lt;include schemaLocation="base.xsd"/>
+
+ &lt;xs:complexType name="derived">
+ &lt;xs:complexContent>
+ &lt;xs:extension base="base">
+ &lt;xs:sequence>
+ &lt;xs:element name="d" type="xs:string"/>
+ &lt;/xs:sequence>
+ &lt;/xs:extension>
+ &lt;/xs:complexContent>
+ &lt;/xs:complexType>
+
+ &lt;xs:element name="derived" type="derived" substitutionGroup="base"/>
+
+&lt;/xs:schema>
+ </pre>
+
+ <p>In this example we need to specify "<code>--polymorphic-type base</code>"
+ when compiling both schemas because the substitution group is declared
+ in a schema other than the one defining type <code>base</code>.</p>
+
+ <p>You can also indicate that all types should be treated as polymorphic
+ with the <code>--polymorphic-type-all</code>. However, this may result
+ in slower generated code with a greater footprint.</p>
+
+
+ <!-- Mapping for any and anyAttribute -->
+
+
+ <h2><a name="2.12">2.12 Mapping for <code>any</code> and <code>anyAttribute</code></a></h2>
+
+ <p>For the XML Schema <code>any</code> and <code>anyAttribute</code>
+ wildcards an optional mapping can be requested with the
+ <code>--generate-wildcard</code> option. The mapping represents
+ the content matched by wildcards as DOM fragments. Because the
+ DOM API is used to access such content, the Xerces-C++ runtime
+ should be initialized by the application prior to parsing and
+ should remain initialized for the lifetime of objects with
+ the wildcard content. For more information on the Xerces-C++
+ runtime initialization see <a href="#3.1">Section 3.1,
+ "Initializing the Xerces-C++ Runtime"</a>.
+ </p>
+
+ <p>The mapping for <code>any</code> is similar to the mapping for
+ local elements (see <a href="#2.8">Section 2.8, "Mapping for Local
+ Elements and Attributes"</a>) except that the type used in the
+ wildcard mapping is <code>xercesc::DOMElement</code>. As with local
+ elements, the mapping divides all possible cardinality combinations
+ into three cardinality classes: <i>one</i>, <i>optional</i>, and
+ <i>sequence</i>.
+ </p>
+
+ <p>The mapping for <code>anyAttribute</code> represents the attributes
+ matched by this wildcard as a set of <code>xercesc::DOMAttr</code>
+ objects with a key being the attribute's name and namespace.</p>
+
+ <p>Similar to local elements and attributes, the <code>any</code> and
+ <code>anyAttribute</code> wildcards are mapped to a set of public type
+ definitions (typedefs) and a set of public accessor and modifier
+ functions. Type definitions have names derived from <code>"any"</code>
+ for the <code>any</code> wildcard and <code>"any_attribute"</code>
+ for the <code>anyAttribute</code> wildcard. The accessor and modifier
+ functions are named <code>"any"</code> for the <code>any</code> wildcard
+ and <code>"any_attribute"</code> for the <code>anyAttribute</code>
+ wildcard. Subsequent wildcards in the same type have escaped names
+ such as <code>"any1"</code> or <code>"any_attribute1"</code>.
+ </p>
+
+ <p>Because Xerces-C++ DOM nodes always belong to a <code>DOMDocument</code>,
+ each type with a wildcard has an associated <code>DOMDocument</code>
+ object. The reference to this object can be obtained using the accessor
+ function called <code>dom_document</code>. The access to the document
+ object from the application code may be necessary to create or modify
+ the wildcard content. For example:
+ </p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;any namespace="##other"/>
+ &lt;/sequence>
+ &lt;anyAttribute namespace="##other"/>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // any
+ //
+ const xercesc::DOMElement&amp;
+ any () const;
+
+ void
+ any (const xercesc::DOMElement&amp;);
+
+ ...
+
+ // any_attribute
+ //
+ typedef attribute_set any_attribute_set;
+ typedef any_attribute_set::iterator any_attribute_iterator;
+ typedef any_attribute_set::const_iterator any_attribute_const_iterator;
+
+ const any_attribute_set&amp;
+ any_attribute () const;
+
+ any_attribute_set&amp;
+ any_attribute ();
+
+ ...
+
+ // DOMDocument object for wildcard content.
+ //
+ const xercesc::DOMDocument&amp;
+ dom_document () const;
+
+ xercesc::DOMDocument&amp;
+ dom_document ();
+
+ ...
+};
+ </pre>
+
+
+ <p>Names and semantics of type definitions for the wildcards as well
+ as signatures of the accessor and modifier functions depend on the
+ wildcard type as well as the cardinality class for the <code>any</code>
+ wildcard. They are described in the following sub-sections.
+ </p>
+
+
+ <h3><a name="2.12.1">2.12.1 Mapping for <code>any</code> with the One Cardinality Class</a></h3>
+
+ <p>For <code>any</code> with the One cardinality class,
+ there are no type definitions. The accessor functions come in
+ constant and non-constant versions. The constant accessor function
+ returns a constant reference to <code>xercesc::DOMElement</code> and
+ can be used for read-only access. The non-constant version returns
+ an unrestricted reference to <code>xercesc::DOMElement</code> and can
+ be used for read-write access.
+ </p>
+
+ <p>The first modifier function expects an argument of type reference
+ to constant <code>xercesc::DOMElement</code> and makes a deep copy
+ of its argument. The second modifier function expects an argument of
+ type pointer to <code>xercesc::DOMElement</code>. This modifier
+ function assumes ownership of its argument and expects the element
+ object to be created using the DOM document associated with this
+ instance. For example:
+ </p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;any namespace="##other"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Accessors.
+ //
+ const xercesc::DOMElement&amp;
+ any () const;
+
+ xercesc::DOMElement&amp;
+ any ();
+
+ // Modifiers.
+ //
+ void
+ any (const xercesc::DOMElement&amp;);
+
+ void
+ any (xercesc::DOMElement*);
+
+ ...
+
+};
+ </pre>
+
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o, const xercesc::DOMElement&amp; e)
+{
+ using namespace xercesc;
+
+ DOMElement&amp; e1 (o.any ()); // get
+ o.any (e) // set, deep copy
+ DOMDocument&amp; doc (o.dom_document ());
+ o.any (doc.createElement (...)); // set, assumes ownership
+}
+ </pre>
+
+ <h3><a name="2.12.2">2.12.2 Mapping for <code>any</code> with the Optional Cardinality Class</a></h3>
+
+ <p>For <code>any</code> with the Optional cardinality class, the type
+ definitions consist of an alias for the container type with name
+ <code>any_optional</code> (or <code>any1_optional</code>, etc., for
+ subsequent wildcards in the type definition).
+ </p>
+
+ <p>Unlike accessor functions for the One cardinality class, accessor
+ functions for the Optional cardinality class return references to
+ corresponding containers rather than directly to <code>DOMElement</code>.
+ The accessor functions come in constant and non-constant versions.
+ The constant accessor function returns a constant reference to
+ the container and can be used for read-only access. The non-constant
+ version returns an unrestricted reference to the container
+ and can be used for read-write access.
+ </p>
+
+ <p>The modifier functions are overloaded for <code>xercesc::DOMElement</code>
+ and the container type. The first modifier function expects an argument of
+ type reference to constant <code>xercesc::DOMElement</code> and
+ makes a deep copy of its argument. The second modifier function
+ expects an argument of type pointer to <code>xercesc::DOMElement</code>.
+ This modifier function assumes ownership of its argument and expects
+ the element object to be created using the DOM document associated
+ with this instance. The third modifier function expects an argument
+ of type reference to constant of the container type and makes a
+ deep copy of its argument. For instance:
+ </p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;any namespace="##other" minOccurs="0"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Type definitions.
+ //
+ typedef element_optional any_optional;
+
+ // Accessors.
+ //
+ const any_optional&amp;
+ any () const;
+
+ any_optional&amp;
+ any ();
+
+ // Modifiers.
+ //
+ void
+ any (const xercesc::DOMElement&amp;);
+
+ void
+ any (xercesc::DOMElement*);
+
+ void
+ any (const any_optional&amp;);
+
+ ...
+
+};
+ </pre>
+
+
+ <p>The <code>element_optional</code> container is a
+ specialization of the <code>optional</code> class template described
+ in <a href="#2.8.2">Section 2.8.2, "Mapping for Members with the Optional
+ Cardinality Class"</a>. Its interface is presented below:
+ </p>
+
+ <pre class="c++">
+class element_optional
+{
+public:
+ explicit
+ element_optional (xercesc::DOMDocument&amp;);
+
+ // Makes a deep copy.
+ //
+ element_optional (const xercesc::DOMElement&amp;, xercesc::DOMDocument&amp;);
+
+ // Assumes ownership.
+ //
+ element_optional (xercesc::DOMElement*, xercesc::DOMDocument&amp;);
+
+ element_optional (const element_optional&amp;, xercesc::DOMDocument&amp;);
+
+public:
+ element_optional&amp;
+ operator= (const xercesc::DOMElement&amp;);
+
+ element_optional&amp;
+ operator= (const element_optional&amp;);
+
+ // Pointer-like interface.
+ //
+public:
+ const xercesc::DOMElement*
+ operator-> () const;
+
+ xercesc::DOMElement*
+ operator-> ();
+
+ const xercesc::DOMElement&amp;
+ operator* () const;
+
+ xercesc::DOMElement&amp;
+ operator* ();
+
+ typedef void (element_optional::*bool_convertible) ();
+ operator bool_convertible () const;
+
+ // Get/set interface.
+ //
+public:
+ bool
+ present () const;
+
+ const xercesc::DOMElement&amp;
+ get () const;
+
+ xercesc::DOMElement&amp;
+ get ();
+
+ // Makes a deep copy.
+ //
+ void
+ set (const xercesc::DOMElement&amp;);
+
+ // Assumes ownership.
+ //
+ void
+ set (xercesc::DOMElement*);
+
+ void
+ reset ();
+};
+
+bool
+operator== (const element_optional&amp;, const element_optional&amp;);
+
+bool
+operator!= (const element_optional&amp;, const element_optional&amp;);
+ </pre>
+
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o, const xercesc::DOMElement&amp; e)
+{
+ using namespace xercesc;
+
+ DOMDocument&amp; doc (o.dom_document ());
+
+ if (o.any ().present ()) // test
+ {
+ DOMElement&amp; e1 (o.any ().get ()); // get
+ o.any ().set (e); // set, deep copy
+ o.any ().set (doc.createElement (...)); // set, assumes ownership
+ o.any ().reset (); // reset
+ }
+
+ // Same as above but using pointer notation:
+ //
+ if (o.member ()) // test
+ {
+ DOMElement&amp; e1 (*o.any ()); // get
+ o.any (e); // set, deep copy
+ o.any (doc.createElement (...)); // set, assumes ownership
+ o.any ().reset (); // reset
+ }
+}
+ </pre>
+
+
+
+ <h3><a name="2.12.3">2.12.3 Mapping for <code>any</code> with the Sequence Cardinality Class</a></h3>
+
+ <p>For <code>any</code> with the Sequence cardinality class, the type
+ definitions consist of an alias of the container type with name
+ <code>any_sequence</code> (or <code>any1_sequence</code>, etc., for
+ subsequent wildcards in the type definition), an alias of the iterator
+ type with name <code>any_iterator</code> (or <code>any1_iterator</code>,
+ etc., for subsequent wildcards in the type definition), and an alias
+ of the constant iterator type with name <code>any_const_iterator</code>
+ (or <code>any1_const_iterator</code>, etc., for subsequent wildcards
+ in the type definition).
+ </p>
+
+ <p>The accessor functions come in constant and non-constant versions.
+ The constant accessor function returns a constant reference to the
+ container and can be used for read-only access. The non-constant
+ version returns an unrestricted reference to the container and can
+ be used for read-write access.
+ </p>
+
+ <p>The modifier function expects an argument of type reference to
+ constant of the container type. The modifier function makes
+ a deep copy of its argument. For instance:
+ </p>
+
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;any namespace="##other" minOccurs="unbounded"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Type definitions.
+ //
+ typedef element_sequence any_sequence;
+ typedef any_sequence::iterator any_iterator;
+ typedef any_sequence::const_iterator any_const_iterator;
+
+ // Accessors.
+ //
+ const any_sequence&amp;
+ any () const;
+
+ any_sequence&amp;
+ any ();
+
+ // Modifier.
+ //
+ void
+ any (const any_sequence&amp;);
+
+ ...
+
+};
+ </pre>
+
+ <p>The <code>element_sequence</code> container is a
+ specialization of the <code>sequence</code> class template described
+ in <a href="#2.8.3">Section 2.8.3, "Mapping for Members with the
+ Sequence Cardinality Class"</a>. Its interface is similar to
+ the sequence interface as defined by the ISO/ANSI Standard for
+ C++ (ISO/IEC 14882:1998, Section 23.1.1, "Sequences") and is
+ presented below:
+ </p>
+
+ <pre class="c++">
+class element_sequence
+{
+public:
+ typedef xercesc::DOMElement value_type;
+ typedef xercesc::DOMElement* pointer;
+ typedef const xercesc::DOMElement* const_pointer;
+ typedef xercesc::DOMElement&amp; reference;
+ typedef const xercesc::DOMElement&amp; const_reference;
+
+ typedef &lt;implementation-defined> iterator;
+ typedef &lt;implementation-defined> const_iterator;
+ typedef &lt;implementation-defined> reverse_iterator;
+ typedef &lt;implementation-defined> const_reverse_iterator;
+
+ typedef &lt;implementation-defined> size_type;
+ typedef &lt;implementation-defined> difference_type;
+ typedef &lt;implementation-defined> allocator_type;
+
+public:
+ explicit
+ element_sequence (xercesc::DOMDocument&amp;);
+
+ // DOMElement cannot be default-constructed.
+ //
+ // explicit
+ // element_sequence (size_type n);
+
+ element_sequence (size_type n,
+ const xercesc::DOMElement&amp;,
+ xercesc::DOMDocument&amp;);
+
+ template &lt;typename I>
+ element_sequence (const I&amp; begin,
+ const I&amp; end,
+ xercesc::DOMDocument&amp;);
+
+ element_sequence (const element_sequence&amp;, xercesc::DOMDocument&amp;);
+
+ element_sequence&amp;
+ operator= (const element_sequence&amp;);
+
+public:
+ void
+ assign (size_type n, const xercesc::DOMElement&amp;);
+
+ template &lt;typename I>
+ void
+ assign (const I&amp; begin, const I&amp; end);
+
+public:
+ // This version of resize can only be used to shrink the
+ // sequence because DOMElement cannot be default-constructed.
+ //
+ void
+ resize (size_type);
+
+ void
+ resize (size_type, const xercesc::DOMElement&amp;);
+
+public:
+ size_type
+ size () const;
+
+ size_type
+ max_size () const;
+
+ size_type
+ capacity () const;
+
+ bool
+ empty () const;
+
+ void
+ reserve (size_type);
+
+ void
+ clear ();
+
+public:
+ const_iterator
+ begin () const;
+
+ const_iterator
+ end () const;
+
+ iterator
+ begin ();
+
+ iterator
+ end ();
+
+ const_reverse_iterator
+ rbegin () const;
+
+ const_reverse_iterator
+ rend () const
+
+ reverse_iterator
+ rbegin ();
+
+ reverse_iterator
+ rend ();
+
+public:
+ xercesc::DOMElement&amp;
+ operator[] (size_type);
+
+ const xercesc::DOMElement&amp;
+ operator[] (size_type) const;
+
+ xercesc::DOMElement&amp;
+ at (size_type);
+
+ const xercesc::DOMElement&amp;
+ at (size_type) const;
+
+ xercesc::DOMElement&amp;
+ front ();
+
+ const xercesc::DOMElement&amp;
+ front () const;
+
+ xercesc::DOMElement&amp;
+ back ();
+
+ const xercesc::DOMElement&amp;
+ back () const;
+
+public:
+ // Makes a deep copy.
+ //
+ void
+ push_back (const xercesc::DOMElement&amp;);
+
+ // Assumes ownership.
+ //
+ void
+ push_back (xercesc::DOMElement*);
+
+ void
+ pop_back ();
+
+ // Makes a deep copy.
+ //
+ iterator
+ insert (iterator position, const xercesc::DOMElement&amp;);
+
+ // Assumes ownership.
+ //
+ iterator
+ insert (iterator position, xercesc::DOMElement*);
+
+ void
+ insert (iterator position, size_type n, const xercesc::DOMElement&amp;);
+
+ template &lt;typename I>
+ void
+ insert (iterator position, const I&amp; begin, const I&amp; end);
+
+ iterator
+ erase (iterator position);
+
+ iterator
+ erase (iterator begin, iterator end);
+
+public:
+ // Note that the DOMDocument object of the two sequences being
+ // swapped should be the same.
+ //
+ void
+ swap (sequence&amp; x);
+};
+
+inline bool
+operator== (const element_sequence&amp;, const element_sequence&amp;);
+
+inline bool
+operator!= (const element_sequence&amp;, const element_sequence&amp;);
+ </pre>
+
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o, const xercesc::DOMElement&amp; e)
+{
+ using namespace xercesc;
+
+ object::any_sequence&amp; s (o.any ());
+
+ // Iteration.
+ //
+ for (object::any_iterator i (s.begin ()); i != s.end (); ++i)
+ {
+ DOMElement&amp; e (*i);
+ }
+
+ // Modification.
+ //
+ s.push_back (e); // deep copy
+ DOMDocument&amp; doc (o.dom_document ());
+ s.push_back (doc.createElement (...)); // assumes ownership
+}
+ </pre>
+
+ <h3><a name="2.12.4">2.12.4 Element Wildcard Order</a></h3>
+
+ <p>Similar to elements, element wildcards in ordered types
+ (<a href="#2.8.4">Section 2.8.4, "Element Order"</a>) are assigned
+ content ids and are included in the content order sequence.
+ Continuing with the bank transactions example started in Section
+ 2.8.4, we can extend the batch by allowing custom transactions:</p>
+
+ <pre class="xml">
+&lt;complexType name="batch">
+ &lt;choice minOccurs="0" maxOccurs="unbounded">
+ &lt;element name="withdraw" type="withdraw"/>
+ &lt;element name="deposit" type="deposit"/>
+ &lt;any namespace="##other" processContents="lax"/>
+ &lt;/choice>
+&lt;/complexType>
+ </pre>
+
+ <p>This will lead to the following changes in the generated
+ <code>batch</code> C++ class:</p>
+
+ <pre class="c++">
+class batch: public xml_schema::type
+{
+public:
+ ...
+
+ // any
+ //
+ typedef element_sequence any_sequence;
+ typedef any_sequence::iterator any_iterator;
+ typedef any_sequence::const_iterator any_const_iterator;
+
+ static const std::size_t any_id = 3UL;
+
+ const any_sequence&amp;
+ any () const;
+
+ any_sequence&amp;
+ any ();
+
+ void
+ any (const any_sequence&amp;);
+
+ ...
+};
+ </pre>
+
+ <p>With this change we also need to update the iteration code to handle
+ the new content id:</p>
+
+ <pre class="c++">
+for (batch::content_order_const_iterator i (b.content_order ().begin ());
+ i != b.content_order ().end ();
+ ++i)
+{
+ switch (i->id)
+ {
+ ...
+
+ case batch::any_id:
+ {
+ const DOMElement&amp; e (b.any ()[i->index]);
+ ...
+ break;
+ }
+
+ ...
+ }
+}
+ </pre>
+
+ <p>For the complete working code that shows the use of wildcards in
+ ordered types refer to the <code>order/element</code> example in
+ the <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a>
+ package.</p>
+
+ <h3><a name="2.12.5">2.12.5 Mapping for <code>anyAttribute</code></a></h3>
+
+ <p>For <code>anyAttribute</code> the type definitions consist of an alias
+ of the container type with name <code>any_attribute_set</code>
+ (or <code>any1_attribute_set</code>, etc., for subsequent wildcards
+ in the type definition), an alias of the iterator type with name
+ <code>any_attribute_iterator</code> (or <code>any1_attribute_iterator</code>,
+ etc., for subsequent wildcards in the type definition), and an alias
+ of the constant iterator type with name <code>any_attribute_const_iterator</code>
+ (or <code>any1_attribute_const_iterator</code>, etc., for subsequent
+ wildcards in the type definition).
+ </p>
+
+ <p>The accessor functions come in constant and non-constant versions.
+ The constant accessor function returns a constant reference to the
+ container and can be used for read-only access. The non-constant
+ version returns an unrestricted reference to the container and can
+ be used for read-write access.
+ </p>
+
+ <p>The modifier function expects an argument of type reference to
+ constant of the container type. The modifier function makes
+ a deep copy of its argument. For instance:
+ </p>
+
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ ...
+ &lt;/sequence>
+ &lt;anyAttribute namespace="##other"/>
+&lt;/complexType>
+ </pre>
+
+ <p>is mapped to:</p>
+
+ <pre class="c++">
+class object: public xml_schema::type
+{
+public:
+ // Type definitions.
+ //
+ typedef attribute_set any_attribute_set;
+ typedef any_attribute_set::iterator any_attribute_iterator;
+ typedef any_attribute_set::const_iterator any_attribute_const_iterator;
+
+ // Accessors.
+ //
+ const any_attribute_set&amp;
+ any_attribute () const;
+
+ any_attribute_set&amp;
+ any_attribute ();
+
+ // Modifier.
+ //
+ void
+ any_attribute (const any_attribute_set&amp;);
+
+ ...
+
+};
+ </pre>
+
+ <p>The <code>attribute_set</code> class is an associative container
+ similar to the <code>std::set</code> class template as defined by
+ the ISO/ANSI Standard for C++ (ISO/IEC 14882:1998, Section 23.3.3,
+ "Class template set") with the key being the attribute's name
+ and namespace. Unlike <code>std::set</code>, <code>attribute_set</code>
+ allows searching using names and namespaces instead of
+ <code>xercesc::DOMAttr</code> objects. It is defined in an
+ implementation-specific namespace and its interface is presented
+ below:
+ </p>
+
+ <pre class="c++">
+class attribute_set
+{
+public:
+ typedef xercesc::DOMAttr key_type;
+ typedef xercesc::DOMAttr value_type;
+ typedef xercesc::DOMAttr* pointer;
+ typedef const xercesc::DOMAttr* const_pointer;
+ typedef xercesc::DOMAttr&amp; reference;
+ typedef const xercesc::DOMAttr&amp; const_reference;
+
+ typedef &lt;implementation-defined> iterator;
+ typedef &lt;implementation-defined> const_iterator;
+ typedef &lt;implementation-defined> reverse_iterator;
+ typedef &lt;implementation-defined> const_reverse_iterator;
+
+ typedef &lt;implementation-defined> size_type;
+ typedef &lt;implementation-defined> difference_type;
+ typedef &lt;implementation-defined> allocator_type;
+
+public:
+ attribute_set (xercesc::DOMDocument&amp;);
+
+ template &lt;typename I>
+ attribute_set (const I&amp; begin, const I&amp; end, xercesc::DOMDocument&amp;);
+
+ attribute_set (const attribute_set&amp;, xercesc::DOMDocument&amp;);
+
+ attribute_set&amp;
+ operator= (const attribute_set&amp;);
+
+public:
+ const_iterator
+ begin () const;
+
+ const_iterator
+ end () const;
+
+ iterator
+ begin ();
+
+ iterator
+ end ();
+
+ const_reverse_iterator
+ rbegin () const;
+
+ const_reverse_iterator
+ rend () const;
+
+ reverse_iterator
+ rbegin ();
+
+ reverse_iterator
+ rend ();
+
+public:
+ size_type
+ size () const;
+
+ size_type
+ max_size () const;
+
+ bool
+ empty () const;
+
+ void
+ clear ();
+
+public:
+ // Makes a deep copy.
+ //
+ std::pair&lt;iterator, bool>
+ insert (const xercesc::DOMAttr&amp;);
+
+ // Assumes ownership.
+ //
+ std::pair&lt;iterator, bool>
+ insert (xercesc::DOMAttr*);
+
+ // Makes a deep copy.
+ //
+ iterator
+ insert (iterator position, const xercesc::DOMAttr&amp;);
+
+ // Assumes ownership.
+ //
+ iterator
+ insert (iterator position, xercesc::DOMAttr*);
+
+ template &lt;typename I>
+ void
+ insert (const I&amp; begin, const I&amp; end);
+
+public:
+ void
+ erase (iterator position);
+
+ size_type
+ erase (const std::basic_string&lt;C>&amp; name);
+
+ size_type
+ erase (const std::basic_string&lt;C>&amp; namespace_,
+ const std::basic_string&lt;C>&amp; name);
+
+ size_type
+ erase (const XMLCh* name);
+
+ size_type
+ erase (const XMLCh* namespace_, const XMLCh* name);
+
+ void
+ erase (iterator begin, iterator end);
+
+public:
+ size_type
+ count (const std::basic_string&lt;C>&amp; name) const;
+
+ size_type
+ count (const std::basic_string&lt;C>&amp; namespace_,
+ const std::basic_string&lt;C>&amp; name) const;
+
+ size_type
+ count (const XMLCh* name) const;
+
+ size_type
+ count (const XMLCh* namespace_, const XMLCh* name) const;
+
+ iterator
+ find (const std::basic_string&lt;C>&amp; name);
+
+ iterator
+ find (const std::basic_string&lt;C>&amp; namespace_,
+ const std::basic_string&lt;C>&amp; name);
+
+ iterator
+ find (const XMLCh* name);
+
+ iterator
+ find (const XMLCh* namespace_, const XMLCh* name);
+
+ const_iterator
+ find (const std::basic_string&lt;C>&amp; name) const;
+
+ const_iterator
+ find (const std::basic_string&lt;C>&amp; namespace_,
+ const std::basic_string&lt;C>&amp; name) const;
+
+ const_iterator
+ find (const XMLCh* name) const;
+
+ const_iterator
+ find (const XMLCh* namespace_, const XMLCh* name) const;
+
+public:
+ // Note that the DOMDocument object of the two sets being
+ // swapped should be the same.
+ //
+ void
+ swap (attribute_set&amp;);
+};
+
+bool
+operator== (const attribute_set&amp;, const attribute_set&amp;);
+
+bool
+operator!= (const attribute_set&amp;, const attribute_set&amp;);
+ </pre>
+
+ <p>The following code shows how one could use this mapping:</p>
+
+ <pre class="c++">
+void
+f (object&amp; o, const xercesc::DOMAttr&amp; a)
+{
+ using namespace xercesc;
+
+ object::any_attribute_set&amp; s (o.any_attribute ());
+
+ // Iteration.
+ //
+ for (object::any_attribute_iterator i (s.begin ()); i != s.end (); ++i)
+ {
+ DOMAttr&amp; a (*i);
+ }
+
+ // Modification.
+ //
+ s.insert (a); // deep copy
+ DOMDocument&amp; doc (o.dom_document ());
+ s.insert (doc.createAttribute (...)); // assumes ownership
+
+ // Searching.
+ //
+ object::any_attribute_iterator i (s.find ("name"));
+ i = s.find ("http://www.w3.org/XML/1998/namespace", "lang");
+}
+ </pre>
+
+ <!-- Mapping for Mixed Content Models -->
+
+ <h2><a name="2.13">2.13 Mapping for Mixed Content Models</a></h2>
+
+ <p>For XML Schema types with mixed content models C++/Tree provides
+ mapping support only if the type is marked as ordered
+ (<a href="#2.8.4">Section 2.8.4, "Element Order"</a>). Use the
+ <code>--ordered-type-mixed</code> XSD compiler option to
+ automatically mark all types with mixed content as ordered.</p>
+
+ <p>For an ordered type with mixed content, C++/Tree adds an extra
+ text content sequence that is used to store the text fragments.
+ This text content sequence is also assigned the content id and
+ its entries are included in the content order sequence, just
+ like elements. As a result, it is possible to capture the order
+ between elements and text fragments.</p>
+
+ <p>As an example, consider the following schema that describes text
+ with embedded links:</p>
+
+ <pre class="xml">
+&lt;complexType name="anchor">
+ &lt;simpleContent>
+ &lt;extension base="string">
+ &lt;attribute name="href" type="anyURI" use="required"/>
+ &lt;/extension>
+ &lt;/simpleContent>
+&lt;/complexType>
+
+&lt;complexType name="text" mixed="true">
+ &lt;sequence>
+ &lt;element name="a" type="anchor" minOccurs="0" maxOccurs="unbounded"/>
+ &lt;/sequence>
+&lt;/complexType>
+ </pre>
+
+ <p>The generated <code>text</code> C++ class will provide the following
+ API (assuming it is marked as ordered):</p>
+
+ <pre class="c++">
+class text: public xml_schema::type
+{
+public:
+ // a
+ //
+ typedef anchor a_type;
+ typedef sequence&lt;a_type> a_sequence;
+ typedef a_sequence::iterator a_iterator;
+ typedef a_sequence::const_iterator a_const_iterator;
+
+ static const std::size_t a_id = 1UL;
+
+ const a_sequence&amp;
+ a () const;
+
+ a_sequence&amp;
+ a ();
+
+ void
+ a (const a_sequence&amp;);
+
+ // text_content
+ //
+ typedef xml_schema::string text_content_type;
+ typedef sequence&lt;text_content_type> text_content_sequence;
+ typedef text_content_sequence::iterator text_content_iterator;
+ typedef text_content_sequence::const_iterator text_content_const_iterator;
+
+ static const std::size_t text_content_id = 2UL;
+
+ const text_content_sequence&amp;
+ text_content () const;
+
+ text_content_sequence&amp;
+ text_content ();
+
+ void
+ text_content (const text_content_sequence&amp;);
+
+ // content_order
+ //
+ typedef xml_schema::content_order content_order_type;
+ typedef std::vector&lt;content_order_type> content_order_sequence;
+ typedef content_order_sequence::iterator content_order_iterator;
+ typedef content_order_sequence::const_iterator content_order_const_iterator;
+
+ const content_order_sequence&amp;
+ content_order () const;
+
+ content_order_sequence&amp;
+ content_order ();
+
+ void
+ content_order (const content_order_sequence&amp;);
+
+ ...
+};
+ </pre>
+
+ <p>Given this interface we can iterate over both link elements
+ and text in content order. The following code fragment converts
+ our format to plain text with references.</p>
+
+ <pre class="c++">
+const text&amp; t = ...
+
+for (text::content_order_const_iterator i (t.content_order ().begin ());
+ i != t.content_order ().end ();
+ ++i)
+{
+ switch (i->id)
+ {
+ case text::a_id:
+ {
+ const anchor&amp; a (t.a ()[i->index]);
+ cerr &lt;&lt; a &lt;&lt; "[" &lt;&lt; a.href () &lt;&lt; "]";
+ break;
+ }
+ case text::text_content_id:
+ {
+ const xml_schema::string&amp; s (t.text_content ()[i->index]);
+ cerr &lt;&lt; s;
+ break;
+ }
+ default:
+ {
+ assert (false); // Unknown content id.
+ }
+ }
+}
+ </pre>
+
+ <p>For the complete working code that shows the use of mixed content
+ in ordered types refer to the <code>order/mixed</code> example in
+ the <code>cxx/tree/</code> directory in the
+ <a href="https://cppget.org/xsd-examples">xsd-examples</a>
+ package.</p>
+
+ <!-- Parsing -->
+
+
+ <h1><a name="3">3 Parsing</a></h1>
+
+ <p>This chapter covers various aspects of parsing XML instance
+ documents in order to obtain corresponding tree-like object
+ model.
+ </p>
+
+ <p>Each global XML Schema element in the form:</p>
+
+ <pre class="xml">
+&lt;element name="name" type="type"/>
+ </pre>
+
+ <p>is mapped to 14 overloaded C++ functions in the form:</p>
+
+ <pre class="c++">
+// Read from a URI or a local file.
+//
+
+std::[unique|auto]_ptr&lt;type>
+name (const std::basic_string&lt;C>&amp; uri,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (const std::basic_string&lt;C>&amp; uri,
+ xml_schema::error_handler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (const std::basic_string&lt;C>&amp; uri,
+ xercesc::DOMErrorHandler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+
+// Read from std::istream.
+//
+
+std::[unique|auto]_ptr&lt;type>
+name (std::istream&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (std::istream&amp;,
+ xml_schema::error_handler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (std::istream&amp;,
+ xercesc::DOMErrorHandler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+
+std::[unique|auto]_ptr&lt;type>
+name (std::istream&amp;,
+ const std::basic_string&lt;C>&amp; id,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (std::istream&amp;,
+ const std::basic_string&lt;C>&amp; id,
+ xml_schema::error_handler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (std::istream&amp;,
+ const std::basic_string&lt;C>&amp; id,
+ xercesc::DOMErrorHandler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+
+// Read from InputSource.
+//
+
+std::[unique|auto]_ptr&lt;type>
+name (xercesc::InputSource&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (xercesc::InputSource&amp;,
+ xml_schema::error_handler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (xercesc::InputSource&amp;,
+ xercesc::DOMErrorHandler&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+
+// Read from DOM.
+//
+
+std::[unique|auto]_ptr&lt;type>
+name (const xercesc::DOMDocument&amp;,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+
+std::[unique|auto]_ptr&lt;type>
+name (xml_schema::dom::[unique|auto]_ptr&lt;xercesc::DOMDocument>,
+ xml_schema::flags = 0,
+ const xml_schema::properties&amp; = xml_schema::properties ());
+ </pre>
+
+ <p>You can choose between reading an XML instance from a local file,
+ URI, <code>std::istream</code>, <code>xercesc::InputSource</code>,
+ or a pre-parsed DOM instance in the form of
+ <code>xercesc::DOMDocument</code>. All the parsing functions
+ return a dynamically allocated object model as either
+ <code>std::unique_ptr</code> or <code>std::auto_ptr</code>,
+ depending on the C++ standard selected. Each of these parsing
+ functions is discussed in more detail in the following sections.
+ </p>
+
+ <h2><a name="3.1">3.1 Initializing the Xerces-C++ Runtime</a></h2>
+
+ <p>Some parsing functions expect you to initialize the Xerces-C++
+ runtime while others initialize and terminate it as part of their
+ work. The general rule is as follows: if a function has any arguments
+ or return a value that is an instance of a Xerces-C++ type, then
+ this function expects you to initialize the Xerces-C++ runtime.
+ Otherwise, the function initializes and terminates the runtime for
+ you. Note that it is legal to have nested calls to the Xerces-C++
+ initialize and terminate functions as long as the calls are balanced.
+ </p>
+
+ <p>You can instruct parsing functions that initialize and terminate
+ the runtime not to do so by passing the
+ <code>xml_schema::flags::dont_initialize</code> flag (see
+ <a href="#3.2">Section 3.2, "Flags and Properties"</a>).
+ </p>
+
+
+ <h2><a name="3.2">3.2 Flags and Properties</a></h2>
+
+ <p>Parsing flags and properties are the last two arguments of every
+ parsing function. They allow you to fine-tune the process of
+ instance validation and parsing. Both arguments are optional.
+ </p>
+
+
+ <p>The following flags are recognized by the parsing functions:</p>
+
+ <dl>
+ <dt><code>xml_schema::flags::keep_dom</code></dt>
+ <dd>Keep association between DOM nodes and the resulting
+ object model nodes. For more information about DOM association
+ refer to <a href="#5.1">Section 5.1, "DOM Association"</a>.</dd>
+
+ <dt><code>xml_schema::flags::own_dom</code></dt>
+ <dd>Assume ownership of the DOM document passed. This flag only
+ makes sense together with the <code>keep_dom</code> flag in
+ the call to the parsing function with the
+ <code>xml_schema::dom::[unique|auto]_ptr&lt;DOMDocument></code>
+ argument.</dd>
+
+ <dt><code>xml_schema::flags::dont_validate</code></dt>
+ <dd>Do not validate instance documents against schemas.</dd>
+
+ <dt><code>xml_schema::flags::dont_initialize</code></dt>
+ <dd>Do not initialize the Xerces-C++ runtime.</dd>
+ </dl>
+
+ <p>You can pass several flags by combining them using the bit-wise OR
+ operator. For example:</p>
+
+ <pre class="c++">
+using xml_schema::flags;
+
+std::unique_ptr&lt;type> r (
+ name ("test.xml", flags::keep_dom | flags::dont_validate));
+ </pre>
+
+ <p>By default, validation of instance documents is turned on even
+ though parsers generated by XSD do not assume instance
+ documents are valid. They include a number of checks that prevent
+ construction of inconsistent object models. This,
+ however, does not mean that an instance document that was
+ successfully parsed by the XSD-generated parsers is
+ valid per the corresponding schema. If an instance document is not
+ "valid enough" for the generated parsers to construct consistent
+ object model, one of the exceptions defined in
+ <code>xml_schema</code> namespace is thrown (see
+ <a href="#3.3">Section 3.3, "Error Handling"</a>).
+ </p>
+
+ <p>For more information on the Xerces-C++ runtime initialization
+ refer to <a href="#3.1">Section 3.1, "Initializing the Xerces-C++
+ Runtime"</a>.
+ </p>
+
+ <p>The <code>xml_schema::properties</code> class allows you to
+ programmatically specify schema locations to be used instead
+ of those specified with the <code>xsi::schemaLocation</code>
+ and <code>xsi::noNamespaceSchemaLocation</code> attributes
+ in instance documents. The interface of the <code>properties</code>
+ class is presented below:
+ </p>
+
+ <pre class="c++">
+class properties
+{
+public:
+ void
+ schema_location (const std::basic_string&lt;C>&amp; namespace_,
+ const std::basic_string&lt;C>&amp; location);
+ void
+ no_namespace_schema_location (const std::basic_string&lt;C>&amp; location);
+};
+ </pre>
+
+ <p>Note that all locations are relative to an instance document unless
+ they are URIs. For example, if you want to use a local file as your
+ schema, then you will need to pass
+ <code>file:///absolute/path/to/your/schema</code> as the location
+ argument.
+ </p>
+
+ <h2><a name="3.3">3.3 Error Handling</a></h2>
+
+ <p>As discussed in <a href="#2.2">Section 2.2, "Error Handling"</a>,
+ the mapping uses the C++ exception handling mechanism as its primary
+ way of reporting error conditions. However, to handle recoverable
+ parsing and validation errors and warnings, a callback interface maybe
+ preferred by the application.</p>
+
+ <p>To better understand error handling and reporting strategies employed
+ by the parsing functions, it is useful to know that the
+ transformation of an XML instance document to a statically-typed
+ tree happens in two stages. The first stage, performed by Xerces-C++,
+ consists of parsing an XML document into a DOM instance. For short,
+ we will call this stage the XML-DOM stage. Validation, if not disabled,
+ happens during this stage. The second stage,
+ performed by the generated parsers, consist of parsing the DOM
+ instance into the statically-typed tree. We will call this stage
+ the DOM-Tree stage. Additional checks are performed during this
+ stage in order to prevent construction of inconsistent tree which
+ could otherwise happen when validation is disabled, for example.</p>
+
+ <p>All parsing functions except the one that operates on a DOM instance
+ come in overloaded triples. The first function in such a triple
+ reports error conditions exclusively by throwing exceptions. It
+ accumulates all the parsing and validation errors of the XML-DOM
+ stage and throws them in a single instance of the
+ <code>xml_schema::parsing</code> exception (described below).
+ The second and the third functions in the triple use callback
+ interfaces to report parsing and validation errors and warnings.
+ The two callback interfaces are <code>xml_schema::error_handler</code>
+ and <code>xercesc::DOMErrorHandler</code>. For more information
+ on the <code>xercesc::DOMErrorHandler</code> interface refer to
+ the Xerces-C++ documentation. The <code>xml_schema::error_handler</code>
+ interface is presented below:
+ </p>
+
+ <pre class="c++">
+class error_handler
+{
+public:
+ struct severity
+ {
+ enum value
+ {
+ warning,
+ error,
+ fatal
+ };
+ };
+
+ virtual bool
+ handle (const std::basic_string&lt;C>&amp; id,
+ unsigned long line,
+ unsigned long column,
+ severity,
+ const std::basic_string&lt;C>&amp; message) = 0;
+
+ virtual
+ ~error_handler ();
+};
+ </pre>
+
+ <p>The <code>id</code> argument of the <code>error_handler::handle</code>
+ function identifies the resource being parsed (e.g., a file name or
+ URI).
+ </p>
+
+ <p>By returning <code>true</code> from the <code>handle</code> function
+ you instruct the parser to recover and continue parsing. Returning
+ <code>false</code> results in termination of the parsing process.
+ An error with the <code>fatal</code> severity level results in
+ termination of the parsing process no matter what is returned from
+ the <code>handle</code> function. It is safe to throw an exception
+ from the <code>handle</code> function.
+ </p>
+
+ <p>The DOM-Tree stage reports error conditions exclusively by throwing
+ exceptions. Individual exceptions thrown by the parsing functions
+ are described in the following sub-sections.
+ </p>
+
+
+ <h3><a name="3.3.1">3.3.1 <code>xml_schema::parsing</code></a></h3>
+
+ <pre class="c++">
+struct severity
+{
+ enum value
+ {
+ warning,
+ error
+ };
+
+ severity (value);
+ operator value () const;
+};
+
+struct error
+{
+ error (severity,
+ const std::basic_string&lt;C>&amp; id,
+ unsigned long line,
+ unsigned long column,
+ const std::basic_string&lt;C>&amp; message);
+
+ severity
+ severity () const;
+
+ const std::basic_string&lt;C>&amp;
+ id () const;
+
+ unsigned long
+ line () const;
+
+ unsigned long
+ column () const;
+
+ const std::basic_string&lt;C>&amp;
+ message () const;
+};
+
+std::basic_ostream&lt;C>&amp;
+operator&lt;&lt; (std::basic_ostream&lt;C>&amp;, const error&amp;);
+
+struct diagnostics: std::vector&lt;error>
+{
+};
+
+std::basic_ostream&lt;C>&amp;
+operator&lt;&lt; (std::basic_ostream&lt;C>&amp;, const diagnostics&amp;);
+
+struct parsing: virtual exception
+{
+ parsing ();
+ parsing (const diagnostics&amp;);
+
+ const diagnostics&amp;
+ diagnostics () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::parsing</code> exception is thrown if there
+ were parsing or validation errors reported during the XML-DOM stage.
+ If no callback interface was provided to the parsing function, the
+ exception contains a list of errors and warnings accessible using
+ the <code>diagnostics</code> function. The usual conditions when
+ this exception is thrown include malformed XML instances and, if
+ validation is turned on, invalid instance documents.
+ </p>
+
+ <h3><a name="3.3.2">3.3.2 <code>xml_schema::expected_element</code></a></h3>
+
+ <pre class="c++">
+struct expected_element: virtual exception
+{
+ expected_element (const std::basic_string&lt;C>&amp; name,
+ const std::basic_string&lt;C>&amp; namespace_);
+
+
+ const std::basic_string&lt;C>&amp;
+ name () const;
+
+ const std::basic_string&lt;C>&amp;
+ namespace_ () const;
+
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::expected_element</code> exception is thrown
+ when an expected element is not encountered by the DOM-Tree stage.
+ The name and namespace of the expected element can be obtained using
+ the <code>name</code> and <code>namespace_</code> functions respectively.
+ </p>
+
+
+ <h3><a name="3.3.3">3.3.3 <code>xml_schema::unexpected_element</code></a></h3>
+
+ <pre class="c++">
+struct unexpected_element: virtual exception
+{
+ unexpected_element (const std::basic_string&lt;C>&amp; encountered_name,
+ const std::basic_string&lt;C>&amp; encountered_namespace,
+ const std::basic_string&lt;C>&amp; expected_name,
+ const std::basic_string&lt;C>&amp; expected_namespace)
+
+
+ const std::basic_string&lt;C>&amp;
+ encountered_name () const;
+
+ const std::basic_string&lt;C>&amp;
+ encountered_namespace () const;
+
+
+ const std::basic_string&lt;C>&amp;
+ expected_name () const;
+
+ const std::basic_string&lt;C>&amp;
+ expected_namespace () const;
+
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::unexpected_element</code> exception is thrown
+ when an unexpected element is encountered by the DOM-Tree stage.
+ The name and namespace of the encountered element can be obtained
+ using the <code>encountered_name</code> and
+ <code>encountered_namespace</code> functions respectively. If an
+ element was expected instead of the encountered one, its name
+ and namespace can be obtained using the <code>expected_name</code> and
+ <code>expected_namespace</code> functions respectively. Otherwise
+ these functions return empty strings.
+ </p>
+
+ <h3><a name="3.3.4">3.3.4 <code>xml_schema::expected_attribute</code></a></h3>
+
+ <pre class="c++">
+struct expected_attribute: virtual exception
+{
+ expected_attribute (const std::basic_string&lt;C>&amp; name,
+ const std::basic_string&lt;C>&amp; namespace_);
+
+
+ const std::basic_string&lt;C>&amp;
+ name () const;
+
+ const std::basic_string&lt;C>&amp;
+ namespace_ () const;
+
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::expected_attribute</code> exception is thrown
+ when an expected attribute is not encountered by the DOM-Tree stage.
+ The name and namespace of the expected attribute can be obtained using
+ the <code>name</code> and <code>namespace_</code> functions respectively.
+ </p>
+
+
+ <h3><a name="3.3.5">3.3.5 <code>xml_schema::unexpected_enumerator</code></a></h3>
+
+ <pre class="c++">
+struct unexpected_enumerator: virtual exception
+{
+ unexpected_enumerator (const std::basic_string&lt;C>&amp; enumerator);
+
+ const std::basic_string&lt;C>&amp;
+ enumerator () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::unexpected_enumerator</code> exception is thrown
+ when an unexpected enumerator is encountered by the DOM-Tree stage.
+ The enumerator can be obtained using the <code>enumerator</code>
+ functions.
+ </p>
+
+ <h3><a name="3.3.6">3.3.6 <code>xml_schema::expected_text_content</code></a></h3>
+
+ <pre class="c++">
+struct expected_text_content: virtual exception
+{
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::expected_text_content</code> exception is thrown
+ when a content other than text is encountered and the text content was
+ expected by the DOM-Tree stage.
+ </p>
+
+ <h3><a name="3.3.7">3.3.7 <code>xml_schema::no_type_info</code></a></h3>
+
+ <pre class="c++">
+struct no_type_info: virtual exception
+{
+ no_type_info (const std::basic_string&lt;C>&amp; type_name,
+ const std::basic_string&lt;C>&amp; type_namespace);
+
+ const std::basic_string&lt;C>&amp;
+ type_name () const;
+
+ const std::basic_string&lt;C>&amp;
+ type_namespace () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::no_type_info</code> exception is thrown
+ when there is no type information associated with a type specified
+ by the <code>xsi:type</code> attribute. This exception is thrown
+ by the DOM-Tree stage. The name and namespace of the type in question
+ can be obtained using the <code>type_name</code> and
+ <code>type_namespace</code> functions respectively. Usually, catching
+ this exception means that you haven't linked the code generated
+ from the schema defining the type in question with your application
+ or this schema has been compiled without the
+ <code>--generate-polymorphic</code> option.
+ </p>
+
+
+ <h3><a name="3.3.8">3.3.8 <code>xml_schema::not_derived</code></a></h3>
+
+ <pre class="c++">
+struct not_derived: virtual exception
+{
+ not_derived (const std::basic_string&lt;C>&amp; base_type_name,
+ const std::basic_string&lt;C>&amp; base_type_namespace,
+ const std::basic_string&lt;C>&amp; derived_type_name,
+ const std::basic_string&lt;C>&amp; derived_type_namespace);
+
+ const std::basic_string&lt;C>&amp;
+ base_type_name () const;
+
+ const std::basic_string&lt;C>&amp;
+ base_type_namespace () const;
+
+
+ const std::basic_string&lt;C>&amp;
+ derived_type_name () const;
+
+ const std::basic_string&lt;C>&amp;
+ derived_type_namespace () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::not_derived</code> exception is thrown
+ when a type specified by the <code>xsi:type</code> attribute is
+ not derived from the expected base type. This exception is thrown
+ by the DOM-Tree stage. The name and namespace of the expected
+ base type can be obtained using the <code>base_type_name</code> and
+ <code>base_type_namespace</code> functions respectively. The name
+ and namespace of the offending type can be obtained using the
+ <code>derived_type_name</code> and
+ <code>derived_type_namespace</code> functions respectively.
+ </p>
+
+ <h3><a name="3.3.9">3.3.9 <code>xml_schema::no_prefix_mapping</code></a></h3>
+
+ <pre class="c++">
+struct no_prefix_mapping: virtual exception
+{
+ no_prefix_mapping (const std::basic_string&lt;C>&amp; prefix);
+
+ const std::basic_string&lt;C>&amp;
+ prefix () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::no_prefix_mapping</code> exception is thrown
+ during the DOM-Tree stage if a namespace prefix is encountered for
+ which a prefix-namespace mapping hasn't been provided. The namespace
+ prefix in question can be obtained using the <code>prefix</code>
+ function.
+ </p>
+
+ <h2><a name="3.4">3.4 Reading from a Local File or URI</a></h2>
+
+ <p>Using a local file or URI is the simplest way to parse an XML instance.
+ For example:</p>
+
+ <pre class="c++">
+using std::unique_ptr;
+
+unique_ptr&lt;type> r1 (name ("test.xml"));
+unique_ptr&lt;type> r2 (name ("https://www.codesynthesis.com/test.xml"));
+ </pre>
+
+ <p>Or, in the C++98 mode:</p>
+
+ <pre class="c++">
+using std::auto_ptr;
+
+auto_ptr&lt;type> r1 (name ("test.xml"));
+auto_ptr&lt;type> r2 (name ("https://www.codesynthesis.com/test.xml"));
+ </pre>
+
+ <h2><a name="3.5">3.5 Reading from <code>std::istream</code></a></h2>
+
+ <p>When using an <code>std::istream</code> instance, you may also
+ pass an optional resource id. This id is used to identify the
+ resource (for example in error messages) as well as to resolve
+ relative paths. For instance:</p>
+
+ <pre class="c++">
+using std::unique_ptr;
+
+{
+ std::ifstream ifs ("test.xml");
+ unique_ptr&lt;type> r (name (ifs, "test.xml"));
+}
+
+{
+ std::string str ("..."); // Some XML fragment.
+ std::istringstream iss (str);
+ unique_ptr&lt;type> r (name (iss));
+}
+ </pre>
+
+ <h2><a name="3.6">3.6 Reading from <code>xercesc::InputSource</code></a></h2>
+
+ <p>Reading from a <code>xercesc::InputSource</code> instance
+ is similar to the <code>std::istream</code> case except
+ the resource id is maintained by the <code>InputSource</code>
+ object. For instance:</p>
+
+ <pre class="c++">
+xercesc::StdInInputSource is;
+std::unique_ptr&lt;type> r (name (is));
+ </pre>
+
+ <h2><a name="3.7">3.7 Reading from DOM</a></h2>
+
+ <p>Reading from a <code>xercesc::DOMDocument</code> instance allows
+ you to setup a custom XML-DOM stage. Things like DOM
+ parser reuse, schema pre-parsing, and schema caching can be achieved
+ with this approach. For more information on how to obtain DOM
+ representation from an XML instance refer to the Xerces-C++
+ documentation. In addition, the
+ <a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree Mapping
+ FAQ</a> shows how to parse an XML instance to a Xerces-C++
+ DOM document using the XSD runtime utilities.
+ </p>
+
+ <p>The last parsing function is useful when you would like to perform
+ your own XML-to-DOM parsing and associate the resulting DOM document
+ with the object model nodes. The automatic <code>DOMDocument</code>
+ pointer is reset and the resulting object model assumes ownership
+ of the DOM document passed. For example:</p>
+
+ <pre class="c++">
+// C++11 version.
+//
+xml_schema::dom::unique_ptr&lt;xercesc::DOMDocument> doc = ...
+
+std::unique_ptr&lt;type> r (
+ name (std::move (doc),
+ xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+
+// At this point doc is reset to 0.
+
+// C++98 version.
+//
+xml_schema::dom::auto_ptr&lt;xercesc::DOMDocument> doc = ...
+
+std::auto_ptr&lt;type> r (
+ name (doc, xml_schema::flags::keep_dom | xml_schema::flags::own_dom));
+
+// At this point doc is reset to 0.
+ </pre>
+
+ <h1><a name="4">4 Serialization</a></h1>
+
+ <p>This chapter covers various aspects of serializing a
+ tree-like object model to DOM or XML.
+ In this regard, serialization is complimentary to the reverse
+ process of parsing a DOM or XML instance into an object model
+ which is discussed in <a href="#3">Chapter 3,
+ "Parsing"</a>. Note that the generation of the serialization code
+ is optional and should be explicitly requested with the
+ <code>--generate-serialization</code> option. See the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a> for more information.
+ </p>
+
+ <p>Each global XML Schema element in the form:
+ </p>
+
+
+ <pre class="xml">
+&lt;xsd:element name="name" type="type"/>
+ </pre>
+
+ <p>is mapped to 8 overloaded C++ functions in the form:</p>
+
+ <pre class="c++">
+// Serialize to std::ostream.
+//
+void
+name (std::ostream&amp;,
+ const type&amp;,
+ const xml_schema::namespace_fomap&amp; =
+ xml_schema::namespace_infomap (),
+ const std::basic_string&lt;C>&amp; encoding = "UTF-8",
+ xml_schema::flags = 0);
+
+void
+name (std::ostream&amp;,
+ const type&amp;,
+ xml_schema::error_handler&amp;,
+ const xml_schema::namespace_infomap&amp; =
+ xml_schema::namespace_infomap (),
+ const std::basic_string&lt;C>&amp; encoding = "UTF-8",
+ xml_schema::flags = 0);
+
+void
+name (std::ostream&amp;,
+ const type&amp;,
+ xercesc::DOMErrorHandler&amp;,
+ const xml_schema::namespace_infomap&amp; =
+ xml_schema::namespace_infomap (),
+ const std::basic_string&lt;C>&amp; encoding = "UTF-8",
+ xml_schema::flags = 0);
+
+
+// Serialize to XMLFormatTarget.
+//
+void
+name (xercesc::XMLFormatTarget&amp;,
+ const type&amp;,
+ const xml_schema::namespace_infomap&amp; =
+ xml_schema::namespace_infomap (),
+ const std::basic_string&lt;C>&amp; encoding = "UTF-8",
+ xml_schema::flags = 0);
+
+void
+name (xercesc::XMLFormatTarget&amp;,
+ const type&amp;,
+ xml_schema::error_handler&amp;,
+ const xml_schema::namespace_infomap&amp; =
+ xml_schema::namespace_infomap (),
+ const std::basic_string&lt;C>&amp; encoding = "UTF-8",
+ xml_schema::flags = 0);
+
+void
+name (xercesc::XMLFormatTarget&amp;,
+ const type&amp;,
+ xercesc::DOMErrorHandler&amp;,
+ const xml_schema::namespace_infomap&amp; =
+ xml_schema::namespace_infomap (),
+ const std::basic_string&lt;C>&amp; encoding = "UTF-8",
+ xml_schema::flags = 0);
+
+
+// Serialize to DOM.
+//
+xml_schema::dom::[unique|auto]_ptr&lt;xercesc::DOMDocument>
+name (const type&amp;,
+ const xml_schema::namespace_infomap&amp;
+ xml_schema::namespace_infomap (),
+ xml_schema::flags = 0);
+
+void
+name (xercesc::DOMDocument&amp;,
+ const type&amp;,
+ xml_schema::flags = 0);
+ </pre>
+
+ <p>You can choose between writing XML to <code>std::ostream</code> or
+ <code>xercesc::XMLFormatTarget</code> and creating a DOM instance
+ in the form of <code>xercesc::DOMDocument</code>. Serialization
+ to <code>ostream</code> or <code>XMLFormatTarget</code> requires a
+ considerably less work while serialization to DOM provides
+ for greater flexibility. Each of these serialization functions
+ is discussed in more detail in the following sections.
+ </p>
+
+
+ <h2><a name="4.1">4.1 Initializing the Xerces-C++ Runtime</a></h2>
+
+ <p>Some serialization functions expect you to initialize the Xerces-C++
+ runtime while others initialize and terminate it as part of their
+ work. The general rule is as follows: if a function has any arguments
+ or return a value that is an instance of a Xerces-C++ type, then
+ this function expects you to initialize the Xerces-C++ runtime.
+ Otherwise, the function initializes and terminates the runtime for
+ you. Note that it is legal to have nested calls to the Xerces-C++
+ initialize and terminate functions as long as the calls are balanced.
+ </p>
+
+ <p>You can instruct serialization functions that initialize and terminate
+ the runtime not to do so by passing the
+ <code>xml_schema::flags::dont_initialize</code> flag (see
+ <a href="#4.3">Section 4.3, "Flags"</a>).
+ </p>
+
+ <h2><a name="4.2">4.2 Namespace Infomap and Character Encoding</a></h2>
+
+ <p>When a document being serialized uses XML namespaces, custom
+ prefix-namespace associations can to be established. If custom
+ prefix-namespace mapping is not provided then generic prefixes
+ (<code>p1</code>, <code>p2</code>, etc) are automatically assigned
+ to namespaces as needed. Also, if
+ you would like the resulting instance document to contain the
+ <code>schemaLocation</code> or <code>noNamespaceSchemaLocation</code>
+ attributes, you will need to provide namespace-schema associations.
+ The <code>xml_schema::namespace_infomap</code> class is used
+ to capture this information:</p>
+
+ <pre class="c++">
+struct namespace_info
+{
+ namespace_info ();
+ namespace_info (const std::basic_string&lt;C>&amp; name,
+ const std::basic_string&lt;C>&amp; schema);
+
+ std::basic_string&lt;C> name;
+ std::basic_string&lt;C> schema;
+};
+
+// Map of namespace prefix to namespace_info.
+//
+struct namespace_infomap: public std::map&lt;std::basic_string&lt;C>,
+ namespace_info>
+{
+};
+ </pre>
+
+ <p>Consider the following associations as an example:</p>
+
+ <pre class="c++">
+xml_schema::namespace_infomap map;
+
+map["t"].name = "https://www.codesynthesis.com/test";
+map["t"].schema = "test.xsd";
+ </pre>
+
+ <p>This map, if passed to one of the serialization functions,
+ could result in the following XML fragment:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;t:name xmlns:t="https://www.codesynthesis.com/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="https://www.codesynthesis.com/test test.xsd">
+ </pre>
+
+ <p>As you can see, the serialization function automatically added namespace
+ mapping for the <code>xsi</code> prefix. You can change this by
+ providing your own prefix:</p>
+
+ <pre class="c++">
+xml_schema::namespace_infomap map;
+
+map["xsn"].name = "http://www.w3.org/2001/XMLSchema-instance";
+
+map["t"].name = "https://www.codesynthesis.com/test";
+map["t"].schema = "test.xsd";
+ </pre>
+
+ <p>This could result in the following XML fragment:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;t:name xmlns:t="https://www.codesynthesis.com/test"
+ xmlns:xsn="http://www.w3.org/2001/XMLSchema-instance"
+ xsn:schemaLocation="https://www.codesynthesis.com/test test.xsd">
+ </pre>
+
+ <p>To specify the location of a schema without a namespace you can use
+ an empty prefix as in the example below: </p>
+
+ <pre class="c++">
+xml_schema::namespace_infomap map;
+
+map[""].schema = "test.xsd";
+ </pre>
+
+ <p>This would result in the following XML fragment:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="test.xsd">
+ </pre>
+
+ <p>To make a particular namespace default you can use an empty
+ prefix, for example:</p>
+
+ <pre class="c++">
+xml_schema::namespace_infomap map;
+
+map[""].name = "https://www.codesynthesis.com/test";
+map[""].schema = "test.xsd";
+ </pre>
+
+ <p>This could result in the following XML fragment:</p>
+
+ <pre class="xml">
+&lt;?xml version="1.0" ?>
+&lt;name xmlns="https://www.codesynthesis.com/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="https://www.codesynthesis.com/test test.xsd">
+ </pre>
+
+
+ <p>Another bit of information that you can pass to the serialization
+ functions is the character encoding method that you would like to use.
+ Common values for this argument are <code>"US-ASCII"</code>,
+ <code>"ISO8859-1"</code>, <code>"UTF-8"</code>,
+ <code>"UTF-16BE"</code>, <code>"UTF-16LE"</code>,
+ <code>"UCS-4BE"</code>, and <code>"UCS-4LE"</code>. The default
+ encoding is <code>"UTF-8"</code>. For more information on
+ encoding methods see the
+ "<a href="http://en.wikipedia.org/wiki/Character_code">Character
+ Encoding</a>" article from Wikipedia.
+ </p>
+
+ <h2><a name="4.3">4.3 Flags</a></h2>
+
+ <p>Serialization flags are the last argument of every serialization
+ function. They allow you to fine-tune the process of serialization.
+ The flags argument is optional.
+ </p>
+
+
+ <p>The following flags are recognized by the serialization
+ functions:</p>
+
+ <dl>
+ <dt><code>xml_schema::flags::dont_initialize</code></dt>
+ <dd>Do not initialize the Xerces-C++ runtime.</dd>
+
+ <dt><code>xml_schema::flags::dont_pretty_print</code></dt>
+ <dd>Do not add extra spaces or new lines that make the resulting XML
+ slightly bigger but easier to read.</dd>
+
+ <dt><code>xml_schema::flags::no_xml_declaration</code></dt>
+ <dd>Do not write XML declaration (&lt;?xml ... ?>).</dd>
+ </dl>
+
+ <p>You can pass several flags by combining them using the bit-wise OR
+ operator. For example:</p>
+
+ <pre class="c++">
+std::unique_ptr&lt;type> r = ...
+std::ofstream ofs ("test.xml");
+xml_schema::namespace_infomap map;
+name (ofs,
+ *r,
+ map,
+ "UTF-8",
+ xml_schema::flags::no_xml_declaration |
+ xml_schema::flags::dont_pretty_print);
+ </pre>
+
+ <p>For more information on the Xerces-C++ runtime initialization
+ refer to <a href="#4.1">Section 4.1, "Initializing the Xerces-C++
+ Runtime"</a>.
+ </p>
+
+ <h2><a name="4.4">4.4 Error Handling</a></h2>
+
+ <p>As with the parsing functions (see <a href="#3.3">Section 3.3,
+ "Error Handling"</a>), to better understand error handling and
+ reporting strategies employed by the serialization functions, it
+ is useful to know that the transformation of a statically-typed
+ tree to an XML instance document happens in two stages. The first
+ stage, performed by the generated code, consist of building a DOM
+ instance from the statically-typed tree . For short, we will call
+ this stage the Tree-DOM stage. The second stage, performed by
+ Xerces-C++, consists of serializing the DOM instance into the XML
+ document. We will call this stage the DOM-XML stage.
+ </p>
+
+ <p>All serialization functions except the two that serialize into
+ a DOM instance come in overloaded triples. The first function
+ in such a triple reports error conditions exclusively by throwing
+ exceptions. It accumulates all the serialization errors of the
+ DOM-XML stage and throws them in a single instance of the
+ <code>xml_schema::serialization</code> exception (described below).
+ The second and the third functions in the triple use callback
+ interfaces to report serialization errors and warnings. The two
+ callback interfaces are <code>xml_schema::error_handler</code> and
+ <code>xercesc::DOMErrorHandler</code>. The
+ <code>xml_schema::error_handler</code> interface is described in
+ <a href="#3.3">Section 3.3, "Error Handling"</a>. For more information
+ on the <code>xercesc::DOMErrorHandler</code> interface refer to the
+ Xerces-C++ documentation.
+ </p>
+
+ <p>The Tree-DOM stage reports error conditions exclusively by throwing
+ exceptions. Individual exceptions thrown by the serialization functions
+ are described in the following sub-sections.
+ </p>
+
+ <h3><a name="4.4.1">4.4.1 <code>xml_schema::serialization</code></a></h3>
+
+ <pre class="c++">
+struct serialization: virtual exception
+{
+ serialization ();
+ serialization (const diagnostics&amp;);
+
+ const diagnostics&amp;
+ diagnostics () const;
+
+ virtual const char*
+ what () const throw ();
+};
+ </pre>
+
+ <p>The <code>xml_schema::diagnostics</code> class is described in
+ <a href="#3.3.1">Section 3.3.1, "<code>xml_schema::parsing</code>"</a>.
+ The <code>xml_schema::serialization</code> exception is thrown if
+ there were serialization errors reported during the DOM-XML stage.
+ If no callback interface was provided to the serialization function,
+ the exception contains a list of errors and warnings accessible using
+ the <code>diagnostics</code> function.
+ </p>
+
+
+ <h3><a name="4.4.2">4.4.2 <code>xml_schema::unexpected_element</code></a></h3>
+
+ <p>The <code>xml_schema::unexpected_element</code> exception is
+ described in <a href="#3.3.3">Section 3.3.3,
+ "<code>xml_schema::unexpected_element</code>"</a>. It is thrown
+ by the serialization functions during the Tree-DOM stage if the
+ root element name of the provided DOM instance does not match with
+ the name of the element this serialization function is for.
+ </p>
+
+ <h3><a name="4.4.3">4.4.3 <code>xml_schema::no_type_info</code></a></h3>
+
+ <p>The <code>xml_schema::no_type_info</code> exception is
+ described in <a href="#3.3.7">Section 3.3.7,
+ "<code>xml_schema::no_type_info</code>"</a>. It is thrown
+ by the serialization functions during the Tree-DOM stage when there
+ is no type information associated with a dynamic type of an
+ element. Usually, catching this exception means that you haven't
+ linked the code generated from the schema defining the type in
+ question with your application or this schema has been compiled
+ without the <code>--generate-polymorphic</code> option.
+ </p>
+
+ <h2><a name="4.5">4.5 Serializing to <code>std::ostream</code></a></h2>
+
+ <p>In order to serialize to <code>std::ostream</code> you will need
+ an object model, an output stream and, optionally, a namespace
+ infomap. For instance:</p>
+
+ <pre class="c++">
+// Obtain the object model.
+//
+std::unique_ptr&lt;type> r = ...
+
+// Prepare namespace mapping and schema location information.
+//
+xml_schema::namespace_infomap map;
+
+map["t"].name = "https://www.codesynthesis.com/test";
+map["t"].schema = "test.xsd";
+
+// Write it out.
+//
+name (std::cout, *r, map);
+ </pre>
+
+ <p>Note that the output stream is treated as a binary stream. This
+ becomes important when you use a character encoding that is wider
+ than 8-bit <code>char</code>, for instance UTF-16 or UCS-4. For
+ example, things will most likely break if you try to serialize
+ to <code>std::ostringstream</code> with UTF-16 or UCS-4 as an
+ encoding. This is due to the special value,
+ <code>'\0'</code>, that will most likely occur as part of such
+ serialization and it won't have the special meaning assumed by
+ <code>std::ostringstream</code>.
+ </p>
+
+
+ <h2><a name="4.6">4.6 Serializing to <code>xercesc::XMLFormatTarget</code></a></h2>
+
+ <p>Serializing to an <code>xercesc::XMLFormatTarget</code> instance
+ is similar the <code>std::ostream</code> case. For instance:
+ </p>
+
+ <pre class="c++">
+using std::unique_ptr;
+
+// Obtain the object model.
+//
+unique_ptr&lt;type> r = ...
+
+// Prepare namespace mapping and schema location information.
+//
+xml_schema::namespace_infomap map;
+
+map["t"].name = "https://www.codesynthesis.com/test";
+map["t"].schema = "test.xsd";
+
+using namespace xercesc;
+
+XMLPlatformUtils::Initialize ();
+
+{
+ // Choose a target.
+ //
+ unique_ptr&lt;XMLFormatTarget> ft;
+
+ if (argc != 2)
+ {
+ ft = unique_ptr&lt;XMLFormatTarget> (new StdOutFormatTarget ());
+ }
+ else
+ {
+ ft = unique_ptr&lt;XMLFormatTarget> (
+ new LocalFileFormatTarget (argv[1]));
+ }
+
+ // Write it out.
+ //
+ name (*ft, *r, map);
+}
+
+XMLPlatformUtils::Terminate ();
+ </pre>
+
+ <p>Note that we had to initialize the Xerces-C++ runtime before we
+ could call this serialization function.</p>
+
+ <h2><a name="4.7">4.7 Serializing to DOM</a></h2>
+
+ <p>The mapping provides two overloaded functions that implement
+ serialization to a DOM instance. The first creates a DOM instance
+ for you and the second serializes to an existing DOM instance.
+ While serializing to a new DOM instance is similar to serializing
+ to <code>std::ostream</code> or <code>xercesc::XMLFormatTarget</code>,
+ serializing to an existing DOM instance requires quite a bit of work
+ from your side. You will need to set all the custom namespace mapping
+ attributes as well as the <code>schemaLocation</code> and/or
+ <code>noNamespaceSchemaLocation</code> attributes. The following
+ listing should give you an idea about what needs to be done:
+ </p>
+
+ <pre class="c++">
+// Obtain the object model.
+//
+std::unique_ptr&lt;type> r = ...
+
+using namespace xercesc;
+
+XMLPlatformUtils::Initialize ();
+
+{
+ // Create a DOM instance. Set custom namespace mapping and schema
+ // location attributes.
+ //
+ DOMDocument&amp; doc = ...
+
+ // Serialize to DOM.
+ //
+ name (doc, *r);
+
+ // Serialize the DOM document to XML.
+ //
+ ...
+}
+
+XMLPlatformUtils::Terminate ();
+ </pre>
+
+ <p>For more information on how to create and serialize a DOM instance
+ refer to the Xerces-C++ documentation. In addition, the
+ <a href="http://wiki.codesynthesis.com/Tree/FAQ">C++/Tree Mapping
+ FAQ</a> shows how to implement these operations using the XSD
+ runtime utilities.
+ </p>
+
+ <h1><a name="5">5 Additional Functionality</a></h1>
+
+ <p>The C++/Tree mapping provides a number of optional features
+ that can be useful in certain situations. They are described
+ in the following sections.</p>
+
+ <h2><a name="5.1">5.1 DOM Association</a></h2>
+
+ <p>Normally, after parsing is complete, the DOM document which
+ was used to extract the data is discarded. However, the parsing
+ functions can be instructed to preserve the DOM document
+ and create an association between the DOM nodes and object model
+ nodes. When there is an association between the DOM and
+ object model nodes, you can obtain the corresponding DOM element
+ or attribute node from an object model node as well as perform
+ the reverse transition: obtain the corresponding object model
+ from a DOM element or attribute node.</p>
+
+ <p>Maintaining DOM association is normally useful when the application
+ needs access to XML constructs that are not preserved in the
+ object model, for example, XML comments.
+ Another useful aspect of DOM association is the ability of the
+ application to navigate the document tree using the generic DOM
+ interface (for example, with the help of an XPath processor)
+ and then move back to the statically-typed object model. Note
+ also that while you can change the underlying DOM document,
+ these changes are not reflected in the object model and will
+ be ignored during serialization. If you need to not only access
+ but also modify some aspects of XML that are not preserved in
+ the object model, then type customization with custom parsing
+ constructors and serialization operators should be used instead.</p>
+
+ <p>To request DOM association you will need to pass the
+ <code>xml_schema::flags::keep_dom</code> flag to one of the
+ parsing functions (see <a href="#3.2">Section 3.2,
+ "Flags and Properties"</a> for more information). In this case the
+ DOM document is retained and will be released when the object model
+ is deleted. Note that since DOM nodes "out-live" the parsing function
+ call, you need to initialize the Xerces-C++ runtime before calling
+ one of the parsing functions with the <code>keep_dom</code> flag and
+ terminate it after the object model is destroyed (see
+ <a href="#3.1">Section 3.1, "Initializing the Xerces-C++ Runtime"</a>).</p>
+
+ <p>If the <code>keep_dom</code> flag is passed
+ as the second argument to the copy constructor and the copy
+ being made is of a complete tree, then the DOM association
+ is also maintained in the copy by cloning the underlying
+ DOM document and reestablishing the associations. For example:</p>
+
+ <pre class="c++">
+using namespace xercesc;
+
+XMLPlatformUtils::Initialize ();
+
+{
+ // Parse XML to object model.
+ //
+ std::unique_ptr&lt;type> r (root (
+ "root.xml",
+ xml_schema::flags::keep_dom |
+ xml_schema::flags::dont_initialize));
+
+ // Copy without DOM association.
+ //
+ type copy1 (*r);
+
+ // Copy with DOM association.
+ //
+ type copy2 (*r, xml_schema::flags::keep_dom);
+}
+
+XMLPlatformUtils::Terminate ();
+ </pre>
+
+
+ <p>To obtain the corresponding DOM node from an object model node
+ you will need to call the <code>_node</code> accessor function
+ which returns a pointer to <code>DOMNode</code>. You can then query
+ this DOM node's type and cast it to either <code>DOMAttr*</code>
+ or <code>DOMElement*</code>. To obtain the corresponding object
+ model node from a DOM node, the DOM user data API is used. The
+ <code>xml_schema::dom::tree_node_key</code> variable contains
+ the key for object model nodes. The following schema and code
+ fragment show how to navigate from DOM to object model nodes
+ and in the opposite direction:</p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="a" type="string"/>
+ &lt;/sequence>
+&lt;/complexType>
+
+&lt;element name="root" type="object"/>
+ </pre>
+
+ <pre class="c++">
+using namespace xercesc;
+
+XMLPlatformUtils::Initialize ();
+
+{
+ // Parse XML to object model.
+ //
+ std::unique_ptr&lt;type> r (root (
+ "root.xml",
+ xml_schema::flags::keep_dom |
+ xml_schema::flags::dont_initialize));
+
+ DOMNode* n = r->_node ();
+ assert (n->getNodeType () == DOMNode::ELEMENT_NODE);
+ DOMElement* re = static_cast&lt;DOMElement*> (n);
+
+ // Get the 'a' element. Note that it is not necessarily the
+ // first child node of 'root' since there could be whitespace
+ // nodes before it.
+ //
+ DOMElement* ae;
+
+ for (n = re->getFirstChild (); n != 0; n = n->getNextSibling ())
+ {
+ if (n->getNodeType () == DOMNode::ELEMENT_NODE)
+ {
+ ae = static_cast&lt;DOMElement*> (n);
+ break;
+ }
+ }
+
+ // Get from the 'a' DOM element to xml_schema::string object model
+ // node.
+ //
+ xml_schema::type&amp; t (
+ *reinterpret_cast&lt;xml_schema::type*> (
+ ae->getUserData (xml_schema::dom::tree_node_key)));
+
+ xml_schema::string&amp; a (dynamic_cast&lt;xml_schema::string&amp;> (t));
+}
+
+XMLPlatformUtils::Terminate ();
+ </pre>
+
+ <p>The 'mixed' example which can be found in the XSD distribution
+ shows how to handle the mixed content using DOM association.</p>
+
+ <h2><a name="5.2">5.2 Binary Serialization</a></h2>
+
+ <p>Besides reading from and writing to XML, the C++/Tree mapping
+ also allows you to save the object model to and load it from a
+ number of predefined as well as custom data representation
+ formats. The predefined binary formats are CDR (Common Data
+ Representation) and XDR (eXternal Data Representation). A
+ custom format can easily be supported by providing
+ insertion and extraction operators for basic types.</p>
+
+ <p>Binary serialization saves only the data without any meta
+ information or markup. As a result, saving to and loading
+ from a binary representation can be an order of magnitude
+ faster than parsing and serializing the same data in XML.
+ Furthermore, the resulting representation is normally several
+ times smaller than the equivalent XML representation. These
+ properties make binary serialization ideal for internal data
+ exchange and storage. A typical application that uses this
+ facility stores the data and communicates within the
+ system using a binary format and reads/writes the data
+ in XML when communicating with the outside world.</p>
+
+ <p>In order to request the generation of insertion operators and
+ extraction constructors for a specific predefined or custom
+ data representation stream, you will need to use the
+ <code>--generate-insertion</code> and <code>--generate-extraction</code>
+ compiler options. See the
+ <a href="https://www.codesynthesis.com/projects/xsd/documentation/xsd.xhtml">XSD
+ Compiler Command Line Manual</a> for more information.</p>
+
+ <p>Once the insertion operators and extraction constructors are
+ generated, you can use the <code>xml_schema::istream</code>
+ and <code>xml_schema::ostream</code> wrapper stream templates
+ to save the object model to and load it from a specific format.
+ The following code fragment shows how to do this using ACE
+ (Adaptive Communication Environment) CDR streams as an example:</p>
+
+ <pre class="xml">
+&lt;complexType name="object">
+ &lt;sequence>
+ &lt;element name="a" type="string"/>
+ &lt;element name="b" type="int"/>
+ &lt;/sequence>
+&lt;/complexType>
+
+&lt;element name="root" type="object"/>
+ </pre>
+
+ <pre class="c++">
+// Parse XML to object model.
+//
+std::unique_ptr&lt;type> r (root ("root.xml"));
+
+// Save to a CDR stream.
+//
+ACE_OutputCDR ace_ocdr;
+xml_schema::ostream&lt;ACE_OutputCDR> ocdr (ace_ocdr);
+
+ocdr &lt;&lt; *r;
+
+// Load from a CDR stream.
+//
+ACE_InputCDR ace_icdr (buf, size);
+xml_schema::istream&lt;ACE_InputCDR> icdr (ace_icdr);
+
+std::unique_ptr&lt;object> copy (new object (icdr));
+
+// Serialize to XML.
+//
+root (std::cout, *copy);
+ </pre>
+
+ <p>The XSD distribution contains a number of examples that
+ show how to save the object model to and load it from
+ CDR, XDR, and a custom format.</p>
+
+ <!-- Appendix A -->
+
+
+ <h1><a name="A">Appendix A &mdash; Default and Fixed Values</a></h1>
+
+ <p>The following table summarizes the effect of default and fixed
+ values (specified with the <code>default</code> and <code>fixed</code>
+ attributes, respectively) on attribute and element values. The
+ <code>default</code> and <code>fixed</code> attributes are mutually
+ exclusive. It is also worthwhile to note that the fixed value semantics
+ is a superset of the default value semantics.
+ </p>
+
+ <!-- border="1" is necessary for html2ps -->
+ <table id="default-fixed" border="1">
+ <tr>
+ <th></th>
+ <th></th>
+ <th colspan="2">default</th>
+ <th colspan="2">fixed</th>
+ </tr>
+
+ <!-- element -->
+
+ <tr>
+ <th rowspan="4">element</th>
+ <th rowspan="2">not present</th>
+ <th>optional</th>
+ <th>required</th>
+ <th>optional</th>
+ <th>required</th>
+ </tr>
+ <tr>
+ <td>not present</td>
+ <td>invalid instance</td>
+ <td>not present</td>
+ <td>invalid instance</td>
+ </tr>
+
+
+ <tr>
+ <th>empty</th>
+ <td colspan="2">default value is used</td>
+ <td colspan="2">fixed value is used</td>
+ </tr>
+
+ <tr>
+ <th>value</th>
+ <td colspan="2">value is used</td>
+ <td colspan="2">value is used provided it's the same as fixed</td>
+ </tr>
+
+ <!-- attribute -->
+
+ <!-- element -->
+
+ <tr>
+ <th rowspan="4">attribute</th>
+ <th rowspan="2">not present</th>
+ <th>optional</th>
+ <th>required</th>
+ <th>optional</th>
+ <th>required</th>
+ </tr>
+ <tr>
+ <td>default value is used</td>
+ <td>invalid schema</td>
+ <td>fixed value is used</td>
+ <td>invalid instance</td>
+ </tr>
+
+
+ <tr>
+ <th>empty</th>
+ <td colspan="2">empty value is used</td>
+ <td colspan="2">empty value is used provided it's the same as fixed</td>
+ </tr>
+
+ <tr>
+ <th>value</th>
+ <td colspan="2">value is used</td>
+ <td colspan="2">value is used provided it's the same as fixed</td>
+ </tr>
+
+ </table>
+
+ </div>
+</div>
+
+
+</body>
+</html>
diff --git a/xsd/doc/cxx/tree/manual/manual.html2ps.in b/xsd/doc/cxx/tree/manual/manual.html2ps.in
new file mode 100644
index 0000000..5629122
--- /dev/null
+++ b/xsd/doc/cxx/tree/manual/manual.html2ps.in
@@ -0,0 +1,66 @@
+@@html2ps {
+ option {
+ toc: hb;
+ colour: 1;
+ hyphenate: 1;
+ titlepage: 1;
+ }
+
+ datefmt: "%B %Y";
+
+ titlepage {
+ content: "
+<div align=center>
+ <h1><big>C++/Tree Mapping User Manual</big></h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+ <h1>&nbsp;</h1>
+</div>
+ <p>Revision $[revision] &nbsp;&nbsp;&nbsp; $D</p>
+ <p>Copyright &#169; @copyright@.</p>
+
+ <p>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the
+ <a href='https://www.codesynthesis.com/licenses/fdl-1.2.txt'>GNU Free
+ Documentation License, version 1.2</a>; with no Invariant Sections,
+ no Front-Cover Texts and no Back-Cover Texts.
+ </p>
+
+ <p>This document is available in the following formats:
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/index.xhtml'>XHTML</a>,
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf'>PDF</a>, and
+ <a href='https://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps'>PostScript</a>.</p>";
+ }
+
+ toc {
+ indent: 2em;
+ }
+
+ header {
+ odd-right: $H;
+ even-left: $H;
+ }
+
+ footer {
+ odd-left: $D;
+ odd-center: $T, v$[revision];
+ odd-right: $N;
+
+ even-left: $N;
+ even-center: $T, v$[revision];
+ even-right: $D;
+ }
+}
+
+body {
+ font-size: 12pt;
+ text-align: justify;
+}
+
+pre {
+ font-size: 10pt;
+}
diff --git a/doc/default.css b/xsd/doc/default.css
index bb3805b..bb3805b 100644
--- a/doc/default.css
+++ b/xsd/doc/default.css
diff --git a/doc/xsd-epilogue.1 b/xsd/doc/xsd-epilogue.1
index 192880c..192880c 100644
--- a/doc/xsd-epilogue.1
+++ b/xsd/doc/xsd-epilogue.1
diff --git a/doc/xsd-epilogue.xhtml b/xsd/doc/xsd-epilogue.xhtml
index aef0418..aef0418 100644
--- a/doc/xsd-epilogue.xhtml
+++ b/xsd/doc/xsd-epilogue.xhtml
diff --git a/doc/xsd-parser-header.1 b/xsd/doc/xsd-parser-header.1
index e0cf84e..e0cf84e 100644
--- a/doc/xsd-parser-header.1
+++ b/xsd/doc/xsd-parser-header.1
diff --git a/doc/xsd-parser-header.xhtml b/xsd/doc/xsd-parser-header.xhtml
index 94fa2c1..94fa2c1 100644
--- a/doc/xsd-parser-header.xhtml
+++ b/xsd/doc/xsd-parser-header.xhtml
diff --git a/xsd/doc/xsd-prologue.1 b/xsd/doc/xsd-prologue.1
new file mode 100644
index 0000000..33f039e
--- /dev/null
+++ b/xsd/doc/xsd-prologue.1
@@ -0,0 +1,119 @@
+.\" Process this file with
+.\" groff -man -Tascii xsd.1
+.\"
+.TH XSD 1 "$date$" "$project$ $version$"
+.SH NAME
+xsd \- W3C XML Schema to C++ Compiler
+.\"
+.\"
+.\"
+.\"--------------------------------------------------------------------
+.SH SYNOPSIS
+.\"--------------------------------------------------------------------
+.B xsd
+.I command
+.B [
+.I options
+.B ]
+.I file
+.B [
+.I file
+.B ...]
+.in
+.B xsd help
+.B [
+.I command
+.B ]
+.in
+.B xsd version
+.\"
+.\"
+.\"
+.\"--------------------------------------------------------------------
+.SH DESCRIPTION
+.\"--------------------------------------------------------------------
+.B xsd
+generates vocabulary-specific, statically-typed C++ mapping from W3C XML
+Schema definitions. Particular mapping to produce is selected by a
+.IR command .
+Each mapping has a number of mapping-specific
+.I options
+that should appear, if any, after the
+.IR command .
+Input files should be W3C XML Schema definitions. The exact set of the
+generated files depends on the selected mapping and options.
+.\"
+.\"
+.\"
+.\"--------------------------------------------------------------------
+.SH COMMANDS
+.\"--------------------------------------------------------------------
+.IP \fBcxx-tree\fR
+Generate the C++/Tree mapping. For each input file in the form
+.B name.xsd
+the following C++ files are generated:
+.B name.hxx
+(header file),
+.B name.ixx
+(inline file, generated only if the
+.B --generate-inline
+option is specified),
+.B name.cxx
+(source file), and
+.B name-fwd.hxx
+(forward declaration file, generated only if the
+.B --generate-forward
+option is specified).
+
+.IP \fBcxx-parser\fR
+Generate the C++/Parser mapping. For each input file in the form
+.B name.xsd
+the following C++ files are generated:
+.B name-pskel.hxx
+(parser skeleton header file),
+.B name-pskel.ixx
+(parser skeleton inline file, generated only if the
+.B --generate-inline
+option is specified), and
+.B name-pskel.cxx
+(parser skeleton source file). If the
+.B --generate-noop-impl
+or
+.B --generate-print-impl
+option is specified, the following additional sample implementation files
+are generated:
+.B name-pimpl.hxx
+(parser implementation header file) and
+.B name-pimpl.cxx
+(parser implementation source file). If the
+.B --generate-test-driver
+option is specified, the additional
+.B name-driver.cxx
+test driver file is generated.
+
+.IP \fBhelp\fR
+Print usage information and exit. Use
+.PP
+.RS
+.RS 3
+.B xsd help
+.I command
+.RE
+.PP
+for command-specific help.
+.RE
+.IP \fBversion\fR
+Print version and exit.
+.\"--------------------------------------------------------------------
+.SH OPTIONS
+.\"--------------------------------------------------------------------
+Command-specific
+.IR options ,
+if any, should appear after the corresponding
+.IR command .
+
+.\"
+.\" Common options.
+.\"
+.SS common options
+.
diff --git a/xsd/doc/xsd-prologue.xhtml b/xsd/doc/xsd-prologue.xhtml
new file mode 100644
index 0000000..e52e1fc
--- /dev/null
+++ b/xsd/doc/xsd-prologue.xhtml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+
+<head>
+ <title>$project$ $version$ Compiler Command Line Manual</title>
+
+ <meta name="version" content="$version$"/>
+ <meta name="copyright" content="&#169; $copyright$"/>
+ <meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,code,generator,manual,man,page"/>
+ <meta name="description" content="XSD Compiler Command Line Manual"/>
+
+ <link rel="stylesheet" type="text/css" href="default.css" />
+
+<style type="text/css">
+
+ #synopsis {
+ list-style-type: none;
+ }
+
+ #synopsis li {
+ padding-top : 0.0em;
+ padding-bottom : 0.0em;
+ }
+
+ #commands dt {
+ padding-top : 0.4em;
+ }
+
+ #commands dd {
+ padding-bottom : 0.4em;
+ padding-left : 2em;
+ }
+
+ .options {
+ margin: 1em 0 1em 0;
+ }
+
+ .options dt {
+ margin: 1em 0 0 0;
+ }
+
+ .options dd {
+ margin: .1em 0 0 4.5em;
+ }
+
+</style>
+</head>
+
+<body>
+<div id="container">
+ <div id="content">
+
+ <h1>NAME</h1>
+
+ <p>xsd - W3C XML Schema to C++ Compiler</p>
+
+ <h1>SYNOPSIS</h1>
+
+ <dl id="synopsis">
+ <dt><code><b>xsd</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
+ <dt><code><b>xsd help</b> [<i>command</i>]</code></dt>
+ <dt><code><b>xsd version</b></code></dt>
+ </dl>
+
+ <h1>DESCRIPTION</h1>
+
+ <p><code><b>xsd</b></code> generates vocabulary-specific, statically-typed
+ C++ mapping from W3C XML Schema definitions. Particular mapping to
+ produce is selected by a <code><i>command</i></code>. Each mapping has
+ a number of mapping-specific <code><i>options</i></code> that should
+ appear, if any, after the <code><i>command</i></code>. Input files should
+ be W3C XML Schema definitions. The exact set of the generated files depends
+ on the selected mapping and options.</p>
+
+ <h1>COMMANDS</h1>
+
+ <dl id="commands">
+ <dt><code><b>cxx-tree</b></code></dt>
+ <dd>Generate the C++/Tree mapping. For each input file in the form
+ <code><b>name.xsd</b></code> the following C++ files are generated:
+ <code><b>name.hxx</b></code> (header file),
+ <code><b>name.ixx</b></code> (inline file, generated only if the
+ <code><b>--generate-inline</b></code> option is specified),
+ <code><b>name.cxx</b></code> (source file), and
+ <code><b>name-fwd.hxx</b></code> (forward declaration file, generated
+ only if the <code><b>--generate-forward</b></code> option is
+ specified).</dd>
+
+ <dt><code><b>cxx-parser</b></code></dt>
+ <dd>Generate the C++/Parser mapping. For each input file in the form
+ <code><b>name.xsd</b></code> the following C++ files are generated:
+ <code><b>name-pskel.hxx</b></code> (parser skeleton header file),
+ <code><b>name-pskel.ixx</b></code> (parser skeleton inline file,
+ generated only if the <code><b>--generate-inline</b></code>
+ option is specified), and
+ <code><b>name-pskel.cxx</b></code> (parser skeleton source file).
+ If the <code><b>--generate-noop-impl</b></code> or
+ <code><b>--generate-print-impl</b></code> option is specified,
+ the following additional sample implementation files are generated:
+ <code><b>name-pimpl.hxx</b></code> (parser implementation header
+ file) and
+ <code><b>name-pimpl.cxx</b></code> (parser implementation source
+ file). If the <code><b>--generate-test-driver</b></code> option
+ is specified, the additional <code><b>name-driver.cxx</b></code>
+ test driver file is generated.</dd>
+
+ <dt><code><b>help</b></code></dt>
+ <dd>Print usage information and exit. Use
+ <p><code><b>xsd help</b> <i>command</i></code></p>
+ for command-specific help.
+ </dd>
+
+ <dt><code><b>version</b></code></dt>
+ <dd>Print version and exit.</dd>
+ </dl>
+
+ <h1>OPTIONS</h1>
+
+ <p>Command-specific <code><i>options</i></code>, if any, should appear
+ after the corresponding <code><i>command</i></code>.</p>
+
+ <h2>COMMON OPTIONS</h2>
diff --git a/doc/xsd-tree-header.1 b/xsd/doc/xsd-tree-header.1
index b9146a7..b9146a7 100644
--- a/doc/xsd-tree-header.1
+++ b/xsd/doc/xsd-tree-header.1
diff --git a/doc/xsd-tree-header.xhtml b/xsd/doc/xsd-tree-header.xhtml
index 73f9c99..73f9c99 100644
--- a/doc/xsd-tree-header.xhtml
+++ b/xsd/doc/xsd-tree-header.xhtml
diff --git a/xsd/elements.hxx b/xsd/elements.hxx
deleted file mode 100644
index 4d63f6a..0000000
--- a/xsd/elements.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-// file : xsd/elements.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef ELEMENTS_HXX
-#define ELEMENTS_HXX
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <types.hxx>
-
-namespace SemanticGraph = XSDFrontend::SemanticGraph;
-namespace Traversal = XSDFrontend::Traversal;
-
-// Anonymous feedback via belongs edge.
-//
-struct AnonymousBase : Traversal::Element, Traversal::Attribute
-{
- AnonymousBase (Traversal::NodeDispatcher& d1)
- : complex_ (&d1, 0)
- {
- edge_traverser (belongs_);
- belongs_.node_traverser (complex_);
- }
-
- AnonymousBase (Traversal::NodeDispatcher& d1, Traversal::NodeDispatcher& d2)
- : complex_ (&d1, &d2)
- {
- edge_traverser (belongs_);
- belongs_.node_traverser (complex_);
- }
-
- // Hooks.
- //
-public:
- virtual void
- member_pre (SemanticGraph::Member&)
- {
- }
-
- virtual void
- member_post (SemanticGraph::Member&)
- {
- }
-
- /*
- virtual void
- type_pre (SemanticGraph::Type& t)
- {
- }
-
- virtual void
- type_post (SemanticGraph::Type& t)
- {
- }
- */
-
-public:
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- SemanticGraph::Type& t (e.type ());
-
- if (!t.named_p () && !t.context ().count ("seen"))
- {
- t.context ().set ("seen", true);
-
- member_pre (e);
-
- Element::belongs (e, belongs_);
-
- member_post (e);
-
- t.context ().remove ("seen");
- }
- }
-
- virtual void
- traverse (SemanticGraph::Attribute& a)
- {
- SemanticGraph::Type& t (a.type ());
-
- if (!t.named_p () && !t.context ().count ("seen"))
- {
- t.context ().set ("seen", true);
-
- member_pre (a);
-
- Attribute::belongs (a, belongs_);
-
- member_post (a);
-
- t.context ().remove ("seen");
- }
- }
-
-private:
- struct Complex : Traversal::Complex
- {
- Complex (Traversal::NodeDispatcher* d1, Traversal::NodeDispatcher* d2)
- : d1_ (d1), d2_ (d2)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- if (d1_)
- d1_->dispatch (c);
-
- if (d2_)
- d2_->dispatch (c);
- }
-
- private:
- Traversal::NodeDispatcher* d1_;
- Traversal::NodeDispatcher* d2_;
-
- } complex_;
-
- Traversal::Belongs belongs_;
-};
-
-#endif // ELEMENTS_HXX
diff --git a/xsd/makefile b/xsd/makefile
deleted file mode 100644
index 55a99ef..0000000
--- a/xsd/makefile
+++ /dev/null
@@ -1,190 +0,0 @@
-# file : xsd/makefile
-# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
-
-cxx_tun := xsd.cxx
-
-cxx_tun += cxx/elements.cxx \
- cxx/literal-map.cxx \
- cxx/option-types.cxx
-
-cxx_tun += cxx/parser/elements.cxx \
- cxx/parser/validator.cxx \
- cxx/parser/name-processor.cxx \
- cxx/parser/type-processor.cxx \
- cxx/parser/state-processor.cxx \
- cxx/parser/generator.cxx \
- cxx/parser/parser-header.cxx \
- cxx/parser/parser-inline.cxx \
- cxx/parser/parser-source.cxx \
- cxx/parser/parser-forward.cxx \
- cxx/parser/impl-header.cxx \
- cxx/parser/impl-source.cxx \
- cxx/parser/driver-source.cxx \
- cxx/parser/element-validation-source.cxx \
- cxx/parser/attribute-validation-source.cxx \
- cxx/parser/characters-validation-source.cxx
-
-cxx_tun += cxx/tree/elements.cxx \
- cxx/tree/validator.cxx \
- cxx/tree/counter.cxx \
- cxx/tree/name-processor.cxx \
- cxx/tree/order-processor.cxx \
- cxx/tree/polymorphism-processor.cxx \
- cxx/tree/default-value.cxx \
- cxx/tree/generator.cxx \
- cxx/tree/tree-forward.cxx \
- cxx/tree/tree-header.cxx \
- cxx/tree/tree-inline.cxx \
- cxx/tree/tree-source.cxx \
- cxx/tree/parser-header.cxx \
- cxx/tree/parser-source.cxx \
- cxx/tree/stream-header.cxx \
- cxx/tree/stream-source.cxx \
- cxx/tree/serialization-header.cxx \
- cxx/tree/serialization-source.cxx \
- cxx/tree/stream-insertion-header.cxx \
- cxx/tree/stream-insertion-source.cxx \
- cxx/tree/stream-extraction-source.cxx
-
-
-# Type map.
-#
-cxx_tun += type-map/lexer.cxx \
- type-map/parser.cxx
-
-# Processing.
-#
-cxx_tun += processing/cardinality/processor.cxx \
- processing/inheritance/processor.cxx
-
-# Options file.
-#
-cli_tun := options.cli \
- cxx/options.cli \
- cxx/tree/options.cli \
- cxx/parser/options.cli
-
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-xsd := $(out_base)/xsd
-install := $(out_base)/.install
-dist := $(out_base)/.dist
-dist-win := $(out_base)/.dist-win
-clean := $(out_base)/.clean
-
-# Import.
-#
-$(call import,\
- $(scf_root)/import/cli/stub.make,\
- cli: cli,cli-rules: cli_rules)
-
-$(call import,\
- $(scf_root)/import/libcutl/stub.make,\
- l: cutl.l,cpp-options: cutl.l.cpp-options)
-
-$(call import,\
- $(scf_root)/import/libxsd-frontend/stub.make,\
- l: xsd_fe.l,cpp-options: xsd_fe.l.cpp-options)
-
-$(call import,\
- $(scf_root)/import/libxerces-c/stub.make,\
- l: xerces_c.l,cpp-options: xerces_c.l.cpp-options)
-
-# Build.
-#
-$(xsd): $(cxx_obj) $(xsd_fe.l) $(cutl.l) $(xerces_c.l)
-
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
-$(cxx_obj) $(cxx_od): \
- $(xsd_fe.l.cpp-options) \
- $(cutl.l.cpp-options) \
- $(xerces_c.l.cpp-options)
-
-genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-# Don't depend on installed executable since it may not exist.
-#
-ifneq ($(cli),cli)
-$(gen): $(cli)
-endif
-$(gen): cli := $(cli)
-$(gen): cli_options += \
--I $(src_base) \
---generate-specifier \
---ostream-type ::std::wostream \
---exclude-base \
---suppress-undocumented \
---generate-file-scanner \
---include-with-brackets \
---option-length 28 \
---cxx-prologue '\#include <options-parser.hxx>'
-
-#--include-prefix xsd
-#--guard-prefix XSD
-
-$(addprefix $(out_base)/cxx/options,.hxx .ixx .cxx): $(src_base)/options.cli
-$(addprefix $(out_base)/cxx/options,.hxx .ixx .cxx): cli_options += \
---include-prefix cxx --guard-prefix CXX
-
-$(addprefix $(out_base)/cxx/tree/options,.hxx .ixx .cxx): \
-$(src_base)/options.cli $(src_base)/cxx/options.cli
-$(addprefix $(out_base)/cxx/tree/options,.hxx .ixx .cxx): cli_options += \
---include-prefix cxx/tree --guard-prefix CXX_TREE
-
-$(addprefix $(out_base)/cxx/parser/options,.hxx .ixx .cxx): \
-$(src_base)/options.cli $(src_base)/cxx/options.cli
-$(addprefix $(out_base)/cxx/parser/options,.hxx .ixx .cxx): cli_options += \
---include-prefix cxx/parser --guard-prefix CXX_PARSER
-
-$(call include-dep,$(cxx_od),$(cxx_obj),$(gen))
-
-# Alias for default target.
-#
-$(out_base)/: $(xsd)
-
-# Install
-#
-$(install): $(xsd)
- $(call install-exec,$<,$(install_bin_dir)/xsd)
-
-# Dist.
-#
-$(dist): $(xsd)
- $(call install-exec,$<,$(dist_prefix)/bin/xsd)
-
-$(dist-win): $(xsd)
- $(call install-exec,$<,$(dist_prefix)/bin/xsd.exe)
-
-# Clean.
-#
-$(clean): \
- $(xsd).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
-
-ifneq ($(xsd_clean_gen),n)
-$(clean): $(addprefix $(out_base)/,$(cli_tun:.cli=.cxx.cli.clean))
-endif
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(xsd): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := xsd $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(cli_rules))
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(bld_root)/install.make)
diff --git a/xsd/manifest b/xsd/manifest
new file mode 100644
index 0000000..db9720b
--- /dev/null
+++ b/xsd/manifest
@@ -0,0 +1,23 @@
+: 1
+name: xsd
+version: 4.2.0-b.1.z
+summary: XML Schema to C++ data binding compiler
+license: other: GPL-2.0-only with Xerces-C++ linking exception and FLOSS exception
+topics: C++, XML, XML Schema, XML parser, source code generation
+description-file: README
+changes-file: NEWS
+url: https://www.codesynthesis.com/projects/xsd/
+doc-url: https://www.codesynthesis.com/projects/xsd/
+src-url: https://git.codesynthesis.com/cgit/xsd/xsd/tree/xsd/
+email: xsd-users@codesynthesis.com ; Mailing list
+build-warning-email: builds@codesynthesis.com
+requires: c++11
+depends: * build2 >= 0.13.0
+depends: * bpkg >= 0.13.0
+# @@ Should probably become conditional dependency.
+requires: ? cli ; Only required if changing .cli files.
+depends: libxsd-frontend ^2.1.0-
+depends: libcutl ^1.11.0-
+depends: libxerces-c ^3.0.0
+tests: xsd-tests == $
+examples: xsd-examples == $
diff --git a/xsd/options-parser.hxx b/xsd/options-parser.hxx
deleted file mode 100644
index 52125cb..0000000
--- a/xsd/options-parser.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-// file : xsd/options-parser.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef OPTIONS_PARSER_HXX
-#define OPTIONS_PARSER_HXX
-
-#include <types.hxx>
-#include <options.hxx>
-
-namespace cli
-{
- template <>
- struct parser<NarrowString>
- {
- static void
- parse (NarrowString& x, bool& xs, scanner& s)
- {
- xs = true;
- const char* o (s.next ());
-
- if (s.more ())
- x = s.next ();
- else
- throw missing_value (o);
- }
- };
-}
-
-#endif // OPTIONS_PARSER_HXX
diff --git a/xsd/options.cli b/xsd/options.cli
deleted file mode 100644
index ac129cf..0000000
--- a/xsd/options.cli
+++ /dev/null
@@ -1,312 +0,0 @@
-// file : xsd/options.cli
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-include <cstddef>; // std::size_t
-
-include <types.hxx>; // NarrowString, NarrowStrings
-
-class help_options
-{
- // These are all documented elsewhere.
- //
- bool --help;
- bool --version;
- bool --proprietary-license;
-};
-
-class options = 0
-{
- NarrowStrings --disable-warning
- {
- "<warn>",
- "Disable printing warning with id <warn>. If \cb{all} is specified for
- the warning id then all warnings are disabled."
- };
-
- // The following option is "fake" in that it is actually handled by
- // argv_file_scanner. We have it here to get the documentation.
- //
- std::string --options-file
- {
- "<file>",
- "Read additional options from <file>. Each option should appearing on a
- separate line optionally followed by space and an option value. Empty
- lines and lines starting with \cb{#} are ignored. Option values can
- be enclosed in double (\cb{\"}) or single (\cb{'}) quotes to preserve
- leading and trailing whitespaces as well as to specify empty values.
- If the value itself contains trailing or leading quotes, enclose it
- with an extra pair of quotes, for example \cb{'\"x\"'}. Non-leading
- and non-trailing quotes are interpreted as being part of the option
- value.
-
- The semantics of providing options in a file is equivalent to providing
- the same set of options in the same order on the command line at the
- point where the \cb{--options-file} option is specified except that
- the shell escaping and quoting is not required. You can repeat this
- option to specify more than one options file."
- };
-
- // SLOC/license options.
- //
- bool --show-sloc
- {
- "Show the number of generated physical source lines of code (SLOC)."
- };
-
- std::size_t --sloc-limit
- {
- "<num>",
- "Check that the number of generated physical source lines of code (SLOC)
- does not exceed <num>."
- };
-
- bool --proprietary-license
- {
- "Indicate that the generated code is licensed under a proprietary
- license instead of the GPL."
- };
-
- NarrowString --custom-literals
- {
- "<file>",
- "Load custom XML string to C++ literal mappings from <file>. This
- mechanism can be useful if you are using a custom character encoding
- and some of the strings in your schemas, for example element/attribute
- names or enumeration values, contain non-ASCII characters. In this
- case you will need to provide a custom mapping to C++ literals for
- such strings. The format of this file is specified in the
- \cb{custom-literals.xsd} XML Schema file that can be found in the
- documentation directory."
- };
-
- // Anonymous type morphing.
- //
- bool --preserve-anonymous
- {
- "Preserve anonymous types. By default anonymous types are automatically
- named with names derived from the enclosing elements/attributes. Because
- mappings implemented by this compiler require all types to be named,
- this option is only useful if you want to make sure your schemas don't
- have anonymous types."
- };
-
- bool --show-anonymous
- {
- "Show elements and attributes that are of anonymous types. This option
- only makes sense together with the \cb{--preserve-anonymous} option."
- };
-
- NarrowStrings --anonymous-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to derive names for
- anonymous types from the enclosing attributes/elements. <regex> is a
- Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}.
- Any character can be used as a delimiter instead of '\cb{/}'. Escaping of
- the delimiter character in \ci{pattern} or \ci{replacement} is not
- supported.
-
- All the regular expressions are pushed into a stack with the last
- specified expression considered first. The first match that succeeds is
- used. Regular expressions are applied to a string in the form
-
- \c{\i{filename} \i{namespace} \i{xpath}}
-
- For instance:
-
- \cb{hello.xsd http://example.com/hello element}
-
- \cb{hello.xsd http://example.com/hello type/element}
-
- As an example, the following expression makes all the derived names
- start with capital letters. This could be useful when your naming
- convention requires type names to start with capital letters:
-
- \cb{%.* .* (.+/)*(.+)%\\u$2%}
-
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- bool --anonymous-regex-trace
- {
- "Trace the process of applying regular expressions specified with the
- \cb{--anonymous-regex} option. Use this option to find out why your
- regular expressions don't do what you expected them to do."
- };
-
- bool --morph-anonymous; // Deprecated and therefore undocumented.
-
- // Location options.
- //
- NarrowStrings --location-map
- {
- "<ol>=<nl>",
- "Map the original schema location <ol> that is specified in the XML
- Schema include or import elements to new schema location <nl>. Repeat
- this option to map more than one schema location. For example, the
- following option maps the \cb{http://example.com/foo.xsd} URL to the
- \cb{foo.xsd} local file.
-
- \cb{--location-map http://example.com/foo.xsd=foo.xsd}"
- };
-
- NarrowStrings --location-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to map schema
- locations that are specified in the XML Schema include or import
- elements. <regex> is a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can
- be used as a delimiter instead of '\cb{/}'. Escaping of the delimiter
- character in \ci{pattern} or \ci{replacement} is not supported. All
- the regular expressions are pushed into a stack with the last specified
- expression considered first. The first match that succeeds is used.
-
- For example, the following expression maps URL locations in the form
- \cb{http://example.com/foo/bar.xsd} to local files in the form
- \cb{bar.xsd}:
-
- \cb{%http://.+/(.+)%$1%}
-
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- bool --location-regex-trace
- {
- "Trace the process of applying regular expressions specified with the
- \cb{--location-regex} option. Use this option to find out why your
- regular expressions don't do what you expected them to do."
- };
-
- // File-per-type option.
- //
- bool --file-per-type
- {
- "Generate a separate set of C++ files for each type defined in XML
- Schema. Note that in this mode you only need to compile the root
- schema(s) and the code will be generated for all included and
- imported schemas. This compilation mode is primarily useful when
- some of your schemas cannot be compiled separately or have cyclic
- dependencies which involve type inheritance. Other options related
- to this mode are: \cb{--type-file-regex}, \cb{--schema-file-regex},
- \cb{--fat-type-file}, and \cb{--file-list}."
- };
-
- NarrowStrings --type-file-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate type
- names to file names when the \cb{--file-per-type} option is specified.
- <regex> is a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can be
- used as a delimiter instead of '\cb{/}'. Escaping of the delimiter
- character in \ci{pattern} or \ci{replacement} is not supported. All
- the regular expressions are pushed into a stack with the last specified
- expression considered first. The first match that succeeds is used.
- Regular expressions are applied to a string in the form
-
- \c{\i{namespace} \i{type-name}}
-
- For example, the following expression maps type \cb{foo} that is
- defined in the \cb{http://example.com/bar} namespace to file name
- \cb{bar-foo}:
-
- \cb{%http://example.com/(.+) (.+)%$1-$2%}
-
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- bool --type-file-regex-trace
- {
- "Trace the process of applying regular expressions specified with the
- \cb{--type-file-regex} option. Use this option to find out why your
- regular expressions don't do what you expected them to do."
- };
-
- NarrowStrings --schema-file-regex
- {
- "<regex>",
- "Add <regex> to the list of regular expressions used to translate schema
- file names when the \cb{--file-per-type} option is specified. <regex> is
- a Perl-like regular expression in the form
- \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can be used
- as a delimiter instead of '\cb{/}'. Escaping of the delimiter character in
- \ci{pattern} or \ci{replacement} is not supported. All the regular
- expressions are pushed into a stack with the last specified expression
- considered first. The first match that succeeds is used. Regular
- Expressions are applied to the absolute filesystem path of a schema file
- and the result, including the directory part, if any, is used to derive
- the \cb{#include} directive paths as well as the generated C++ file
- paths. This option, along with \cb{--type-file-regex} are primarily
- useful to place the generated files into subdirectories or to resolve
- file name conflicts.
-
- For example, the following expression maps schema files in the
- \cb{foo/1.0.0/} subdirectory to the files in the \cb{foo/} subdirectory.
- As a result, the \cb{#include} directive paths for such schemas will be
- in the \cb{foo/schema.hxx} form and the generated C++ files will be
- placed into the \cb{foo/} subdirectory:
-
- \cb{%.*/foo/1.0.0/(.+)%foo/$1%}
-
- See also the REGEX AND SHELL QUOTING section below."
- };
-
- bool --schema-file-regex-trace
- {
- "Trace the process of applying regular expressions specified with the
- \cb{--schema-file-regex} option. Use this option to find out why your
- regular expressions don't do what you expected them to do."
- };
-
- bool --fat-type-file
- {
- "Generate code corresponding to global elements into type files instead
- of schema files when the \cb{--type-file-regex} option is specified.
- This option is primarily useful when trying to minimize the amount of
- object code that is linked to an executable by packaging compiled
- generated code into a static (archive) library."
- };
-
- // File list options.
- //
- NarrowString --file-list
- {
- "<file>",
- "Write a list of generated C++ files to <file>. This option is primarily
- useful in the file-per-type compilation mode (\cb{--file-per-type}) to
- create a list of generated C++ files, for example, as a makefile
- fragment."
- };
-
- NarrowString --file-list-prologue
- {
- "<text>",
- "Insert <text> at the beginning of the file list. As a convenience, all
- occurrences of the \cb{\\n} character sequence in <text> are replaced
- with new lines. This option can, for example, be used to assign the
- generated file list to a makefile variable."
- };
-
- NarrowString --file-list-epilogue
- {
- "<text>",
- "Insert <text> at the end of the file list. As a convenience, all
- occurrences of the \cb{\\n} character sequence in <text> are replaced
- with new lines."
- };
-
- NarrowString --file-list-delim = "\n"
- {
- "<text>",
- "Delimit file names written to the file list with <text> instead of new
- lines. As a convenience, all occurrences of the \cb{\\n} character
- sequence in <text> are replaced with new lines."
- };
-
- // Undocumented.
- //
- bool --disable-multi-import;
- bool --disable-full-check;
-};
diff --git a/xsd/processing/cardinality/processor.cxx b/xsd/processing/cardinality/processor.cxx
deleted file mode 100644
index 2a5292e..0000000
--- a/xsd/processing/cardinality/processor.cxx
+++ /dev/null
@@ -1,407 +0,0 @@
-// file : processing/cardinality/processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <map>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-#include <elements.hxx>
-
-#include <processing/cardinality/processor.hxx>
-
-using namespace std;
-
-namespace Processing
-{
- namespace SemanticGraph = XSDFrontend::SemanticGraph;
- namespace Traversal = XSDFrontend::Traversal;
-
- namespace Cardinality
- {
- namespace
- {
- //
- //
- struct ElementInfo
- {
- ElementInfo ()
- : min (0), max (0), e_ (0)
- {
- }
-
- ElementInfo (SemanticGraph::Element& e)
- : min (1), max (1), e_ (&e)
- {
- }
-
- ElementInfo (SemanticGraph::Element& e, size_t min_, size_t max_)
- : min (min_), max (max_), e_ (&e)
- {
- }
-
- SemanticGraph::Element&
- element ()
- {
- assert (e_ != 0);
- return *e_;
- }
-
- public:
- size_t min, max;
-
- private:
- SemanticGraph::Element* e_;
- };
-
- typedef map<String, ElementInfo> ElementInfoMap;
-
- //
- //
- struct AnyInfo
- {
- AnyInfo ()
- : min (0), max (0), a_ (0)
- {
- }
-
- AnyInfo (SemanticGraph::Any& a)
- : min (1), max (1), a_ (&a)
- {
- }
-
- AnyInfo (SemanticGraph::Any& a, size_t min_, size_t max_)
- : min (min_), max (max_), a_ (&a)
- {
- }
-
- SemanticGraph::Any&
- any ()
- {
- assert (a_ != 0);
- return *a_;
- }
-
- public:
- size_t min, max;
-
- private:
- SemanticGraph::Any* a_;
- };
-
- typedef map<String, AnyInfo> AnyInfoMap;
-
- //
- //
- struct Particle: Traversal::All,
- Traversal::Choice,
- Traversal::Sequence,
- Traversal::Element,
- Traversal::Any
- {
- virtual void
- traverse (SemanticGraph::All& a)
- {
- traverse_sequence (a);
- }
-
- virtual void
- traverse (SemanticGraph::Choice& c)
- {
- using SemanticGraph::Compositor;
-
- // Go over all particles we contain and add them to the map.
- //
- for (Compositor::ContainsIterator ci (c.contains_begin ());
- ci != c.contains_end (); ++ci)
- {
- Particle t;
- t.dispatch (ci->particle ());
-
- // Handle elements.
- //
- if (ci == c.contains_begin ())
- el_map = t.el_map; // First arm.
- else
- {
- // For elements that are in the map but not in this
- // arm of choice, we need to set min to 0 while for
- // those that are we need to choose minimum between
- // the two for min and maximum for max.
- //
- for (ElementInfoMap::iterator i (el_map.begin ());
- i != el_map.end (); ++i)
- {
- String const& name (i->first);
- ElementInfo& ei (i->second);
-
- ElementInfoMap::iterator j (t.el_map.find (name));
-
- if (j == t.el_map.end ())
- ei.min = 0;
- else
- {
- ei.min = j->second.min < ei.min ? j->second.min : ei.min;
-
- // Unbounded is encoded as 0.
- //
- if (j->second.max == 0 || ei.max == 0)
- ei.max = 0;
- else
- ei.max = j->second.max > ei.max ? j->second.max : ei.max;
- }
- }
-
- // Now elements that are in this arm of choice but are
- // not in the map, we need to add to the map and set their
- // min to 0.
- //
- for (ElementInfoMap::iterator i (t.el_map.begin ());
- i != t.el_map.end (); ++i)
- {
- String const& name (i->first);
- ElementInfo& ei (i->second);
-
- ElementInfoMap::iterator j (el_map.find (name));
-
- if (j == el_map.end ())
- el_map[name] = ElementInfo (ei.element (), 0, ei.max);
- }
- }
-
- // Handle wildcards. Since each wildcard is treated as unique,
- // we need to copy them from each arm of choice and set min to
- // 0.
- //
- for (AnyInfoMap::iterator i (t.any_map.begin ());
- i != t.any_map.end (); ++i)
- {
- String const& name (i->first);
- AnyInfo& ai (i->second);
-
- assert (any_map.find (name) == any_map.end ());
-
- any_map[name] = AnyInfo (ai.any (), 0, ai.max);
- }
- }
-
- // Choice's min and max.
- //
- size_t cmin (c.min ()), cmax (c.max ());
-
- // Iterate over elements and wildcards in the maps and multiply
- // their cardinality by cmin and cmax.
- //
- for (ElementInfoMap::iterator i (el_map.begin ());
- i != el_map.end (); ++i)
- {
- i->second.min *= cmin;
- i->second.max *= cmax;
- }
-
- for (AnyInfoMap::iterator i (any_map.begin ());
- i != any_map.end (); ++i)
- {
- i->second.min *= cmin; // Not really necessary since min == 0.
- i->second.max *= cmax;
- }
- }
-
- virtual void
- traverse (SemanticGraph::Sequence& s)
- {
- traverse_sequence (s);
- }
-
- void
- traverse_sequence (SemanticGraph::Compositor& c)
- {
- using SemanticGraph::Compositor;
-
- // Sequence's min and max.
- //
- size_t smin (c.min ()), smax (c.max ());
-
- // Go over all particles we contain and add them to the map.
- //
- for (Compositor::ContainsIterator ci (c.contains_begin ());
- ci != c.contains_end (); ++ci)
- {
- Particle t;
- t.dispatch (ci->particle ());
-
- // Handle elements.
- //
- for (ElementInfoMap::iterator i (t.el_map.begin ());
- i != t.el_map.end (); ++i)
- {
- String const& name (i->first);
- ElementInfo& ei (i->second);
- size_t min (ei.min * smin);
- size_t max (ei.max * smax);
- ElementInfoMap::iterator j (el_map.find (name));
-
- if (j != el_map.end ())
- {
- // Add i's cardinality to j
- //
- j->second.min += min;
- j->second.max = (j->second.max == 0 || max == 0) ?
- 0 : (j->second.max + max);
- }
- else
- el_map[name] = ElementInfo (ei.element (), min, max);
- }
-
- // Handle wildcards.
- //
- for (AnyInfoMap::iterator i (t.any_map.begin ());
- i != t.any_map.end (); ++i)
- {
- String const& name (i->first);
- AnyInfo& ai (i->second);
- size_t min (ai.min * smin);
- size_t max (ai.max * smax);
-
- assert (any_map.find (name) == any_map.end ());
-
- any_map[name] = AnyInfo (ai.any (), min, max);
- }
- }
- }
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- SemanticGraph::ContainsParticle& cp (e.contained_particle ());
-
- String name (e.qualified_p ()
- ? e.namespace_ ().name () + L" " + e.name ()
- : e.name ());
-
- el_map[name] = ElementInfo (e, cp.min (), cp.max ());
- }
-
- virtual void
- traverse (SemanticGraph::Any& a)
- {
- SemanticGraph::ContainsParticle& cp (a.contained_particle ());
-
- any_map[a.name ()] = AnyInfo (a, cp.min (), cp.max ());
- }
-
- public:
- AnyInfoMap any_map;
- ElementInfoMap el_map;
- };
-
-
- //
- //
- struct Complex: Traversal::Complex
- {
- virtual void
- traverse (Type& c)
- {
- if (c.contains_compositor_p ())
- {
- Particle t;
- t.dispatch (c.contains_compositor ().compositor ());
-
- for (ElementInfoMap::iterator i (t.el_map.begin ());
- i != t.el_map.end (); ++i)
- {
- ElementInfo& ei (i->second);
- SemanticGraph::Context& ctx (ei.element ().context ());
-
- ctx.set ("min", ei.min);
- ctx.set ("max", ei.max);
- }
-
- for (AnyInfoMap::iterator i (t.any_map.begin ());
- i != t.any_map.end (); ++i)
- {
- AnyInfo& ai (i->second);
- SemanticGraph::Context& ctx (ai.any ().context ());
-
- ctx.set ("min", ai.min);
- ctx.set ("max", ai.max);
- }
- }
-
- // Traverse attributes and anonymous types (via elements).
- //
- Complex::names (c);
- }
- };
-
-
- //
- //
- struct Attribute: Traversal::Attribute
- {
- virtual void
- traverse (Type& a)
- {
- SemanticGraph::Context& ctx (a.context ());
-
- ctx.set ("min", size_t (a.optional_p () ? 0 : 1));
- ctx.set ("max", size_t (1));
- }
- };
-
- // Go into implied/included/imported schemas while making sure
- // we don't process the same stuff more than once.
- //
- struct Uses: Traversal::Uses
- {
- virtual void
- traverse (Type& u)
- {
- SemanticGraph::Schema& s (u.schema ());
-
- if (!s.context ().count ("processing-cardinality-seen"))
- {
- s.context ().set ("processing-cardinality-seen", true);
- Traversal::Uses::traverse (u);
- }
- }
- };
- }
-
- void Processor::
- process (SemanticGraph::Schema& tu, SemanticGraph::Path const&)
- {
- Traversal::Schema schema;
- Uses uses;
-
- schema >> uses >> schema;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
-
- schema >> schema_names >> ns >> ns_names;
-
- Complex complex_type;
- AnonymousBase anonymous (complex_type);
-
- ns_names >> complex_type;
- ns_names >> anonymous;
-
- Attribute attribute;
- Traversal::Names names;
-
- complex_type >> names;
-
- names >> attribute;
- names >> anonymous;
-
- // Some twisted schemas do recusive inclusions.
- //
- tu.context ().set ("processing-cardinality-seen", true);
-
- schema.dispatch (tu);
- }
- }
-}
diff --git a/xsd/processing/cardinality/processor.hxx b/xsd/processing/cardinality/processor.hxx
deleted file mode 100644
index f09155e..0000000
--- a/xsd/processing/cardinality/processor.hxx
+++ /dev/null
@@ -1,28 +0,0 @@
-// file : processing/cardinality/processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef PROCESSING_CARDINALITY_PROCESSOR_HXX
-#define PROCESSING_CARDINALITY_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph/elements.hxx> // Path
-#include <xsd-frontend/semantic-graph/schema.hxx>
-
-#include <types.hxx>
-
-namespace Processing
-{
- namespace Cardinality
- {
- class Processor
- {
- public:
- struct Failed {};
-
- void
- process (XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file);
- };
- }
-}
-
-#endif // PROCESSING_CARDINALITY_PROCESSOR_HXX
diff --git a/xsd/processing/inheritance/processor.cxx b/xsd/processing/inheritance/processor.cxx
deleted file mode 100644
index 9269852..0000000
--- a/xsd/processing/inheritance/processor.cxx
+++ /dev/null
@@ -1,492 +0,0 @@
-// file : processing/inheritance/processor.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <set>
-#include <iostream>
-
-#include <processing/inheritance/processor.hxx>
-
-#include <elements.hxx>
-
-#include <xsd-frontend/semantic-graph.hxx>
-#include <xsd-frontend/traversal.hxx>
-
-using namespace std;
-
-namespace Processing
-{
- namespace SemanticGraph = XSDFrontend::SemanticGraph;
- namespace Traversal = XSDFrontend::Traversal;
-
- namespace Inheritance
- {
- namespace
- {
- struct Dep
- {
- Dep (SemanticGraph::Type& t,
- SemanticGraph::Member* m = 0,
- String const& xpath = L"")
- : type (t), member (m), member_xpath (xpath)
- {
- }
-
- SemanticGraph::Type& type;
- SemanticGraph::Member* member; // Member if type is anonymous.
- String member_xpath;
- };
-
- inline bool
- operator< (Dep const& a, Dep const& b)
- {
- return &a.type < &b.type;
- }
-
- typedef set<Dep> DepSet;
- typedef set<SemanticGraph::Type*> TypeSet;
-
- String
- xpath (SemanticGraph::Nameable& n)
- {
- if (dynamic_cast<SemanticGraph::Namespace*> (&n) != 0)
- return L"<namespace-level>"; // There is a bug if you see this.
-
- if (n.named_p ())
- {
- SemanticGraph::Scope& scope (n.scope ());
-
- if (dynamic_cast<SemanticGraph::Namespace*> (&scope) != 0)
- return n.name ();
-
- return xpath (scope) + L"/" + n.name ();
- }
- else
- {
- return L"(anonymous type for " +
- n.context ().get<String> ("instance-name") + L")";
- }
- }
-
-
- // Calculate the list of dependencies for this complex
- // type.
- //
- struct ComplexType: Traversal::Complex,
- Traversal::Member
- {
- ComplexType (DepSet& dep_set)
- : dep_set_ (dep_set), last_ (0)
- {
- *this >> names_ >> *this;
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- using SemanticGraph::Complex;
-
- if (c.inherits_p ())
- dep_set_.insert (Dep (c.inherits ().base (), last_, last_xpath_));
-
- types_seen_.insert (&c);
-
- // Go after anonymous types.
- //
- names (c);
- }
-
- virtual void
- traverse (SemanticGraph::Member& m)
- {
- SemanticGraph::Type& t (m.type ());
-
- if (!t.named_p () && types_seen_.find (&t) == types_seen_.end ())
- {
- SemanticGraph::Context& ctx (t.context ());
-
- last_xpath_ = xpath (m);
-
- String prev_xpath;
-
- if (ctx.count ("instance-name"))
- prev_xpath = ctx.get<String> ("instance-name");
-
- ctx.set ("instance-name", last_xpath_);
-
- last_ = &m;
- dispatch (t);
-
- if (prev_xpath)
- ctx.set ("instance-name", prev_xpath);
- else
- ctx.remove ("instance-name");
- }
- }
-
- private:
- DepSet& dep_set_;
- TypeSet types_seen_;
-
- SemanticGraph::Member* last_;
- String last_xpath_;
-
- Traversal::Names names_;
- };
-
-
- //
- //
- template <typename N, typename A>
- struct NodeArgs
- {
- NodeArgs (N& node, A arg)
- : node_ (node), arg_ (arg)
- {
- }
-
- operator N& () const
- {
- return node_;
- }
-
- template <typename E>
- void
- add_edge_left (E& e)
- {
- node_.add_edge_left (e, arg_);
- }
-
- template <typename E>
- void
- add_edge_right (E& e)
- {
- node_.add_edge_right (e, arg_);
- }
-
- private:
- N& node_;
- A arg_;
- };
-
-
- //
- //
- struct Global: Traversal::Type,
- Traversal::Complex,
- Traversal::Element
- {
- Global (SemanticGraph::Schema& root,
- SemanticGraph::Schema& schema,
- bool& failed)
- : root_ (root), schema_ (schema), failed_ (failed)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Type& t)
- {
- if (t.named_p ())
- types_seen_.insert (&t);
- }
-
- virtual void
- traverse (SemanticGraph::Complex& c)
- {
- check_dep (c, c);
- types_seen_.insert (&c);
- };
-
- virtual void
- traverse (SemanticGraph::Element& e)
- {
- SemanticGraph::Type& t (e.type ());
-
- if (!t.named_p ())
- {
- t.context ().set ("instance-name", xpath (e));
- check_dep (e, t);
- t.context ().remove ("instance-name");
- }
- };
-
- private:
- void
- check_dep (SemanticGraph::Nameable& global,
- SemanticGraph::Type& type)
- {
- using SemanticGraph::Type;
- using SemanticGraph::Scope;
- using SemanticGraph::Names;
- using SemanticGraph::Schema;
-
- DepSet prereqs;
-
- // Calculate our prerequisistes.
- //
- {
- ComplexType complex (prereqs);
- complex.dispatch (type);
- }
-
- for (DepSet::const_iterator i (prereqs.begin ());
- i != prereqs.end (); ++i)
- {
- Dep const& dep (*i);
- Type& t (dep.type);
-
- // Ignore IDREF templates.
- //
- if (!t.named_p () &&
- (t.is_a<SemanticGraph::Fundamental::IdRef> () ||
- t.is_a<SemanticGraph::Fundamental::IdRefs> ()))
- continue;
-
- // We won't be able to generate compilable code in case of a
- // dependency on ourselves (e.g., a member element with
- // anonymous type that inherits from us).
- //
- if (&t == &type)
- {
- assert (dep.member != 0);
-
- SemanticGraph::Member& m (*dep.member);
-
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << " error: nested anonymous type for '"
- << dep.member_xpath << "' cyclicly inherits from '"
- << t.name () << "'" << endl;
-
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << " error: unable to generate valid code for such "
- << "cyclic inheritance" << endl;
-
- wcerr << m.file () << ":" << m.line () << ":" << m.column ()
- << " info: '" << m.name () << "' element is declared here"
- << endl;
-
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << ": info: consider explicitly naming this type "
- << "or remove the --preserve-anonymous option"
- << endl;
-
- failed_ = true;
- continue;
- }
-
- if (types_seen_.find (&t) == types_seen_.end ())
- {
- Scope& scope (t.scope ());
- Schema& schema (dynamic_cast<Schema&> (scope.scope ()));
-
- // Don't worry about types that are in included/imported
- // schemas.
- //
- if (&schema != &schema_ && !sources_p (schema_, schema))
- continue;
-
- if (t.context ().count ("seen"))
- {
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << " error: nested anonymous type in '" << t.name ()
- << "' or '" << type.name () << "' inherits from one of "
- << "these types and makes them mutually dependant"
- << endl;
-
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << " error: unable to generate valid code for such "
- << "cyclic dependency" << endl;
-
- wcerr << type.file () << ":" << type.line () << ":"
- << type.column () << " info: '" << type.name ()
- << "' type is defined here"
- << endl;
-
- wcerr << t.file () << ":" << t.line () << ":" << t.column ()
- << ": info: consider explicitly naming the anonymous "
- << "type or remove the --preserve-anonymous option"
- << endl;
-
- failed_ = true;
- continue;
- }
-
- //wcerr << "type '" << t.name () << "' needs to be moved " <<
- // "before " << (global.is_a<Type> () ? "type" : "element") <<
- // " '" << global.name () << "'" << endl;
-
-
- // Delete current Names edge.
- //
- String name (t.name ());
- {
- Names& n (t.named ());
- root_.delete_edge (scope, t, n);
- }
-
- // Insert a new Names edge before global.
- //
- {
- // t.scope () and global.scope () can be different in
- // case of the chameleon inclusion.
- //
- Scope& scope (global.scope ());
-
- // Convert to the insert-after call.
- //
- Scope::NamesIterator i (scope.find (global.named ()));
-
- if (i == scope.names_begin ())
- i = scope.names_end ();
- else
- --i;
-
- NodeArgs<Scope, Scope::NamesIterator> na (scope, i);
- root_.new_edge<Names> (na, t, name);
- }
-
- // Recursively process the moved type.
- //
- global.context ().set ("seen", true);
- dispatch (t);
- global.context ().remove ("seen");
- }
- }
- }
-
- private:
- // Return true if root sources s.
- //
- bool
- sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
- {
- using SemanticGraph::Schema;
- using SemanticGraph::Sources;
-
- for (Schema::UsesIterator i (root.uses_begin ());
- i != root.uses_end (); ++i)
- {
- if (i->is_a<Sources> ())
- {
- if (&i->schema () == &s || sources_p (i->schema (), s))
- return true;
- }
- }
-
- return false;
- }
-
- private:
- SemanticGraph::Schema& root_;
- SemanticGraph::Schema& schema_;
- TypeSet types_seen_;
- bool& failed_;
- };
-
-
- // Sources traverser that goes into each schema only once.
- //
- struct Sources: Traversal::Sources
- {
- virtual void
- traverse (SemanticGraph::Sources& s)
- {
- if (schemas_.insert (&s.schema ()).second)
- Traversal::Sources::traverse (s);
- }
-
- private:
- set<SemanticGraph::Schema*> schemas_;
- };
-
- // Go into included/imported schemas while making sure we don't
- // process the same stuff more than once.
- //
- struct Uses: Traversal::Includes, Traversal::Imports
- {
- Uses (SemanticGraph::Schema& root, bool& failed)
- : root_ (root), failed_ (failed)
- {
- }
-
- virtual void
- traverse (SemanticGraph::Includes& i)
- {
- traverse (i.schema ());
- }
-
- virtual void
- traverse (SemanticGraph::Imports& i)
- {
- traverse (i.schema ());
- }
-
- private:
- void
- traverse (SemanticGraph::Schema& s)
- {
- if (!s.context ().count ("processing-inheritance-seen"))
- {
- Traversal::Schema schema;
- Sources sources;
-
- schema >> sources >> schema;
- schema >> *this;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
-
- schema >> schema_names >> ns >> ns_names;
-
- Global global (root_, s, failed_);
-
- ns_names >> global;
-
- s.context ().set ("processing-inheritance-seen", true);
- schema.dispatch (s);
- }
- }
-
- private:
- SemanticGraph::Schema& root_;
- bool& failed_;
- };
- }
-
- void Processor::
- process (SemanticGraph::Schema& tu, SemanticGraph::Path const&)
- {
- bool failed (false);
-
- // We need to process include/imported schemas since other
- // parts of the process, for example, name processors can
- // rely on the order of types in the schema.
- //
- Traversal::Schema schema;
- Sources sources;
- Uses uses (tu, failed);
-
- schema >> sources >> schema;
- schema >> uses;
-
- Traversal::Names schema_names;
- Traversal::Namespace ns;
- Traversal::Names ns_names;
-
- schema >> schema_names >> ns >> ns_names;
-
- Global global (tu, tu, failed);
-
- ns_names >> global;
-
- // Some twisted schemas do recusive self-inclusion.
- //
- tu.context ().set ("processing-inheritance-seen", true);
-
- schema.dispatch (tu);
-
- if (failed)
- throw Failed ();
- }
- }
-}
diff --git a/xsd/processing/inheritance/processor.hxx b/xsd/processing/inheritance/processor.hxx
deleted file mode 100644
index f0a881f..0000000
--- a/xsd/processing/inheritance/processor.hxx
+++ /dev/null
@@ -1,28 +0,0 @@
-// file : processing/inheritance/processor.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef PROCESSING_INHERITANCE_PROCESSOR_HXX
-#define PROCESSING_INHERITANCE_PROCESSOR_HXX
-
-#include <xsd-frontend/semantic-graph/elements.hxx> // Path
-#include <xsd-frontend/semantic-graph/schema.hxx>
-
-#include <types.hxx>
-
-namespace Processing
-{
- namespace Inheritance
- {
- class Processor
- {
- public:
- struct Failed {};
-
- void
- process (XSDFrontend::SemanticGraph::Schema&,
- XSDFrontend::SemanticGraph::Path const& file);
- };
- }
-}
-
-#endif // PROCESSING_INHERITANCE_PROCESSOR_HXX
diff --git a/xsd/type-map/lexer.cxx b/xsd/type-map/lexer.cxx
deleted file mode 100644
index 26600c5..0000000
--- a/xsd/type-map/lexer.cxx
+++ /dev/null
@@ -1,131 +0,0 @@
-// file : xsd/type-map/lexer.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <iostream>
-
-#include <type-map/lexer.hxx>
-
-using std::wcerr;
-using std::endl;
-
-namespace TypeMap
-{
- Lexer::Lexer (std::istream& is, String const& path)
- : locale_ ("C"), is_ (is), path_ (path), line_ (1), comment_ (false)
- {
- is_.exceptions (std::ios_base::badbit);
- }
-
- Lexer::Token Lexer::
- next ()
- {
- if (held_lexeme_)
- {
- Token t (Token::punct, held_lexeme_, line_);
- held_lexeme_.clear ();
- return t;
- }
-
- typedef std::char_traits<char> Traits;
- typedef Traits::char_type CharType;
- typedef Traits::int_type IntType;
-
- IntType i;
- CharType c ('\0');
- NarrowString lexeme;
-
- // Skip all whitespaces including comments.
- //
- while (!is_.eof ())
- {
- i = is_.get ();
-
- if (i == Traits::eof ())
- break;
-
- c = Traits::to_char_type (i);
-
- if (comment_)
- {
- if (c == '\n')
- comment_ = false;
- }
- else
- {
- if (!(std::isspace (c, locale_) || c == '#'))
- break;
-
- if (c == '#')
- comment_ = true;
- }
-
- if (c == '\n')
- ++line_;
- }
-
- if (is_.eof ())
- return Token (Token::eos, L"<end-of-stream>", line_);
-
- bool quote (c == '"');
-
- if (!quote)
- lexeme += c;
-
- if (c != ';' && c != '{' && c != '}')
- {
- // Accumulate non-whitespace character sequence.
- //
-
- while (!is_.eof ())
- {
- i = is_.get ();
-
- if (i == Traits::eof ())
- break;
-
- c = Traits::to_char_type (i);
-
- if (!quote && c == '#')
- {
- comment_ = true;
- break;
- }
-
- if (std::isspace (c, locale_))
- {
- if (c == '\n')
- ++line_;
-
- if (!quote)
- break;
- }
-
- if (!quote && (c == ';' || c == '{' || c == '}'))
- {
- held_lexeme_ += c;
- break;
- }
-
- if (quote && c == '"')
- break;
-
- lexeme += c;
- }
-
- if (quote && c != '"')
- {
- wcerr << path_ << ":" << line_ << ": error: closing '\"' expected"
- << endl;
-
- throw Failed ();
- }
- }
-
- if (!quote && (lexeme == ";" || lexeme == "{" || lexeme == "}"))
- {
- return Token (Token::punct, lexeme, line_);
- }
- else
- return Token (Token::token, lexeme, line_);
- }
-}
diff --git a/xsd/type-map/lexer.hxx b/xsd/type-map/lexer.hxx
deleted file mode 100644
index ab16eb1..0000000
--- a/xsd/type-map/lexer.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-// file : xsd/type-map/lexer.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef XSD_TYPE_MAP_LEXER_HXX
-#define XSD_TYPE_MAP_LEXER_HXX
-
-#include <locale>
-#include <iosfwd>
-
-#include <types.hxx>
-
-namespace TypeMap
-{
- class Lexer
- {
- public:
- class Token
- {
- public:
- enum Type
- {
- token,
- punct,
- eos
- };
-
- Token (Type type, String const& lexeme, size_t line)
- : type_ (type), lexeme_ (lexeme), line_ (line)
- {
- }
-
- Type
- type () const
- {
- return type_;
- }
-
- String const&
- lexeme () const
- {
- return lexeme_;
- }
-
- size_t
- line () const
- {
- return line_;
- }
-
- private:
- Type type_;
- String lexeme_;
- size_t line_;
- };
-
- Lexer (std::istream&, String const& path);
-
- struct Failed {};
-
- Token
- next ();
-
- private:
- std::locale locale_;
- std::istream& is_;
- String path_;
- size_t line_;
- String held_lexeme_;
- bool comment_;
- };
-
-}
-
-#endif // XSD_TYPE_MAP_LEXER_HXX
diff --git a/xsd/type-map/parser.cxx b/xsd/type-map/parser.cxx
deleted file mode 100644
index 39389f7..0000000
--- a/xsd/type-map/parser.cxx
+++ /dev/null
@@ -1,279 +0,0 @@
-// file : xsd/type-map/parser.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <iostream>
-
-#include <cutl/re.hxx>
-
-#include <type-map/parser.hxx>
-
-using std::endl;
-
-namespace TypeMap
-{
- typedef Lexer::Token Token;
- typedef cutl::re::wformat Format;
-
- Parser::Parser (Lexer& lex, String const& path)
- : lex_ (lex), path_ (path), e (std::wcerr)
- {
- }
-
- bool Parser::
- parse (Namespaces& ns)
- {
- try
- {
- Namespace* global = 0;
-
- for (Token t (lex_.next ()); t.type () != Token::eos; t = lex_.next ())
- {
- String l (t.lexeme ());
-
- if (l == L"namespace")
- {
- global = 0;
-
- if (!namespace_ (ns))
- return false;
- }
- else if (l == L"include")
- {
- if (global == 0)
- {
- ns.push_back (Namespace (Pattern ()));
- global = &(*ns.rbegin ());
- }
-
- if (!include (*global))
- return false;
- }
- else if (l == L"type" || t.type () == Token::token)
- {
- // Type mapping can have 'type' specifier omitted.
- //
- if (l == L"type")
- t = lex_.next ();
-
- if (global == 0)
- {
- ns.push_back (Namespace (Pattern ()));
- global = &(*ns.rbegin ());
- }
-
- if (!type (t, *global))
- return false;
- }
- else
- {
- e << path_ << ":" << t.line () << ": unexpected '" << l << "'"
- << endl;
-
- return false;
- }
- }
- }
- catch (Lexer::Failed const&)
- {
- return false;
- }
-
- return true;
- }
-
- bool Parser::
- namespace_ (Namespaces& ns)
- {
- // First get XML namespace.
- //
- Token t (lex_.next ());
-
- Pattern xsd_name;
-
- try
- {
- xsd_name = t.lexeme ();
- }
- catch (Format const& ex)
- {
- e << path_ << ":" << t.line () << ": invalid namespace pattern: "
- << ex.description ().c_str () << endl;
- return false;
- }
-
- if (t.type () != Token::token)
- {
- e << path_ << ":" << t.line () << ": expected XML namespace "
- << "instead of '" << xsd_name << "'" << endl;
- return false;
- }
-
-
- // See if we've got optional C++ mapping.
- //
- t = lex_.next ();
-
- bool has_cxx_name (false);
- String cxx_name;
-
- if (t.type () != Token::token)
- {
- if (t.lexeme () != L"{")
- {
- e << path_ << ":" << t.line () << ": expected C++ namespace or '{' "
- << "instead of '" << t.lexeme () << "'" << endl;
- return false;
- }
- }
- else
- {
- has_cxx_name = true;
- cxx_name = t.lexeme ();
- }
-
- // Swallow '{' if needed.
- //
- if (has_cxx_name)
- {
- t = lex_.next ();
-
- if (t.type () != Token::punct || t.lexeme () != L"{")
- {
- e << path_ << ":" << t.line () << ": expected '{' instead of '"
- << t.lexeme () << "'" << endl;
- return false;
- }
- }
-
- Namespace n (xsd_name, has_cxx_name, cxx_name);
-
- // Parse namespace body.
- //
- for (t = lex_.next ();; t = lex_.next ())
- {
- String l (t.lexeme ());
-
- if (l == L"include")
- {
- if (!include (n))
- return false;
- }
- else if (l == L"type" || t.type () == Token::token)
- {
- // Type mapping can have 'type' specifier omitted.
- //
- if (l == L"type")
- t = lex_.next ();
-
- if (!type (t, n))
- return false;
- }
- else if (t.type () == Token::punct && l == L"}")
- {
- break;
- }
- else
- {
- e << path_ << ":" << t.line () << ": unexpected '" << l << "'"
- << endl;
- return false;
- }
- }
-
- if (cxx_name || n.types_begin () != n.types_end () ||
- n.includes_begin () != n.includes_end ())
- {
- ns.push_back (n);
- }
-
- return true;
- }
-
- bool Parser::
- include (Namespace& n)
- {
- Token t (lex_.next ());
-
- String path (t.lexeme ());
-
- if (t.type () != Token::token)
- {
- e << path_ << ":" << t.line () << ": expected include path "
- << "instead of '" << path << "'" << endl;
- return false;
- }
-
- if (path && path[0] == L'<')
- n.includes_push_back (path);
- else
- n.includes_push_back (L'"' + path + L'"');
-
- t = lex_.next ();
-
- if (t.type () != Token::punct || t.lexeme () != L";")
- {
- e << path_ << ":" << t.line () << ": expected ';' after '"
- << path << "'" << endl;
- return false;
- }
-
- return true;
- }
-
- bool Parser::
- type (Token t, Namespace& n)
- {
- Pattern xsd_name;
-
- try
- {
- xsd_name = t.lexeme ();
- }
- catch (Format const& ex)
- {
- e << path_ << ":" << t.line () << ": invalid namespace pattern: "
- << ex.description ().c_str () << endl;
- return false;
- }
-
- if (t.type () != Token::token)
- {
- e << path_ << ":" << t.line () << ": expected XML Schema type name "
- << "instead of '" << xsd_name << "'" << endl;
- return false;
- }
-
- t = lex_.next ();
- String cxx_ret_name (t.lexeme ());
-
- if (t.type () != Token::token)
- {
- e << path_ << ":" << t.line () << ": expected C++ type name "
- << "instead of '" << cxx_ret_name << "'" << endl;
- return false;
- }
-
- t = lex_.next ();
-
- String cxx_arg_name;
-
- // See if we've got optional argument type.
- //
- if (t.type () == Token::token)
- {
- cxx_arg_name = t.lexeme ();
- t = lex_.next ();
- }
-
- if (t.type () != Token::punct || t.lexeme () != L";")
- {
- e << path_ << ":" << t.line () << ": expected ';' after '"
- << cxx_arg_name << "'" << endl;
- return false;
- }
-
- n.types_push_back (xsd_name, cxx_ret_name, cxx_arg_name);
-
- return true;
- }
-}
diff --git a/xsd/type-map/parser.hxx b/xsd/type-map/parser.hxx
deleted file mode 100644
index eceb255..0000000
--- a/xsd/type-map/parser.hxx
+++ /dev/null
@@ -1,41 +0,0 @@
-// file : xsd/type-map/parser.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef XSD_TYPE_MAP_PARSER_HXX
-#define XSD_TYPE_MAP_PARSER_HXX
-
-#include <types.hxx>
-
-#include <type-map/type-map.hxx>
-#include <type-map/lexer.hxx>
-
-namespace TypeMap
-{
- class Parser
- {
- public:
- Parser (Lexer&, String const& path);
-
- // Merge parsed namespaces.
- //
- bool
- parse (Namespaces&);
-
- private:
- bool
- namespace_ (Namespaces&);
-
- bool
- include (Namespace&);
-
- bool
- type (Lexer::Token, Namespace&);
-
- private:
- Lexer& lex_;
- String path_;
- std::wostream& e;
- };
-}
-
-#endif // XSD_TYPE_MAP_PARSER_HXX
diff --git a/xsd/type-map/type-map.hxx b/xsd/type-map/type-map.hxx
deleted file mode 100644
index 374591e..0000000
--- a/xsd/type-map/type-map.hxx
+++ /dev/null
@@ -1,178 +0,0 @@
-// file : xsd/type-map/type-map.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef XSD_TYPE_MAP_TYPE_MAP_HXX
-#define XSD_TYPE_MAP_TYPE_MAP_HXX
-
-#include <vector>
-
-#include <cutl/re.hxx>
-
-#include <types.hxx>
-
-namespace TypeMap
-{
- typedef cutl::re::wregex Pattern;
-
- class Type
- {
- public:
- Type (String const& xsd_name,
- String const& cxx_ret_name,
- String const& cxx_arg_name)
- : xsd_name_ (xsd_name),
- cxx_ret_name_ (cxx_ret_name),
- cxx_arg_name_ (cxx_arg_name)
- {
- }
-
- Type (Pattern const& xsd_name,
- String const& cxx_ret_name,
- String const& cxx_arg_name)
- : xsd_name_ (xsd_name),
- cxx_ret_name_ (cxx_ret_name),
- cxx_arg_name_ (cxx_arg_name)
- {
- }
-
- Pattern const&
- xsd_name () const
- {
- return xsd_name_;
- }
-
- String const&
- cxx_ret_name () const
- {
- return cxx_ret_name_;
- }
-
- String const&
- cxx_arg_name () const
- {
- return cxx_arg_name_;
- }
-
- private:
- Pattern xsd_name_;
- String cxx_ret_name_;
- String cxx_arg_name_;
- };
-
- class Namespace
- {
- public:
- Namespace (String const& xsd_name)
- : xsd_name_ (xsd_name), has_cxx_name_ (false)
- {
- }
-
- Namespace (Pattern const& xsd_name)
- : xsd_name_ (xsd_name), has_cxx_name_ (false)
- {
- }
-
- Namespace (Pattern const& xsd_name, String const& cxx_name)
- : xsd_name_ (xsd_name), has_cxx_name_ (true), cxx_name_ (cxx_name)
- {
- }
-
- Namespace (Pattern const& xsd_name,
- bool has_cxx_name,
- String const& cxx_name)
- : xsd_name_ (xsd_name),
- has_cxx_name_ (has_cxx_name),
- cxx_name_ (cxx_name)
- {
- }
-
- //
- //
- typedef std::vector<String> Includes;
- typedef Includes::const_iterator IncludesIterator;
-
- IncludesIterator
- includes_begin () const
- {
- return includes_.begin ();
- }
-
- IncludesIterator
- includes_end () const
- {
- return includes_.end ();
- }
-
- void
- includes_push_back (String const& i)
- {
- includes_.push_back (i);
- }
-
- //
- //
- typedef std::vector<Type> Types;
- typedef Types::const_iterator TypesIterator;
-
- TypesIterator
- types_begin () const
- {
- return types_.begin ();
- }
-
- TypesIterator
- types_end () const
- {
- return types_.end ();
- }
-
- void
- types_push_back (String const& xsd_type,
- String const& cxx_ret_type,
- String const& cxx_arg_type = L"")
- {
- types_.push_back (Type (xsd_type, cxx_ret_type, cxx_arg_type));
- }
-
- void
- types_push_back (Pattern const& xsd_type,
- String const& cxx_ret_type,
- String const& cxx_arg_type = L"")
- {
- types_.push_back (Type (xsd_type, cxx_ret_type, cxx_arg_type));
- }
-
- //
- //
- Pattern const&
- xsd_name () const
- {
- return xsd_name_;
- }
-
- //
- //
- bool
- has_cxx_name () const
- {
- return has_cxx_name_;
- }
-
- String const&
- cxx_name () const
- {
- return cxx_name_;
- }
-
- private:
- Includes includes_;
- Types types_;
- Pattern xsd_name_;
- bool has_cxx_name_;
- String cxx_name_;
- };
-
- typedef std::vector<Namespace> Namespaces;
-}
-
-#endif // XSD_TYPE_MAP_TYPE_MAP_HXX
diff --git a/xsd/types.hxx b/xsd/types.hxx
deleted file mode 100644
index 51af830..0000000
--- a/xsd/types.hxx
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : xsd/types.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef TYPES_HXX
-#define TYPES_HXX
-
-#include <vector>
-#include <cstddef> // std::size_t
-
-#include <xsd-frontend/types.hxx>
-
-using std::size_t;
-
-using XSDFrontend::String;
-using XSDFrontend::NarrowString;
-
-typedef std::vector<NarrowString> NarrowStrings;
-
-#endif // TYPES_HXX
diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx
deleted file mode 100644
index bcf7307..0000000
--- a/xsd/xsd.cxx
+++ /dev/null
@@ -1,1126 +0,0 @@
-// file : xsd/xsd.cxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#include <map>
-#include <vector>
-#include <memory> // std::auto_ptr
-#include <cstddef> // std::size_t
-#include <iostream>
-#include <fstream>
-
-#include <xercesc/util/PlatformUtils.hpp>
-
-#include <cutl/re.hxx>
-
-#include <xsd-frontend/parser.hxx>
-#include <xsd-frontend/transformations/anonymous.hxx>
-#include <xsd-frontend/transformations/enum-synthesis.cxx>
-#include <xsd-frontend/transformations/restriction.hxx>
-#include <xsd-frontend/transformations/schema-per-type.hxx>
-#include <xsd-frontend/transformations/simplifier.hxx>
-
-#include <cxx/tree/options.hxx>
-#include <cxx/parser/options.hxx>
-
-#include <cxx/tree/generator.hxx>
-#include <cxx/parser/generator.hxx>
-
-#include <processing/cardinality/processor.hxx>
-#include <processing/inheritance/processor.hxx>
-
-#include <xsd.hxx>
-#include <types.hxx>
-#include <options.hxx>
-
-#include "../libxsd/xsd/cxx/version.hxx"
-
-namespace SemanticGraph = XSDFrontend::SemanticGraph;
-namespace Transformations = XSDFrontend::Transformations;
-
-using namespace std;
-
-//
-//
-struct LocationTranslator: XSDFrontend::LocationTranslator
-{
- struct Failed {};
-
- LocationTranslator (NarrowStrings const& map,
- NarrowStrings const& regex,
- bool trace);
-
- virtual NarrowString
- translate (NarrowString const&);
-
-private:
- typedef map<NarrowString, NarrowString> Map;
-
- typedef cutl::re::regexsub Regex;
- typedef cutl::re::format RegexFormat;
- typedef vector<Regex> RegexVector;
-
- typedef map<NarrowString, NarrowString> Cache;
-
- Map map_;
- RegexVector regex_;
- Cache cache_;
- bool trace_;
-};
-
-//
-//
-struct AnonymousNameTranslator: Transformations::AnonymousNameTranslator
-{
- struct Failed {};
-
- AnonymousNameTranslator (NarrowStrings const& regex, bool trace);
-
- virtual String
- translate (String const& file,
- String const& ns,
- String const& name,
- String const& xpath);
-
-private:
- typedef cutl::re::wregexsub Regex;
- typedef cutl::re::wformat RegexFormat;
- typedef vector<Regex> RegexVector;
-
- RegexVector regex_;
- bool trace_;
-
-};
-
-//
-//
-struct SchemaPerTypeTranslator: Transformations::SchemaPerTypeTranslator
-{
- struct Failed {};
-
- SchemaPerTypeTranslator (NarrowStrings const& type_regex,
- bool type_trace,
- NarrowStrings const& schema_regex,
- bool schema_trace);
-
- virtual String
- translate_type (String const& ns, String const& name);
-
- virtual NarrowString
- translate_schema (NarrowString const& file);
-
-private:
- typedef cutl::re::wregexsub TypeRegex;
- typedef cutl::re::wformat TypeRegexFormat;
- typedef vector<TypeRegex> TypeRegexVector;
-
- TypeRegexVector type_regex_;
- bool type_trace_;
-
- typedef cutl::re::regexsub SchemaRegex;
- typedef cutl::re::format SchemaRegexFormat;
- typedef vector<SchemaRegex> SchemaRegexVector;
-
- SchemaRegexVector schema_regex_;
- bool schema_trace_;
-};
-
-//
-//
-struct XercesInitializer
-{
- XercesInitializer ()
- {
- xercesc::XMLPlatformUtils::Initialize ();
- }
-
- ~XercesInitializer ()
- {
- xercesc::XMLPlatformUtils::Terminate ();
- }
-};
-
-// Expand the \n escape sequence.
-//
-void
-expand_nl (NarrowString& s);
-
-int
-main (int argc, char* argv[])
-{
- wostream& e (wcerr);
-
- try
- {
- cli::argv_file_scanner args (argc, argv, "--options-file");
- help_options help_ops (args, cli::unknown_mode::stop);
-
- NarrowString cmd;
- if (args.more ())
- cmd = args.next ();
-
- if (help_ops.version () || cmd == "version")
- {
- wostream& o (wcout);
-
- o << "CodeSynthesis XSD XML Schema to C++ compiler " <<
- XSD_STR_VERSION << endl
- << "Copyright (c) 2005-2020 Code Synthesis Tools CC." << endl;
-
- if (!help_ops.proprietary_license () && cmd == "version")
- {
- // Parse the options after the command to detect trailing
- // --proprietary-license.
- //
- help_ops = help_options (args, cli::unknown_mode::stop);
- }
-
- if (help_ops.proprietary_license ())
- {
- o << "The compiler was invoked in the Proprietary License mode. You "
- << "should have\nreceived a proprietary license from Code Synthesis "
- << "Tools CC that entitles\nyou to use it in this mode." << endl;
- }
- else
- {
- o << "This is free software; see the source for copying conditions. "
- << "There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS "
- << "FOR A PARTICULAR PURPOSE." << endl;
- }
-
- return 0;
- }
-
- if (help_ops.help () || cmd == "help")
- {
- wostream& o (wcout);
-
- if (cmd == "help" && args.more ())
- {
- NarrowString arg (args.next ());
-
- if (arg == "cxx-tree")
- {
- o << "Usage: " << argv[0] << " cxx-tree [options] file [file ...]"
- << endl
- << "Options:" << endl;
-
- CXX::Tree::Generator::usage ();
- }
- else if (arg == "cxx-parser")
- {
- o << "Usage: " << argv[0] << " cxx-parser [options] file [file ...]"
- << endl
- << "Options:" << endl;
-
- CXX::Parser::Generator::usage ();
- }
- else
- {
- o << "error: unknown command '" << arg.c_str () << "'" << endl
- << "info: try '" << argv[0] << " help' for the list of commands"
- << endl;
-
- return 1;
- }
-
- // Add frontend options at the end.
- //
- options::print_usage (o);
- }
- else
- {
- o << "Usage: " << argv[0] << " <cmd> ..." << endl
- << "Commands:" << endl;
-
- o << " help Print usage information and exit. Use\n"
- << " 'help <cmd>' for command-specific options."
- << endl;
-
- o << " version Print version and exit."
- << endl;
-
- o << " cxx-tree Generate the C++/Tree mapping."
- << endl;
-
- o << " cxx-parser Generate the C++/Parser mapping."
- << endl;
- }
-
- return 0;
- }
-
- if (cmd.empty ())
- {
- e << "error: no command specified" << endl
- << "info: try '" << argv[0] << " help' for usage information" << endl;
-
- return 1;
- }
-
- if (cmd != "cxx-tree" && cmd != "cxx-parser")
- {
- e << "error: unknown command '" << cmd.c_str () << "'" << endl
- << "info: try '" << argv[0] << " help' for the list of commands"
- << endl;
-
- return 1;
- }
-
- // We need to parse command line options before we can get to
- // the arguments.
- //
- auto_ptr<CXX::Tree::options> tree_ops (
- cmd == "cxx-tree" ? new CXX::Tree::options (args) : 0);
-
- auto_ptr<CXX::Parser::options> parser_ops (
- cmd == "cxx-parser" ? new CXX::Parser::options (args) : 0);
-
- CXX::options& common_ops (
- cmd == "cxx-tree"
- ? static_cast<CXX::options&> (*tree_ops)
- : static_cast<CXX::options&> (*parser_ops));
-
- // Disabled warnings.
- //
- WarningSet disabled_w;
- {
- NarrowStrings const& w (common_ops.disable_warning ());
-
- for (NarrowStrings::const_iterator i (w.begin ()); i != w.end (); ++i)
- disabled_w.insert (*i);
- }
-
- bool disabled_w_all (disabled_w.find ("all") != disabled_w.end ());
-
- if (common_ops.morph_anonymous () &&
- !disabled_w_all &&
- disabled_w.find ("D001") == disabled_w.end ())
- {
- e << "warning D001: the --morph-anonymous option is on by default and "
- << "no longer required"
- << endl;
- }
-
- // Collect all the files to compile in a vector.
- //
- NarrowStrings files;
-
- while (args.more ())
- files.push_back (args.next ());
-
- if (files.empty ())
- {
- e << "error: no input file specified" << endl;
- return 1;
- }
-
- bool fpt (common_ops.file_per_type ());
-
- if (cmd == "cxx-tree" || cmd == "cxx-parser")
- {
- bool gen (common_ops.generate_xml_schema ());
- bool use (common_ops.extern_xml_schema ());
-
- // Things get complicated when we are compiling several schemas at
- // once (non-file-per-type mode) and use the --generate-xml-schema/
- // --extern-xml-schema options. The only way we can figure out which
- // file corresponds to XML Schema is if the --extern-xml-schema option
- // is also present. So we are going to require it for this case,
- // especially since it generally makes sense.
- //
- if (!fpt)
- {
- if (files.size () > 1 && gen && !use)
- {
- e << "error: --extern-xml-schema is required when compiling more "
- << "than one schema and --generate-xml-schema is specified"
- << endl;
-
- return 1;
- }
-
- if (files.size () == 1 && gen && use)
- {
- e << "error: --generate-xml-schema and --extern-xml-schema are "
- << "mutually exclusive when compiling a single schema" << endl;
-
- return 1;
- }
- }
- else
- {
- // The --file-per-type and --generate-xml-schema options are
- // incompatible. It also makes sense to use --file-per-type
- // and --extern-xml-schema.
- //
- if (gen)
- {
- e << "error: --file-per-type and --generate-xml-schema are "
- << "incompatible" << endl
- << "info: use --generate-xml-schema in a separate invocation "
- << "of the compiler" << endl;
-
- return 1;
- }
-
- if (!use &&
- !disabled_w_all && disabled_w.find ("D002") == disabled_w.end ())
- {
- e << "warning D002: --extern-xml-schema is recommended when "
- << "--file-per-type is specified to reduce generated code size"
- << endl;
- }
- }
- }
-
- //
- //
- FileList file_list;
- AutoUnlinks unlinks;
- size_t sloc (0);
-
- LocationTranslator loc_translator (
- common_ops.location_map (),
- common_ops.location_regex (),
- common_ops.location_regex_trace ());
-
- AnonymousNameTranslator anon_translator (
- common_ops.anonymous_regex (),
- common_ops.anonymous_regex_trace ());
-
- // Load custom string literals, if any.
- //
- CXX::StringLiteralMap string_literal_map;
-
- if (NarrowString file = common_ops.custom_literals ())
- {
- XercesInitializer xerces_init;
-
- if (!CXX::read_literal_map (file, string_literal_map))
- {
- // Diagnostics has already been issued.
- //
- return 1;
- }
- }
-
- if (!fpt)
- {
- // File-per-schema compilation mode.
- //
-
- for (size_t i (0); i < files.size (); ++i)
- {
- // Parse schema.
- //
- SemanticGraph::Path tu;
-
- try
- {
- tu = SemanticGraph::Path (files[i]);
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- e << "error: '" << files[i].c_str () << "' is not a valid "
- << "filesystem path" << endl;
-
- return 1;
- }
-
- XSDFrontend::Parser parser (
- cmd != "cxx-tree",
- !common_ops.disable_multi_import (),
- !common_ops.disable_full_check (),
- loc_translator,
- disabled_w);
-
- auto_ptr<SemanticGraph::Schema> schema;
-
- if (cmd == "cxx-tree" || cmd == "cxx-parser")
- {
- // See if we are generating code for the XML Schema namespace.
- // We could be compiling several schemas at once in which case
- // handling of the --generate-xml-schema option gets tricky: we
- // will need to rely on the presence of the --extern-xml-schema
- // to tell us which (fake) schema file corresponds to XML Schema.
- //
- bool gen_xml_schema (common_ops.generate_xml_schema ());
-
- if (gen_xml_schema)
- {
- if (NarrowString name = common_ops.extern_xml_schema ())
- {
- if (tu.string () != name)
- gen_xml_schema = false;
- }
- }
-
- if (gen_xml_schema)
- schema = parser.xml_schema (tu);
- else
- schema = parser.parse (tu);
- }
- else
- schema = parser.parse (tu);
-
- // Morph anonymous types.
- //
- if (!common_ops.preserve_anonymous ())
- {
- try
- {
- Transformations::Anonymous trans (anon_translator);
- trans.transform (*schema, tu, true);
- }
- catch (Transformations::Anonymous::Failed const&)
- {
- return 1; // Diagnostic has already been issued.
- }
- }
-
- // Synthesize enumerations from unions.
- //
- if (cmd == "cxx-tree")
- {
- Transformations::EnumSynthesis trans;
- trans.transform (*schema, tu);
- }
-
- // Simplify the schema graph.
- //
- if (cmd == "cxx-parser")
- {
- Transformations::Simplifier trans;
- trans.transform (*schema, tu);
- }
-
- // Try to rearrange definitions so that there is no forward
- // inheritance.
- //
- try
- {
- Processing::Inheritance::Processor proc;
- proc.process (*schema, tu);
- }
- catch (Processing::Inheritance::Processor::Failed const&)
- {
- return 1; // Diagnostic has already been issued.
- }
-
- // Normalize and annotate complex content restrictions.
- //
- if (cmd == "cxx-parser")
- {
- try
- {
- Transformations::Restriction trans;
- trans.transform (*schema, tu);
- }
- catch (Transformations::Restriction::Failed const&)
- {
- return 1; // Diagnostic has already been issued.
- }
- }
-
- // Calculate cardinality.
- //
- {
- Processing::Cardinality::Processor proc;
- proc.process (*schema, tu);
- }
-
- // Generate mapping.
- //
- if (cmd == "cxx-tree")
- {
- try
- {
- sloc += CXX::Tree::Generator::generate (
- *tree_ops,
- *schema,
- tu,
- false,
- string_literal_map,
- disabled_w,
- file_list,
- unlinks);
- }
- catch (CXX::Tree::Generator::Failed const&)
- {
- // Diagnostic has already been issued.
- //
- return 1;
- }
- }
- else if (cmd == "cxx-parser")
- {
- try
- {
- sloc += CXX::Parser::Generator::generate (
- *parser_ops,
- *schema,
- tu,
- false,
- string_literal_map,
- true,
- disabled_w,
- file_list,
- unlinks);
- }
- catch (CXX::Parser::Generator::Failed const&)
- {
- // Diagnostic has already been issued.
- //
- return 1;
- }
- }
- }
- }
- else
- {
- // File-per-type compilation mode.
- //
- SemanticGraph::Paths paths;
-
- for (size_t i (0); i < files.size (); ++i)
- {
- try
- {
- paths.push_back (SemanticGraph::Path (files[i]));
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- e << "error: '" << files[i].c_str () << "' is not a valid "
- << "filesystem path" << endl;
-
- return 1;
- }
- }
-
- if (cmd == "cxx-parser" &&
- paths.size () > 1 &&
- parser_ops->generate_test_driver ())
- {
- e << "info: generating test driver for the first schema only: '" <<
- paths[0] << "'" << endl;
- }
-
- XSDFrontend::Parser parser (
- cmd != "cxx-tree",
- !common_ops.disable_multi_import (),
- !common_ops.disable_full_check (),
- loc_translator,
- disabled_w);
-
- auto_ptr<SemanticGraph::Schema> schema (parser.parse (paths));
-
- // Morph anonymous types.
- //
- if (!common_ops.preserve_anonymous ())
- {
- try
- {
- Transformations::Anonymous trans (anon_translator);
- trans.transform (*schema, SemanticGraph::Path (), false);
- }
- catch (Transformations::Anonymous::Failed const&)
- {
- return 1; // Diagnostic has already been issued.
- }
- }
-
- // Synthesize enumerations from unions.
- //
- if (cmd == "cxx-tree")
- {
- Transformations::EnumSynthesis trans;
- trans.transform (*schema, SemanticGraph::Path ());
- }
-
- // Simplify the schema graph.
- //
- if (cmd == "cxx-parser")
- {
- Transformations::Simplifier trans;
- trans.transform (*schema, SemanticGraph::Path ());
- }
-
- // Normalize and annotate complex content restrictions.
- //
- if (cmd == "cxx-parser")
- {
- try
- {
- Transformations::Restriction trans;
- trans.transform (*schema, SemanticGraph::Path ());
- }
- catch (Transformations::Restriction::Failed const&)
- {
- return 1; // Diagnostic has already been issued.
- }
- }
-
- // Calculate cardinality.
- //
- {
- Processing::Cardinality::Processor proc;
- proc.process (*schema, SemanticGraph::Path ());
- }
-
- // Rearrange the graph so that each type is in a seperate
- // schema file.
- //
- typedef vector<SemanticGraph::Schema*> Schemas;
-
- SchemaPerTypeTranslator type_translator (
- common_ops.type_file_regex (),
- common_ops.type_file_regex_trace (),
- common_ops.schema_file_regex (),
- common_ops.schema_file_regex_trace ());
-
- Transformations::SchemaPerType trans (
- type_translator,
- common_ops.fat_type_file ());
-
- Schemas schemas (trans.transform (*schema));
-
- // Generate code.
- //
- for (Schemas::iterator b (schemas.begin ()), i (b), e (schemas.end ());
- i != e; ++i)
- {
- SemanticGraph::Schema& s (**i);
- SemanticGraph::Path path (
- s.context ().count ("renamed")
- ? s.context ().get<SemanticGraph::Path> ("renamed")
- : s.used_begin ()->path ());
-
- if (cmd == "cxx-tree")
- {
- try
- {
- sloc += CXX::Tree::Generator::generate (
- *tree_ops,
- s,
- path,
- true,
- string_literal_map,
- disabled_w,
- file_list,
- unlinks);
- }
- catch (CXX::Tree::Generator::Failed const&)
- {
- // Diagnostic has already been issued.
- //
- return 1;
- }
- }
- else if (cmd == "cxx-parser")
- {
- try
- {
- // Only generate driver for the first schema.
- //
- sloc += CXX::Parser::Generator::generate (
- *parser_ops,
- s,
- path,
- true,
- string_literal_map,
- i == b,
- disabled_w,
- file_list,
- unlinks);
- }
- catch (CXX::Parser::Generator::Failed const&)
- {
- // Diagnostic has already been issued.
- //
- return 1;
- }
- }
- }
- }
-
- // See if we need to produce the file list.
- //
- if (NarrowString fl = common_ops.file_list ())
- {
- typedef std::ofstream OutputFileStream;
-
- try
- {
- OutputFileStream ofs;
- SemanticGraph::Path path (fl);
-
- ofs.open (path.string ().c_str (), ios_base::out);
-
- if (!ofs.is_open ())
- {
- wcerr << path << ": error: unable to open in write mode" << endl;
- return 1;
- }
-
- NarrowString d (common_ops.file_list_delim ());
- expand_nl (d);
-
- if (NarrowString p = common_ops.file_list_prologue ())
- {
- expand_nl (p);
- ofs << p;
- }
-
- for (FileList::iterator i (file_list.begin ()), e (file_list.end ());
- i != e;)
- {
- ofs << *i;
-
- if (++i != e)
- ofs << d;
- }
-
- if (NarrowString e = common_ops.file_list_epilogue ())
- {
- expand_nl (e);
- ofs << e;
- }
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- wcerr << "error: '" << fl.c_str () << "' is not a valid "
- << "filesystem path" << endl;
- return 1;
- }
- }
-
- if (common_ops.show_sloc ())
- e << "total: " << sloc << endl;
-
- if (size_t sloc_limit = common_ops.sloc_limit ())
- {
- if (sloc_limit < sloc)
- {
- e << "error: SLOC limit of " << sloc_limit
- << " lines has been exceeded" << endl;
-
- return 1;
- }
- }
-
- unlinks.cancel ();
-
- return 0;
- }
- catch (LocationTranslator::Failed const&)
- {
- // Diagnostic has already been issued.
- }
- catch (AnonymousNameTranslator::Failed const&)
- {
- // Diagnostic has already been issued.
- }
- catch (SchemaPerTypeTranslator::Failed const&)
- {
- // Diagnostic has already been issued.
- }
- catch (Transformations::SchemaPerType::Failed const&)
- {
- // Diagnostic has already been issued.
- }
- catch (XSDFrontend::InvalidSchema const&)
- {
- // Diagnostic has already been issued.
- }
- catch (cli::exception const& ex)
- {
- wcerr << ex << endl;
- wcerr << "try '" << argv[0] << " help' for usage information" << endl;
- }
-
- return 1;
-}
-
-// LocationTranslator
-//
-
-LocationTranslator::
-LocationTranslator (NarrowStrings const& map,
- NarrowStrings const& regex,
- bool trace)
- : trace_ (trace)
-{
- // Map.
- //
- for (NarrowStrings::const_iterator i (map.begin ()); i != map.end (); ++i)
- {
- // Split the string in two parts at the last '='.
- //
- size_t pos (i->rfind ('='));
-
- if (pos == NarrowString::npos)
- {
- wcerr << "error: invalid location map: '" << i->c_str () <<
- "': delimiter ('=') not found" << endl;
-
- throw Failed ();
- }
-
- map_[NarrowString (*i, 0, pos)] = NarrowString (*i, pos + 1);
- }
-
- // Regex.
- //
- for (NarrowStrings::const_iterator i (regex.begin ()); i != regex.end (); ++i)
- {
- try
- {
- regex_.push_back (Regex (*i));
- }
- catch (RegexFormat const& e)
- {
- wcerr << "error: invalid location regex: '" <<
- e.regex ().c_str () << "': " <<
- e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
-}
-
-NarrowString LocationTranslator::
-translate (NarrowString const& l)
-{
- // First check the cache.
- //
- Cache::const_iterator ci (cache_.find (l));
-
- if (ci != cache_.end ())
- return ci->second;
-
- // Then check the direct map.
- //
- Map::const_iterator mi (map_.find (l));
-
- if (mi != map_.end ())
- {
- cache_[l] = mi->second;
- return mi->second;
- }
-
- // Finally try regex.
- //
- if (trace_)
- wcerr << "location: '" << l.c_str () << "'" << endl;
-
- for (RegexVector::reverse_iterator i (regex_.rbegin ());
- i != regex_.rend (); ++i)
- {
- if (trace_)
- wcerr << "try: '" << i->regex ().str ().c_str () << "' : ";
-
- if (i->match (l))
- {
- NarrowString r (i->replace (l));
-
- if (trace_)
- wcerr << "'" << r.c_str () << "' : +" << endl;
-
- cache_[l] = r;
- return r;
- }
-
- if (trace_)
- wcerr << '-' << endl;
- }
-
- // No match - return the original location.
- //
- cache_[l] = l;
- return l;
-}
-
-// AnonymousNameTranslator
-//
-
-AnonymousNameTranslator::
-AnonymousNameTranslator (NarrowStrings const& regex, bool trace)
- : trace_ (trace)
-{
- for (NarrowStrings::const_iterator i (regex.begin ()); i != regex.end (); ++i)
- {
- try
- {
- regex_.push_back (Regex (String (*i)));
- }
- catch (RegexFormat const& e)
- {
- wcerr << "error: invalid anonymous type regex: '" <<
- e.regex () << "': " << e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
-}
-
-String AnonymousNameTranslator::
-translate (String const& file,
- String const& ns,
- String const& name,
- String const& xpath)
-{
- String s (file + L' ' + ns + L' ' + xpath);
-
- if (trace_)
- wcerr << "anonymous type: '" << s << "'" << endl;
-
- for (RegexVector::reverse_iterator i (regex_.rbegin ());
- i != regex_.rend (); ++i)
- {
- if (trace_)
- wcerr << "try: '" << i->regex () << "' : ";
-
- if (i->match (s))
- {
- String r (i->replace (s));
-
- if (trace_)
- wcerr << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (trace_)
- wcerr << '-' << endl;
- }
-
- // No match - return the name.
- //
- return name;
-}
-
-// SchemaPerTypeTranslator
-//
-
-SchemaPerTypeTranslator::
-SchemaPerTypeTranslator (NarrowStrings const& type_regex,
- bool type_trace,
- NarrowStrings const& schema_regex,
- bool schema_trace)
- : type_trace_ (type_trace), schema_trace_ (schema_trace)
-{
- for (NarrowStrings::const_iterator i (type_regex.begin ());
- i != type_regex.end (); ++i)
- {
- try
- {
- type_regex_.push_back (TypeRegex (String (*i)));
- }
- catch (TypeRegexFormat const& e)
- {
- wcerr << "error: invalid type file regex: '" <<
- e.regex () << "': " << e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
-
- for (NarrowStrings::const_iterator i (schema_regex.begin ());
- i != schema_regex.end (); ++i)
- {
- try
- {
- schema_regex_.push_back (SchemaRegex (*i));
- }
- catch (SchemaRegexFormat const& e)
- {
- wcerr << "error: invalid type file regex: '" <<
- e.regex ().c_str () << "': " << e.description ().c_str () << endl;
-
- throw Failed ();
- }
- }
-}
-
-String SchemaPerTypeTranslator::
-translate_type (String const& ns, String const& name)
-{
- String s (ns + L' ' + name);
-
- if (type_trace_)
- wcerr << "type: '" << s << "'" << endl;
-
- for (TypeRegexVector::reverse_iterator i (type_regex_.rbegin ());
- i != type_regex_.rend (); ++i)
- {
- if (type_trace_)
- wcerr << "try: '" << i->regex () << "' : ";
-
- if (i->match (s))
- {
- String r (i->replace (s));
-
- if (type_trace_)
- wcerr << "'" << r << "' : +" << endl;
-
- return r;
- }
-
- if (type_trace_)
- wcerr << '-' << endl;
- }
-
- // No match - return empty string.
- //
- return L"";
-}
-
-NarrowString SchemaPerTypeTranslator::
-translate_schema (NarrowString const& file)
-{
- if (schema_trace_)
- wcerr << "schema: '" << file.c_str () << "'" << endl;
-
- for (SchemaRegexVector::reverse_iterator i (schema_regex_.rbegin ());
- i != schema_regex_.rend (); ++i)
- {
- if (schema_trace_)
- wcerr << "try: '" << i->regex ().str ().c_str () << "' : ";
-
- if (i->match (file))
- {
- NarrowString r (i->replace (file));
-
- if (schema_trace_)
- wcerr << "'" << r.c_str () << "' : +" << endl;
-
- return r;
- }
-
- if (schema_trace_)
- wcerr << '-' << endl;
- }
-
- // No match - return empty string.
- //
- return "";
-}
-
-//
-//
-void
-expand_nl (NarrowString& s)
-{
- for (size_t i (0); i < s.size ();)
- {
- if (s[i] == '\\' && (i + 1) < s.size () && s[i + 1] == 'n')
- {
- NarrowString tmp (s, 0, i);
- tmp += '\n';
- tmp.append (s.c_str () + i + 2);
- s = tmp;
- }
- else
- ++i;
- }
-}
diff --git a/xsd/xsd.hxx b/xsd/xsd.hxx
deleted file mode 100644
index f1bbd5f..0000000
--- a/xsd/xsd.hxx
+++ /dev/null
@@ -1,24 +0,0 @@
-// file : xsd/xsd.hxx
-// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-
-#ifndef XSD_HXX
-#define XSD_HXX
-
-#include <set>
-#include <vector>
-#include <cstdio> // std::remove
-
-#include <cutl/shared-ptr.hxx>
-#include <cutl/fs/auto-remove.hxx>
-
-#include <xsd-frontend/semantic-graph/elements.hxx> // Path
-
-#include <types.hxx>
-
-typedef std::set<NarrowString> WarningSet;
-typedef std::vector<NarrowString> FileList;
-
-typedef cutl::fs::auto_remove AutoUnlink;
-typedef cutl::fs::auto_removes AutoUnlinks;
-
-#endif // XSD_HXX
diff --git a/xsd/xsd/.gitignore b/xsd/xsd/.gitignore
new file mode 100644
index 0000000..2d9360c
--- /dev/null
+++ b/xsd/xsd/.gitignore
@@ -0,0 +1,3 @@
+xsd
+options.?xx
+version.hxx
diff --git a/xsd/xsd/buildfile b/xsd/xsd/buildfile
new file mode 100644
index 0000000..49fbf2c
--- /dev/null
+++ b/xsd/xsd/buildfile
@@ -0,0 +1,68 @@
+# file : xsd/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+import libs = libxsd-frontend%lib{xsd-frontend}
+import libs += libcutl%lib{cutl}
+import libs += libxerces-c%lib{xerces-c}
+
+options_topics = options cxx/options cxx/parser/options cxx/tree/options
+
+./: exe{xsd}: {hxx ixx txx cxx}{** -{$options_topics} -version} \
+ {hxx ixx cxx}{$options_topics} \
+ {hxx}{version} \
+ $libs
+
+# Target metadata, see also --build2-metadata in xsd.cxx.
+#
+exe{xsd}:
+{
+ export.metadata = 1 xsd
+ xsd.name = [string] xsd
+ xsd.version = $version
+ xsd.checksum = $version
+}
+
+hxx{version}: in{version} $src_root/manifest
+
+# Build options.
+#
+# Pass the copyright notice extracted from the LICENSE file.
+#
+obj{xsd cxx/parser/generator cxx/tree/generator}: \
+ cxx.poptions += -DXSD_COPYRIGHT=\"$copyright\"
+
+# Generated options parser.
+#
+if $cli.configured
+{
+ cli.cxx{options}: cli{options}
+ cxx/cli.cxx{options}: cxx/cli{options}
+ cxx/parser/cli.cxx{options}: cxx/parser/cli{options}
+ cxx/tree/cli.cxx{options}: cxx/tree/cli{options}
+
+ cli.options += --std c++11 -I $src_root --generate-specifier \
+--ostream-type ::std::wostream --exclude-base --suppress-undocumented \
+--generate-file-scanner --include-with-brackets --option-length 28 \
+--cxx-prologue '#include <xsd/options-parser.hxx>'
+
+ cli.cxx{options}: cli.options += --include-prefix xsd --guard-prefix XSD
+
+ cxx/cli.cxx{options}: cli.options += --include-prefix xsd/cxx \
+ --guard-prefix XSD_CXX
+
+ cxx/parser/cli.cxx{options}: cli.options += --include-prefix xsd/cxx/parser \
+ --guard-prefix XSD_CXX_PARSER
+
+ cxx/tree/cli.cxx{options}: cli.options += --include-prefix xsd/cxx/tree \
+ --guard-prefix XSD_CXX_TREE
+
+ # Include the generated cli files into the distribution and don't remove
+ # them when cleaning in src (so that clean results in a state identical to
+ # distributed).
+ #
+ cli.cxx{*}:
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+}
diff --git a/xsd/xsd/cxx/elements.cxx b/xsd/xsd/cxx/elements.cxx
new file mode 100644
index 0000000..e914f9d
--- /dev/null
+++ b/xsd/xsd/cxx/elements.cxx
@@ -0,0 +1,1322 @@
+// file : xsd/cxx/elements.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/elements.hxx>
+
+#include <cctype> // std::toupper
+#include <memory>
+#include <sstream>
+#include <fstream>
+#include <cassert>
+#include <iostream>
+
+using std::wcerr;
+using std::endl;
+
+namespace CXX
+{
+ //
+ //
+ wchar_t
+ upcase (wchar_t c)
+ {
+ return std::toupper (c);
+ }
+
+ namespace
+ {
+ wchar_t const* keywords[] = {
+ L"NULL",
+ L"and",
+ L"asm",
+ L"auto",
+ L"bitand",
+ L"bitor",
+ L"bool",
+ L"break",
+ L"case",
+ L"catch",
+ L"char",
+ L"class",
+ L"compl",
+ L"const",
+ L"const_cast",
+ L"continue",
+ L"default",
+ L"delete",
+ L"do",
+ L"double",
+ L"dynamic_cast",
+ L"else",
+ L"end_eq",
+ L"enum",
+ L"explicit",
+ L"export",
+ L"extern",
+ L"false",
+ L"float",
+ L"for",
+ L"friend",
+ L"goto",
+ L"if",
+ L"inline",
+ L"int",
+ L"long",
+ L"mutable",
+ L"namespace",
+ L"new",
+ L"not",
+ L"not_eq",
+ L"operator",
+ L"or",
+ L"or_eq",
+ L"private",
+ L"protected",
+ L"public",
+ L"register",
+ L"reinterpret_cast",
+ L"return",
+ L"short",
+ L"signed",
+ L"sizeof",
+ L"static",
+ L"static_cast",
+ L"struct",
+ L"switch",
+ L"template",
+ L"this",
+ L"throw",
+ L"true",
+ L"try",
+ L"typedef",
+ L"typeid",
+ L"typename",
+ L"union",
+ L"unsigned",
+ L"using",
+ L"virtual",
+ L"void",
+ L"volatile",
+ L"wchar_t",
+ L"while",
+ L"xor",
+ L"xor_eq"
+ };
+ }
+
+ // Context
+ //
+
+ Context::
+ Context (std::wostream& o,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ options_type const& ops,
+ StringLiteralMap const* string_literal_map_)
+ : os (o),
+ schema_root (root),
+ schema_path (schema_path_),
+ options (ops),
+ std (ops.std ()),
+ char_type (char_type_),
+ char_encoding (char_encoding_),
+ L (L_),
+ string_type (string_type_),
+ auto_ptr (auto_ptr_),
+ string_literal_map (string_literal_map_),
+ type_exp (type_exp_),
+ inst_exp (inst_exp_),
+ inl (inl_),
+ ns_mapping_cache (ns_mapping_cache_),
+ schema_path_ (path),
+ xs_ns_ (0),
+ char_type_ (ops.char_type ()),
+ char_encoding_ (ops.char_encoding ()),
+ L_ (char_type == L"wchar_t" ? L"L" : L""),
+ inl_ (ops.generate_inline () ? L"inline\n" : L""),
+ cxx_id_expr_ (L"^(::)?([a-zA-Z_]\\w*)(::[a-zA-Z_]\\w*)*$"),
+ cxx_id_expr (cxx_id_expr_),
+ urn_mapping_ (L"#^urn.*:([a-zA-Z_].*)$#$1#"),
+ urn_mapping (urn_mapping_),
+ nsr_mapping (nsr_mapping_),
+ nsm_mapping (nsm_mapping_),
+ include_mapping (include_mapping_),
+ reserved_name_map (reserved_name_map_),
+ keyword_set (keyword_set_)
+ {
+ // Export symbol.
+ //
+ {
+ String es (ops.export_symbol ());
+ type_exp_ = es ? es + L" " : es;
+ inst_exp_ = es ? es + L"\n" : es;
+ }
+
+ // Resolve and cache XML Schema namespace.
+ //
+ {
+ SemanticGraph::Nameable* n;
+
+ if (schema_root.names_begin ()->name () ==
+ L"http://www.w3.org/2001/XMLSchema")
+ {
+ // schema_root is the XML Schema itself.
+ //
+ n = &schema_root.names_begin ()->named ();
+ }
+ else
+ {
+ // Otherwise, the first used schema is implied XML Schema.
+ //
+ SemanticGraph::Uses& u = *schema_root.uses_begin ();
+ assert (u.is_a<SemanticGraph::Implies> ());
+ n = &u.schema ().names_begin ()->named ();
+ }
+
+ xs_ns_ = dynamic_cast<SemanticGraph::Namespace*> (n);
+ }
+
+ // String type.
+ //
+ if (char_type == L"char")
+ string_type_ = L"::std::string";
+ else if (char_type == L"wchar_t")
+ string_type_ = L"::std::wstring";
+ else
+ string_type_ = L"::std::basic_string< " + char_type + L" >";
+
+ // Automatic pointer type.
+ //
+ auto_ptr_ = std >= cxx_version::cxx11
+ ? "::std::unique_ptr"
+ : "::std::auto_ptr";
+
+ // Default encoding.
+ //
+ if (!char_encoding)
+ {
+ if (char_type == L"char")
+ char_encoding = L"utf8";
+ else
+ char_encoding = L"auto";
+ }
+
+ // Default mapping.
+ //
+ nsr_mapping_.push_back (
+ Regex (L"#^.* (.*?/)??" L"(([a-zA-Z_]\\w*)(/[a-zA-Z_]\\w*)*)/?$#$2#"));
+ nsr_mapping_.push_back (
+ Regex (L"#^.* http://www\\.w3\\.org/2001/XMLSchema$#xml_schema#"));
+
+ // Custom regex mapping.
+ //
+ for (NarrowStrings::const_iterator i (ops.namespace_regex ().begin ()),
+ e (ops.namespace_regex ().end ()); i != e; ++i)
+ {
+ nsr_mapping_.push_back (Regex (String (*i)));
+ }
+
+ // Custom direct mapping.
+ //
+ for (NarrowStrings::const_iterator i (ops.namespace_map ().begin ()),
+ e (ops.namespace_map ().end ()); i != e; ++i)
+ {
+ String s (*i);
+
+ // Split the string in two parts at the last '='.
+ //
+ size_t pos (s.rfind ('='));
+
+ if (pos == String::npos)
+ throw InvalidNamespaceMapping (s, "delimiter ('=') not found");
+
+ // Empty xml_ns designates the no-namespace case.
+ //
+ String xml_ns (s, 0, pos);
+ String cxx_ns (s, pos + 1);
+
+ if (!cxx_ns.empty () && !cxx_id_expr.match (cxx_ns))
+ throw InvalidNamespaceMapping (s, "invalid C++ identifier");
+
+ nsm_mapping_[xml_ns] = cxx_ns;
+ }
+
+ // Include path regex
+ //
+ for (NarrowStrings::const_iterator i (ops.include_regex ().begin ()),
+ e (ops.include_regex ().end ()); i != e; ++i)
+ {
+ include_mapping_.push_back (Regex (String (*i)));
+ }
+
+ // Reserved names.
+ //
+ for (NarrowStrings::const_iterator i (ops.reserved_name ().begin ()),
+ e (ops.reserved_name ().end ()); i != e; ++i)
+ {
+ String s (*i);
+
+ // Split the string in two parts at '='.
+ //
+ size_t pos (s.find ('='));
+
+ if (pos == String::npos)
+ reserved_name_map_[s] = L"";
+ else
+ reserved_name_map_[String (s, 0, pos)] = String (s, pos + 1);
+ }
+
+ // Populate the keyword set.
+ //
+ for (size_t i (0); i < sizeof (keywords) / sizeof (char*); ++i)
+ keyword_set_.insert (keywords[i]);
+ }
+
+ String Context::
+ ns_name (SemanticGraph::Namespace& ns)
+ {
+ using SemanticGraph::Schema;
+ using SemanticGraph::Includes;
+ using SemanticGraph::Imports;
+ using SemanticGraph::Implies;
+ using SemanticGraph::Sources;
+
+ String tmp;
+ MapMapping::const_iterator i (nsm_mapping.find (ns.name ()));
+
+ if (i != nsm_mapping.end ())
+ {
+ tmp = i->second;
+ }
+ else
+ {
+ SemanticGraph::Path path;
+ Schema& schema (dynamic_cast<Schema&> (ns.scope ()));
+
+ if (schema.used_p ())
+ {
+ // Here we need to detect a special multi-schema compilation
+ // case where the root schemas are imported into a special
+ // schema that doesn't have a namespace.
+ //
+ SemanticGraph::Uses& u (*schema.used_begin ());
+ SemanticGraph::Schema& s (u.user ());
+
+ if (s.names_begin () != s.names_end ())
+ path = u.path ();
+ }
+ else
+ path = schema_path;
+
+ String pair;
+
+ if (!path.empty ())
+ {
+ path.normalize ();
+
+ // Try to use the portable representation of the path. If that
+ // fails, fall back to the native representation.
+ //
+ try
+ {
+ pair = path.posix_string ();
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ pair = path.string ();
+ }
+ }
+
+ pair += L' ' + ns.name ();
+
+ // Check cache first
+ //
+ MappingCache::const_iterator i (ns_mapping_cache.find (pair));
+
+ if (i != ns_mapping_cache.end ())
+ {
+ tmp = i->second;
+ }
+ else
+ {
+ bool trace (options.namespace_regex_trace ());
+
+ if (trace)
+ wcerr << "namespace: '" << pair << "'" << endl;
+
+ bool found (false);
+ Regex colon (L"#/#::#");
+
+ for (RegexMapping::const_reverse_iterator e (nsr_mapping.rbegin ());
+ e != nsr_mapping.rend (); ++e)
+ {
+ if (trace)
+ wcerr << "try: '" << e->regex () << "' : ";
+
+ if (e->match (pair))
+ {
+ tmp = e->replace (pair);
+ tmp = colon.replace (tmp); // replace `/' with `::'
+
+ // Check the result.
+ //
+ found = cxx_id_expr.match (tmp);
+
+ if (trace)
+ wcerr << "'" << tmp << "' : ";
+ }
+
+ if (trace)
+ wcerr << (found ? '+' : '-') << endl;
+
+ if (found)
+ break;
+ }
+
+ if (!found)
+ {
+ String const& n (ns.name ());
+
+ // Check if the name is valid by itself.
+ //
+ if (n.empty ())
+ {
+ // Empty name denotes a no-namespace case.
+ //
+ tmp = n;
+ }
+ else
+ {
+ tmp = colon.replace (n); // replace `/' with `::'
+
+ if (!cxx_id_expr.match (tmp))
+ {
+ // See if this is a urn-style namespace.
+ //
+ if (urn_mapping.match (n))
+ {
+ Regex filter (L"#[.:-]#_#");
+ tmp = urn_mapping.replace (n);
+ tmp = filter.replace (tmp);
+
+ if (!cxx_id_expr.match (tmp))
+ throw NoNamespaceMapping (
+ ns.file (), ns.line (), ns.column (), ns.name ());
+ }
+ else
+ throw NoNamespaceMapping (
+ ns.file (), ns.line (), ns.column (), ns.name ());
+ }
+ }
+ }
+
+ // Add the mapping to the cache.
+ //
+ ns_mapping_cache[pair] = tmp;
+ }
+ }
+
+
+ // Parse resulting namespace string and id() each name.
+ //
+ String r;
+ String::size_type b (0), e;
+
+ do
+ {
+ e = tmp.find (L"::", b);
+
+ String name (tmp, b, e == tmp.npos ? e : e - b);
+
+ if (!name.empty ())
+ r += L"::" + escape (name);
+
+ b = e;
+
+ if (b == tmp.npos)
+ break;
+
+ b += 2;
+
+ } while (true);
+
+ return r;
+ }
+
+ SemanticGraph::Namespace& Context::
+ xs_ns ()
+ {
+ return *xs_ns_;
+ }
+
+ String Context::
+ xs_ns_name ()
+ {
+ return ns_name (*xs_ns_);
+ }
+
+ SemanticGraph::Namespace& Context::
+ namespace_ (SemanticGraph::Nameable& n)
+ {
+ // The basic idea goes like this: go up Names edges until you
+ // reach Namespace. There are, however, anonymous types which
+ // need special handling. In the case of an anonymous type we
+ // will go up the first Belongs edge (because the first edge
+ // is where the type was defined.
+ //
+
+ if (n.named_p ())
+ {
+ SemanticGraph::Scope& s (n.scope ());
+
+ SemanticGraph::Namespace* ns (
+ dynamic_cast<SemanticGraph::Namespace*> (&n));
+
+ return ns ? *ns : namespace_ (s);
+ }
+ else
+ {
+ SemanticGraph::Type& t (dynamic_cast<SemanticGraph::Type&> (n));
+
+ SemanticGraph::Belongs& b (*t.classifies_begin ());
+
+ return namespace_ (b.instance ());
+ }
+ }
+
+ String Context::
+ xml_ns_name (SemanticGraph::Nameable& n)
+ {
+ return namespace_ (n).name ();
+ }
+
+ String Context::
+ fq_name (SemanticGraph::Nameable& n, char const* name_key)
+ {
+ using namespace SemanticGraph;
+
+ String r;
+
+ if (dynamic_cast<Schema*> (&n))
+ {
+ return L""; // Map to global namespace.
+ }
+ else if (SemanticGraph::Namespace* ns =
+ dynamic_cast<SemanticGraph::Namespace*> (&n))
+ {
+ r = ns_name (*ns);
+ }
+ else
+ {
+ r = fq_name (n.scope ());
+ r += L"::";
+ r += n.context ().get<String> (name_key);
+ }
+
+ return r;
+ }
+
+ SemanticGraph::Type& Context::
+ ultimate_base (SemanticGraph::Complex& c)
+ {
+ using namespace SemanticGraph;
+
+ Type* b (&c.inherits ().base ());
+
+ while (true)
+ {
+ Complex* cb (dynamic_cast<Complex*> (b));
+
+ if (cb != 0 && cb->inherits_p ())
+ {
+ b = &cb->inherits ().base ();
+ continue;
+ }
+
+ break;
+ }
+
+ return *b;
+ }
+
+ String Context::
+ escape (String const& name)
+ {
+ String r;
+ size_t n (name.size ());
+
+ // In most common cases we will have that many chars.
+ //
+ r.reserve (n);
+
+ for (size_t i (0); i < n; ++i)
+ {
+ bool first (i == 0);
+
+ unsigned int u (unicode_char (name, i)); // May advance i.
+
+ if (first)
+ {
+ if (!((u >= 'a' && u <= 'z') ||
+ (u >= 'A' && u <= 'Z') ||
+ u == '_'))
+ r = (u >= '0' && u <= '9') ? L"cxx_" : L"cxx";
+ }
+
+ if (!((u >= 'a' && u <= 'z') ||
+ (u >= 'A' && u <= 'Z') ||
+ (u >= '0' && u <= '9') ||
+ u == '_'))
+ r.push_back ('_');
+ else
+ r.push_back (static_cast<wchar_t> (u));
+ }
+
+ if (r.empty ())
+ r = L"cxx";
+
+ // Custom reserved words.
+ //
+ ReservedNameMap::const_iterator i (reserved_name_map.find (r));
+
+ if (i != reserved_name_map.end ())
+ {
+ if (i->second)
+ return i->second;
+ else
+ r += L'_';
+ }
+
+ // Keywords
+ //
+ if (keyword_set.find (r) != keyword_set.end ())
+ {
+ r += L'_';
+
+ // Re-run custom words.
+ //
+ i = reserved_name_map.find (r);
+
+ if (i != reserved_name_map.end ())
+ {
+ if (i->second)
+ return i->second;
+ else
+ r += L'_';
+ }
+ }
+
+ return r;
+ }
+
+ // String escaping.
+ //
+
+ String
+ charlit (unsigned int u)
+ {
+ String r ("\\x");
+ bool lead (true);
+
+ for (int i (7); i >= 0; --i)
+ {
+ unsigned int x ((u >> (i * 4)) & 0x0F);
+
+ if (lead)
+ {
+ if (x == 0)
+ continue;
+
+ lead = false;
+ }
+
+ r += x < 10 ? ('0' + x) : ('A' + x - 10);
+ }
+
+ return r;
+ }
+
+ String
+ strlit_ascii (String const& str)
+ {
+ String r;
+ size_t n (str.size ());
+
+ // In most common cases we will have that many chars.
+ //
+ r.reserve (n + 2);
+
+ r += '"';
+
+ bool escape (false);
+
+ for (size_t i (0); i < n; ++i)
+ {
+ unsigned int u (Context::unicode_char (str, i)); // May advance i.
+
+ // [128 - ] - unrepresentable
+ // 127 - \x7F
+ // [32 - 126] - as is
+ // [0 - 31] - \X or \xXX
+ //
+
+ if (u < 32 || u == 127)
+ {
+ switch (u)
+ {
+ case L'\n':
+ {
+ r += L"\\n";
+ break;
+ }
+ case L'\t':
+ {
+ r += L"\\t";
+ break;
+ }
+ case L'\v':
+ {
+ r += L"\\v";
+ break;
+ }
+ case L'\b':
+ {
+ r += L"\\b";
+ break;
+ }
+ case L'\r':
+ {
+ r += L"\\r";
+ break;
+ }
+ case L'\f':
+ {
+ r += L"\\f";
+ break;
+ }
+ case L'\a':
+ {
+ r += L"\\a";
+ break;
+ }
+ default:
+ {
+ r += charlit (u);
+ escape = true;
+ break;
+ }
+ }
+ }
+ else if (u < 127)
+ {
+ if (escape)
+ {
+ // Close and open the string so there are no clashes.
+ //
+ r += '"';
+ r += '"';
+
+ escape = false;
+ }
+
+ switch (u)
+ {
+ case L'"':
+ {
+ r += L"\\\"";
+ break;
+ }
+ case L'\\':
+ {
+ r += L"\\\\";
+ break;
+ }
+ default:
+ {
+ r += static_cast<wchar_t> (u);
+ break;
+ }
+ }
+ }
+ else
+ {
+ // Unrepresentable character.
+ //
+ throw UnrepresentableCharacter (str, i + 1);
+ }
+ }
+
+ r += '"';
+
+ return r;
+ }
+
+ const unsigned int utf8_first_char_mask[5] =
+ {
+ 0x00, 0x00, 0xC0, 0xE0, 0xF0
+ };
+
+ String
+ strlit_utf8 (String const& str)
+ {
+ String r;
+ size_t n (str.size ());
+
+ // In most common cases we will have that many chars.
+ //
+ r.reserve (n + 2);
+
+ r += '"';
+
+ bool escape (false);
+
+ for (size_t i (0); i < n; ++i)
+ {
+ unsigned int u (Context::unicode_char (str, i)); // May advance i.
+
+ // [128 - ] - UTF-8
+ // 127 - \x7F
+ // [32 - 126] - as is
+ // [0 - 31] - \X or \xXX
+ //
+
+ if (u < 32 || u == 127)
+ {
+ switch (u)
+ {
+ case L'\n':
+ {
+ r += L"\\n";
+ break;
+ }
+ case L'\t':
+ {
+ r += L"\\t";
+ break;
+ }
+ case L'\v':
+ {
+ r += L"\\v";
+ break;
+ }
+ case L'\b':
+ {
+ r += L"\\b";
+ break;
+ }
+ case L'\r':
+ {
+ r += L"\\r";
+ break;
+ }
+ case L'\f':
+ {
+ r += L"\\f";
+ break;
+ }
+ case L'\a':
+ {
+ r += L"\\a";
+ break;
+ }
+ default:
+ {
+ r += charlit (u);
+ escape = true;
+ break;
+ }
+ }
+ }
+ else if (u < 127)
+ {
+ if (escape)
+ {
+ // Close and open the string so there are no clashes.
+ //
+ r += '"';
+ r += '"';
+
+ escape = false;
+ }
+
+ switch (u)
+ {
+ case L'"':
+ {
+ r += L"\\\"";
+ break;
+ }
+ case L'\\':
+ {
+ r += L"\\\\";
+ break;
+ }
+ default:
+ {
+ r += static_cast<wchar_t> (u);
+ break;
+ }
+ }
+ }
+ else
+ {
+ unsigned int count (0);
+ unsigned int tmp[4];
+
+ if (u < 0x800)
+ count = 2;
+ else if (u < 0x10000)
+ count = 3;
+ else if (u < 0x110000)
+ count = 4;
+
+ switch (count)
+ {
+ case 4:
+ {
+ tmp[3] = (u | 0x80UL) & 0xBFUL;
+ u >>= 6;
+ }
+ // Fall through.
+ case 3:
+ {
+ tmp[2] = (u | 0x80UL) & 0xBFUL;
+ u >>= 6;
+ }
+ // Fall through.
+ case 2:
+ {
+ tmp[1] = (u | 0x80UL) & 0xBFUL;
+ u >>= 6;
+ }
+ // Fall through.
+ case 1:
+ {
+ tmp[0] = u | utf8_first_char_mask[count];
+ break;
+ }
+ default:
+ assert (false);
+ }
+
+ for (unsigned int j (0); j < count; ++j)
+ r += charlit (tmp[j]);
+
+ escape = true;
+ }
+ }
+
+ r += '"';
+
+ return r;
+ }
+
+ String
+ strlit_iso8859_1 (String const& str)
+ {
+ String r;
+ size_t n (str.size ());
+
+ // In most common cases we will have that many chars.
+ //
+ r.reserve (n + 2);
+
+ r += '"';
+
+ bool escape (false);
+
+ for (size_t i (0); i < n; ++i)
+ {
+ unsigned int u (Context::unicode_char (str, i)); // May advance i.
+
+ // [256 - ] - unrepresentable
+ // [127 - 255] - \xXX
+ // [32 - 126] - as is
+ // [0 - 31] - \X or \xXX
+ //
+
+ if (u < 32)
+ {
+ switch (u)
+ {
+ case L'\n':
+ {
+ r += L"\\n";
+ break;
+ }
+ case L'\t':
+ {
+ r += L"\\t";
+ break;
+ }
+ case L'\v':
+ {
+ r += L"\\v";
+ break;
+ }
+ case L'\b':
+ {
+ r += L"\\b";
+ break;
+ }
+ case L'\r':
+ {
+ r += L"\\r";
+ break;
+ }
+ case L'\f':
+ {
+ r += L"\\f";
+ break;
+ }
+ case L'\a':
+ {
+ r += L"\\a";
+ break;
+ }
+ default:
+ {
+ r += charlit (u);
+ escape = true;
+ break;
+ }
+ }
+ }
+ else if (u < 127)
+ {
+ if (escape)
+ {
+ // Close and open the string so there are no clashes.
+ //
+ r += '"';
+ r += '"';
+
+ escape = false;
+ }
+
+ switch (u)
+ {
+ case L'"':
+ {
+ r += L"\\\"";
+ break;
+ }
+ case L'\\':
+ {
+ r += L"\\\\";
+ break;
+ }
+ default:
+ {
+ r += static_cast<wchar_t> (u);
+ break;
+ }
+ }
+ }
+ else if (u < 256)
+ {
+ r += charlit (u);
+ escape = true;
+ }
+ else
+ {
+ // Unrepresentable character.
+ //
+ throw UnrepresentableCharacter (str, i + 1);
+ }
+ }
+
+ r += '"';
+
+ return r;
+ }
+
+ String
+ strlit_utf32 (String const& str)
+ {
+ String r;
+ size_t n (str.size ());
+
+ // In most common cases we will have that many chars.
+ //
+ r.reserve (n + 3);
+
+ r += L"L\"";
+
+ bool escape (false);
+
+ for (size_t i (0); i < n; ++i)
+ {
+ unsigned int u (Context::unicode_char (str, i)); // May advance i.
+
+ // [128 - ] - \xUUUUUUUU
+ // 127 - \x7F
+ // [32 - 126] - as is
+ // [0 - 31] - \X or \xXX
+ //
+
+ if (u < 32 || u == 127)
+ {
+ switch (u)
+ {
+ case L'\n':
+ {
+ r += L"\\n";
+ break;
+ }
+ case L'\t':
+ {
+ r += L"\\t";
+ break;
+ }
+ case L'\v':
+ {
+ r += L"\\v";
+ break;
+ }
+ case L'\b':
+ {
+ r += L"\\b";
+ break;
+ }
+ case L'\r':
+ {
+ r += L"\\r";
+ break;
+ }
+ case L'\f':
+ {
+ r += L"\\f";
+ break;
+ }
+ case L'\a':
+ {
+ r += L"\\a";
+ break;
+ }
+ default:
+ {
+ r += charlit (u);
+ escape = true;
+ break;
+ }
+ }
+ }
+ else if (u < 127)
+ {
+ if (escape)
+ {
+ // Close and open the string so there are no clashes. C++11
+ // requires a space between " and L.
+ //
+ r += L"\" L\"";
+ escape = false;
+ }
+
+ switch (u)
+ {
+ case L'"':
+ {
+ r += L"\\\"";
+ break;
+ }
+ case L'\\':
+ {
+ r += L"\\\\";
+ break;
+ }
+ default:
+ {
+ r += static_cast<wchar_t> (u);
+ break;
+ }
+ }
+ }
+ else
+ {
+ r += charlit (u);
+ escape = true;
+ }
+ }
+
+ r += '"';
+
+ return r;
+ }
+
+ String Context::
+ strlit (String const& str)
+ {
+ // First see if we have a custom mapping.
+ //
+ assert (string_literal_map != 0);
+ StringLiteralMap::const_iterator i (string_literal_map->find (str));
+
+ if (i != string_literal_map->end ())
+ return i->second;
+
+ if (char_type == L"char")
+ {
+ if (char_encoding == L"utf8")
+ return strlit_utf8 (str);
+ else if (char_encoding == L"iso8859-1")
+ return strlit_iso8859_1 (str);
+ else
+ {
+ // For LCP, custom, and other unknown encodings, use ASCII.
+ //
+ return strlit_ascii (str);
+ }
+ }
+ else
+ return strlit_utf32 (str);
+ }
+
+ String Context::
+ comment (String const& str)
+ {
+ String r;
+
+ wchar_t const* s (str.c_str ());
+ size_t size (str.size ());
+
+ // In most common cases we will have that many chars.
+ //
+ r.reserve (size);
+
+ for (wchar_t const* p (s); p < s + size; ++p)
+ {
+ unsigned int u (unicode_char (p)); // May advance p.
+
+ // We are going to treat \v, \f and \n as unrepresentable
+ // here even though they can be present in C++ source code.
+ //
+ if (u > 127 || (u < 32 && u != '\t'))
+ r += L'?';
+ else
+ r += static_cast<wchar_t> (u);
+ }
+
+ return r;
+ }
+
+ String Context::
+ process_include_path (String const& name) const
+ {
+ String path (String (options.include_prefix ()) + name);
+ bool trace (options.include_regex_trace ());
+
+ if (trace)
+ wcerr << "include: '" << path << "'" << endl;
+
+ String r;
+ bool found (false);
+
+ for (RegexMapping::const_reverse_iterator e (include_mapping.rbegin ());
+ e != include_mapping.rend (); ++e)
+ {
+ if (trace)
+ wcerr << "try: '" << e->regex () << "' : ";
+
+ if (e->match (path))
+ {
+ r = e->replace (path);
+ found = true;
+
+ if (trace)
+ wcerr << "'" << r << "' : ";
+ }
+
+ if (trace)
+ wcerr << (found ? '+' : '-') << endl;
+
+ if (found)
+ break;
+ }
+
+ if (!found)
+ r = path;
+
+ if (!r.empty () && r[0] != L'"' && r[0] != L'<')
+ {
+ wchar_t op (options.include_with_brackets () ? L'<' : L'"');
+ wchar_t cl (options.include_with_brackets () ? L'>' : L'"');
+ r = op + r + cl;
+ }
+
+ return r;
+ }
+
+ // Namespace
+ //
+
+ void Namespace::
+ pre (Type& n)
+ {
+ String ns (ctx_.ns_name (n));
+
+ String::size_type b (0), e;
+
+ if (st_)
+ st_->enter (n, L"", ns ? false : true);
+
+ do
+ {
+ e = ns.find (L"::", b);
+
+ String name (ns, b, e == ns.npos ? e : e - b);
+
+ if (!name.empty ())
+ {
+ if (st_)
+ st_->enter (n, name, e == ns.npos);
+
+ ctx_.os << "namespace " << name << "{";
+ }
+
+ b = e;
+
+ if (b == ns.npos)
+ break;
+
+ b += 2;
+
+ } while (true);
+ }
+
+ void Namespace::
+ post (Type& n)
+ {
+ String ns (ctx_.ns_name (n));
+
+ String::size_type b (0), e;
+
+ do
+ {
+ e = ns.find (L"::", b);
+
+ String name (ns, b, e == ns.npos ? e : e - b);
+
+ if (!name.empty ())
+ {
+ ctx_.os << "}";
+
+ if (st_)
+ st_->leave ();
+ }
+
+
+ b = e;
+
+ if (b == ns.npos)
+ break;
+
+ b += 2;
+
+ }
+ while (true);
+
+ if (st_)
+ st_->leave ();
+ }
+}
diff --git a/xsd/xsd/cxx/elements.hxx b/xsd/xsd/cxx/elements.hxx
new file mode 100644
index 0000000..62ba97c
--- /dev/null
+++ b/xsd/xsd/cxx/elements.hxx
@@ -0,0 +1,626 @@
+// file : xsd/cxx/elements.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_ELEMENTS_HXX
+#define XSD_CXX_ELEMENTS_HXX
+
+#include <set>
+#include <map>
+#include <vector>
+#include <ostream>
+
+#include <libcutl/re.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/types.hxx>
+#include <xsd/elements.hxx>
+
+#include <xsd/cxx/options.hxx>
+#include <xsd/cxx/literal-map.hxx>
+
+namespace CXX
+{
+ using std::endl;
+
+ // On some platforms std::toupper can be something other than a
+ // function with C++ linkage.
+ //
+ wchar_t
+ upcase (wchar_t c);
+
+
+ // Exceptions.
+ //
+
+ struct UnrepresentableCharacter
+ {
+ UnrepresentableCharacter (String const& str, size_t pos)
+ : str_ (str), pos_ (pos)
+ {
+ }
+
+ String const&
+ string () const
+ {
+ return str_;
+ }
+
+ size_t
+ position () const
+ {
+ return pos_;
+ }
+
+ private:
+ String str_;
+ size_t pos_;
+ };
+
+ struct NoNamespaceMapping
+ {
+ NoNamespaceMapping (SemanticGraph::Path const& file,
+ size_t line,
+ size_t column,
+ String const& ns)
+ : file_ (file),
+ line_ (line),
+ column_ (column),
+ ns_ (ns)
+ {
+ }
+
+
+ SemanticGraph::Path const&
+ file () const
+ {
+ return file_;
+ }
+
+ size_t
+ line () const
+ {
+ return line_;
+ }
+
+ size_t
+ column () const
+ {
+ return column_;
+ }
+
+ String const&
+ ns () const
+ {
+ return ns_;
+ }
+
+ private:
+ SemanticGraph::Path file_;
+ size_t line_;
+ size_t column_;
+ String ns_;
+ };
+
+ struct InvalidNamespaceMapping
+ {
+ InvalidNamespaceMapping (String const& mapping,
+ String const& reason)
+ : mapping_ (mapping), reason_ (reason)
+ {
+ }
+
+ String const&
+ mapping () const
+ {
+ return mapping_;
+ }
+
+ String const&
+ reason () const
+ {
+ return reason_;
+ }
+
+ private:
+ String mapping_;
+ String reason_;
+ };
+
+ //
+ //
+ class Context
+ {
+ public:
+ typedef cutl::re::wregex RegexPat;
+ typedef cutl::re::wregexsub Regex;
+ typedef std::vector<Regex> RegexMapping;
+ typedef std::map<String, String> MapMapping;
+ typedef std::map<String, String> MappingCache;
+
+ typedef std::map<String, String> ReservedNameMap;
+ typedef std::set<String> KeywordSet;
+
+ typedef CXX::options options_type;
+
+ public:
+ Context (std::wostream& o,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ options_type const& ops,
+ StringLiteralMap const* custom_literals_map);
+
+ protected:
+ Context (Context& c)
+ : os (c.os),
+ schema_root (c.schema_root),
+ schema_path (c.schema_path),
+ options (c.options),
+ std (c.std),
+ char_type (c.char_type),
+ char_encoding (c.char_encoding),
+ L (c.L),
+ string_type (c.string_type),
+ auto_ptr (c.auto_ptr),
+ string_literal_map (c.string_literal_map),
+ type_exp (c.type_exp),
+ inst_exp (c.inst_exp),
+ inl (c.inl),
+ ns_mapping_cache (c.ns_mapping_cache),
+ xs_ns_ (c.xs_ns_),
+ cxx_id_expr (c.cxx_id_expr),
+ urn_mapping (c.urn_mapping),
+ nsr_mapping (c.nsr_mapping),
+ nsm_mapping (c.nsm_mapping),
+ include_mapping (c.include_mapping),
+ reserved_name_map (c.reserved_name_map),
+ keyword_set (c.keyword_set)
+ {
+ }
+
+ Context (Context& c, std::wostream& o)
+ : os (o),
+ schema_root (c.schema_root),
+ schema_path (c.schema_path),
+ options (c.options),
+ std (c.std),
+ char_type (c.char_type),
+ char_encoding (c.char_encoding),
+ L (c.L),
+ string_type (c.string_type),
+ auto_ptr (c.auto_ptr),
+ string_literal_map (c.string_literal_map),
+ type_exp (c.type_exp),
+ inst_exp (c.inst_exp),
+ inl (c.inl),
+ ns_mapping_cache (c.ns_mapping_cache),
+ xs_ns_ (c.xs_ns_),
+ cxx_id_expr (c.cxx_id_expr),
+ urn_mapping (c.urn_mapping),
+ nsr_mapping (c.nsr_mapping),
+ nsm_mapping (c.nsm_mapping),
+ include_mapping (c.include_mapping),
+ reserved_name_map (c.reserved_name_map),
+ keyword_set (c.keyword_set)
+ {
+ }
+
+ public:
+ static String
+ unclash (String const& name, String const& new_name)
+ {
+ return name == new_name ? (new_name + L'_') : new_name;
+ }
+
+ public:
+ // Return UTF-32 character starting at this position. Position is
+ // advanced by 1 if this Unicode character takes more than one
+ // underlying character.
+ //
+ static unsigned int
+ unicode_char (String const& str, size_t& pos);
+
+ static unsigned int
+ unicode_char (wchar_t const*& p);
+
+ // Escape C++ keywords and illegal characters.
+ //
+ String
+ escape (String const&);
+
+ // Create a string literal so that it can be used in C++ source
+ // code. It includes "".
+ //
+ String
+ strlit (String const&);
+
+ // Escape the string so that it can be used in C++ comment.
+ //
+ String
+ comment (String const&);
+
+ // Translate XML namespace name to a C++ identifier.
+ //
+ String
+ ns_name (SemanticGraph::Namespace&);
+
+ // XML Schema namespace.
+ //
+ SemanticGraph::Namespace&
+ xs_ns ();
+
+ // C++ namespace for XML Schema.
+ //
+ String
+ xs_ns_name ();
+
+ //
+ //
+ SemanticGraph::Namespace&
+ namespace_ (SemanticGraph::Nameable& n);
+
+ // Original XML namespace name.
+ //
+ String
+ xml_ns_name (SemanticGraph::Nameable& ns);
+
+
+ // Fully-qualified C++ name.
+ //
+ String
+ fq_name (SemanticGraph::Nameable& n, char const* name_key = "name");
+
+ public:
+ static SemanticGraph::Type&
+ ultimate_base (SemanticGraph::Complex&);
+
+ public:
+ String
+ process_include_path (String const&) const;
+
+ public:
+ static bool
+ skip (SemanticGraph::Member& m)
+ {
+ // "Subsequent" local element.
+ //
+ return !m.scope ().is_a<SemanticGraph::Namespace> () &&
+ m.context ().count ("min") == 0;
+ }
+
+ static size_t
+ min (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<size_t> ("min");
+ }
+
+ static size_t
+ min (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<size_t> ("min");
+ }
+
+ static size_t
+ max (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<size_t> ("max");
+ }
+
+ static size_t
+ max (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<size_t> ("max");
+ }
+
+ public:
+ // Get escaped name.
+ //
+ static String const&
+ ename (SemanticGraph::Nameable const& n)
+ {
+ return n.context ().get<String> ("name");
+ }
+
+ public:
+ std::wostream& os;
+
+ SemanticGraph::Schema& schema_root;
+ SemanticGraph::Path const& schema_path;
+
+ options_type const& options;
+
+ cxx_version std;
+
+ String& char_type;
+ String& char_encoding;
+ String& L; // string literal prefix
+ String& string_type;
+ String& auto_ptr;
+
+ StringLiteralMap const* string_literal_map;
+
+ String& type_exp;
+ String& inst_exp;
+ String& inl;
+
+ public:
+ MappingCache& ns_mapping_cache;
+
+ private:
+ SemanticGraph::Path const schema_path_;
+
+ SemanticGraph::Namespace* xs_ns_;
+
+ String char_type_;
+ String char_encoding_;
+ String L_;
+ String string_type_;
+ String auto_ptr_;
+
+ String type_exp_;
+ String inst_exp_;
+ String inl_;
+
+ private:
+ RegexPat const cxx_id_expr_;
+ RegexPat const& cxx_id_expr;
+ Regex urn_mapping_;
+ RegexMapping nsr_mapping_;
+ MapMapping nsm_mapping_;
+ Regex const& urn_mapping;
+ RegexMapping const& nsr_mapping;
+ MapMapping const& nsm_mapping;
+ MappingCache ns_mapping_cache_;
+
+ RegexMapping include_mapping_;
+ RegexMapping const& include_mapping;
+
+ ReservedNameMap const& reserved_name_map;
+ ReservedNameMap reserved_name_map_;
+
+ KeywordSet const& keyword_set;
+ KeywordSet keyword_set_;
+ };
+
+ inline unsigned int Context::
+ unicode_char (String const& str, size_t& pos)
+ {
+ if (sizeof (wchar_t) == 4)
+ {
+ return str[pos];
+ }
+ else if (sizeof (wchar_t) == 2)
+ {
+ wchar_t x (str[pos]);
+
+ if (x < 0xD800 || x > 0xDBFF)
+ return x;
+ else
+ return ((x - 0xD800) << 10) + (str[++pos] - 0xDC00) + 0x10000;
+ }
+ else
+ return 0;
+ }
+
+ inline unsigned int Context::
+ unicode_char (wchar_t const*& p)
+ {
+ if (sizeof (wchar_t) == 4)
+ {
+ return *p;
+ }
+ else if (sizeof (wchar_t) == 2)
+ {
+ wchar_t x (*p);
+
+ if (x < 0xD800 || x > 0xDBFF)
+ return x;
+ else
+ return ((x - 0xD800) << 10) + (*(++p) - 0xDC00) + 0x10000;
+ }
+ else
+ return 0;
+ }
+
+ // Sources traverser that goes into each schema only once.
+ //
+ struct Sources: Traversal::Sources
+ {
+ virtual void
+ traverse (SemanticGraph::Sources& s)
+ {
+ if (schemas_.insert (&s.schema ()).second)
+ Traversal::Sources::traverse (s);
+ }
+
+ private:
+ std::set<SemanticGraph::Schema*> schemas_;
+ };
+
+ // Usual namespace mapping.
+ //
+ struct Namespace: Traversal::Namespace
+ {
+ struct ScopeTracker
+ {
+ // First scope name if always empty (global scope). The last flag
+ // signals the last scope.
+ //
+ virtual void
+ enter (Type&, String const& name, bool last) = 0;
+
+ virtual void
+ leave () = 0;
+ };
+
+
+ Namespace (Context& c)
+ : ctx_ (c), st_ (0)
+ {
+ }
+
+ Namespace (Context& c, ScopeTracker& st)
+ : ctx_ (c), st_ (&st)
+ {
+ }
+
+ virtual void
+ pre (Type&);
+
+ virtual void
+ post (Type&);
+
+ private:
+ Context& ctx_;
+ ScopeTracker* st_;
+ };
+
+ //
+ //
+ template <typename X>
+ struct Has : X
+ {
+ Has (bool& result)
+ : result_ (result)
+ {
+ }
+
+ virtual void
+ traverse (typename X::Type&)
+ {
+ result_ = true;
+ }
+
+ private:
+ bool& result_;
+ };
+
+ // Checks if scope 'Y' names any of 'X'
+ //
+ template <typename X, typename Y>
+ bool
+ has (Y& y)
+ {
+ using SemanticGraph::Scope;
+
+ bool result (false);
+ Has<X> t (result);
+
+ for (Scope::NamesIterator i (y.names_begin ()), e (y.names_end ());
+ !result && i != e; ++i)
+ t.dispatch (i->named ());
+
+ return result;
+ }
+
+ // Checks if the compositor has any particle of 'X'
+ //
+ template <typename X>
+ bool
+ has_particle (SemanticGraph::Compositor& y)
+ {
+ using SemanticGraph::Compositor;
+
+ bool result (false);
+ Has<X> t (result);
+
+ for (Compositor::ContainsIterator i (y.contains_begin ()),
+ e (y.contains_end ()); !result && i != e; ++i)
+ {
+ SemanticGraph::Particle& p (i->particle ());
+
+ t.dispatch (p);
+
+ if (!result && p.is_a<Compositor> ())
+ result = has_particle<X> (dynamic_cast<Compositor&> (p));
+ }
+
+ return result;
+ }
+
+ // Specialization for Complex
+ //
+ template <typename X>
+ bool
+ has_particle (SemanticGraph::Complex& c)
+ {
+ return c.contains_compositor_p () &&
+ has_particle<X> (c.contains_compositor ().compositor ());
+ }
+
+ // Fundamental type mapping helper.
+ //
+ struct Fundamental: Traversal::Fundamental::Type,
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef
+ {
+ virtual void
+ fundamental_type (SemanticGraph::Fundamental::Type& t) = 0;
+
+ virtual void
+ fundamental_template (SemanticGraph::Fundamental::Type& t) = 0;
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Type& t)
+ {
+ fundamental_type (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ fundamental_template (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ fundamental_template (t);
+ }
+ };
+}
+
+#endif // XSD_CXX_TREE_ELEMENTS_HXX
diff --git a/xsd/xsd/cxx/literal-map.cxx b/xsd/xsd/cxx/literal-map.cxx
new file mode 100644
index 0000000..b81f249
--- /dev/null
+++ b/xsd/xsd/cxx/literal-map.cxx
@@ -0,0 +1,261 @@
+// file : xsd/cxx/literal-map.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <fstream>
+#include <iostream>
+
+#include <xercesc/util/XMLUni.hpp>
+
+#include <xercesc/framework/LocalFileInputSource.hpp>
+
+#include <xercesc/sax/Locator.hpp>
+#include <xercesc/sax/SAXParseException.hpp>
+#include <xercesc/sax2/DefaultHandler.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+
+#include <libxsd-frontend/xml.hxx>
+
+#include <xsd/cxx/literal-map.hxx>
+
+using namespace std;
+using namespace xercesc;
+namespace XML = XSDFrontend::XML;
+
+namespace CXX
+{
+ class Handler: public DefaultHandler
+ {
+ public:
+ struct Failed {};
+
+ Handler (String const& file, StringLiteralMap& map)
+ : state_ (s_init), file_ (file), map_ (map)
+ {
+ }
+
+ virtual void
+ setDocumentLocator (const Locator* const l)
+ {
+ locator_ = l;
+ }
+
+ virtual void
+ startElement (const XMLCh* const,
+ const XMLCh* const lname,
+ const XMLCh* const,
+ const xercesc::Attributes&)
+ {
+ String n (XML::transcode (lname));
+
+ if (n == L"string-literal-map" && state_ == s_init)
+ state_ = s_map;
+ else if (n == L"entry" && state_ == s_map)
+ {
+ str_seen_ = false;
+ lit_seen_ = false;
+ state_ = s_entry;
+ }
+ else if (n == L"string" && state_ == s_entry)
+ {
+ str_seen_ = true;
+ str_.clear ();
+ state_ = s_string;
+ }
+ else if (n == L"literal" && state_ == s_entry)
+ {
+ lit_seen_ = true;
+ lit_.clear ();
+ state_ = s_literal;
+ }
+ else
+ {
+ wcerr << file_ << ":" << line () << ":" << col () << ": error: "
+ << "unexpected element '" << n << "'" << endl;
+ throw Failed ();
+ }
+ }
+
+ virtual void
+ endElement (const XMLCh* const,
+ const XMLCh* const lname,
+ const XMLCh* const)
+ {
+ String n (XML::transcode (lname));
+
+ if (n == L"string-literal-map")
+ state_ = s_init;
+ else if (n == L"entry")
+ {
+ if (!str_seen_)
+ {
+ wcerr << file_ << ":" << line () << ":" << col () << ": error: "
+ << "expected 'string' element" << endl;
+ throw Failed ();
+ }
+
+ if (!lit_seen_)
+ {
+ wcerr << file_ << ":" << line () << ":" << col () << ": error: "
+ << "expected 'literal' element" << endl;
+ throw Failed ();
+ }
+
+ map_[str_] = lit_;
+ state_ = s_map;
+ }
+ else if (n == L"string")
+ state_ = s_entry;
+ else if (n == L"literal")
+ state_ = s_entry;
+ }
+
+ virtual void
+ characters (const XMLCh* const s, const XMLSize_t length)
+ {
+ String str (XML::transcode (s, length));
+
+ if (state_ == s_string)
+ str_ += str;
+ else if (state_ == s_literal)
+ lit_ += str;
+ else
+ {
+ for (size_t i (0); i < str.size (); ++i)
+ {
+ wchar_t c (str[i]);
+
+ if (c != 0x20 && c != 0x0A && c != 0x0D && c != 0x09)
+ {
+ wcerr << file_ << ":" << line () << ":" << col () << ": error: "
+ << "unexpected character data" << endl;
+ throw Failed ();
+ }
+ }
+ }
+ }
+
+ // Error hanlding.
+ //
+ enum Severity {s_warning, s_error, s_fatal};
+
+ virtual void
+ warning (const SAXParseException& e)
+ {
+ handle (e, s_warning);
+ }
+
+ virtual void
+ error (const SAXParseException& e)
+ {
+ handle (e, s_error);
+ }
+
+ virtual void
+ fatalError (const SAXParseException& e)
+ {
+ handle (e, s_fatal);
+ }
+
+ virtual void
+ resetErrors ()
+ {
+ }
+
+ void
+ handle (const SAXParseException& e, Severity s)
+ {
+ String msg (XML::transcode (e.getMessage ()));
+
+ wcerr << file_ << ":"
+ << e.getLineNumber () << ":" << e.getColumnNumber () << ": "
+ << (s == s_warning ? "warning: " : "error: ") << msg << endl;
+
+ if (s != s_warning)
+ throw Failed ();
+ }
+
+ size_t
+ line () const
+ {
+ return locator_ != 0
+ ? static_cast<size_t> (locator_->getLineNumber ())
+ : 0;
+ }
+
+ size_t
+ col () const
+ {
+ return locator_ != 0
+ ? static_cast<size_t> (locator_->getColumnNumber ())
+ : 0;
+ }
+
+ private:
+ const Locator* locator_;
+
+ enum
+ {
+ s_init,
+ s_map,
+ s_entry,
+ s_string,
+ s_literal
+ } state_;
+
+ String file_;
+ StringLiteralMap& map_;
+
+ bool str_seen_;
+ bool lit_seen_;
+
+ String str_;
+ String lit_;
+ };
+
+ bool
+ read_literal_map (NarrowString const& file, StringLiteralMap& map)
+ {
+ try
+ {
+ // Try to open the file with fstream. This way we get to
+ // report the error in a consistent manner.
+ //
+ {
+ ifstream ifs (file.c_str ());
+ if (!ifs.is_open ())
+ {
+ wcerr << file.c_str () << ": unable to open in read mode" << endl;
+ return false;
+ }
+ }
+
+ String wfile (file);
+
+ LocalFileInputSource is (XML::XMLChString (wfile).c_str ());
+ Handler h (wfile, map);
+
+ unique_ptr<SAX2XMLReader> parser (
+ XMLReaderFactory::createXMLReader ());
+
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpaces, true);
+ parser->setFeature (XMLUni::fgSAX2CoreNameSpacePrefixes, true);
+ parser->setFeature (XMLUni::fgSAX2CoreValidation, false);
+ parser->setFeature (XMLUni::fgXercesSchema, false);
+ parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false);
+
+ parser->setErrorHandler (&h);
+ parser->setContentHandler (&h);
+
+ parser->parse (is);
+ }
+ catch (Handler::Failed const&)
+ {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/xsd/xsd/cxx/literal-map.hxx b/xsd/xsd/cxx/literal-map.hxx
new file mode 100644
index 0000000..bc8fabb
--- /dev/null
+++ b/xsd/xsd/cxx/literal-map.hxx
@@ -0,0 +1,19 @@
+// file : xsd/cxx/literal-map.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_LITERAL_MAP_HXX
+#define XSD_CXX_LITERAL_MAP_HXX
+
+#include <map>
+
+#include <xsd/types.hxx>
+
+namespace CXX
+{
+ typedef std::map<String, String> StringLiteralMap;
+
+ bool
+ read_literal_map (NarrowString const& file, StringLiteralMap& map);
+}
+
+#endif // XSD_CXX_LITERAL_MAP_HXX
diff --git a/xsd/xsd/cxx/option-types.cxx b/xsd/xsd/cxx/option-types.cxx
new file mode 100644
index 0000000..ad8a3c9
--- /dev/null
+++ b/xsd/xsd/cxx/option-types.cxx
@@ -0,0 +1,47 @@
+// file : xsd/cxx/option-types.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <istream>
+#include <ostream>
+
+#include <xsd/cxx/option-types.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ //
+ // cxx_version
+ //
+
+ static const char* cxx_version_[] =
+ {
+ "c++98",
+ "c++11"
+ };
+
+ string cxx_version::
+ string () const
+ {
+ return cxx_version_[v_];
+ }
+
+ istream&
+ operator>> (istream& is, cxx_version& v)
+ {
+ string s;
+ is >> s;
+
+ if (!is.fail ())
+ {
+ if (s == "c++98")
+ v = cxx_version::cxx98;
+ else if (s == "c++11")
+ v = cxx_version::cxx11;
+ else
+ is.setstate (istream::failbit);
+ }
+
+ return is;
+ }
+}
diff --git a/xsd/xsd/cxx/option-types.hxx b/xsd/xsd/cxx/option-types.hxx
new file mode 100644
index 0000000..bbb15b3
--- /dev/null
+++ b/xsd/xsd/cxx/option-types.hxx
@@ -0,0 +1,34 @@
+// file : xsd/cxx/option-types.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_XSD_OPTION_TYPES_HXX
+#define XSD_XSD_OPTION_TYPES_HXX
+
+#include <iosfwd>
+#include <string>
+
+namespace CXX
+{
+ struct cxx_version
+ {
+ enum value
+ {
+ cxx98,
+ cxx11
+ };
+
+ cxx_version (value v = value (0)) : v_ (v) {}
+ operator value () const {return v_;}
+
+ std::string
+ string () const;
+
+ private:
+ value v_;
+ };
+
+ std::istream&
+ operator>> (std::istream&, cxx_version&);
+}
+
+#endif // XSD_XSD_OPTION_TYPES_HXX
diff --git a/xsd/xsd/cxx/options.cli b/xsd/xsd/cxx/options.cli
new file mode 100644
index 0000000..2c50f19
--- /dev/null
+++ b/xsd/xsd/cxx/options.cli
@@ -0,0 +1,550 @@
+// file : xsd/cxx/options.cli
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include <cstddef>; // std::size_t
+
+include <xsd/types.hxx>; // NarrowString, NarrowStrings
+
+include <xsd/cxx/option-types.hxx>;
+
+include <xsd/options.cli>;
+
+namespace CXX
+{
+ class options: ::options = 0
+ {
+ // Language.
+ //
+ cxx_version --std = cxx_version::cxx98
+ {
+ "<version>",
+ "Specify the C++ standard that the generated code should conform to.
+ Valid values are \cb{c++98} (default) and \cb{c++11}.
+
+ The C++ standard affects various aspects of the generated code that
+ are discussed in more detail in various mapping-specific
+ documentation. Overall, when C++11 is selected, the generated
+ code relies on the move semantics and uses \cb{std::unique_ptr}
+ instead of deprecated \cb{std::auto_ptr}.
+
+ When the C++11 mode is selected, you normally don't need to
+ perform any extra steps other than enable C++11 in your C++
+ compiler, if required. The XSD compiler will automatically
+ add the necessary macro defines to the generated header files
+ that will switch the header-only XSD runtime library (\cb{libxsd})
+ to the C++11 mode. However, if you include any of the XSD runtime
+ headers directly in your application (normally you just include
+ the generated headers), then you will need to define the
+ \cb{XSD_CXX11} macro for your entire project."
+ };
+
+ // Character type and encoding.
+ //
+ NarrowString --char-type = "char"
+ {
+ "<type>",
+ "Generate code using the provided character <type> instead of the
+ default \cb{char}. Valid values are \cb{char} and \cb{wchar_t}."
+ };
+
+ NarrowString --char-encoding
+ {
+ "<enc>",
+ "Specify the character encoding that should be used in the generated
+ code. Valid values for the \cb{char} character type are \cb{utf8}
+ (default), \cb{iso8859-1}, \cb{lcp} (Xerces-C++ local code page),
+ and \cb{custom}. If you pass \cb{custom} as the value then you will
+ need to include the transcoder implementation header for your
+ encoding at the beginning of the generated header files (see the
+ \cb{--hxx-prologue} option).
+
+ For the \cb{wchar_t} character type the only valid value is \cb{auto}
+ and the encoding is automatically selected between UTF-16 and
+ UTF-32/UCS-4, depending on the \cb{wchar_t} type size."
+ };
+
+ // Output options.
+ //
+ NarrowString --output-dir
+ {
+ "<dir>",
+ "Write generated files to <dir> instead of the current directory."
+ };
+
+ bool --generate-inline
+ {
+ "Generate simple functions inline. This option triggers creation of
+ the inline file."
+ };
+
+ // Extern XML Schema.
+ //
+ bool --generate-xml-schema
+ {
+ "Generate a C++ header file as if the schema being compiled defines the
+ XML Schema namespace. For the C++/Tree mapping, the resulting file will
+ contain definitions for all XML Schema built-in types. For the
+ C++/Parser mapping, the resulting file will contain definitions for
+ all the parser skeletons and implementations corresponding to the
+ XML Schema built-in types.
+
+ The schema file provided to the compiler need not exist and is only
+ used to derive the name of the resulting header file. Use the
+ \cb{--extern-xml-schema} option to include this file in the
+ generated files for other schemas."
+ };
+
+ NarrowString --extern-xml-schema
+ {
+ "<file>",
+ "Include a header file derived from <file> instead of generating the
+ XML Schema namespace mapping inline. The provided file need not
+ exist and is only used to derive the name of the included header
+ file. Use the \cb{--generate-xml-schema} option to generate this
+ header file."
+ };
+
+ // Namespace mapping.
+ //
+ NarrowStrings --namespace-map
+ {
+ "<xns>=<cns>",
+ "Map XML Schema namespace <xns> to C++ namespace <cns>. Repeat
+ this option to specify mapping for more than one XML Schema namespace.
+ For example, the following option:
+
+ \cb{--namespace-map http://example.com/foo/bar=foo::bar}
+
+ Will map the \cb{http://example.com/foo/bar} XML Schema namespace to
+ the \cb{foo::bar} C++ namespace."
+ };
+
+ NarrowStrings --namespace-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate XML
+ Schema namespace names to C++ namespace names. <regex> is a Perl-like
+ regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can be
+ used as a delimiter instead of '\cb{/}'. Escaping of the delimiter
+ character in \ci{pattern} or \ci{replacement} is not supported.
+
+ All the regular expressions are pushed into a stack with the last
+ specified expression considered first. The first match that
+ succeeds is used. Regular expressions are applied to a string in
+ the form
+
+ \c{\i{filename} \i{namespace}}
+
+ For example, if you have file \cb{hello.xsd} with namespace
+ \cb{http://example.com/hello} and you run \cb{xsd} on this file,
+ then the string in question will be:
+
+ \cb{hello.xsd. http://example.com/hello}
+
+ For the built-in XML Schema namespace the string is:
+
+ \cb{XMLSchema.xsd http://www.w3.org/2001/XMLSchema}
+
+ The following three steps are performed for each regular expression
+ until the match is found:
+
+ 1. The expression is applied and if the result is empty the next
+ expression is considered.
+
+ 2. All '\cb{/}' are replaced with '\cb{::}'.
+
+ 3. The result is verified to be a valid C++ scope name (e.g.,
+ \cb{foo::bar}). If this test succeeds, the result is used as a
+ C++ namespace name.
+
+ As an example, the following expression maps XML Schema namespaces
+ in the form \cb{http://example.com/foo/bar} to C++ namespaces in the
+ form \cb{foo::bar}:
+
+ \cb{%.* http://example.com/(.+)%$1%}
+
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ bool --namespace-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with the
+ \cb{--namespace-regex} option. Use this option to find out why your
+ regular expressions don't do what you expected them to do."
+ };
+
+ // Reserved names.
+ //
+ NarrowStrings --reserved-name
+ {
+ "<n>[=<r>]",
+ "Add name <n> to the list of names that should not be used as
+ identifiers. The name can optionally be followed by \cb{=} and the
+ replacement name <r> that should be used instead. All the C++ keywords
+ are already in this list."
+ };
+
+ // Include options.
+ //
+ bool --include-with-brackets
+ {
+ "Use angle brackets (<>) instead of quotes (\"\") in generated
+ \cb{#include} directives."
+ };
+
+ NarrowString --include-prefix
+ {
+ "<prefix>",
+ "Add <prefix> to generated \cb{#include} directive paths.
+
+ For example, if you had the following import element in your schema
+
+ \cb{<import namespace=\"...\" schemaLocation=\"base.xsd\"/>}
+
+ and compiled this fragment with \cb{--include-prefix schemas/}, then
+ the include directive in the generated code would be:
+
+ \cb{#include \"schemas/base.hxx\"}"
+ };
+
+ NarrowStrings --include-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to transform
+ \cb{#include} directive paths. <regex> is a Perl-like regular
+ expression in the form \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}.
+ Any character can be used as a delimiter instead of '\cb{/}'. Escaping
+ of the delimiter character in \ci{pattern} or \ci{replacement} is not
+ supported.
+
+ All the regular expressions are pushed into a stack with the last
+ specified expression considered first. The first match that succeeds
+ is used.
+
+ As an example, the following expression transforms paths in the form
+ \cb{schemas/foo/bar} to paths in the form \cb{generated/foo/bar}:
+
+ \cb{%schemas/(.+)%generated/$1%}
+
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ bool --include-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with the
+ \cb{--include-regex} option. Use this option to find out why your
+ regular expressions don't do what you expected them to do."
+ };
+
+ NarrowString --guard-prefix
+ {
+ "<prefix>",
+ "Add <prefix> to generated header inclusion guards. The prefix is
+ transformed to upper case and characters that are illegal in a
+ preprocessor macro name are replaced with underscores. If this
+ option is not specified then the directory part of the input schema
+ file is used as a prefix."
+ };
+
+ // File suffixes.
+ //
+ NarrowString --hxx-suffix = ".hxx"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{.hxx} to
+ construct the name of the header file. Note that this suffix is also
+ used to construct names of header files corresponding to
+ included/imported schemas."
+ };
+
+ NarrowString --ixx-suffix = ".ixx"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{.ixx} to
+ construct the name of the inline file."
+ };
+
+ NarrowString --cxx-suffix = ".cxx"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{.cxx} to
+ construct the name of the source file."
+ };
+
+ NarrowString --fwd-suffix = "-fwd.hxx"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{-fwd.hxx} to
+ construct the name of the forward declaration file."
+ };
+
+ NarrowString --hxx-regex
+ {
+ "<regex>",
+ "Use the provided expression to construct the name of the header file.
+ <regex> is a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}.
+ Note that this expression is also used to construct names of header
+ files corresponding to included/imported schemas. See also the REGEX
+ AND SHELL QUOTING section below."
+ };
+
+ NarrowString --ixx-regex
+ {
+ "<regex>",
+ "Use the provided expression to construct the name of the inline file.
+ <regex> is a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX AND
+ SHELL QUOTING section below."
+ };
+
+ NarrowString --cxx-regex
+ {
+ "<regex>",
+ "Use the provided expression to construct the name of the source file.
+ <regex> is a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX AND
+ SHELL QUOTING section below."
+ };
+
+ NarrowString --fwd-regex
+ {
+ "<regex>",
+ "Use the provided expression to construct the name of the forward
+ declaration file. <regex> is a Perl-like regular expression in the
+ form \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX
+ AND SHELL QUOTING section below."
+ };
+
+ // Prologues/epilogues.
+ //
+ NarrowStrings --hxx-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the header file."
+ };
+
+ NarrowStrings --ixx-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the inline file."
+ };
+
+ NarrowStrings --cxx-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the source file."
+ };
+
+ NarrowStrings --fwd-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the forward declaration file."
+ };
+
+ NarrowStrings --prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of each generated file for which
+ there is no file-specific prologue."
+ };
+
+ NarrowStrings --hxx-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the header file."
+ };
+
+ NarrowStrings --ixx-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the inline file."
+ };
+
+ NarrowStrings --cxx-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the source file."
+ };
+
+ NarrowStrings --fwd-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the forward declaration file."
+ };
+
+ NarrowStrings --epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of each generated file for which there
+ is no file-specific epilogue."
+ };
+
+ NarrowString --hxx-prologue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the beginning of the header file."
+ };
+
+ NarrowString --ixx-prologue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the beginning of the inline file."
+ };
+
+ NarrowString --cxx-prologue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the beginning of the source file."
+ };
+
+ NarrowString --fwd-prologue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the beginning of the forward
+ declaration file."
+ };
+
+ NarrowString --prologue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the beginning of each generated
+ file for which there is no file-specific prologue file."
+ };
+
+ NarrowString --hxx-epilogue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the end of the header file."
+ };
+
+ NarrowString --ixx-epilogue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the end of the inline file."
+ };
+
+ NarrowString --cxx-epilogue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the end of the source file."
+ };
+
+ NarrowString --fwd-epilogue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the end of the forward declaration
+ file."
+ };
+
+ NarrowString --epilogue-file
+ {
+ "<file>",
+ "Insert the content of the <file> at the end of each generated file
+ for which there is no file-specific epilogue file."
+ };
+
+ // Export options.
+ //
+ NarrowString --export-symbol
+ {
+ "<symbol>",
+ "Insert <symbol> in places where DLL export/import control statements
+ (\cb{__declspec(dllexport/dllimport)}) are necessary."
+ };
+
+ bool --export-xml-schema
+ {
+ "Export/import types in the XML Schema namespace using the export
+ symbol provided with the \cb{--export-symbol} option. The
+ \cb{XSD_NO_EXPORT} macro can be used to omit this code during C++
+ compilation, which may be useful if you would like to use the same
+ generated code across multiple platforms."
+ };
+
+ bool --export-maps
+ {
+ "Export polymorphism support maps from a Win32 DLL into which this
+ generated code is placed. This is necessary when your type hierarchy
+ is split across several DLLs since otherwise each DLL will have its
+ own set of maps. In this situation the generated code for the DLL
+ which contains base types and/or substitution group heads should be
+ compiled with this option and the generated code for all other DLLs
+ should be compiled with \cb{--import-maps}. This option is only valid
+ together with \cb{--generate-polymorphic}. The \cb{XSD_NO_EXPORT}
+ macro can be used to omit this code during C++ compilation, which may
+ be useful if you would like to use the same generated code across
+ multiple platforms."
+ };
+
+ bool --import-maps
+ {
+ "Import polymorphism support maps to a Win32 DLL or executable into
+ which this generated code is linked. See the \cb{--export-maps}
+ option documentation for details. This options is only valid together
+ with \cb{--generate-polymorphic}. The \cb{XSD_NO_EXPORT} macro can be
+ used to omit this code during C++ compilation, which may be useful if
+ you would like to use the same generated code across multiple
+ platforms."
+ };
+
+ // Make dependency generation.
+ //
+ bool --generate-dep
+ {
+ "Generate \cb{make} dependency information. This option triggers the
+ creation of the \cb{.d} file containing the dependencies of the
+ generated files on the main schema file as well as all the schema
+ files that it includes/imports, transitively. This dependency file
+ is then normally included into the main \cb{makefile} to implement
+ automatic dependency tracking.
+
+ Note also that automatic dependency generation is not supported in
+ the file-per-type mode (\cb{--file-per-type}). In this case, all
+ the generated files are produced with a single compiler invocation
+ and depend on all the schemas. As a result, it is easier to establish
+ such a dependency manually, perhaps with the help of the
+ \cb{--file-list*} options."
+ };
+
+ bool --generate-dep-only
+ {
+ "Generate \cb{make} dependency information only."
+ };
+
+ bool --dep-phony
+ {
+ "Generate phony targets for included/imported schema files, causing
+ each to depend on nothing. Such dummy rules work around \cb{make}
+ errors caused by the removal of schema files without also updating
+ the dependency file to match."
+ };
+
+ NarrowStrings --dep-target
+ {
+ "<target>",
+ "Change the target of the dependency rule. By default it contains
+ all the generated C++ files as well as the dependency file itself,
+ without any directory prefixes. If you require multiple targets,
+ then you can specify them as a single, space-separated argument or
+ you can repeat this option multiple times."
+ };
+
+ NarrowString --dep-suffix = ".d"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{.d} to
+ construct the name of the dependency file."
+ };
+
+ NarrowString --dep-regex
+ {
+ "<regex>",
+ "Use the provided expression to construct the name of the dependency
+ file. <regex> is a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. See also the REGEX
+ AND SHELL QUOTING section below."
+ };
+ };
+}
diff --git a/xsd/xsd/cxx/parser/attribute-validation-source.cxx b/xsd/xsd/cxx/parser/attribute-validation-source.cxx
new file mode 100644
index 0000000..1c873fd
--- /dev/null
+++ b/xsd/xsd/cxx/parser/attribute-validation-source.cxx
@@ -0,0 +1,412 @@
+// file : xsd/cxx/parser/attribute-validation-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/attribute-validation-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ struct Test: Traversal::Attribute,
+ Traversal::AnyAttribute,
+ Context
+ {
+ Test (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ String const& name (a.name ());
+
+ if (a.qualified_p () && a.namespace_ ().name ())
+ {
+ String const& ns (a.namespace_ ().name ());
+
+ os << "n == " << strlit (name) << " &&" << endl
+ << "ns == " << strlit (ns);
+ }
+ else
+ os << "n == " << strlit (name) << " && ns.empty ()";
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& ns (a.definition_namespace ().name ());
+
+ for (SemanticGraph::AnyAttribute::NamespaceIterator
+ i (a.namespace_begin ()), e (a.namespace_end ()); i != e;)
+ {
+ if (*i == L"##any")
+ {
+ os << "!n.empty ()";
+ }
+ else if (*i == L"##other")
+ {
+ if (ns)
+ {
+ // Note that here I assume that ##other does not include
+ // unqualified names in a schema with target namespace.
+ // This is not what the spec says but that seems to be
+ // the consensus.
+ //
+ os << "(!ns.empty () && ns != " << strlit (ns) << ")";
+ }
+ else
+ os << "!ns.empty ()";
+ }
+ else if (*i == L"##local")
+ {
+ os << "(ns.empty () && !n.empty ())";
+ }
+ else if (*i == L"##targetNamespace")
+ {
+ os << "ns == " << strlit (ns);
+ }
+ else
+ {
+ os << "ns == " << strlit (*i);
+ }
+
+ if (++i != e)
+ os << " ||" << endl;
+ }
+ }
+ };
+
+ //
+ //
+ struct PhaseOne: Traversal::Attribute, Context
+ {
+ PhaseOne (Context& c)
+ : Context (c), test_ (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& name (ename (a));
+ String const& inst (emember (a));
+
+ SemanticGraph::Type& type (a.type ());
+ String const& post (post_name (type));
+ String const& ret (ret_type (type));
+
+ os << "if (";
+
+ test_.traverse (a);
+
+ os << ")"
+ << "{"
+ << "if (this->" << inst << ")"
+ << "{"
+ << "this->" << inst << "->pre ();"
+ << "this->" << inst << "->_pre_impl ();"
+ << "this->" << inst << "->_characters (s);"
+ << "this->" << inst << "->_post_impl ();";
+
+ if (ret == L"void")
+ os << "this->" << inst << "->" << post << " ();"
+ << "this->" << name << " ();";
+ else
+ {
+ // Don't create an lvalue in C++11 (think std::unique_ptr).
+ // In C++98 we do it for compatibility with older/broken
+ // compilers (e.g., IBM xlC that needs an lvalue to pass
+ // std::auto_ptr).
+ //
+ if (std == cxx_version::cxx98)
+ os << arg_type (type) << " tmp (this->" << inst << "->" <<
+ post << " ());"
+ << "this->" << name << " (tmp);";
+ else
+ os << "this->" << name << " (this->" << inst << "->" <<
+ post << " ());";
+ }
+
+ os << "}";
+
+ if (!a.optional_p ())
+ os << "static_cast< v_state_attr_* > (" <<
+ "this->v_state_attr_stack_.top ())->" << name << " = true;";
+
+ os << "return true;"
+ << "}";
+ }
+
+ private:
+ Test test_;
+ };
+
+
+ //
+ //
+ struct PhaseTwo: Traversal::AnyAttribute, Context
+ {
+ PhaseTwo (Context& c)
+ : Context (c), test_ (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ os << "if (";
+
+ test_.traverse (a);
+
+ os << ")" << endl
+ << "{"
+ << "this->_any_attribute (ns, n, s);"
+ << "return true;"
+ << "}";
+ }
+
+ private:
+ Test test_;
+ };
+
+
+ //
+ //
+ struct AttributeStateInit: Traversal::Attribute, Context
+ {
+ AttributeStateInit (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ if (!a.optional_p ())
+ os << "as." << ename (a) << " = false;";
+ }
+ };
+
+
+ //
+ //
+ struct AttributeStateCheck: Traversal::Attribute, Context
+ {
+ AttributeStateCheck (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ if (!a.optional_p ())
+ {
+ String ns (a.qualified_p () ? a.namespace_ ().name () : String ());
+
+ os << "if (!as." << ename (a) << ")" << endl
+ << "this->_expected_attribute (" << endl
+ << strlit (ns) << ", " << strlit (a.name ()) << ");";
+ }
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ phase_one_ (c),
+ phase_two_ (c),
+ attribute_state_init_ (c),
+ attribute_state_check_ (c)
+ {
+ names_phase_one_ >> phase_one_;
+ names_phase_two_ >> phase_two_;
+
+ names_attribute_state_init_ >> attribute_state_init_;
+ names_attribute_state_check_ >> attribute_state_check_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ bool has_att (has<Traversal::Attribute> (c));
+ bool has_any (has<Traversal::AnyAttribute> (c));
+
+ if (!has_att && !has_any)
+ return;
+
+ bool has_req_att (false);
+ if (has_att)
+ {
+ RequiredAttributeTest test (has_req_att);
+ Traversal::Names names_test (test);
+ names (c, names_test);
+ }
+
+ String const& name (ename (c));
+
+ os <<"// Attribute validation and dispatch functions for " <<
+ name << "." << endl
+ <<"//" << endl;
+
+ if (has_att)
+ {
+ // _attribute_impl_phase_one
+ //
+ os << "bool " << name << "::" << endl
+ << "_attribute_impl_phase_one (const " << string_type <<
+ "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "& s)" << endl
+ << "{";
+
+ names (c, names_phase_one_);
+
+ // Nothing matched - call our base (extension) or return false
+ // if there is no base (or restriction (even from anyType)).
+ //
+ os << "return ";
+
+ if (c.inherits_p () &&
+ !c.inherits ().is_a<SemanticGraph::Restricts> ())
+ {
+ os << "this->" << fq_name (c.inherits ().base ()) <<
+ "::_attribute_impl_phase_one (ns, n, s);";
+ }
+ else
+ os << "false;";
+
+ os << "}";
+ }
+
+
+ if (has_any)
+ {
+ // _attribute_impl_phase_two
+ //
+ os << "bool " << name << "::" << endl
+ << "_attribute_impl_phase_two (const " << string_type <<
+ "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "& s)"
+ << "{";
+
+ names (c, names_phase_two_);
+
+ // Nothing matched - call our base (extension) or return false
+ // if there is no base (or restriction (even from anyType)).
+ //
+ os << "return ";
+
+ if (c.inherits_p () &&
+ !c.inherits ().is_a<SemanticGraph::Restricts> ())
+ {
+ os << "this->" << fq_name (c.inherits ().base ()) <<
+ "::_attribute_impl_phase_two (ns, n, s);";
+ }
+ else
+ os << "false;";
+
+ os << "}";
+ }
+
+ if (has_req_att)
+ {
+ // _pre_a_validate
+ //
+ os << "void " << name << "::" << endl
+ << "_pre_a_validate ()"
+ << "{"
+ << "this->v_state_attr_stack_.push ();"
+ << "v_state_attr_& as = *static_cast< v_state_attr_* > (" <<
+ "this->v_state_attr_stack_.top ());"
+ << endl;
+
+ names (c, names_attribute_state_init_);
+
+ // Call our base (extension) last.
+ //
+ if (c.inherits_p () &&
+ !c.inherits ().is_a<SemanticGraph::Restricts> ())
+ {
+ os << "this->" << fq_name (c.inherits ().base ()) <<
+ "::_pre_a_validate ();";
+ }
+
+ os << "}";
+
+
+ // _post_a_validate
+ //
+ os << "void " << name << "::" << endl
+ << "_post_a_validate ()"
+ << "{";
+
+ // Call our base (extension) first.
+ //
+ if (c.inherits_p () &&
+ !c.inherits ().is_a<SemanticGraph::Restricts> ())
+ {
+ os << "this->" << fq_name (c.inherits ().base ()) <<
+ "::_post_a_validate ();"
+ << endl;
+ }
+
+ os << "v_state_attr_& as = *static_cast< v_state_attr_* > (" <<
+ "this->v_state_attr_stack_.top ());"
+ << endl;
+
+ names (c, names_attribute_state_check_);
+
+ os << endl
+ << "this->v_state_attr_stack_.pop ();"
+ << "}";
+ }
+ }
+
+ private:
+ PhaseOne phase_one_;
+ Traversal::Names names_phase_one_;
+
+ PhaseTwo phase_two_;
+ Traversal::Names names_phase_two_;
+
+ AttributeStateInit attribute_state_init_;
+ Traversal::Names names_attribute_state_init_;
+
+ AttributeStateCheck attribute_state_check_;
+ Traversal::Names names_attribute_state_check_;
+ };
+ }
+
+ void
+ generate_attribute_validation_source (Context& ctx)
+ {
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ Complex complex (ctx);
+
+ names >> complex;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/attribute-validation-source.hxx b/xsd/xsd/cxx/parser/attribute-validation-source.hxx
new file mode 100644
index 0000000..1f19bed
--- /dev/null
+++ b/xsd/xsd/cxx/parser/attribute-validation-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/attribute-validation-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_ATTRIBUTE_VALIDATION_SOURCE_HXX
+#define XSD_CXX_PARSER_ATTRIBUTE_VALIDATION_SOURCE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_attribute_validation_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_ATTRIBUTE_VALIDATION_SOURCE_HXX
diff --git a/xsd/xsd/cxx/parser/characters-validation-source.cxx b/xsd/xsd/cxx/parser/characters-validation-source.cxx
new file mode 100644
index 0000000..749a4cc
--- /dev/null
+++ b/xsd/xsd/cxx/parser/characters-validation-source.cxx
@@ -0,0 +1,73 @@
+// file : xsd/cxx/parser/characters-validation-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/characters-validation-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ if (!c.mixed_p ())
+ return;
+
+ String const& name (ename (c));
+
+ os <<"// Character validation functions for " << name << "." << endl
+ <<"//" << endl;
+
+ // _characters_impl
+ //
+ os << "bool " << name << "::" << endl
+ << "_characters_impl (const " << string_type << "& s)"
+ << "{"
+ << "this->_any_characters (s);"
+ << "return true;"
+ << "}";
+ }
+ };
+ }
+
+ void
+ generate_characters_validation_source (Context& ctx)
+ {
+ //@@ Most of the time there is no mixed content type so
+ // we generate an empty namespace which looks ugly. Will
+ // need to implement smart namespace to handle this at
+ // some point.
+ //
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ Complex complex (ctx);
+
+ names >> complex;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/characters-validation-source.hxx b/xsd/xsd/cxx/parser/characters-validation-source.hxx
new file mode 100644
index 0000000..909901b
--- /dev/null
+++ b/xsd/xsd/cxx/parser/characters-validation-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/characters-validation-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_CHARACTERS_VALIDATION_SOURCE_HXX
+#define XSD_CXX_PARSER_CHARACTERS_VALIDATION_SOURCE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_characters_validation_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_CHARACTERS_VALIDATION_SOURCE_HXX
diff --git a/xsd/xsd/cxx/parser/driver-source.cxx b/xsd/xsd/cxx/parser/driver-source.cxx
new file mode 100644
index 0000000..d1e6b7f
--- /dev/null
+++ b/xsd/xsd/cxx/parser/driver-source.cxx
@@ -0,0 +1,775 @@
+// file : xsd/cxx/parser/driver-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+#include <map>
+#include <sstream>
+
+#include <xsd/cxx/parser/driver-source.hxx>
+#include <xsd/cxx/parser/print-impl-common.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ typedef map<SemanticGraph::Type*, String> TypeInstanceMap;
+ typedef set<String> InstanceSet;
+
+ // For base types we only want member's types, but not the
+ // base itself.
+ //
+ struct BaseType: Traversal::Complex,
+ Traversal::List,
+ Context
+ {
+ BaseType (Context& c, Traversal::NodeBase& def)
+ : Context (c), def_ (def)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c);
+
+ if (!restriction_p (c))
+ names (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ def_.dispatch (l.argumented ().type ());
+ }
+
+ private:
+ Traversal::NodeBase& def_;
+ };
+
+ struct ParserDef: Traversal::Type,
+ Traversal::List,
+ Traversal::Complex,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities,
+
+ Context
+ {
+ ParserDef (Context& c, TypeInstanceMap& map, InstanceSet& set)
+ : Context (c), map_ (map), set_ (set), base_ (c, *this)
+ {
+ *this >> inherits_ >> base_ >> inherits_;
+
+ *this >> names_;
+ base_ >> names_;
+
+ names_ >> member_ >> belongs_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ if (map_.find (&t) == map_.end ())
+ {
+ String inst (find_instance_name (t));
+ map_[&t] = inst;
+
+ os << fq_name (t, "impl") << " " << inst << ";";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ if (map_.find (&l) == map_.end ())
+ {
+ String inst (find_instance_name (l));
+ map_[&l] = inst;
+
+ os << fq_name (l, "impl") << " " << inst << ";";
+
+ dispatch (l.argumented ().type ());
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ if (map_.find (&c) == map_.end ())
+ {
+ String inst (find_instance_name (c));
+ map_[&c] = inst;
+
+ os << fq_name (c, "impl") << " " << inst << ";";
+
+ inherits (c);
+
+ if (!restriction_p (c))
+ names (c);
+ }
+ }
+
+ // anyType & anySimpleType.
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ fund_type (t, "any_type");
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ fund_type (t, "any_simple_type");
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ fund_type (t, "boolean");
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ fund_type (t, "byte");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ fund_type (t, "unsigned_byte");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ fund_type (t, "short");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ fund_type (t, "unsigned_short");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ fund_type (t, "int");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ fund_type (t, "unsigned_int");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ fund_type (t, "long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ fund_type (t, "unsigned_long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ fund_type (t, "integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ fund_type (t, "non_positive_integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ fund_type (t, "non_negative_integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ fund_type (t, "positive_integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ fund_type (t, "negative_integer");
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ fund_type (t, "float");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ fund_type (t, "double");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ fund_type (t, "decimal");
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ fund_type (t, "string");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ fund_type (t, "normalized_string");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ fund_type (t, "token");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ fund_type (t, "nmtoken");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ fund_type (t, "nmtokens");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ fund_type (t, "name");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ fund_type (t, "ncname");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ fund_type (t, "language");
+ }
+
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ fund_type (t, "qname");
+ }
+
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ fund_type (t, "id");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ fund_type (t, "idref");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ fund_type (t, "idrefs");
+ }
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ fund_type (t, "uri");
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ fund_type (t, "base64_binary");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ fund_type (t, "hex_binary");
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ fund_type (t, "date");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ fund_type (t, "date_time");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ fund_type (t, "duration");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ fund_type (t, "day");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ fund_type (t, "month");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ fund_type (t, "month_day");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ fund_type (t, "year");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ fund_type (t, "year_month");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ fund_type (t, "time");
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity& t)
+ {
+ fund_type (t, "entity");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities& t)
+ {
+ fund_type (t, "entities");
+ }
+
+ private:
+ virtual void
+ fund_type (SemanticGraph::Type& t, String const& name)
+ {
+ if (map_.find (&t) == map_.end ())
+ {
+ String inst (find_instance_name (name));
+ map_[&t] = inst;
+
+ os << fq_name (t, "impl") << " " << inst << ";";
+ }
+ }
+
+ String
+ find_instance_name (String const& raw_name)
+ {
+ String base_name (escape (raw_name + L"_p"));
+ String name (base_name);
+
+ for (size_t i (1); set_.find (name) != set_.end (); ++i)
+ {
+ std::wostringstream os;
+ os << i;
+ name = base_name + os.str ();
+ }
+
+ set_.insert (name);
+ return name;
+ }
+
+ String
+ find_instance_name (SemanticGraph::Type& t)
+ {
+ return find_instance_name (t.name ());
+ }
+
+ TypeInstanceMap& map_;
+ InstanceSet& set_;
+
+ BaseType base_;
+ Traversal::Inherits inherits_;
+
+ Traversal::Names names_;
+ Traversal::Member member_;
+ Traversal::Belongs belongs_;
+ };
+
+ struct ArgList: Traversal::Complex,
+ Traversal::List,
+ Traversal::Member,
+ Context
+ {
+ ArgList (Context& c, TypeInstanceMap& map)
+ : Context (c), map_ (map), first_ (true)
+ {
+ inherits_ >> *this;
+ names_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c, inherits_);
+
+ if (!restriction_p (c))
+ names (c, names_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ if (!first_)
+ os << "," << endl;
+ else
+ first_ = false;
+
+ os << map_[&l.argumented ().type ()];
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ if (skip (m))
+ return;
+
+ if (!first_)
+ os << "," << endl;
+ else
+ first_ = false;
+
+ os << map_[&m.type ()];
+ }
+
+ private:
+ TypeInstanceMap& map_;
+
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+
+ bool first_;
+ };
+
+ struct ParserConnect: Traversal::List,
+ Traversal::Complex,
+ Context
+ {
+ ParserConnect (Context& c, TypeInstanceMap& map)
+ : Context (c), map_ (map), base_ (c, *this)
+ {
+ *this >> inherits_ >> base_ >> inherits_;
+
+ *this >> names_;
+ base_ >> names_;
+
+ names_ >> member_ >> belongs_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ if (type_set_.find (&l) == type_set_.end ())
+ {
+ os << map_[&l] << ".parsers (" <<
+ map_[&l.argumented ().type ()] << ");"
+ << endl;
+
+ type_set_.insert (&l);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ if (type_set_.find (&c) == type_set_.end ())
+ {
+ if (has_members (c))
+ {
+ os << map_[&c] << ".parsers (";
+
+ ArgList args (*this, map_);
+ args.dispatch (c);
+
+ os << ");"
+ << endl;
+ }
+
+ type_set_.insert (&c);
+
+ inherits (c);
+
+ if (!restriction_p (c))
+ names (c);
+ }
+ }
+
+ private:
+ bool
+ has_members (SemanticGraph::Complex& c)
+ {
+ using SemanticGraph::Complex;
+
+ if (has<Traversal::Member> (c))
+ return true;
+
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& b (c.inherits ().base ());
+
+ if (Complex* cb = dynamic_cast<Complex*> (&b))
+ return has_members (*cb);
+
+ return b.is_a<SemanticGraph::List> ();
+ }
+
+ return false;
+ }
+
+ private:
+ TypeInstanceMap& map_;
+ set<SemanticGraph::Type*> type_set_;
+
+ BaseType base_;
+ Traversal::Inherits inherits_;
+
+ Traversal::Names names_;
+ Traversal::Member member_;
+ Traversal::Belongs belongs_;
+ };
+ }
+
+ void
+ generate_driver_source (Context& ctx)
+ {
+ // Figure out the root element. Validator should have made sure
+ // it is unique.
+ //
+ SemanticGraph::Element* root (0);
+ {
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ RootElement root_element (ctx.options, root);
+
+ schema >> schema_names >> ns >> ns_names >> root_element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+
+ std::wostream& os (ctx.os);
+ String const& L (ctx.L);
+ String const& cerr (ctx.cerr_inst);
+
+ InstanceSet set;
+ TypeInstanceMap map;
+ SemanticGraph::Type& root_type (root->type ());
+
+ set.insert ("doc_p");
+
+ os << "#include <iostream>" << endl
+ << endl
+ << "int" << endl
+ << "main (int argc, char* argv[])"
+ << "{"
+ << "if (argc != 2)"
+ << "{"
+ << cerr << " << " << L << "\"usage: \" << argv[0] << " <<
+ L << "\" file.xml\" << std::endl;"
+ << "return 1;"
+ << "}"
+ << "try"
+ << "{"
+ << "// Instantiate individual parsers." << endl
+ << "//" << endl;
+
+ {
+ ParserDef def (ctx, map, set);
+ def.dispatch (root_type);
+ }
+
+ os << endl
+ << "// Connect the parsers together." << endl
+ << "//" << endl;
+
+ {
+ ParserConnect connect (ctx, map);
+ connect.dispatch (root_type);
+ }
+
+ String const& root_p (map[&root_type]);
+
+ os << "// Parse the XML document." << endl
+ << "//" << endl;
+
+ if (root->namespace_().name ())
+ os << ctx.xs_ns_name () << "::document doc_p (" << endl
+ << root_p << "," << endl
+ << ctx.strlit (root->namespace_().name ()) << "," << endl
+ << ctx.strlit (root->name ()) << ");"
+ << endl;
+ else
+ os << ctx.xs_ns_name () << "::document doc_p (" << root_p << ", " <<
+ ctx.strlit (root->name ()) << ");"
+ << endl;
+
+ os << root_p << ".pre ();"
+ << "doc_p.parse (argv[1]);";
+
+ String const& ret (Context::ret_type (root_type));
+ String const& post (Context::post_name (root_type));
+
+ if (ret == L"void")
+ os << root_p << "." << post << " ();";
+ else
+ {
+ os << Context::arg_type (root_type) << " v (" <<
+ root_p << "." << post << " ());"
+ << endl;
+
+ if (ctx.options.generate_print_impl ())
+ {
+ PrintCall t (ctx, root->name (), "v");
+ t.dispatch (root_type);
+ }
+ else
+ os << "// TODO" << endl
+ << "//" << endl;
+ }
+
+ os << "}" // try
+ << "catch (const " << ctx.xs_ns_name () << "::exception& e)"
+ << "{"
+ << cerr << " << e << std::endl;"
+ << "return 1;"
+ << "}"
+ << "catch (const std::ios_base::failure&)"
+ << "{"
+ << cerr << " << argv[1] << " <<
+ L << "\": error: io failure\" << std::endl;"
+ << "return 1;"
+ << "}"
+ << "}";
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/driver-source.hxx b/xsd/xsd/cxx/parser/driver-source.hxx
new file mode 100644
index 0000000..154091f
--- /dev/null
+++ b/xsd/xsd/cxx/parser/driver-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/driver-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_DRIVER_SOURCE_HXX
+#define XSD_CXX_PARSER_DRIVER_SOURCE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_driver_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_DRIVER_SOURCE_HXX
diff --git a/xsd/xsd/cxx/parser/element-validation-source.cxx b/xsd/xsd/cxx/parser/element-validation-source.cxx
new file mode 100644
index 0000000..a5379c2
--- /dev/null
+++ b/xsd/xsd/cxx/parser/element-validation-source.cxx
@@ -0,0 +1,1600 @@
+// file : xsd/cxx/parser/element-validation-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <vector>
+
+#include <xsd/cxx/parser/element-validation-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ typedef vector<SemanticGraph::Particle*> Particles;
+
+ //
+ //
+ struct ParticleTest: Traversal::Compositor,
+ Traversal::Element,
+ Traversal::Any,
+ Context
+ {
+ ParticleTest (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ String const& name (e.name ());
+
+ if (polymorphic && e.global_p ())
+ os << "(";
+
+ if (e.qualified_p () && e.namespace_ ().name ())
+ {
+ String const& ns (e.namespace_ ().name ());
+
+ os << "n == " << strlit (name) << " &&" << endl
+ << "ns == " << strlit (ns);
+ }
+ else
+ os << "n == " << strlit (name) << " && ns.empty ()";
+
+
+ // Only a globally-defined element can be a subst-group root.
+ //
+ if (polymorphic && e.global_p ())
+ {
+ os << ") ||" << endl
+ << "::xsd::cxx::parser::substitution_map_instance< " <<
+ char_type << " > ().check (" << endl
+ << "ns, n, " << strlit (e.namespace_ ().name ()) <<
+ ", " << strlit (name) << ", t)";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& ns (a.definition_namespace ().name ());
+
+ // Note that we need to make sure the "flush" element (both name
+ // and namespace are empty) does not match any compositor.
+ //
+ for (SemanticGraph::Any::NamespaceIterator i (a.namespace_begin ()),
+ e (a.namespace_end ()); i != e;)
+ {
+ if (*i == L"##any")
+ {
+ os << "!n.empty ()";
+ }
+ else if (*i == L"##other")
+ {
+ if (ns)
+ {
+ // Note that here I assume that ##other does not include
+ // unqualified names in a schema with target namespace.
+ // This is not what the spec says but that seems to be
+ // the consensus.
+ //
+ os << "(!ns.empty () && ns != " << strlit (ns) << ")";
+ }
+ else
+ os << "!ns.empty ()";
+ }
+ else if (*i == L"##local")
+ {
+ os << "(ns.empty () && !n.empty ())";
+ }
+ else if (*i == L"##targetNamespace")
+ {
+ os << "ns == " << strlit (ns);
+ }
+ else
+ {
+ os << "ns == " << strlit (*i);
+ }
+
+ if (++i != e)
+ os << " ||" << endl;
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor& c)
+ {
+ // This compositor should already have been tested for
+ // triviality (empty).
+ //
+ Particles const& p (c.context ().get<Particles> ("prefixes"));
+
+ bool paren (p.size () != 1);
+
+ for (Particles::const_iterator i (p.begin ()), e (p.end ());
+ i != e;)
+ {
+ if (paren)
+ os << "(";
+
+ dispatch (**i);
+
+ if (paren)
+ os << ")";
+
+ if (++i != e)
+ os << " ||" << endl;
+ }
+ }
+ };
+
+
+ // Generates particle namespace-name pair. Used to generate
+ // the _expected_element call.
+ //
+ struct ParticleName: Traversal::Compositor,
+ Traversal::Element,
+ Traversal::Any,
+ Context
+ {
+ ParticleName (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ String ns (e.qualified_p () ? e.namespace_ ().name () : String ());
+ os << strlit (ns) << ", " << strlit (e.name ());
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& ns (*a.namespace_begin ());
+ os << strlit (ns) << ", " << L << "\"*\"";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor& c)
+ {
+ Particles const& p (c.context ().get<Particles> ("prefixes"));
+
+ dispatch (**p.begin ());
+ }
+ };
+
+
+ // Common base for the ParticleIn{All, Choice, Sequence} treversers.
+ //
+ struct ParticleInCompositor: Context
+ {
+ protected:
+ ParticleInCompositor (Context& c, SemanticGraph::Complex& type)
+ : Context (c), type_ (type), particle_test_ (c)
+ {
+ }
+
+
+ // Generate sub-parser setup code as well as the pre/post calls.
+ //
+ void
+ pre_post_calls (SemanticGraph::Particle& p)
+ {
+ using SemanticGraph::Element;
+ using SemanticGraph::Complex;
+
+ if (Element* e = dynamic_cast<Element*> (&p))
+ {
+ SemanticGraph::Type& type (e->type ());
+ String const& fq_type (fq_name (type));
+ bool poly (polymorphic && !anonymous (type));
+
+ String name, inst, def_parser, map;
+
+ if (e->context ().count("name"))
+ {
+ name = ename (*e);
+
+ if (poly)
+ {
+ def_parser = emember (*e);
+ map = emember_map (*e);
+ inst = "p";
+ }
+ else
+ inst = L"this->" + emember (*e);
+ }
+ else
+ {
+ // This is the subsequent mentioning of this element in the
+ // content. We need to find the first one in order to get
+ // to the escaped names.
+ //
+ Complex::NamesIteratorPair ip (type_.find (e->name ()));
+ assert (ip.first != ip.second);
+ Element& fe (dynamic_cast<Element&>(ip.first->named ()));
+
+ name = ename (fe);
+
+ if (poly)
+ {
+ def_parser = emember (fe);
+ map = emember_map (fe);
+ inst = "p";
+ }
+ else
+ inst = L"this->" + emember (fe);
+ }
+
+ if (poly)
+ {
+ // For pre-computing length.
+ //
+ String type_id (type.name ());
+
+ if (String type_ns = xml_ns_name (type))
+ {
+ type_id += L' ';
+ type_id += type_ns;
+ }
+
+ os << fq_type << "* p = 0;"
+ << endl
+ << "if (t == 0 && this->" << def_parser << " != 0)" << endl
+ << inst << " = this->" << def_parser << ";"
+ << "else"
+ << "{"
+ << string_type << " ts (" << fq_name (type) <<
+ "::_static_type (), " << type_id.size () << "UL);"
+ << endl
+ << "if (t == 0)" << endl
+ << "t = &ts;"
+ << endl
+ << "if (this->" << def_parser << " != 0 && *t == ts)" << endl
+ << inst << " = this->" << def_parser << ";"
+ << "else"
+ << "{";
+
+ // Check that the types are related by inheritance.
+ //
+ os << "if (t != &ts &&" << endl
+ << "!::xsd::cxx::parser::validating::" <<
+ "inheritance_map_instance< " << char_type <<
+ " > ().check (" << endl
+ << "t->data (), ts))" << endl
+ << "throw ::xsd::cxx::parser::dynamic_type< " << char_type <<
+ " > (*t);"
+ << endl
+ << "if (this->" << map << " != 0)" << endl
+ << inst << " = dynamic_cast< " << fq_type << "* > (" << endl
+ << "this->" << map << "->find (*t));"
+ << "}"
+ << "}";
+ }
+
+ os << "this->" << complex_base << "::context_.top ()." <<
+ "parser_ = " << inst << ";"
+ << endl
+ << "if (" << inst << ")" << endl
+ << inst << "->pre ();"
+ << "}"
+ << "else" // start
+ << "{";
+
+ if (poly)
+ os << fq_type << "* p =" << endl
+ << "dynamic_cast< " << fq_type << "* > (" << endl
+ << "this->" << complex_base << "::context_.top ().parser_);"
+ << endl;
+
+ os << "if (" << inst << ")"
+ << "{";
+
+ String const& ret (ret_type (type));
+ String const& post (post_name (type));
+
+ if (ret == L"void")
+ os << inst << "->" << post << " ();"
+ << "this->" << name << " ();";
+ else
+ {
+ // Don't create an lvalue in C++11 (think std::unique_ptr).
+ // In C++98 we do it for compatibility with older/broken
+ // compilers (e.g., IBM xlC that needs an lvalue to pass
+ // std::auto_ptr).
+ //
+ if (std == cxx_version::cxx98)
+ os << arg_type (type) << " tmp (" << inst << "->" <<
+ post << " ());"
+ << "this->" << name << " (tmp);";
+ else
+ os << "this->" << name << " (" << inst << "->" <<
+ post << " ());";
+ }
+
+ os << "}";
+ }
+ else
+ {
+ os << "this->_start_any_element (ns, n, t);"
+ << "this->" << complex_base << "::context_.top ().any_ = true;"
+ << "}"
+ << "else" // start
+ << "{"
+ << "this->" << complex_base << "::context_.top ().any_ = false;"
+ << "this->_end_any_element (ns, n);";
+ }
+ }
+
+ protected:
+ SemanticGraph::Complex& type_;
+ ParticleTest particle_test_;
+ };
+
+
+
+ // The 'all' compositor can only contain elements with min={0,1}, max=1.
+ //
+ struct ParticleInAll: Traversal::Element,
+ ParticleInCompositor
+ {
+ ParticleInAll (Context& c, SemanticGraph::Complex& type)
+ : ParticleInCompositor (c, type)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ size_t state (e.context ().get<size_t> ("state"));
+
+ if (state != 0)
+ os << "else ";
+
+ os << "if (";
+
+ particle_test_.traverse (e);
+
+ os << ")"
+ << "{"
+ << "if (count[" << state << "UL] == 0)"
+ << "{"
+ << "if (start)"
+ << "{";
+
+ pre_post_calls (e);
+
+ os << "count[" << state << "UL] = 1;"
+ << "}"
+ << "}"
+ << "else" // count != 0
+ << "{"
+ << "assert (start);" // Assuming well-formed XML.
+
+ // Since there is never more content after 'all', we could have
+ // as well thrown here. But instead we will let the code in
+ // start_element handle this along with other unexpected
+ // elements.
+ //
+ << "state = ~0UL;"
+ << "}"
+ << "}";
+ }
+ };
+
+
+ //
+ //
+ struct ParticleInChoice: Traversal::Particle,
+ Traversal::Compositor,
+ ParticleInCompositor
+ {
+ ParticleInChoice (Context& c, SemanticGraph::Complex& type)
+ : ParticleInCompositor (c, type), particle_name_ (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Particle& p)
+ {
+ using SemanticGraph::Element;
+
+ size_t state (p.context ().get<size_t> ("state"));
+
+ size_t min (p.min ()), max (p.max ());
+
+ os << "case " << state << "UL:" << endl
+ << "{";
+
+ if (max != 1) // We don't need the test if max == 1.
+ {
+ os << "if (";
+
+ particle_test_.dispatch (p);
+
+ os << ")"
+ << "{";
+ }
+
+ os << "if (start)"
+ << "{";
+
+ pre_post_calls (p);
+
+ switch (max)
+ {
+ case 0:
+ {
+ os << "count++;";
+ break;
+ }
+ case 1:
+ {
+ // We do not need to increment count because min <= max and
+ // we do not generate min check for min <= 1 (see below).
+ //
+ os << "state = ~0UL;";
+ break;
+ }
+ default:
+ {
+ os << "if (++count == " << max << "UL)" << endl
+ << "state = ~0UL;";
+ }
+ };
+
+ os << "}"; // start
+
+ // We've already moved to the final state if max == 1.
+ //
+ if (max != 1)
+ {
+ os << "}"
+ << "else"
+ << "{"
+ << "assert (start);"; // Assuming well-formed XML
+
+ // Check if min cardinality requirements have been met. Since
+ // count is always >= 1, don't generate dead code if min <= 1.
+ //
+ if (min > 1)
+ {
+ os << "if (count < " << min << "UL)" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (p);
+
+ os << "," << endl
+ << "ns, n);";
+ }
+
+
+ os << "state = ~0UL;"
+ << "}";
+ }
+
+ os << "break;"
+ << "}"; // case
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor& c)
+ {
+ using SemanticGraph::Compositor;
+
+ size_t max (c.max ());
+ size_t min (c.context ().get<size_t> ("effective-min"));
+ size_t n (c.context ().get<size_t> ("comp-number"));
+ size_t state (c.context ().get<size_t> ("state"));
+
+ String func (c.is_a<SemanticGraph::Choice> () ?
+ "choice_" : "sequence_");
+
+ os << "case " << state << "UL:" << endl
+ << "{"
+ << "unsigned long s (~0UL);"
+ << endl;
+
+ bool first (true);
+
+ for (Compositor::ContainsIterator ci (c.contains_begin ());
+ ci != c.contains_end (); ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<Compositor> () && !c.context ().count ("comp-number"))
+ continue; // Empty compositor.
+
+ if (!p.context ().count ("prefix"))
+ break;
+
+ size_t state (p.context ().get<size_t> ("state"));
+
+ if (first)
+ first = false;
+ else
+ os << "else ";
+
+ os << "if (";
+
+ particle_test_.dispatch (p);
+
+ os << ")" << endl
+ << "s = " << state << "UL;";
+ }
+
+ // This compositor.
+ //
+ os << endl
+ << "if (s != ~0UL)"
+ << "{"
+ << "assert (start);"; // End is handled by the sub-machine.
+
+ switch (max)
+ {
+ case 0:
+ {
+ os << "count++;";
+ break;
+ }
+ case 1:
+ {
+ // We do not need to increment count because min <= max and
+ // we do not generate min check for min <= 1 (see below).
+ //
+ os << "state = ~0UL;";
+ break;
+ }
+ default:
+ {
+ os << "if (++count == " << max << "UL)" << endl
+ << "state = ~0UL;";
+ }
+ };
+
+ // Delegate to the sub-machine.
+ //
+
+ os << endl
+ << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_& vd = vs.data[vs.size++];" // push
+ << endl
+ << "vd.func = &" << ename (type_) << "::" << func << n << ";"
+ << "vd.state = s;"
+ << "vd.count = 0;"
+ << endl
+ << "this->" << func << n << " (vd.state, vd.count, ns, n, t, true);"
+ << "}";
+
+
+ // Not this compositor. We've elready moved to the final state
+ // if max == 1.
+ //
+ if (max != 1)
+ {
+ os << "else"
+ << "{"
+ << "assert (start);"; // Assuming well-formed XML
+
+ // Check if min cardinality requirements have been met. Since
+ // count is always >= 1, don't generate dead code if min <= 1.
+ //
+ if (min > 1)
+ {
+ os << "if (count < " << min << "UL)" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (c);
+
+ os << "," << endl
+ << "ns, n);";
+ }
+
+ os << "state = ~0UL;"
+ << "}";
+ }
+
+ os << "break;"
+ << "}"; // case
+ }
+
+ private:
+ ParticleName particle_name_;
+ };
+
+
+ //
+ //
+ struct ParticleInSequence: Traversal::Particle,
+ Traversal::Compositor,
+ ParticleInCompositor
+ {
+ ParticleInSequence (Context& c,
+ size_t state,
+ size_t next_state,
+ SemanticGraph::Complex& type)
+ : ParticleInCompositor (c, type),
+ state_ (state), particle_name_ (c)
+ {
+ // next_state == 0 indicates the terminal state (~0UL).
+ //
+ if (next_state != 0)
+ {
+ std::wostringstream ostr;
+ ostr << next_state;
+ next_state_ = ostr.str ();
+ }
+ else
+ next_state_ = L"~0";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Particle& p)
+ {
+ size_t min (p.min ()), max (p.max ());
+
+ os << "case " << state_ << "UL:" << endl
+ << "{"
+ << "if (";
+
+ particle_test_.dispatch (p);
+
+ os << ")"
+ << "{";
+
+ // This element.
+ //
+
+ os << "if (start)"
+ << "{";
+
+ pre_post_calls (p);
+
+ switch (max)
+ {
+ case 0:
+ {
+ os << "count++;";
+ break;
+ }
+ case 1:
+ {
+ os << "count = 0;"
+ << "state = " << next_state_ << "UL;";
+ break;
+ }
+ default:
+ {
+ os << "if (++count == " << max << "UL)"
+ << "{"
+ << "count = 0;"
+ << "state = " << next_state_ << "UL;"
+ << "}";
+ }
+ };
+
+ os << "}" // start
+ << "break;"
+ << "}";
+
+ // Not this element.
+ //
+
+ os << "else"
+ << "{"
+ << "assert (start);"; // Assuming well-formed XML.
+
+ // Check if min cardinality requirements have been met. Since
+ // count is always >= 0, don't generate dead code if min == 0.
+ //
+ if (min != 0)
+ {
+ os << "if (count < " << min << "UL)" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (p);
+
+ os << "," << endl
+ << "ns, n);";
+ }
+
+ os << "count = 0;"
+ << "state = " << next_state_ << "UL;"
+ << "// Fall through." << endl
+ << "}" // else
+ << "}"; // case
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor& c)
+ {
+ using SemanticGraph::Compositor;
+
+ size_t max (c.max ());
+ size_t min (c.context ().get<size_t> ("effective-min"));
+ size_t n (c.context ().get<size_t> ("comp-number"));
+
+ String func (c.is_a<SemanticGraph::Choice> () ?
+ "choice_" : "sequence_");
+
+ os << "case " << state_ << "UL:" << endl
+ << "{"
+ << "unsigned long s (~0UL);"
+ << endl;
+
+ bool first (true);
+
+ for (Compositor::ContainsIterator ci (c.contains_begin ());
+ ci != c.contains_end (); ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<Compositor> () && !c.context ().count ("comp-number"))
+ continue; // Empty compositor.
+
+ if (!p.context ().count ("prefix"))
+ break;
+
+ size_t state (p.context ().get<size_t> ("state"));
+
+ if (first)
+ first = false;
+ else
+ os << "else ";
+
+ os << "if (";
+
+ particle_test_.dispatch (p);
+
+ os << ")" << endl
+ << "s = " << state << "UL;";
+ }
+
+ // This element.
+ //
+
+ os << endl
+ << "if (s != ~0UL)"
+ << "{"
+ << "assert (start);"; // End is handled by the sub-machine.
+
+ switch (max)
+ {
+ case 0:
+ {
+ os << "count++;"
+ << endl;
+ break;
+ }
+ case 1:
+ {
+ os << "count = 0;"
+ << "state = " << next_state_ << "UL;"
+ << endl;
+ break;
+ }
+ default:
+ {
+ os << "if (++count == " << max << "UL)"
+ << "{"
+ << "count = 0;"
+ << "state = " << next_state_ << "UL;"
+ << "}";
+ }
+ };
+
+ // Delegate to the sub-machine.
+ //
+
+ os << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_& vd = vs.data[vs.size++];" // push
+ << endl
+ << "vd.func = &" << ename (type_) << "::" << func << n << ";"
+ << "vd.state = s;"
+ << "vd.count = 0;"
+ << endl
+ << "this->" << func << n << " (vd.state, vd.count, ns, n, t, true);"
+ << "break;"
+ << "}";
+
+ // Not this compositor.
+ //
+
+ os << "else"
+ << "{"
+ << "assert (start);"; // Assuming well-formed XML
+
+ // Check if min cardinality requirements have been met. Since
+ // count is always >= 0, don't generate dead code if min == 0.
+ //
+ if (min != 0)
+ {
+ os << "if (count < " << min << "UL)" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (c);
+
+ os << "," << endl
+ << "ns, n);";
+ }
+
+ os << "count = 0;"
+ << "state = " << next_state_ << "UL;"
+ << "// Fall through." << endl
+ << "}" // else
+ << "}"; // case
+ }
+
+ private:
+ size_t state_;
+ String next_state_;
+
+ ParticleName particle_name_;
+ };
+
+
+ //
+ //
+ struct ParticleFunction: Traversal::All,
+ Traversal::Choice,
+ Traversal::Sequence,
+ Context
+ {
+ ParticleFunction (Context& c, SemanticGraph::Complex& type)
+ : Context (c), type_ (type)
+ {
+ *this >> contains_particle_ >> *this;
+ }
+
+
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ if (!a.context().count ("comp-number")) // Empty compositor.
+ return;
+
+ using SemanticGraph::Element;
+ using SemanticGraph::Compositor;
+
+
+ os << "void " << ename (type_) << "::" << endl
+ << "all_0 (unsigned long& state," << endl
+ << "unsigned char* count," << endl
+ << "const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t," << endl
+ << "bool start)"
+ << "{"
+ << "XSD_UNUSED (t);"
+ << endl;
+
+ for (Compositor::ContainsIterator ci (a.contains_begin ()),
+ ce (a.contains_end ()); ci != ce; ++ci)
+ {
+ ParticleInAll t (*this, type_);
+ t.dispatch (ci->particle ());
+ }
+
+ // Handle the flush.
+ //
+ os << "else if (n.empty () && ns.empty ())"
+ << "{";
+
+ for (Compositor::ContainsIterator ci (a.contains_begin ()),
+ ce (a.contains_end ()); ci != ce; ++ci)
+ {
+ if (ci->min () == 0)
+ continue;
+
+ Element& e (dynamic_cast<Element&> (ci->particle ()));
+ String ns (e.qualified_p () ? e.namespace_ ().name () : String ());
+ size_t state (e.context ().get<size_t> ("state"));
+
+ os << "if (count[" << state << "UL] == 0)" << endl
+ << "this->_expected_element (" << endl
+ << strlit (ns) << ", " <<
+ strlit (e.name ()) << ");"
+ << endl;
+ }
+
+ os << "state = ~0UL;"
+ << "}"
+ << "else" << endl
+ << "state = ~0UL;"
+ << "}";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Choice& c)
+ {
+ if (!c.context().count ("comp-number")) // Empty compositor.
+ return;
+
+ using SemanticGraph::Compositor;
+
+ size_t n (c.context ().get<size_t> ("comp-number"));
+
+ os << "void " << ename (type_) << "::" << endl
+ << "choice_" << n << " (unsigned long& state," << endl
+ << "unsigned long& count," << endl
+ << "const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t," << endl
+ << "bool start)"
+ << "{"
+ << "XSD_UNUSED (count);"
+ << "XSD_UNUSED (ns);"
+ << "XSD_UNUSED (n);"
+ << "XSD_UNUSED (t);"
+ << endl
+ << "switch (state)"
+ << "{";
+
+ for (Compositor::ContainsIterator ci (c.contains_begin ()),
+ ce (c.contains_end ()); ci != ce; ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<Compositor> () && !p.context().count ("comp-number"))
+ continue; // Empty compositor.
+
+ ParticleInChoice t (*this, type_);
+ t.dispatch (p);
+ }
+
+ os << "}" // switch
+ << "}";
+
+ // Generate nested compositor functions.
+ //
+ Traversal::Choice::traverse (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Sequence& s)
+ {
+ if (!s.context().count ("comp-number")) // Empty compositor.
+ return;
+
+ using SemanticGraph::Compositor;
+
+ size_t n (s.context ().get<size_t> ("comp-number"));
+
+ os << "void " << ename (type_) << "::" << endl
+ << "sequence_" << n << " (unsigned long& state," << endl
+ << "unsigned long& count," << endl
+ << "const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t," << endl
+ << "bool start)"
+ << "{"
+ << "XSD_UNUSED (t);"
+ << endl
+ << "switch (state)"
+ << "{";
+
+ size_t state (0);
+
+ for (Compositor::ContainsIterator ci (s.contains_begin ()),
+ ce (s.contains_end ()); ci != ce;)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<Compositor> () && !p.context().count ("comp-number"))
+ {
+ // Empty compositor.
+ //
+ ++ci;
+ continue;
+ }
+
+ // Find the next state.
+ //
+ do
+ ++ci;
+ while (ci != ce &&
+ ci->particle ().is_a<Compositor> () &&
+ !ci->particle ().context().count ("comp-number"));
+
+ size_t next (ci == ce ? 0 : state + 1);
+
+ ParticleInSequence t (*this, state++, next, type_);
+ t.dispatch (p);
+ }
+
+ os << "case ~0UL:" << endl
+ << "break;"
+ << "}" // switch
+ << "}";
+
+ // Generate nested compositor functions.
+ //
+ Traversal::Sequence::traverse (s);
+ }
+
+ private:
+ SemanticGraph::Complex& type_;
+ Traversal::ContainsParticle contains_particle_;
+ };
+
+
+ //
+ //
+ struct CompositorPre: Traversal::All,
+ Traversal::Compositor,
+ Context
+ {
+ CompositorPre (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ // Clear the counts and push the initial state.
+ //
+ os << "v_all_count_.push ();"
+ << endl;
+
+ SemanticGraph::Compositor& c (a);
+ traverse (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor&) // Choice and sequence.
+ {
+ os << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_& vd = vs.data[vs.size++];" // push
+ << endl
+ << "vd.func = 0;"
+ << "vd.state = 0;"
+ << "vd.count = 0;";
+ }
+ };
+
+
+ //
+ //
+ struct CompositorStartElement: Traversal::All,
+ Traversal::Compositor,
+ Context
+ {
+ CompositorStartElement (Context& c, SemanticGraph::Complex& type)
+ : Context (c), type_ (type),
+ particle_test_ (c), particle_name_ (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::All&)
+ {
+ // The 'all' state machine reaches the final state only
+ // on an unknown element, in which case we won't get here
+ // again (it would be a validation error). Note that 'all'
+ // compositor cannot contain nested compositors so we don't
+ // need to re-set vd.
+ //
+ os << "all_0 (vd->state, v_all_count_.top (), ns, n, t, true);"
+ << endl
+ << "if (vd->state != ~0UL)" << endl
+ << "vd->count++;"
+ << "else" << endl
+ << "return false;" // Let our parent handle this.
+ << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor& c) // Choice and sequence.
+ {
+ using SemanticGraph::Compositor;
+
+ size_t max (c.max ());
+ size_t min (c.context ().get<size_t> ("effective-min"));
+ size_t n (c.context ().get<size_t> ("comp-number"));
+
+ String func (c.is_a<SemanticGraph::Choice> () ?
+ "choice_" : "sequence_");
+
+ // Invoke the current state machine. If it reaches its
+ // terminal state, pop it and invoke the next one until
+ // we reach the top, which requires special handling.
+ //
+ os << "while (vd->func != 0)"
+ << "{"
+ << "(this->*vd->func) (vd->state, vd->count, ns, n, t, true);"
+ << endl
+ << "vd = vs.data + (vs.size - 1);" // re-acquire
+ << endl
+ << "if (vd->state == ~0UL)" << endl
+ << "vd = vs.data + (--vs.size - 1);" // pop
+ << "else" << endl
+ << "break;"
+ << "}";
+
+
+ // Check if we got to the top. This code is pretty much the
+ // same as the one found in ParticleInSequence.
+ //
+ os << "if (vd->func == 0)"
+ << "{"
+ << "if (vd->state != ~0UL)"
+ << "{"
+ << "unsigned long s = ~0UL;"
+ << endl;
+
+ bool first (true);
+
+ // Note that we don't need to worry about the compositor
+ // being empty - this case is handled by our caller.
+ //
+ for (Compositor::ContainsIterator ci (c.contains_begin ());
+ ci != c.contains_end (); ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<Compositor> () && !c.context ().count ("comp-number"))
+ continue; // Empty compositor.
+
+ if (!p.context ().count ("prefix"))
+ break;
+
+ size_t state (p.context ().get<size_t> ("state"));
+
+ if (first)
+ first = false;
+ else
+ os << "else ";
+
+ os << "if (";
+
+ particle_test_.dispatch (p);
+
+ os << ")" << endl
+ << "s = " << state << "UL;";
+ }
+
+ os << endl
+ << "if (s != ~0UL)"
+ << "{";
+
+ // This element is a prefix of the root compositor.
+ //
+
+ switch (max)
+ {
+ case 0:
+ {
+ os << "vd->count++;";
+ break;
+ }
+ case 1:
+ {
+ os << "vd->count++;"
+ << "vd->state = ~0UL;";
+ break;
+ }
+ default:
+ {
+ os << "if (++vd->count == " << max << "UL)" << endl
+ << "vd->state = ~0UL;";
+ }
+ };
+
+ // Delegate to the sub-machine.
+ //
+
+ os << endl
+ << "vd = vs.data + vs.size++;" // push
+ << "vd->func = &" << ename (type_) << "::" << func << n << ";"
+ << "vd->state = s;"
+ << "vd->count = 0;"
+ << endl
+ << "this->" << func << n << " (vd->state, vd->count, ns, n, t, true);"
+ << "}";
+
+ // This element is not our prefix.
+ //
+
+ os << "else"
+ << "{";
+
+ // Check if min cardinality requirements have been met. Since
+ // count is always >= 0, don't generate dead code if min == 0.
+ //
+ if (min != 0)
+ {
+ os << "if (vd->count < " << min << "UL)" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (c);
+
+ os << "," << endl
+ << "ns, n);";
+ }
+
+ // Return false to indicate that we are not handling this element.
+ //
+ os << "return false;"
+ << "}"
+ << "}" // if (state != ~0)
+ << "else" << endl
+ << "return false;"
+ << "}"; // if (function == 0)
+ }
+
+ private:
+ SemanticGraph::Complex& type_;
+ ParticleTest particle_test_;
+ ParticleName particle_name_;
+ };
+
+
+ //
+ //
+ struct CompositorEndElement: Traversal::All,
+ Traversal::Compositor,
+ Context
+ {
+ CompositorEndElement (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::All&)
+ {
+ os << "all_0 (vd.state, v_all_count_.top (), " <<
+ "ns, n, 0, false);"
+ << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor&) // Choice and sequence.
+ {
+ os << "assert (vd.func != 0);"
+ << "(this->*vd.func) (vd.state, vd.count, ns, n, 0, false);"
+ << endl
+ << "if (vd.state == ~0UL)" << endl
+ << "vs.size--;" // pop
+ << endl;
+ }
+ };
+
+
+ //
+ //
+ struct CompositorPost: Traversal::All,
+ Traversal::Compositor,
+ Context
+ {
+ CompositorPost (Context& c)
+ : Context (c), particle_name_ (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ using SemanticGraph::Element;
+
+ os << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_& vd = vs.data[vs.size - 1];"
+ << endl;
+
+ // Flush the state machine with the empty element name. This
+ // allows us to detect missing content.
+ //
+ os << "if (vd.count != 0)"
+ << "{"
+ << string_type << " empty;"
+ << "all_0 (vd.state, v_all_count_.top (), empty, empty, 0, true);"
+ << "}";
+
+ if (a.context ().get<size_t> ("effective-min") != 0)
+ {
+ os << "else" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (a);
+
+ os << ");";
+ }
+
+ os << endl
+ << "vs.size--;" // pop
+ << "v_all_count_.pop ();";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Compositor& c) // Choice and sequence.
+ {
+ size_t min (c.context ().get<size_t> ("effective-min"));
+
+ os << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_* vd = vs.data + (vs.size - 1);"
+ << endl;
+
+
+ // Flush unfinished state machines with the empty element name.
+ // This allows us to detect missing content. Note that I am
+ // not re-setting vd since no new compositors are pushed on
+ // flush.
+ //
+ os << string_type << " empty;"
+ << "while (vd->func != 0)"
+ << "{"
+ << "(this->*vd->func) (vd->state, vd->count, empty, empty, 0, true);"
+ << "assert (vd->state == ~0UL);"
+ << "vd = vs.data + (--vs.size - 1);" // pop
+ << "}";
+
+ // Check if min cardinality requirements have been met. Since
+ // count is always >= 0, don't generate dead code if min == 0.
+ //
+ if (min != 0)
+ {
+ os << "if (vd->count < " << min << "UL)" << endl
+ << "this->_expected_element (" << endl;
+
+ particle_name_.dispatch (c);
+
+ os << ");";
+ }
+ }
+
+ private:
+ ParticleName particle_name_;
+ };
+
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ // Nothing to generate if we don't have any elements and wildcards.
+ //
+ if (!has<Traversal::Element> (c) &&
+ !has_particle<Traversal::Any> (c))
+ return;
+
+ using SemanticGraph::Compositor;
+
+ String const& name (ename (c));
+ Compositor& comp (c.contains_compositor ().compositor ());
+
+ // Don't use restriction_p here since we don't want special
+ // treatment of anyType.
+ //
+ bool restriction (
+ c.inherits_p () &&
+ c.inherits ().is_a<SemanticGraph::Restricts> ());
+
+ os <<"// Element validation and dispatch functions for " <<
+ name << "." << endl
+ <<"//" << endl;
+
+ // _start_element_impl
+ //
+
+ os << "bool " << name << "::" << endl
+ << "_start_element_impl (const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t)"
+ << "{"
+ << "XSD_UNUSED (t);"
+ << endl;
+
+ os << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_* vd = vs.data + (vs.size - 1);"
+ << endl;
+
+ //@@ OPT: I don't really need to call parser_base since it always
+ // returns false.
+ //
+ // In case of an inheritance-by-extension, call our base first.
+ // We don't need to generate this code for the 'all' compositor
+ // because it can only inherit from the empty content model.
+ // States of the root machine for sequence and choice:
+ //
+ // 0 - calling base
+ // 1 - base returned false
+ // ~0 - terminal state
+ //
+ if (!restriction && !comp.is_a<SemanticGraph::All> ())
+ {
+ os << "if (vd->func == 0 && vd->state == 0)"
+ << "{"
+ << "if (this->";
+
+ if (c.inherits_p ())
+ os << fq_name (c.inherits ().base ());
+ else
+ os << complex_base;
+
+
+ os << "::_start_element_impl (ns, n, t))" << endl
+ << "return true;"
+ << "else" << endl
+ << "vd->state = 1;"
+ << "}";
+ }
+
+ {
+ CompositorStartElement t (*this, c);
+ t.dispatch (comp);
+ }
+
+ os << "return true;"
+ << "}";
+
+
+ // _end_element_impl
+ //
+
+ os << "bool " << name << "::" << endl
+ << "_end_element_impl (const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n)"
+ << "{";
+
+ os << "v_state_& vs = *static_cast< v_state_* > (" <<
+ "this->v_state_stack_.top ());"
+ << "v_state_descr_& vd = vs.data[vs.size - 1];"
+ << endl;
+
+ //@@ OPT: I don't really need to call parser_base since it always
+ // returns false.
+ //
+ // In case of an inheritance-by-extension, call our base first.
+ // We don't need to generate this code for the 'all' compositor
+ // because it can only inherit from the empty content model.
+ //
+ if (!restriction && !comp.is_a<SemanticGraph::All> ())
+ {
+ os << "if (vd.func == 0 && vd.state == 0)"
+ << "{"
+ << "if (!";
+
+ if (c.inherits_p ())
+ os << fq_name (c.inherits ().base ());
+ else
+ os << complex_base;
+
+ os << "::_end_element_impl (ns, n))" << endl
+ << "assert (false);" // Start and end should match.
+ << "return true;"
+ << "}";
+ }
+
+ {
+ CompositorEndElement t (*this);
+ t.dispatch (comp);
+ }
+
+ os << "return true;"
+ << "}";
+
+
+ // _pre_e_validate
+ //
+ os << "void " << name << "::" << endl
+ << "_pre_e_validate ()"
+ << "{"
+ << "this->v_state_stack_.push ();"
+ << "static_cast< v_state_* > (this->v_state_stack_.top ())->" <<
+ "size = 0;"
+ << endl;
+
+ {
+ CompositorPre t (*this);
+ t.dispatch (comp);
+ }
+
+ // In case of an inheritance-by-extension, call our base
+ // _pre_e_validate. We don't need to generate this code for the
+ // 'all' compositor because it can only inherit from the empty
+ // content model.
+ //
+ if (!restriction && !comp.is_a<SemanticGraph::All> ())
+ {
+ // We don't need to call parser_base's implementation
+ // since it does nothing.
+ //
+ if (c.inherits_p ())
+ {
+ os << endl
+ << fq_name (c.inherits ().base ()) << "::_pre_e_validate ();";
+ }
+ }
+
+ os << "}";
+
+
+ // _post_e_validate
+ //
+ os << "void " << name << "::" << endl
+ << "_post_e_validate ()"
+ << "{";
+
+ // In case of an inheritance-by-extension, call our base
+ // _post_e_validate. We don't need to generate this code for
+ // the 'all' compositor because it can only inherit from
+ // the empty content model.
+ //
+ if (!restriction && !comp.is_a<SemanticGraph::All> ())
+ {
+ // We don't need to call parser_base's implementation
+ // since it does nothing.
+ //
+ if (c.inherits_p ())
+ {
+ os << fq_name (c.inherits ().base ()) << "::_post_e_validate ();"
+ << endl;
+ }
+ }
+
+ {
+ CompositorPost t (*this);
+ t.dispatch (c.contains_compositor ().compositor ());
+ }
+
+ os << endl
+ << "this->v_state_stack_.pop ();"
+ << "}";
+
+ //
+ //
+ ParticleFunction t (*this, c);
+ t.dispatch (c.contains_compositor ().compositor ());
+ }
+ };
+ }
+
+ void
+ generate_element_validation_source (Context& ctx)
+ {
+ ctx.os << "#include <cassert>" << endl
+ << endl;
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ Complex complex (ctx);
+
+ names >> complex;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/element-validation-source.hxx b/xsd/xsd/cxx/parser/element-validation-source.hxx
new file mode 100644
index 0000000..b358aee
--- /dev/null
+++ b/xsd/xsd/cxx/parser/element-validation-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/element-validation-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_ELEMENT_VALIDATION_SOURCE_HXX
+#define XSD_CXX_PARSER_ELEMENT_VALIDATION_SOURCE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_element_validation_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_ELEMENT_VALIDATION_SOURCE_HXX
diff --git a/xsd/xsd/cxx/parser/elements.cxx b/xsd/xsd/cxx/parser/elements.cxx
new file mode 100644
index 0000000..63fb3d5
--- /dev/null
+++ b/xsd/xsd/cxx/parser/elements.cxx
@@ -0,0 +1,247 @@
+// file : xsd/cxx/parser/elements.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ Context::
+ Context (std::wostream& o,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ options_type const& ops,
+ StringLiteralMap const* map,
+ Regex const* he,
+ Regex const* ie,
+ Regex const* hie)
+ : CXX::Context (o, root, path, ops, map),
+ options (ops),
+ xml_parser (xml_parser_),
+ simple_base (simple_base_),
+ complex_base (complex_base_),
+ list_base (list_base_),
+ cout_inst (cout_inst_),
+ cerr_inst (cerr_inst_),
+ parser_map (parser_map_),
+ std_string_type (std_string_type_),
+ validation (validation_),
+ polymorphic (polymorphic_),
+ hxx_expr (he),
+ ixx_expr (ie),
+ hxx_impl_expr (hie),
+ xml_parser_ (ops.xml_parser ()),
+ validation_ ((ops.xml_parser () == "expat" ||
+ ops.generate_validation ()) &&
+ !ops.suppress_validation ()),
+ polymorphic_ (ops.generate_polymorphic ())
+ {
+ if (char_type == L"char")
+ std_string_type = L"::std::string";
+ else if (char_type == L"wchar_t")
+ std_string_type = L"::std::wstring";
+ else
+ std_string_type = L"::std::basic_string< " + char_type + L" >";
+
+ String xs_ns (xs_ns_name ());
+
+ string_type = xs_ns + L"::ro_string";
+ simple_base = xs_ns + L"::simple_content";
+ complex_base = xs_ns + L"::complex_content";
+ list_base = xs_ns + L"::list_base";
+
+ cout_inst = (char_type == L"char" ? L"std::cout" : L"std::wcout");
+ cerr_inst = (char_type == L"char" ? L"std::cerr" : L"std::wcerr");
+
+ if (polymorphic)
+ parser_map_ = xs_ns + L"::parser_map";
+ }
+
+ Context::
+ Context (Context& c)
+ : CXX::Context (c),
+ options (c.options),
+ xml_parser (c.xml_parser),
+ simple_base (c.simple_base),
+ complex_base (c.complex_base),
+ list_base (c.list_base),
+ cout_inst (c.cout_inst),
+ cerr_inst (c.cerr_inst),
+ parser_map (c.parser_map),
+ std_string_type (c.std_string_type),
+ validation (c.validation),
+ polymorphic (c.polymorphic),
+ hxx_expr (c.hxx_expr),
+ ixx_expr (c.ixx_expr),
+ hxx_impl_expr (c.hxx_impl_expr)
+ {
+ }
+
+ Context::
+ Context (Context& c, std::wostream& o)
+ : CXX::Context (c, o),
+ options (c.options),
+ xml_parser (c.xml_parser),
+ simple_base (c.simple_base),
+ complex_base (c.complex_base),
+ list_base (c.list_base),
+ cout_inst (c.cout_inst),
+ cerr_inst (c.cerr_inst),
+ parser_map (c.parser_map),
+ std_string_type (c.std_string_type),
+ validation (c.validation),
+ polymorphic (c.polymorphic),
+ hxx_expr (c.hxx_expr),
+ ixx_expr (c.ixx_expr),
+ hxx_impl_expr (c.hxx_impl_expr)
+ {
+ }
+
+ Content::Value Context::
+ content (SemanticGraph::Complex& c)
+ {
+ using namespace SemanticGraph;
+
+ if (c.mixed_p ())
+ return Content::mixed;
+
+ if (c.inherits_p ())
+ {
+ Type& base (c.inherits ().base ());
+
+ if (Complex* cb = dynamic_cast<Complex*> (&base))
+ return content (*cb);
+
+ if (base.is_a<AnyType> ())
+ return Content::complex;
+
+ // Everyhting else (built-in type and AnySimpleType) is simple
+ // content.
+ //
+ return Content::simple;
+ }
+ else
+ return Content::complex;
+ }
+
+ bool Context::
+ anonymous (SemanticGraph::Type& t)
+ {
+ return t.context ().count ("anonymous");
+ }
+
+ String const& Context::
+ ret_type (SemanticGraph::Type& t)
+ {
+ return t.context ().get<String> ("ret-type");
+ }
+
+ String const& Context::
+ arg_type (SemanticGraph::Type& t)
+ {
+ return t.context ().get<String> ("arg-type");
+ }
+
+ String const& Context::
+ post_name (SemanticGraph::Type& t)
+ {
+ return t.context ().get<String> ("post");
+ }
+
+ String const& Context::
+ eparser (SemanticGraph::Member& m)
+ {
+ return m.context ().get<String> ("parser");
+ }
+
+ String const& Context::
+ emember (SemanticGraph::Member& m)
+ {
+ return m.context ().get<String> ("member");
+ }
+
+ String const& Context::
+ emember_map (SemanticGraph::Member& m)
+ {
+ return m.context ().get<String> ("member-map");
+ }
+
+ String const& Context::
+ eimpl (SemanticGraph::Type& t)
+ {
+ return t.context ().get<String> ("impl");
+ }
+
+ // Includes
+ //
+ void TypeForward::
+ traverse (SemanticGraph::Type& t)
+ {
+ os << "class " << t.context ().get<String> (name_key_) << ";";
+ }
+
+ void Includes::
+ traverse_ (SemanticGraph::Uses& u)
+ {
+ // Support for weak (forward) inclusion used in the file-per-type
+ // compilation model.
+ //
+ SemanticGraph::Schema& s (u.schema ());
+ bool weak (u.context ().count ("weak"));
+
+ if (weak && (type_ == header || type_ == impl_header))
+ {
+ // Generate forward declarations. We don't really need them
+ // in the impl files.
+ //
+ if (type_ == header)
+ schema_.dispatch (s);
+
+ return;
+ }
+
+ if (type_ == source && !weak)
+ return;
+
+ SemanticGraph::Path path (
+ s.context ().count ("renamed")
+ ? s.context ().get<SemanticGraph::Path> ("renamed")
+ : u.path ());
+ path.normalize ();
+
+ // Try to use the portable representation of the path. If that
+ // fails, fall back to the native representation.
+ //
+ NarrowString path_str;
+ try
+ {
+ path_str = path.posix_string ();
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ path_str = path.string ();
+ }
+
+ String inc_path;
+
+ switch (type_)
+ {
+ case header:
+ case source:
+ {
+ inc_path = ctx_.hxx_expr->replace (path_str);
+ break;
+ }
+ case impl_header:
+ {
+ inc_path = ctx_.hxx_impl_expr->replace (path_str);
+ break;
+ }
+ }
+
+ ctx_.os << "#include " << ctx_.process_include_path (inc_path) << endl
+ << endl;
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/elements.hxx b/xsd/xsd/cxx/parser/elements.hxx
new file mode 100644
index 0000000..0015923
--- /dev/null
+++ b/xsd/xsd/cxx/parser/elements.hxx
@@ -0,0 +1,315 @@
+// file : xsd/cxx/parser/elements.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_ELEMENTS_HXX
+#define XSD_CXX_PARSER_ELEMENTS_HXX
+
+#include <sstream>
+
+#include <libcutl/re.hxx>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/elements.hxx>
+
+#include <xsd/cxx/parser/options.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ struct Content
+ {
+ enum Value
+ {
+ simple,
+ complex,
+ mixed
+ };
+ };
+
+ //
+ //
+ class Context: public CXX::Context
+ {
+ public:
+ typedef cutl::re::regexsub Regex;
+
+ typedef Parser::options options_type;
+
+ public:
+ Context (std::wostream&,
+ SemanticGraph::Schema&,
+ SemanticGraph::Path const& path,
+ options_type const&,
+ StringLiteralMap const*,
+ Regex const* hxx_expr,
+ Regex const* ixx_expr,
+ Regex const* hxx_impl_expr);
+
+ protected:
+ Context (Context& c);
+ Context (Context& c, std::wostream& o);
+
+ public:
+ bool
+ restriction_p (SemanticGraph::Complex& c) const
+ {
+ if (c.inherits_p () &&
+ c.inherits ().is_a<SemanticGraph::Restricts> ())
+ {
+ // Restriction of anyType is a special case.
+ //
+ return !c.inherits ().base ().is_a<SemanticGraph::AnyType> ();
+ }
+
+ return false;
+ }
+
+ public:
+ static Content::Value
+ content (SemanticGraph::Complex&);
+
+ public:
+ static bool
+ anonymous (SemanticGraph::Type&);
+
+ public:
+ static String const&
+ ret_type (SemanticGraph::Type&);
+
+ static String const&
+ arg_type (SemanticGraph::Type&);
+
+ static String const&
+ post_name (SemanticGraph::Type&);
+
+ public:
+ static String const&
+ eparser (SemanticGraph::Member&);
+
+ static String const&
+ emember (SemanticGraph::Member&);
+
+ static String const&
+ emember_map (SemanticGraph::Member&);
+
+ public:
+ static String const&
+ eimpl (SemanticGraph::Type&);
+
+ public:
+ options_type const& options;
+ String& xml_parser;
+ String& simple_base;
+ String& complex_base;
+ String& list_base;
+ String& cout_inst;
+ String& cerr_inst;
+ String& parser_map;
+ String& std_string_type;
+ bool& validation;
+ bool& polymorphic;
+
+ Regex const* hxx_expr;
+ Regex const* ixx_expr;
+ Regex const* hxx_impl_expr;
+
+ private:
+ String xml_parser_;
+ String simple_base_;
+ String complex_base_;
+ String list_base_;
+ String cout_inst_;
+ String cerr_inst_;
+ String parser_map_;
+ String std_string_type_;
+ bool validation_;
+ bool polymorphic_;
+ };
+
+ //
+ //
+ struct RequiredAttributeTest: Traversal::Attribute
+ {
+ RequiredAttributeTest (bool& result)
+ : result_ (result)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ if (!result_ && !a.optional_p ())
+ result_ = true;
+ }
+
+ private:
+ bool& result_;
+ };
+
+ //
+ //
+ struct ParserParamDecl: Traversal::Complex,
+ Traversal::List,
+ Traversal::Member,
+ Context
+ {
+ ParserParamDecl (Context& c, bool name_arg)
+ : Context (c), first_ (true), name_arg_ (name_arg)
+ {
+ inherits_ >> *this;
+ names_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c, inherits_);
+
+ if (!restriction_p (c))
+ names (c, names_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ if (!first_)
+ os << "," << endl;
+ else
+ first_ = false;
+
+ os << fq_name (l.argumented ().type ()) << "&";
+
+ if (name_arg_)
+ os << " " << ename (l) << "_item";
+ else
+ os << " /* " << comment (l.name ()) << " item */";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ if (skip (m)) return;
+
+ if (!first_)
+ os << "," << endl;
+ else
+ first_ = false;
+
+ os << fq_name (m.type ()) << "&";
+
+ if (name_arg_)
+ os << " " << ename (m);
+ else
+ os << " /* " << comment (m.name ()) << " */";
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+
+ bool first_;
+ bool name_arg_;
+ };
+
+
+ //
+ //
+ struct TypeForward: Traversal::Type, Context
+ {
+ TypeForward (Context& c, char const* name_key)
+ : Context (c), name_key_ (name_key)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t);
+
+ private:
+ char const* name_key_;
+ };
+
+ struct Includes: Traversal::Imports,
+ Traversal::Includes
+ {
+ enum Type
+ {
+ header,
+ source,
+ impl_header
+ };
+
+ Includes (Context& c, Type t)
+ : ctx_ (c),
+ type_ (t),
+ namespace_ (c),
+ type_forward_ (c, t == header ? "name" : "impl")
+ {
+ schema_ >> schema_names_ >> namespace_ >> names_ >> type_forward_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Imports& i)
+ {
+ traverse_ (i);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Includes& i)
+ {
+ traverse_ (i);
+ }
+
+ private:
+ void
+ traverse_ (SemanticGraph::Uses&);
+
+ private:
+ Context& ctx_;
+ Type type_;
+
+ Traversal::Schema schema_;
+ Traversal::Names schema_names_;
+ Namespace namespace_;
+ Traversal::Names names_;
+ TypeForward type_forward_;
+ };
+
+ // Find root element for the test driver.
+ //
+ struct RootElement: Traversal::Element
+ {
+ typedef Parser::options options_type;
+
+ RootElement (options_type const& options,
+ SemanticGraph::Element*& element)
+ : options_ (options), element_ (element)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (options_.root_element_first ())
+ {
+ if (element_ == 0)
+ element_ = &e;
+ }
+ else if (String name = options_.root_element ())
+ {
+ if (e.name () == name)
+ element_ = &e;
+ }
+ else
+ element_ = &e; // Cover root-element-last and no option.
+ }
+
+ private:
+ options_type const& options_;
+ SemanticGraph::Element*& element_;
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_ELEMENTS_HXX
diff --git a/xsd/xsd/cxx/parser/generator.cxx b/xsd/xsd/cxx/parser/generator.cxx
new file mode 100644
index 0000000..91af898
--- /dev/null
+++ b/xsd/xsd/cxx/parser/generator.cxx
@@ -0,0 +1,1099 @@
+// file : xsd/cxx/parser/generator.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <algorithm>
+#include <iostream>
+#include <fstream>
+
+#include <libcutl/re.hxx>
+
+#include <libcutl/compiler/code-stream.hxx>
+#include <libcutl/compiler/cxx-indenter.hxx>
+#include <libcutl/compiler/sloc-counter.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+
+#include <xsd/version.hxx>
+
+#include <xsd/type-map/lexer.hxx>
+#include <xsd/type-map/parser.hxx>
+#include <xsd/type-map/type-map.hxx>
+
+#include <xsd/cxx/parser/elements.hxx>
+#include <xsd/cxx/parser/generator.hxx>
+
+#include <xsd/cxx/parser/validator.hxx>
+#include <xsd/cxx/parser/name-processor.hxx>
+#include <xsd/cxx/parser/state-processor.hxx>
+#include <xsd/cxx/parser/type-processor.hxx>
+
+#include <xsd/cxx/parser/parser-header.hxx>
+#include <xsd/cxx/parser/parser-inline.hxx>
+#include <xsd/cxx/parser/parser-source.hxx>
+#include <xsd/cxx/parser/parser-forward.hxx>
+
+#include <xsd/cxx/parser/impl-header.hxx>
+#include <xsd/cxx/parser/impl-source.hxx>
+#include <xsd/cxx/parser/driver-source.hxx>
+
+#include <xsd/cxx/parser/element-validation-source.hxx>
+#include <xsd/cxx/parser/attribute-validation-source.hxx>
+#include <xsd/cxx/parser/characters-validation-source.hxx>
+
+#include <xsd/cxx/parser/options.hxx>
+
+using std::endl;
+using std::wcerr;
+using std::wcout;
+
+using namespace XSDFrontend::SemanticGraph;
+
+//
+//
+typedef std::wifstream WideInputFileStream;
+typedef std::wofstream WideOutputFileStream;
+typedef std::ifstream NarrowInputFileStream;
+
+namespace CXX
+{
+ namespace
+ {
+ char const copyright_gpl[] =
+ "// Copyright (c) " XSD_COPYRIGHT ".\n"
+ "//\n"
+ "// This program was generated by CodeSynthesis XSD, an XML Schema to\n"
+ "// C++ data binding compiler.\n"
+ "//\n"
+ "// This program is free software; you can redistribute it and/or modify\n"
+ "// it under the terms of the GNU General Public License version 2 as\n"
+ "// published by the Free Software Foundation.\n"
+ "//\n"
+ "// This program is distributed in the hope that it will be useful,\n"
+ "// but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "// GNU General Public License for more details.\n"
+ "//\n"
+ "// You should have received a copy of the GNU General Public License\n"
+ "// along with this program; if not, write to the Free Software\n"
+ "// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
+ "//\n"
+ "// In addition, as a special exception, Code Synthesis Tools CC gives\n"
+ "// permission to link this program with the Xerces-C++ library (or with\n"
+ "// modified versions of Xerces-C++ that use the same license as Xerces-C++),\n"
+ "// and distribute linked combinations including the two. You must obey\n"
+ "// the GNU General Public License version 2 in all respects for all of\n"
+ "// the code used other than Xerces-C++. If you modify this copy of the\n"
+ "// program, you may extend this exception to your version of the program,\n"
+ "// but you are not obligated to do so. If you do not wish to do so, delete\n"
+ "// this exception statement from your version.\n"
+ "//\n"
+ "// Furthermore, Code Synthesis Tools CC makes a special exception for\n"
+ "// the Free/Libre and Open Source Software (FLOSS) which is described\n"
+ "// in the accompanying FLOSSE file.\n"
+ "//\n\n";
+
+ char const copyright_proprietary[] =
+ "// Copyright (c) " XSD_COPYRIGHT ".\n"
+ "//\n"
+ "// This program was generated by CodeSynthesis XSD, an XML Schema\n"
+ "// to C++ data binding compiler, in the Proprietary License mode.\n"
+ "// You should have received a proprietary license from Code Synthesis\n"
+ "// Tools CC prior to generating this code. See the license text for\n"
+ "// conditions.\n"
+ "//\n\n";
+
+ char const copyright_impl[] =
+ "// Not copyrighted - public domain.\n"
+ "//\n"
+ "// This sample parser implementation was generated by CodeSynthesis XSD,\n"
+ "// an XML Schema to C++ data binding compiler. You may use it in your\n"
+ "// programs without any restrictions.\n"
+ "//\n\n";
+ }
+
+ void Parser::Generator::
+ usage ()
+ {
+ CXX::Parser::options::print_usage (wcout);
+ CXX::options::print_usage (wcout);
+ }
+
+ namespace
+ {
+ template <typename S>
+ void
+ open (S& ifs, NarrowString const& path)
+ {
+ try
+ {
+ Path fs_path (path);
+ ifs.open (fs_path.string ().c_str (),
+ std::ios_base::in | std::ios_base::binary);
+
+ if (!ifs.is_open ())
+ {
+ wcerr << path.c_str () << ": error: unable to open in read mode"
+ << endl;
+
+ throw Parser::Generator::Failed ();
+ }
+ }
+ catch (InvalidPath const&)
+ {
+ wcerr << "error: '" << path.c_str () << "' is not a valid "
+ << "filesystem path" << endl;
+
+ throw Parser::Generator::Failed ();
+ }
+ }
+
+ void
+ append (WideOutputFileStream& os,
+ NarrowString const& path,
+ WideInputFileStream& default_is)
+ {
+ using std::ios_base;
+
+ if (path)
+ {
+ WideInputFileStream is;
+ open (is, path);
+ os << is.rdbuf ();
+ }
+ else if (default_is.is_open ())
+ {
+ os << default_is.rdbuf ();
+ default_is.seekg (0, ios_base::beg);
+ }
+ }
+
+ void
+ append (WideOutputFileStream& os,
+ NarrowStrings const& primary,
+ NarrowStrings const& def)
+ {
+ NarrowStrings const& v (primary.empty () ? def : primary);
+
+ for (NarrowStrings::const_iterator i (v.begin ()), e (v.end ());
+ i != e; ++i)
+ {
+ os << i->c_str () << endl;
+ }
+ }
+ }
+
+
+ size_t Parser::Generator::
+ generate (Parser::options const& ops,
+ Schema& schema,
+ Path const& file_path,
+ bool fpt,
+ StringLiteralMap const& string_literal_map,
+ bool gen_driver,
+ const WarningSet& disabled_warnings,
+ FileList& file_list,
+ AutoUnlinks& unlinks)
+ {
+ using std::ios_base;
+
+ typedef cutl::re::regexsub Regex;
+
+ try
+ {
+ bool generate_xml_schema (ops.generate_xml_schema ());
+
+ // We could be compiling several schemas at once in which case
+ // handling of the --generate-xml-schema option gets tricky: we
+ // will need to rely on the presence of the --extern-xml-schema
+ // to tell us which (fake) schema file corresponds to XML Schema.
+ //
+ if (generate_xml_schema)
+ {
+ if (NarrowString name = ops.extern_xml_schema ())
+ {
+ if (file_path.string () != name)
+ generate_xml_schema = false;
+ }
+ }
+
+ bool impl (!generate_xml_schema &&
+ (ops.generate_noop_impl () ||
+ ops.generate_print_impl ()));
+
+ bool driver (gen_driver && !generate_xml_schema &&
+ ops.generate_test_driver ());
+
+ // Evaluate the graph for possibility of generating something useful.
+ //
+ {
+ Validator validator;
+ if (!validator.validate (
+ ops, schema, file_path, driver, disabled_warnings))
+ throw Failed ();
+ }
+
+ // Process names.
+ //
+ {
+ NameProcessor proc;
+ proc.process (ops, schema, file_path, string_literal_map);
+ }
+
+ bool validation ((ops.xml_parser () == "expat" ||
+ ops.generate_validation ()) &&
+ !ops.suppress_validation ());
+
+ // Compute state machine info.
+ //
+ if (validation)
+ {
+ StateProcessor proc;
+ proc.process (schema, file_path);
+ }
+
+ // Read-in type maps.
+ //
+ TypeMap::Namespaces type_map;
+ {
+ using namespace TypeMap;
+
+ NarrowStrings const& files (ops.type_map ());
+
+ for (NarrowStrings::const_iterator f (files.begin ());
+ f != files.end (); ++f )
+ {
+ NarrowInputFileStream ifs;
+ open (ifs, *f);
+
+ Lexer l (ifs, *f);
+ TypeMap::Parser p (l, *f);
+
+ if (!p.parse (type_map))
+ throw Failed ();
+ }
+
+ // Add the built-in mappings at the end.
+ //
+
+ // String-based types.
+ //
+ String char_type (ops.char_type ());
+ String string_type;
+
+ if (char_type == L"char")
+ string_type = L"::std::string";
+ else if (char_type == L"wchar_t")
+ string_type = L"::std::wstring";
+ else
+ string_type = L"::std::basic_string< " + char_type + L" >";
+
+ String xns;
+ String auto_ptr;
+ {
+ Context ctx (std::wcerr, schema, file_path, ops, 0, 0, 0, 0);
+ xns = ctx.xs_ns_name ();
+ auto_ptr = ctx.auto_ptr;
+ }
+
+ String buffer (auto_ptr + L"< " + xns + L"::buffer >");
+ TypeMap::Namespace xsd ("http://www\\.w3\\.org/2001/XMLSchema");
+
+ xsd.types_push_back ("string", string_type);
+ xsd.types_push_back ("normalizedString", string_type);
+ xsd.types_push_back ("token", string_type);
+ xsd.types_push_back ("Name", string_type);
+ xsd.types_push_back ("NMTOKEN", string_type);
+ xsd.types_push_back ("NMTOKENS", xns + L"::string_sequence");
+ xsd.types_push_back ("NCName", string_type);
+
+ xsd.types_push_back ("ID", string_type);
+ xsd.types_push_back ("IDREF", string_type);
+ xsd.types_push_back ("IDREFS", xns + L"::string_sequence");
+
+ xsd.types_push_back ("language", string_type);
+ xsd.types_push_back ("anyURI", string_type);
+ xsd.types_push_back ("QName", xns + L"::qname");
+
+ xsd.types_push_back ("base64Binary", buffer, buffer);
+ xsd.types_push_back ("hexBinary", buffer, buffer);
+
+ xsd.types_push_back ("gDay", xns + L"::gday");
+ xsd.types_push_back ("gMonth", xns + L"::gmonth");
+ xsd.types_push_back ("gYear", xns + L"::gyear");
+ xsd.types_push_back ("gMonthDay", xns + L"::gmonth_day");
+ xsd.types_push_back ("gYearMonth", xns + L"::gyear_month");
+ xsd.types_push_back ("date", xns + L"::date");
+ xsd.types_push_back ("time", xns + L"::time");
+ xsd.types_push_back ("dateTime", xns + L"::date_time");
+ xsd.types_push_back ("duration", xns + L"::duration");
+
+ // Fundamental C++ types.
+ //
+ xsd.types_push_back ("boolean", "bool", "bool");
+
+ xsd.types_push_back ("byte", "signed char", "signed char");
+ xsd.types_push_back ("unsignedByte",
+ "unsigned char",
+ "unsigned char");
+
+ xsd.types_push_back ("short", "short", "short");
+ xsd.types_push_back ("unsignedShort",
+ "unsigned short",
+ "unsigned short");
+
+ xsd.types_push_back ("int", "int", "int");
+ xsd.types_push_back ("unsignedInt", "unsigned int", "unsigned int");
+
+ xsd.types_push_back ("long", "long long", "long long");
+ xsd.types_push_back ("unsignedLong",
+ "unsigned long long",
+ "unsigned long long");
+
+ xsd.types_push_back ("integer", "long long", "long long");
+
+ xsd.types_push_back ("negativeInteger", "long long", "long long");
+ xsd.types_push_back ("nonPositiveInteger", "long long", "long long");
+
+ xsd.types_push_back ("positiveInteger",
+ "unsigned long long",
+ "unsigned long long");
+ xsd.types_push_back ("nonNegativeInteger",
+ "unsigned long long",
+ "unsigned long long");
+
+ xsd.types_push_back ("float", "float", "float");
+ xsd.types_push_back ("double", "double", "double");
+ xsd.types_push_back ("decimal", "double", "double");
+
+ type_map.push_back (xsd);
+
+ // Everything else maps to void.
+ //
+ TypeMap::Namespace rest (".*");
+ rest.types_push_back (".*", "void", "void");
+ type_map.push_back (rest);
+ }
+
+ // Process types.
+ //
+ {
+ TypeProcessor proc;
+ proc.process (ops, schema, gen_driver, type_map);
+ }
+
+ //
+ //
+ bool inline_ (ops.generate_inline () && !generate_xml_schema);
+ bool source (!generate_xml_schema);
+
+ // Generate code.
+ //
+ NarrowString name (file_path.leaf ().string ());
+ NarrowString skel_suffix (ops.skel_file_suffix ());
+ NarrowString impl_suffix (ops.impl_file_suffix ());
+
+ NarrowString hxx_suffix (ops.hxx_suffix ());
+ NarrowString ixx_suffix (ops.ixx_suffix ());
+ NarrowString cxx_suffix (ops.cxx_suffix ());
+
+ Regex hxx_expr (
+ ops.hxx_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + hxx_suffix + "#"
+ : ops.hxx_regex ());
+
+ Regex ixx_expr (
+ ops.ixx_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + ixx_suffix + "#"
+ : ops.ixx_regex ());
+
+ Regex cxx_expr (
+ ops.cxx_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + skel_suffix + cxx_suffix + "#"
+ : ops.cxx_regex ());
+
+
+ Regex hxx_impl_expr;
+ Regex cxx_impl_expr;
+ Regex cxx_driver_expr;
+
+ if (impl || driver)
+ {
+ hxx_impl_expr =
+ "#^(.+?)(\\.[^./\\\\]+)?$#$1" + impl_suffix + hxx_suffix + "#";
+
+ cxx_impl_expr =
+ "#^(.+?)(\\.[^./\\\\]+)?$#$1" + impl_suffix + cxx_suffix + "#";
+
+ cxx_driver_expr =
+ "#^(.+?)(\\.[^./\\\\]+)?$#$1-driver" + cxx_suffix + "#";
+ }
+
+ if (!hxx_expr.match (name))
+ {
+ wcerr << "error: header expression '" <<
+ hxx_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (inline_ && !ixx_expr.match (name))
+ {
+ wcerr << "error: inline expression '" <<
+ ixx_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (source && !cxx_expr.match (name))
+ {
+ wcerr << "error: source expression '" <<
+ cxx_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (impl || driver)
+ {
+ if (!hxx_impl_expr.match (name))
+ {
+ wcerr << "error: implementation header expression '" <<
+ hxx_impl_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (!cxx_impl_expr.match (name))
+ {
+ wcerr << "error: implementation source expression '" <<
+ cxx_impl_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (!cxx_driver_expr.match (name))
+ {
+ wcerr << "error: driver source expression '" <<
+ cxx_driver_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+ }
+
+ NarrowString hxx_name (hxx_expr.replace (name));
+ NarrowString ixx_name (inline_ ? ixx_expr.replace (name) : NarrowString ());
+ NarrowString cxx_name (source ? cxx_expr.replace (name) : NarrowString ());
+
+ NarrowString hxx_impl_name;
+ NarrowString cxx_impl_name;
+ NarrowString cxx_driver_name;
+
+ if (impl || driver)
+ {
+ hxx_impl_name = hxx_impl_expr.replace (name);
+ cxx_impl_name = cxx_impl_expr.replace (name);
+ cxx_driver_name = cxx_driver_expr.replace (name);
+ }
+
+ Path hxx_path (hxx_name);
+ Path ixx_path (ixx_name);
+ Path cxx_path (cxx_name);
+
+ Path hxx_impl_path;
+ Path cxx_impl_path;
+ Path cxx_driver_path;
+
+ if (impl || driver)
+ {
+ hxx_impl_path = Path (hxx_impl_name);
+ cxx_impl_path = Path (cxx_impl_name);
+ cxx_driver_path = Path (cxx_driver_name);
+ }
+
+ Path out_dir;
+
+ if (NarrowString dir = ops.output_dir ())
+ {
+ try
+ {
+ out_dir = Path (dir);
+ }
+ catch (InvalidPath const&)
+ {
+ wcerr << dir.c_str () << ": error: invalid path" << endl;
+ throw Failed ();
+ }
+ }
+
+ if (fpt && !generate_xml_schema)
+ {
+ // In the file-per-type mode the schema files are always local
+ // unless the user added the directory so that we propagate this
+ // to the output files.
+ //
+ Path fpt_dir (file_path.directory ());
+
+ if (!fpt_dir.empty ())
+ out_dir /= fpt_dir;
+ }
+
+ if (!out_dir.empty ())
+ {
+ hxx_path = out_dir / hxx_path;
+ ixx_path = out_dir / ixx_path;
+ cxx_path = out_dir / cxx_path;
+
+ if (impl || driver)
+ {
+ hxx_impl_path = out_dir / hxx_impl_path;
+ cxx_impl_path = out_dir / cxx_impl_path;
+ cxx_driver_path = out_dir /cxx_driver_path;
+ }
+ }
+
+ // Open the impl files first so that if open fails, the skel files
+ // are not deleted.
+ //
+ WideOutputFileStream hxx_impl;
+ WideOutputFileStream cxx_impl;
+ WideOutputFileStream cxx_driver;
+
+ if (impl)
+ {
+ if (!ops.force_overwrite ())
+ {
+ WideInputFileStream tmp (
+ hxx_impl_path.string ().c_str (), ios_base::in);
+
+ if (tmp.is_open ())
+ {
+ wcerr << hxx_impl_path << ": error: cowardly refusing to " <<
+ "overwrite an existing file" << endl;
+ throw Failed ();
+ }
+
+ tmp.close ();
+ }
+
+ hxx_impl.open (hxx_impl_path.string ().c_str (), ios_base::out);
+
+ if (!hxx_impl.is_open ())
+ {
+ wcerr << hxx_impl_path << ": error: unable to open in write mode"
+ << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (hxx_impl_path);
+ file_list.push_back (hxx_impl_path.string ());
+
+ if (!ops.force_overwrite ())
+ {
+ WideInputFileStream tmp (
+ cxx_impl_path.string ().c_str (), ios_base::in);
+
+ if (tmp.is_open ())
+ {
+ wcerr << cxx_impl_path << ": error: cowardly refusing to " <<
+ "overwrite an existing file" << endl;
+ throw Failed ();
+ }
+
+ tmp.close ();
+ }
+
+ cxx_impl.open (cxx_impl_path.string ().c_str (), ios_base::out);
+
+ if (!cxx_impl.is_open ())
+ {
+ wcerr << cxx_impl_path << ": error: unable to open in write mode"
+ << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (cxx_impl_path);
+ file_list.push_back (cxx_impl_path.string ());
+ }
+
+ if (driver)
+ {
+ if (!ops.force_overwrite ())
+ {
+ WideInputFileStream tmp (
+ cxx_driver_path.string ().c_str (), ios_base::in);
+
+ if (tmp.is_open ())
+ {
+ wcerr << cxx_driver_path << ": error: cowardly refusing to " <<
+ "overwrite an existing file" << endl;
+ throw Failed ();
+ }
+
+ tmp.close ();
+ }
+
+ cxx_driver.open (cxx_driver_path.string ().c_str (), ios_base::out);
+
+ if (!cxx_driver.is_open ())
+ {
+ wcerr << cxx_driver_path << ": error: unable to open in write " <<
+ "mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (cxx_driver_path);
+ file_list.push_back (cxx_driver_path.string ());
+ }
+
+ // Open the skel files.
+ //
+ WideOutputFileStream hxx (hxx_path.string ().c_str (), ios_base::out);
+ WideOutputFileStream ixx;
+ WideOutputFileStream cxx;
+
+ if (!hxx.is_open ())
+ {
+ wcerr << hxx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (hxx_path);
+ file_list.push_back (hxx_path.string ());
+
+ if (inline_)
+ {
+ ixx.open (ixx_path.string ().c_str (), ios_base::out);
+
+ if (!ixx.is_open ())
+ {
+ wcerr << ixx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (ixx_path);
+ file_list.push_back (ixx_path.string ());
+ }
+
+
+ if (source)
+ {
+ cxx.open (cxx_path.string ().c_str (), ios_base::out);
+
+ if (!cxx.is_open ())
+ {
+ wcerr << cxx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (cxx_path);
+ file_list.push_back (cxx_path.string ());
+ }
+
+ // Print copyright and license.
+ //
+ char const* copyright (
+ ops.proprietary_license () ? copyright_proprietary : copyright_gpl);
+
+ hxx << copyright;
+
+ if (inline_)
+ ixx << copyright;
+
+ if (source)
+ cxx << copyright;
+
+ if (impl)
+ {
+ hxx_impl << copyright_impl;
+ cxx_impl << copyright_impl;
+ }
+
+ if (driver)
+ cxx_driver << copyright_impl;
+
+ // Prologue.
+ //
+ WideInputFileStream prologue;
+ {
+ NarrowString name (ops.prologue_file ());
+
+ if (name)
+ open (prologue, name);
+ }
+
+ // Epilogue.
+ //
+ WideInputFileStream epilogue;
+ {
+ NarrowString name (ops.epilogue_file ());
+
+ if (name)
+ open (epilogue, name);
+ }
+
+ // SLOC counter.
+ //
+ size_t sloc_total (0);
+ bool show_sloc (ops.show_sloc ());
+
+ typedef
+ compiler::ostream_filter<compiler::cxx_indenter, wchar_t>
+ ind_filter;
+
+ typedef
+ compiler::ostream_filter<compiler::sloc_counter, wchar_t>
+ sloc_filter;
+
+ //
+ //
+ Regex guard_expr ("/([a-z])([A-Z])/$1_$2/"); // Split words.
+
+ NarrowString guard_prefix (ops.guard_prefix ());
+
+ if (!guard_prefix)
+ guard_prefix = file_path.directory ().string ();
+
+ if (guard_prefix)
+ guard_prefix += '_';
+
+ // HXX
+ //
+ {
+ Context ctx (hxx,
+ schema,
+ file_path,
+ ops,
+ &string_literal_map,
+ &hxx_expr,
+ &ixx_expr,
+ &hxx_impl_expr);
+
+ sloc_filter sloc (hxx);
+
+ String guard (guard_expr.replace (guard_prefix + hxx_name));
+ guard = ctx.escape (guard); // Make it a C++ id.
+ std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
+
+ hxx << "#ifndef " << guard << endl
+ << "#define " << guard << endl
+ << endl;
+
+ if (ctx.std >= cxx_version::cxx11)
+ {
+ hxx << "#ifndef XSD_CXX11" << endl
+ << "#define XSD_CXX11" << endl
+ << "#endif" << endl
+ << endl;
+ }
+
+ // Copy prologue.
+ //
+ hxx << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (hxx, ops.hxx_prologue (), ops.prologue ());
+ append (hxx, ops.hxx_prologue_file (), prologue);
+
+ hxx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ // Version check.
+ //
+ hxx << "#include <xsd/cxx/config.hxx>" << endl
+ << endl
+ << "#if (LIBXSD_VERSION != " << XSD_VERSION << "L)" << endl
+ << "#error XSD runtime version mismatch" << endl
+ << "#endif" << endl
+ << endl;
+
+ hxx << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ ind_filter ind (hxx); // We don't want to indent prologues/epilogues.
+
+ if (!generate_xml_schema)
+ generate_parser_forward (ctx);
+
+ generate_parser_header (ctx, generate_xml_schema);
+ }
+
+ if (inline_)
+ hxx << "#include " << ctx.process_include_path (ixx_name) << endl;
+
+ hxx << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ hxx << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (hxx, ops.hxx_epilogue_file (), epilogue);
+ append (hxx, ops.hxx_epilogue (), ops.epilogue ());
+
+ hxx << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ hxx << "#endif // " << guard << endl;
+
+ if (show_sloc)
+ wcerr << hxx_path << ": " << sloc.stream ().count () << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+
+
+ // IXX
+ //
+ if (inline_)
+ {
+ Context ctx (ixx,
+ schema,
+ file_path,
+ ops,
+ &string_literal_map,
+ &hxx_expr,
+ &ixx_expr,
+ &hxx_impl_expr);
+
+ sloc_filter sloc (ixx);
+
+ // Copy prologue.
+ //
+ ixx << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (ixx, ops.ixx_prologue (), ops.prologue ());
+ append (ixx, ops.ixx_prologue_file (), prologue);
+
+ ixx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ ind_filter ind (ixx); // We don't want to indent prologues/epilogues.
+ generate_parser_inline (ctx);
+ }
+
+ // Copy epilogue.
+ //
+ ixx << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (ixx, ops.ixx_epilogue_file (), epilogue);
+ append (ixx, ops.ixx_epilogue (), ops.epilogue ());
+
+ ixx << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ if (show_sloc)
+ wcerr << ixx_path << ": " << sloc.stream ().count () << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+
+
+ // CXX
+ //
+ if (source)
+ {
+ Context ctx (cxx,
+ schema,
+ file_path,
+ ops,
+ &string_literal_map,
+ &hxx_expr,
+ &ixx_expr,
+ &hxx_impl_expr);
+
+ sloc_filter sloc (cxx);
+
+ // Copy prologue.
+ //
+ cxx << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (cxx, ops.cxx_prologue (), ops.prologue ());
+ append (cxx, ops.cxx_prologue_file (), prologue);
+
+ cxx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ cxx << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
+ cxx << "#include " << ctx.process_include_path (hxx_name) << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ ind_filter ind (cxx); // We don't want to indent prologues/epilogues.
+
+ if (!inline_)
+ generate_parser_inline (ctx);
+
+ generate_parser_source (ctx);
+
+ if (validation)
+ {
+ generate_element_validation_source (ctx);
+ generate_attribute_validation_source (ctx);
+ generate_characters_validation_source (ctx);
+ }
+ }
+
+ cxx << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ cxx << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (cxx, ops.cxx_epilogue_file (), epilogue);
+ append (cxx, ops.cxx_epilogue (), ops.epilogue ());
+
+ cxx << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ if (show_sloc)
+ wcerr << cxx_path << ": " << sloc.stream ().count () << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+
+ // HXX impl
+ //
+ if (impl)
+ {
+ Context ctx (hxx_impl,
+ schema,
+ file_path,
+ ops,
+ &string_literal_map,
+ &hxx_expr,
+ &ixx_expr,
+ &hxx_impl_expr);
+
+ String guard (guard_expr.replace (guard_prefix + hxx_impl_name));
+ guard = ctx.escape (guard); // Make it a C++ id.
+ std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
+
+ hxx_impl << "#ifndef " << guard << endl
+ << "#define " << guard << endl
+ << endl;
+
+ hxx_impl << "#include " << ctx.process_include_path (hxx_name)
+ << endl << endl;
+
+ {
+ ind_filter ind (hxx_impl);
+ generate_impl_header (ctx);
+ }
+
+ hxx_impl << "#endif // " << guard << endl;
+ }
+
+ // CXX impl
+ //
+ if (impl)
+ {
+ Context ctx (cxx_impl,
+ schema,
+ file_path,
+ ops,
+ &string_literal_map,
+ &hxx_expr,
+ &ixx_expr,
+ &hxx_impl_expr);
+
+ cxx_impl << "#include " << ctx.process_include_path (hxx_impl_name)
+ << endl << endl;
+
+ {
+ ind_filter ind (cxx_impl);
+ generate_impl_source (ctx);
+ }
+ }
+
+ // CXX driver
+ //
+ if (driver)
+ {
+ Context ctx (cxx_driver,
+ schema,
+ file_path,
+ ops,
+ &string_literal_map,
+ &hxx_expr,
+ &ixx_expr,
+ &hxx_impl_expr);
+
+ cxx_driver << "#include " << ctx.process_include_path (hxx_impl_name)
+ << endl << endl;
+
+ {
+ ind_filter ind (cxx_driver);
+ generate_driver_source (ctx);
+ }
+ }
+
+ return sloc_total;
+ }
+ catch (UnrepresentableCharacter const& e)
+ {
+ wcerr << "error: character at position " << e.position () << " "
+ << "in string '" << e.string () << "' is unrepresentable in "
+ << "the target encoding" << endl;
+
+ wcerr << "info: use the --custom-literals option to provide custom "
+ << "string literals mapping" << endl;
+
+ throw Failed ();
+ }
+ catch (NoNamespaceMapping const& e)
+ {
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": error: unable to map XML Schema namespace '" << e.ns ()
+ << "' to C++ namespace" << endl;
+
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: use the --namespace-map or --namespace-regex option "
+ << "to provide custom mapping" << endl;
+
+ throw Failed ();
+ }
+ catch (InvalidNamespaceMapping const& e)
+ {
+ wcerr << "error: invalid XML to C++ namespace mapping specified: "
+ << "'" << e.mapping () << "': " << e.reason () << endl;
+
+ throw Failed ();
+ }
+ catch (cutl::re::format const& e)
+ {
+ wcerr << "error: invalid regex: '" <<
+ e.regex ().c_str () << "': " <<
+ e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ catch (cutl::re::wformat const& e)
+ {
+ wcerr << "error: invalid regex: '" <<
+ e.regex () << "': " << e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/generator.hxx b/xsd/xsd/cxx/parser/generator.hxx
new file mode 100644
index 0000000..150cd74
--- /dev/null
+++ b/xsd/xsd/cxx/parser/generator.hxx
@@ -0,0 +1,45 @@
+// file : xsd/cxx/parser/generator.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_GENERATOR_HXX
+#define XSD_CXX_PARSER_GENERATOR_HXX
+
+#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
+#include <libxsd-frontend/semantic-graph/schema.hxx>
+
+#include <xsd/xsd.hxx>
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/literal-map.hxx>
+#include <xsd/cxx/parser/options.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class Generator
+ {
+ public:
+ static void
+ usage ();
+
+ struct Failed {};
+
+ static size_t
+ generate (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file,
+ bool file_per_type,
+ StringLiteralMap const&,
+ bool gen_driver,
+ const WarningSet& disabled_warnings,
+ FileList& file_list,
+ AutoUnlinks& unlinks);
+
+ private:
+ Generator ();
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_GENERATOR_HXX
diff --git a/xsd/xsd/cxx/parser/impl-header.cxx b/xsd/xsd/cxx/parser/impl-header.cxx
new file mode 100644
index 0000000..be14dfa
--- /dev/null
+++ b/xsd/xsd/cxx/parser/impl-header.cxx
@@ -0,0 +1,232 @@
+// file : xsd/cxx/parser/impl-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/impl-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String const& name (eimpl (e));
+ String const& ret (ret_type (e));
+ SemanticGraph::Type& base (e.inherits ().base ());
+
+ os << "class " << type_exp << name << ": " <<
+ "public virtual " << ename (e) << "," << endl
+ << " public " << fq_name (base, "impl")
+ << "{"
+ << "public:" << endl
+ << "virtual void" << endl
+ << "pre ();"
+ << endl
+ << "virtual " << ret << endl
+ << post_name (e) << " ();"
+ << "};";
+ }
+ };
+
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String const& name (eimpl (l));
+ SemanticGraph::Type& t (l.argumented ().type ());
+
+ String item (unclash (ename (l), "item"));
+
+ os << "class " << type_exp << name << ": public virtual " <<
+ ename (l)
+ << "{"
+ << "public:" << endl
+ << "virtual void" << endl
+ << "pre ();"
+ << endl;
+
+ // item
+ //
+ String const& arg (arg_type (t));
+
+ os << "virtual void" << endl
+ << item;
+
+ if (arg == L"void")
+ os << " ();";
+ else
+ os << " (" << arg << ");";
+
+ os << endl;
+
+ // post
+ //
+ String const& ret (ret_type (l));
+
+ os << "virtual " << ret << endl
+ << post_name (l) << " ();"
+ << "};";
+ }
+ };
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String const& name (eimpl (u));
+ String const& ret (ret_type (u));
+
+ os << "class " << type_exp << name << ": public virtual " <<
+ ename (u)
+ << "{"
+ << "public:" << endl
+ << "virtual void" << endl
+ << "pre ();"
+ << endl
+ << "virtual void" << endl
+ << "_characters (const " << string_type << "&);"
+ << endl
+ << "virtual " << ret << endl
+ << post_name (u) << " ();"
+ << "};";
+ }
+ };
+
+
+ //
+ //
+ struct ParserCallback: Traversal::Member, Context
+ {
+ ParserCallback (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& arg (arg_type (m.type ()));
+
+ os << "virtual void" << endl
+ << ename (m);
+
+ if (arg == L"void")
+ os << " ();";
+ else
+ os << " (" << arg << ");";
+
+ os << endl;
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ parser_callback_ (c)
+ {
+ names_parser_callback_ >> parser_callback_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String const& name (eimpl (c));
+ String const& ret (ret_type (c));
+
+ os << "class " << type_exp << name << ": public virtual " <<
+ ename (c);
+
+ if (c.inherits_p ())
+ os << "," << endl
+ << " public " << fq_name (c.inherits ().base (), "impl");
+
+ os << "{"
+ << "public:" << endl
+ << "virtual void" << endl
+ << "pre ();"
+ << endl;
+
+ // In case of an inheritance-by-restriction, we don't need to
+ // generate parser callbacks, etc. since they are the same as in
+ // the base.
+ //
+ if (!restriction_p (c))
+ {
+ names (c, names_parser_callback_);
+ }
+
+ os << "virtual " << ret << endl
+ << post_name (c) << " ();"
+ << "};";
+ }
+
+ private:
+ //
+ //
+ ParserCallback parser_callback_;
+ Traversal::Names names_parser_callback_;
+ };
+ }
+
+ void
+ generate_impl_header (Context& ctx)
+ {
+ Traversal::Schema schema;
+
+ Sources sources;
+ Includes includes (ctx, Includes::impl_header);
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> includes;
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/impl-header.hxx b/xsd/xsd/cxx/parser/impl-header.hxx
new file mode 100644
index 0000000..1939e05
--- /dev/null
+++ b/xsd/xsd/cxx/parser/impl-header.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/impl-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_IMPL_HEADER_HXX
+#define XSD_CXX_PARSER_IMPL_HEADER_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_impl_header (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_IMPL_HEADER_HXX
diff --git a/xsd/xsd/cxx/parser/impl-source.cxx b/xsd/xsd/cxx/parser/impl-source.cxx
new file mode 100644
index 0000000..80a9644
--- /dev/null
+++ b/xsd/xsd/cxx/parser/impl-source.cxx
@@ -0,0 +1,384 @@
+// file : xsd/cxx/parser/impl-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/impl-source.hxx>
+#include <xsd/cxx/parser/print-impl-common.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String const& name (eimpl (e));
+ String const& ret (ret_type (e));
+ SemanticGraph::Type& base (e.inherits ().base ());
+ String const& base_ret (ret_type (base));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // pre
+ //
+ os << "void " << name << "::" << endl
+ << "pre ()"
+ << "{"
+ << "}";
+
+ // post
+ //
+ os << ret << " " << name << "::" << endl
+ << post_name (e) << " ()"
+ << "{";
+
+ if (ret == base_ret)
+ {
+ os << (ret != L"void" ? "return " : "") <<
+ post_name (base) << " ();";
+ }
+ else if (ret == L"void")
+ {
+ os << arg_type (base) << " v (" << post_name (base) << " ());"
+ << endl;
+
+ if (options.generate_print_impl ())
+ {
+ PrintCall t (*this, e.name (), "v");
+ t.dispatch (base);
+ }
+ else
+ os << "// TODO" << endl
+ << "//" << endl;
+ }
+ else
+ {
+ if (base_ret == L"void")
+ os << post_name (base) << " ();";
+ else
+ os << arg_type (base) << " v (" << post_name (base) << " ());"
+ << endl
+ << "// TODO" << endl
+ << "//" << endl
+ << "// return ... ;" << endl;
+ }
+
+ os << "}";
+ }
+ };
+
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String const& name (eimpl (l));
+ SemanticGraph::Type& type (l.argumented ().type ());
+
+ String item (unclash (ename (l), "item"));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // pre
+ //
+ os << "void " << name << "::" << endl
+ << "pre ()"
+ << "{"
+ << "}";
+
+ // item
+ //
+ String const& arg (arg_type (type));
+
+ os << "void " << name << "::" << endl
+ << item;
+
+ if (arg == L"void")
+ os << " ()";
+ else
+ os << " (" << arg << " " << item << ")";
+
+ os << "{";
+
+ if (arg != L"void")
+ {
+ if (options.generate_print_impl ())
+ {
+ PrintCall t (*this, type.name (), item);
+ t.dispatch (type);
+ }
+ else
+ os << "// TODO" << endl
+ << "//" << endl;
+ }
+
+ os << "}";
+
+ // post
+ //
+ String const& ret (ret_type (l));
+
+ os << ret << " " << name << "::" << endl
+ << post_name (l) << " ()"
+ << "{";
+
+ if (ret != L"void")
+ os << "// TODO" << endl
+ << "//" << endl
+ << "// return ... ;" << endl;
+
+ os << "}";
+ }
+ };
+
+ //
+ //
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String const& name (eimpl (u));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // pre
+ //
+ os << "void " << name << "::" << endl
+ << "pre ()"
+ << "{"
+ << "}";
+
+ // _characters
+ //
+ os << "void " << name << "::" << endl
+ << "_characters (const " << string_type << "& s)"
+ << "{";
+
+ if (options.generate_print_impl ())
+ os << cout_inst << " << " << strlit (u.name () + L": ") <<
+ " << s << std::endl;";
+ else
+ os << "// TODO" << endl
+ << "//" << endl;
+
+ os << "}";
+
+ // post
+ //
+ String const& ret (ret_type (u));
+
+ os << ret << " " << name << "::" << endl
+ << post_name (u) << " ()"
+ << "{";
+
+ if (ret != L"void")
+ os << "// TODO" << endl
+ << "//" << endl
+ << "// return ... ;" << endl;
+
+ os << "}";
+ }
+ };
+
+ //
+ //
+ struct ParserCallback: Traversal::Member, Context
+ {
+ ParserCallback (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& name (ename (m));
+ String const& arg (arg_type (m.type ()));
+
+ os << "void " <<
+ eimpl (dynamic_cast<SemanticGraph::Complex&> (m.scope ())) <<
+ "::" << endl
+ << name;
+
+ if (arg == L"void")
+ os << " ()";
+ else
+ os << " (" << arg << " " << name << ")";
+
+ os << "{";
+
+ if (arg != L"void")
+ {
+ if (options.generate_print_impl ())
+ {
+ PrintCall t (*this, m.name (), name);
+ t.dispatch (m.type ());
+ }
+ else
+ os << "// TODO" << endl
+ << "//" << endl;
+ }
+
+ os << "}";
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c), parser_callback_ (c)
+ {
+ names_parser_callback_ >> parser_callback_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String const& name (eimpl (c));
+
+ bool restriction (restriction_p (c));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // pre
+ //
+ os << "void " << name << "::" << endl
+ << "pre ()"
+ << "{"
+ << "}";
+
+ // Parser callbacks.
+ //
+ if (!restriction)
+ names (c, names_parser_callback_);
+
+ // post
+ //
+ String const& ret (ret_type (c));
+
+ os << ret << " " << name << "::" << endl
+ << post_name (c) << " ()"
+ << "{";
+
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& base (c.inherits ().base ());
+ String const& base_ret (ret_type (base));
+
+ if (ret == base_ret)
+ {
+ os << (ret != L"void" ? "return " : "") <<
+ post_name (base) << " ();";
+ }
+ else if (ret == L"void")
+ {
+ os << arg_type (base) << " v (" << post_name (base) << " ());"
+ << endl;
+
+ if (options.generate_print_impl ())
+ {
+ PrintCall t (*this, c.name (), "v");
+ t.dispatch (base);
+ }
+ else
+ os << "// TODO" << endl
+ << "//" << endl;
+ }
+ else
+ {
+ if (base_ret == L"void")
+ os << post_name (base) << " ();";
+ else
+ os << arg_type (base) << " v (" << post_name (base) << " ());"
+ << endl
+ << "// TODO" << endl
+ << "//" << endl
+ << "// return ... ;" << endl;
+ }
+ }
+ else
+ {
+ if (ret != L"void")
+ os << "// TODO" << endl
+ << "//" << endl
+ << "// return ... ;" << endl;
+ }
+
+ os << "}";
+ }
+
+ private:
+ //
+ //
+ ParserCallback parser_callback_;
+ Traversal::Names names_parser_callback_;
+ };
+ }
+
+ void
+ generate_impl_source (Context& ctx)
+ {
+ if (ctx.options.generate_print_impl ())
+ ctx.os << "#include <iostream>" << endl
+ << endl;
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names schema_names;
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/impl-source.hxx b/xsd/xsd/cxx/parser/impl-source.hxx
new file mode 100644
index 0000000..0fc8060
--- /dev/null
+++ b/xsd/xsd/cxx/parser/impl-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/impl-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_IMPL_SOURCE_HXX
+#define XSD_CXX_PARSER_IMPL_SOURCE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_impl_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_IMPL_SOURCE_HXX
diff --git a/xsd/xsd/cxx/parser/name-processor.cxx b/xsd/xsd/cxx/parser/name-processor.cxx
new file mode 100644
index 0000000..73710ba
--- /dev/null
+++ b/xsd/xsd/cxx/parser/name-processor.cxx
@@ -0,0 +1,1175 @@
+// file : xsd/cxx/parser/name-processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+#include <map>
+#include <sstream>
+#include <iostream>
+
+#include <xsd/cxx/parser/name-processor.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ //
+ //
+ typedef set<String> NameSet;
+
+ class Context: public CXX::Context
+ {
+ public:
+ Context (Parser::options const& ops,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ StringLiteralMap const* map)
+ : CXX::Context (std::wcerr, root, path, ops, map),
+ skel_suffix_ (ops.skel_type_suffix ()),
+ impl_suffix_ (ops.impl_type_suffix ()),
+ impl (ops.generate_noop_impl () ||
+ ops.generate_print_impl () ||
+ ops.generate_test_driver ()),
+ skel_suffix (skel_suffix_),
+ impl_suffix (impl_suffix_),
+ global_type_names (global_type_names_),
+ polymorphic (ops.generate_polymorphic ())
+ {
+ }
+
+ protected:
+ Context (Context& c)
+ : CXX::Context (c),
+ impl (c.impl),
+ skel_suffix (c.skel_suffix),
+ impl_suffix (c.impl_suffix),
+ global_type_names (c.global_type_names),
+ polymorphic (c.polymorphic)
+ {
+ }
+
+ public:
+ String
+ find_name (String const& n, NameSet& set)
+ {
+ String base_name (escape (n));
+ String name (base_name);
+
+ for (size_t i (1); set.find (name) != set.end (); ++i)
+ {
+ std::wostringstream os;
+ os << i;
+ name = base_name + os.str ();
+ }
+
+ set.insert (name);
+ return name;
+ }
+
+ private:
+ String const skel_suffix_;
+ String const impl_suffix_;
+
+ map<String, NameSet> global_type_names_;
+
+ public:
+ bool const impl;
+ String const& skel_suffix;
+ String const& impl_suffix;
+
+ map<String, NameSet>& global_type_names;
+
+ bool polymorphic;
+ };
+
+
+ //
+ //
+ struct PrimaryMember: Traversal::Member, Context
+ {
+ PrimaryMember (Context& c, NameSet& set)
+ : Context (c), set_ (set)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (Parser::Context::skip (m))
+ return;
+
+ m.context ().set ("name", find_name (m.name (), set_));
+ }
+
+ private:
+ NameSet& set_;
+ };
+
+ struct DerivedMember: Traversal::Member, Context
+ {
+ DerivedMember (Context& c, NameSet& set)
+ : Context (c), set_ (set)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (Parser::Context::skip (m))
+ return;
+
+ m.context ().set ("parser",
+ find_name (m.name () + L"_parser", set_));
+
+ String const& base (m.context ().get<String> ("name"));
+ m.context ().set ("member", find_name (base + L"_parser_", set_));
+
+ if (polymorphic &&
+ m.is_a<SemanticGraph::Element> () &&
+ !m.type ().context ().count ("anonymous"))
+ {
+ m.context ().set (
+ "member-map", find_name (base + L"_parser_map_", set_));
+
+ m.context ().set (
+ "member-map-impl",
+ find_name (base + L"_parser_map_impl_", set_));
+ }
+ }
+
+ private:
+ NameSet& set_;
+ };
+
+
+ //
+ //
+ struct MemberInRestrictionBase: Traversal::Member
+ {
+ protected:
+ MemberInRestrictionBase (NameSet& set, SemanticGraph::Complex& base)
+ : set_ (set), base_ (base)
+ {
+ }
+
+ struct NotFound {};
+
+ Type&
+ find_member (SemanticGraph::Complex& c, Type& m)
+ {
+ using SemanticGraph::Complex;
+
+ Complex::NamesIteratorPair r (c.find (m.name ()));
+
+ for (; r.first != r.second; ++r.first)
+ {
+ if (r.first->named ().is_a<Type> ())
+ {
+ Type& bm (dynamic_cast<Type&> (r.first->named ()));
+
+ if (typeid (bm) != typeid (m))
+ continue;
+
+ if (m.qualified_p ())
+ {
+ if (bm.qualified_p () &&
+ m.name () == bm.name () &&
+ m.namespace_ ().name () == bm.namespace_ ().name ())
+ return bm;
+ }
+ else
+ {
+ if (!bm.qualified_p () && m.name () == bm.name ())
+ return bm;
+ }
+ }
+ }
+
+ // If we didn't find anything, try our base.
+ //
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& base (c.inherits ().base ());
+
+ if (base.is_a<Complex> ())
+ return find_member (dynamic_cast<Complex&> (base), m);
+ }
+
+ //std::wcerr << "unable to find member " << m.name () << " in "
+ // << c.name () << std::endl;
+
+ throw NotFound ();
+ }
+
+ protected:
+ NameSet& set_;
+ SemanticGraph::Complex& base_;
+ };
+
+ struct PrimaryMemberInRestriction: MemberInRestrictionBase, Context
+ {
+ PrimaryMemberInRestriction (Context& c,
+ NameSet& set,
+ SemanticGraph::Complex& base)
+ : MemberInRestrictionBase (set, base), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (Parser::Context::skip (m))
+ return;
+
+ String name;
+
+ try
+ {
+ // Try to find corresponding member in one of our bases.
+ // This may fail if we use an element that substitutes
+ // one in our base.
+ //
+ Type& bm (find_member (base_, m));
+ name = bm.context ().get<String> ("name");
+ }
+ catch (NotFound const&)
+ {
+ // Fall back to the standard name assignment.
+ //
+ name = find_name (m.name (), set_);
+ }
+
+ m.context ().set ("name", name);
+ }
+ };
+
+ struct DerivedMemberInRestriction: MemberInRestrictionBase, Context
+ {
+ DerivedMemberInRestriction (Context& c,
+ NameSet& set,
+ SemanticGraph::Complex& base)
+ : MemberInRestrictionBase (set, base), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (Parser::Context::skip (m))
+ return;
+
+ bool poly (polymorphic &&
+ m.is_a<SemanticGraph::Element> () &&
+ !m.type ().context ().count ("anonymous"));
+
+ String parser, member, member_map, member_map_impl;
+
+ try
+ {
+ // Try to find corresponding member in one of our bases.
+ // This may fail if we use an element that substitutes
+ // one in our base.
+ //
+ Type& bm (find_member (base_, m));
+ parser = bm.context ().get<String> ("parser");
+ member = bm.context ().get<String> ("member");
+
+ if (poly)
+ {
+ member_map = bm.context ().get<String> ("member-map");
+ member_map_impl = bm.context ().get<String> ("member-map-impl");
+ }
+ }
+ catch (NotFound const&)
+ {
+ // Fall back to the standard name assignment.
+ //
+ String const& base (m.context ().get<String> ("name"));
+
+ parser = find_name (m.name () + L"_parser", set_);
+ member = find_name (base + L"_parser_", set_);
+
+ if (poly)
+ {
+ member_map = find_name (base + L"_parser_map_", set_);
+ member_map_impl = find_name (base + L"_parser_map_impl_", set_);
+ }
+ }
+
+ m.context ().set ("parser", parser);
+ m.context ().set ("member", member);
+
+ if (poly)
+ {
+ m.context ().set ("member-map", member_map);
+ m.context ().set ("member-map-impl", member_map_impl);
+ }
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ SemanticGraph::Context& cc (c.context ());
+
+ // Use processed name.
+ //
+ String const& name (cc.get<String> ("name"));
+
+ // We leave this set around to allow other mappings to use
+ // this information.
+ //
+ cc.set ("cxx-parser-name-processor-member-set", NameSet ());
+ NameSet& member_set (
+ cc.get<NameSet> ("cxx-parser-name-processor-member-set"));
+
+ member_set.insert (name);
+
+ // Add our base's members to the initial list unless we are
+ // inheriting by restriction in which case we need to have
+ // the same names as our base.
+ //
+ bool restriction (false);
+
+ if (c.inherits_p ())
+ {
+ // @@ What if this types name is the same as one of base's
+ // members?
+ //
+ SemanticGraph::Type& base (c.inherits ().base ());
+
+ if (base.is_a<SemanticGraph::Complex> ())
+ {
+ if (!base.context ().count (
+ "cxx-parser-name-processor-member-set"))
+ {
+ dispatch (base);
+ }
+
+ NameSet const& base_set (
+ base.context ().get<NameSet> (
+ "cxx-parser-name-processor-member-set"));
+
+ member_set.insert (base_set.begin (), base_set.end ());
+
+ // Inheritance by restriction from anyType is a special case.
+ //
+ restriction = c.inherits ().is_a<SemanticGraph::Restricts> () &&
+ !c.inherits ().base ().is_a<SemanticGraph::AnyType> ();
+ }
+ }
+
+ if (restriction)
+ {
+ // First assign the "primary" names.
+ //
+ {
+ PrimaryMemberInRestriction member (
+ *this,
+ member_set,
+ dynamic_cast<SemanticGraph::Complex&> (
+ c.inherits ().base ()));
+
+ Traversal::Names names (member);
+
+ Complex::names (c, names);
+ }
+
+ // Assign "derived" names.
+ //
+ {
+ DerivedMemberInRestriction member (
+ *this,
+ member_set,
+ dynamic_cast<SemanticGraph::Complex&> (
+ c.inherits ().base ()));
+
+ Traversal::Names names (member);
+
+ Complex::names (c, names);
+ }
+ }
+ else
+ {
+ // First assign the "primary" names.
+ //
+ {
+ PrimaryMember member (*this, member_set);
+ Traversal::Names names (member);
+
+ Complex::names (c, names);
+ }
+
+ // Assign "derived" names.
+ //
+ {
+ DerivedMember member (*this, member_set);
+ Traversal::Names names (member);
+
+ Complex::names (c, names);
+ }
+ }
+ }
+ };
+
+
+ //
+ //
+ struct GlobalType: Traversal::Type, Context
+ {
+ GlobalType (Context& c, NameSet& set)
+ : Context (c), set_ (set)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ SemanticGraph::Context& c (t.context ());
+ String const& n (t.name ());
+
+ String name (find_name (n + skel_suffix, set_));
+ c.set ("name", name);
+
+ // Assign the post_* name.
+ //
+ c.set ("post", find_post_name (t));
+
+ // Note that we do not add this name to the set so that it
+ // does not influence other names.
+ //
+ if (impl)
+ c.set ("impl", escape (n + impl_suffix));
+ }
+
+ private:
+ String
+ find_post_name (SemanticGraph::Type& t)
+ {
+ String const& n (t.name ());
+
+ // It is possible that our base has the same type name (just
+ // in a different namespaces). Avoid name clash in this case.
+ //
+ using SemanticGraph::Complex;
+
+ Complex* c = dynamic_cast<Complex*> (&t);
+
+ if (c == 0 || !c->inherits_p ())
+ {
+ return escape (L"post_" + n);
+ }
+ else
+ {
+ NameSet set;
+
+ // Collect all base's post_*. In some mutual inclusion cases it
+ // is possible that our base won't have the post name assigned
+ // yet. In this situation will will have to figure it out
+ // ourselves (we can do it since we use the "raw" type name).
+ //
+ SemanticGraph::Type* b (&c->inherits ().base ());
+
+ while (true)
+ {
+ if (b->context ().count ("post"))
+ set.insert (b->context ().get<String> ("post"));
+ else
+ set.insert (find_post_name (*b));
+
+ Complex* cb (dynamic_cast<Complex*> (b));
+
+ if (cb != 0 && cb->inherits_p ())
+ {
+ b = &cb->inherits ().base ();
+ continue;
+ }
+
+ break;
+ }
+
+ String base_name (escape (L"post_" + n));
+ String post (base_name);
+
+ for (size_t i (1); set.find (post) != set.end (); ++i)
+ {
+ std::wostringstream os;
+ os << i;
+ post = base_name + os.str ();
+ }
+
+ return post;
+ }
+ }
+
+ private:
+ NameSet& set_;
+ };
+
+
+ struct Namespace: Traversal::Namespace, Context
+ {
+ Namespace (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& ns)
+ {
+ NameSet& type_set (global_type_names[ns.name ()]);
+
+ GlobalType type (*this, type_set);
+ Traversal::Names names (type);
+
+ Traversal::Namespace::names (ns, names);
+ }
+ };
+
+
+ struct FundType: Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities,
+
+ Context
+ {
+ FundType (Context& c)
+ : Context (c)
+ {
+ }
+
+ // anyType & anySimpleType.
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ t.context ().set ("name", make_skel_name ("any_type"));
+ t.context ().set ("impl", make_impl_name ("any_type"));
+ t.context ().set ("post", String ("post_any_type"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ t.context ().set ("name", make_skel_name ("any_simple_type"));
+ t.context ().set ("impl", make_impl_name ("any_simple_type"));
+ t.context ().set ("post", String ("post_any_simple_type"));
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ t.context ().set ("name", make_skel_name ("boolean"));
+ t.context ().set ("impl", make_impl_name ("boolean"));
+ t.context ().set ("post", String ("post_boolean"));
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ t.context ().set ("name", make_skel_name ("byte"));
+ t.context ().set ("impl", make_impl_name ("byte"));
+ t.context ().set ("post", String ("post_byte"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ t.context ().set ("name", make_skel_name ("unsigned_byte"));
+ t.context ().set ("impl", make_impl_name ("unsigned_byte"));
+ t.context ().set ("post", String ("post_unsigned_byte"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ t.context ().set ("name", make_skel_name ("short"));
+ t.context ().set ("impl", make_impl_name ("short"));
+ t.context ().set ("post", String ("post_short"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ t.context ().set ("name", make_skel_name ("unsigned_short"));
+ t.context ().set ("impl", make_impl_name ("unsigned_short"));
+ t.context ().set ("post", String ("post_unsigned_short"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ t.context ().set ("name", make_skel_name ("int"));
+ t.context ().set ("impl", make_impl_name ("int"));
+ t.context ().set ("post", String ("post_int"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ t.context ().set ("name", make_skel_name ("unsigned_int"));
+ t.context ().set ("impl", make_impl_name ("unsigned_int"));
+ t.context ().set ("post", String ("post_unsigned_int"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ t.context ().set ("name", make_skel_name ("long"));
+ t.context ().set ("impl", make_impl_name ("long"));
+ t.context ().set ("post", String ("post_long"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ t.context ().set ("name", make_skel_name ("unsigned_long"));
+ t.context ().set ("impl", make_impl_name ("unsigned_long"));
+ t.context ().set ("post", String ("post_unsigned_long"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ t.context ().set ("name", make_skel_name ("integer"));
+ t.context ().set ("impl", make_impl_name ("integer"));
+ t.context ().set ("post", String ("post_integer"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ t.context ().set ("name", make_skel_name ("non_positive_integer"));
+ t.context ().set ("impl", make_impl_name ("non_positive_integer"));
+ t.context ().set ("post", String ("post_non_positive_integer"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ t.context ().set ("name", make_skel_name ("non_negative_integer"));
+ t.context ().set ("impl", make_impl_name ("non_negative_integer"));
+ t.context ().set ("post", String ("post_non_negative_integer"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ t.context ().set ("name", make_skel_name ("positive_integer"));
+ t.context ().set ("impl", make_impl_name ("positive_integer"));
+ t.context ().set ("post", String ("post_positive_integer"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ t.context ().set ("name", make_skel_name ("negative_integer"));
+ t.context ().set ("impl", make_impl_name ("negative_integer"));
+ t.context ().set ("post", String ("post_negative_integer"));
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ t.context ().set ("name", make_skel_name ("float"));
+ t.context ().set ("impl", make_impl_name ("float"));
+ t.context ().set ("post", String ("post_float"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ t.context ().set ("name", make_skel_name ("double"));
+ t.context ().set ("impl", make_impl_name ("double"));
+ t.context ().set ("post", String ("post_double"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ t.context ().set ("name", make_skel_name ("decimal"));
+ t.context ().set ("impl", make_impl_name ("decimal"));
+ t.context ().set ("post", String ("post_decimal"));
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ t.context ().set ("name", make_skel_name ("string"));
+ t.context ().set ("impl", make_impl_name ("string"));
+ t.context ().set ("post", String ("post_string"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ t.context ().set ("name", make_skel_name ("normalized_string"));
+ t.context ().set ("impl", make_impl_name ("normalized_string"));
+ t.context ().set ("post", String ("post_normalized_string"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ t.context ().set ("name", make_skel_name ("token"));
+ t.context ().set ("impl", make_impl_name ("token"));
+ t.context ().set ("post", String ("post_token"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ t.context ().set ("name", make_skel_name ("nmtoken"));
+ t.context ().set ("impl", make_impl_name ("nmtoken"));
+ t.context ().set ("post", String ("post_nmtoken"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ t.context ().set ("name", make_skel_name ("nmtokens"));
+ t.context ().set ("impl", make_impl_name ("nmtokens"));
+ t.context ().set ("post", String ("post_nmtokens"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ t.context ().set ("name", make_skel_name ("name"));
+ t.context ().set ("impl", make_impl_name ("name"));
+ t.context ().set ("post", String ("post_name"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ t.context ().set ("name", make_skel_name ("ncname"));
+ t.context ().set ("impl", make_impl_name ("ncname"));
+ t.context ().set ("post", String ("post_ncname"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ t.context ().set ("name", make_skel_name ("language"));
+ t.context ().set ("impl", make_impl_name ("language"));
+ t.context ().set ("post", String ("post_language"));
+ }
+
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ t.context ().set ("name", make_skel_name ("qname"));
+ t.context ().set ("impl", make_impl_name ("qname"));
+ t.context ().set ("post", String ("post_qname"));
+ }
+
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ t.context ().set ("name", make_skel_name ("id"));
+ t.context ().set ("impl", make_impl_name ("id"));
+ t.context ().set ("post", String ("post_id"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ t.context ().set ("name", make_skel_name ("idref"));
+ t.context ().set ("impl", make_impl_name ("idref"));
+ t.context ().set ("post", String ("post_idref"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ t.context ().set ("name", make_skel_name ("idrefs"));
+ t.context ().set ("impl", make_impl_name ("idrefs"));
+ t.context ().set ("post", String ("post_idrefs"));
+ }
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ t.context ().set ("name", make_skel_name ("uri"));
+ t.context ().set ("impl", make_impl_name ("uri"));
+ t.context ().set ("post", String ("post_uri"));
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ t.context ().set ("name", make_skel_name ("base64_binary"));
+ t.context ().set ("impl", make_impl_name ("base64_binary"));
+ t.context ().set ("post", String ("post_base64_binary"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ t.context ().set ("name", make_skel_name ("hex_binary"));
+ t.context ().set ("impl", make_impl_name ("hex_binary"));
+ t.context ().set ("post", String ("post_hex_binary"));
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ t.context ().set ("name", make_skel_name ("date"));
+ t.context ().set ("impl", make_impl_name ("date"));
+ t.context ().set ("post", String ("post_date"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ t.context ().set ("name", make_skel_name ("date_time"));
+ t.context ().set ("impl", make_impl_name ("date_time"));
+ t.context ().set ("post", String ("post_date_time"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ t.context ().set ("name", make_skel_name ("duration"));
+ t.context ().set ("impl", make_impl_name ("duration"));
+ t.context ().set ("post", String ("post_duration"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ t.context ().set ("name", make_skel_name ("gday"));
+ t.context ().set ("impl", make_impl_name ("gday"));
+ t.context ().set ("post", String ("post_gday"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ t.context ().set ("name", make_skel_name ("gmonth"));
+ t.context ().set ("impl", make_impl_name ("gmonth"));
+ t.context ().set ("post", String ("post_gmonth"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ t.context ().set ("name", make_skel_name ("gmonth_day"));
+ t.context ().set ("impl", make_impl_name ("gmonth_day"));
+ t.context ().set ("post", String ("post_gmonth_day"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ t.context ().set ("name", make_skel_name ("gyear"));
+ t.context ().set ("impl", make_impl_name ("gyear"));
+ t.context ().set ("post", String ("post_gyear"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ t.context ().set ("name", make_skel_name ("gyear_month"));
+ t.context ().set ("impl", make_impl_name ("gyear_month"));
+ t.context ().set ("post", String ("post_gyear_month"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ t.context ().set ("name", make_skel_name ("time"));
+ t.context ().set ("impl", make_impl_name ("time"));
+ t.context ().set ("post", String ("post_time"));
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity& t)
+ {
+ t.context ().set ("name", make_skel_name ("entity"));
+ t.context ().set ("impl", make_impl_name ("entity"));
+ t.context ().set ("post", String ("post_entity"));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities& t)
+ {
+ t.context ().set ("name", make_skel_name ("entities"));
+ t.context ().set ("impl", make_impl_name ("entities"));
+ t.context ().set ("post", String ("post_entities"));
+ }
+
+ private:
+ String
+ make_skel_name (String const& base)
+ {
+ return escape (base + skel_suffix);
+ }
+
+ String
+ make_impl_name (String const& base)
+ {
+ return escape (base + impl_suffix);
+ }
+ };
+
+ // Go into sourced/included/imported schemas while making sure
+ // we don't process the same stuff more than once.
+ //
+ struct Uses: Traversal::Sources,
+ Traversal::Includes,
+ Traversal::Imports
+ {
+ virtual void
+ traverse (SemanticGraph::Sources& sr)
+ {
+ SemanticGraph::Schema& s (sr.schema ());
+
+ if (!s.context ().count ("cxx-parser-name-processor-seen"))
+ {
+ s.context ().set ("cxx-parser-name-processor-seen", true);
+ Traversal::Sources::traverse (sr);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Includes& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count ("cxx-parser-name-processor-seen"))
+ {
+ s.context ().set ("cxx-parser-name-processor-seen", true);
+ Traversal::Includes::traverse (i);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Imports& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count ("cxx-parser-name-processor-seen"))
+ {
+ s.context ().set ("cxx-parser-name-processor-seen", true);
+ Traversal::Imports::traverse (i);
+ }
+ }
+ };
+
+ // Go into implied schemas while making sure we don't process
+ // the same stuff more than once.
+ //
+ struct Implies: Traversal::Implies
+ {
+ virtual void
+ traverse (SemanticGraph::Implies& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count ("cxx-parser-name-processor-seen"))
+ {
+ s.context ().set ("cxx-parser-name-processor-seen", true);
+ Traversal::Implies::traverse (i);
+ }
+ }
+ };
+
+ void
+ process_impl (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& file,
+ StringLiteralMap const& map)
+ {
+ Context ctx (ops, tu, file, &map);
+
+ if (tu.names_begin ()->named ().name () ==
+ L"http://www.w3.org/2001/XMLSchema")
+ {
+ // XML Schema namespace.
+ //
+ Traversal::Schema schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundType fund_type (ctx);
+
+ schema >> schema_names >> ns >> ns_names >> fund_type;
+
+ schema.dispatch (tu);
+ }
+ else
+ {
+
+ // Pass one - assign names to fundamental types.
+ //
+ {
+ Traversal::Schema schema;
+ Implies implies;
+ Traversal::Schema xs_schema;
+
+ schema >> implies >> xs_schema;
+
+ Traversal::Names xs_schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundType fund_type (ctx);
+
+ xs_schema >> xs_schema_names >> ns >> ns_names >> fund_type;
+
+ schema.dispatch (tu);
+ }
+
+ // Pass two - assign names to global types. This pass cannot
+ // be combined with pass three because of possible recursive
+ // schema inclusions. Also note that we check first if this
+ // schema has already been processed which may happen in the
+ // file-per-type compilation mode.
+ //
+ if (!tu.context ().count ("cxx-parser-name-processor-seen"))
+ {
+ Traversal::Schema schema;
+ Uses uses;
+
+ schema >> uses >> schema;
+
+ Traversal::Names schema_names;
+ Namespace ns (ctx);
+
+ schema >> schema_names >> ns;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set ("cxx-parser-name-processor-seen", true);
+
+ schema.dispatch (tu);
+ }
+
+ // Pass three - assign names inside complex types. Here we don't
+ // need to go into included/imported schemas.
+ //
+ {
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+
+ schema >> schema_names >> ns >> ns_names;
+
+ Complex complex (ctx);
+
+ ns_names >> complex;
+
+ schema.dispatch (tu);
+ }
+ }
+ }
+ }
+
+ void NameProcessor::
+ process (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& file,
+ StringLiteralMap const& map)
+ {
+ process_impl (ops, tu, file, map);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/name-processor.hxx b/xsd/xsd/cxx/parser/name-processor.hxx
new file mode 100644
index 0000000..f8ac28c
--- /dev/null
+++ b/xsd/xsd/cxx/parser/name-processor.hxx
@@ -0,0 +1,30 @@
+// file : xsd/cxx/parser/name-processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_NAME_PROCESSOR_HXX
+#define XSD_CXX_PARSER_NAME_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/elements.hxx>
+#include <xsd/cxx/parser/options.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class NameProcessor
+ {
+ public:
+ void
+ process (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file,
+ StringLiteralMap const& map);
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_NAME_PROCESSOR_HXX
diff --git a/xsd/xsd/cxx/parser/options.cli b/xsd/xsd/cxx/parser/options.cli
new file mode 100644
index 0000000..e430333
--- /dev/null
+++ b/xsd/xsd/cxx/parser/options.cli
@@ -0,0 +1,147 @@
+// file : xsd/cxx/parser/options.cli
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include <cstddef>; // std::size_t
+
+include <xsd/types.hxx>; // NarrowString, NarrowStrings
+
+include <xsd/cxx/options.cli>;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class options: CXX::options
+ {
+ NarrowStrings --type-map
+ {
+ "<mapfile>",
+ "Read XML Schema to C++ type mapping information from <mapfile>.
+ Repeat this option to specify several type maps. Type maps are
+ considered in order of appearance and the first match is used. By
+ default all user-defined types are mapped to \cb{void}. See the
+ TYPE MAP section below for more information."
+ };
+
+ NarrowString --xml-parser = "xerces"
+ {
+ "<parser>",
+ "Use <parser> as the underlying XML parser. Valid values are
+ \cb{xerces} for Xerces-C++ (default) and \cb{expat} for Expat."
+ };
+
+ // Features.
+ //
+ bool --generate-validation
+ {
+ "Generate validation code. The validation code (\"perfect parser\")
+ ensures that instance documents conform to the schema. Validation
+ code is generated by default when the selected underlying XML parser
+ is non-validating (\cb{expat})."
+ };
+
+ bool --suppress-validation
+ {
+ "Suppress the generation of validation code. Validation is suppressed
+ by default when the selected underlying XML parser is validating
+ (\cb{xerces})."
+ };
+
+ bool --generate-polymorphic
+ {
+ "Generate polymorphism-aware code. Specify this option if you use
+ substitution groups or \cb{xsi:type}."
+ };
+
+ bool --generate-noop-impl
+ {
+ "Generate a sample parser implementation that does nothing (no
+ operation). The sample implementation can then be filled with
+ the application-specific code. For an input file in the form
+ \cb{name.xsd} this option triggers the generation of two
+ additional C++ files in the form: \cb{name-pimpl.hxx} (parser
+ implementation header file) and \cb{name-pimpl.cxx} (parser
+ implementation source file)."
+ };
+
+ bool --generate-print-impl
+ {
+ "Generate a sample parser implementation that prints the XML data
+ to \c{STDOUT}. For an input file in the form \cb{name.xsd} this
+ option triggers the generation of two additional C++ files in the
+ form: \cb{name-pimpl.hxx} (parser implementation header file) and
+ \cb{name-pimpl.cxx} (parser implementation source file)."
+ };
+
+ bool --generate-test-driver
+ {
+ "Generate a test driver for the sample parser implementation. For an
+ input file in the form \cb{name.xsd} this option triggers the
+ generation of an additional C++ file in the form
+ \cb{name-driver.cxx}."
+ };
+
+ bool --force-overwrite
+ {
+ "Force overwriting of the existing implementation and test driver
+ files. Use this option only if you do not mind loosing the changes
+ you have made in the sample implementation or test driver files."
+ };
+
+ // Root element.
+ //
+ bool --root-element-first
+ {
+ "Indicate that the first global element is the document root. This
+ information is used to generate the test driver for the sample
+ implementation."
+ };
+
+ bool --root-element-last
+ {
+ "Indicate that the last global element is the document root. This
+ information is used to generate the test driver for the sample
+ implementation."
+ };
+
+ NarrowString --root-element
+ {
+ "<element>",
+ "Indicate that <element> is the document root. This information is
+ used to generate the test driver for the sample implementation."
+ };
+
+ // Suffixes.
+ //
+ NarrowString --skel-type-suffix = "_pskel"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{_pskel} to
+ construct the names of the generated parser skeletons."
+ };
+
+ NarrowString --skel-file-suffix = "-pskel"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{-pskel} to
+ construct the names of the generated parser skeleton files."
+ };
+
+ NarrowString --impl-type-suffix = "_pimpl"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{_pimpl} to
+ construct the names of the parser implementations for the built-in
+ XML Schema types as well as sample parser implementations."
+ };
+
+ NarrowString --impl-file-suffix = "-pimpl"
+ {
+ "<suffix>",
+ "Use the provided <suffix> instead of the default \cb{-pimpl} to
+ construct the names of the generated sample parser implementation
+ files."
+ };
+ };
+ }
+}
diff --git a/xsd/xsd/cxx/parser/parser-forward.cxx b/xsd/xsd/cxx/parser/parser-forward.cxx
new file mode 100644
index 0000000..65603fd
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-forward.cxx
@@ -0,0 +1,110 @@
+// file : xsd/cxx/parser/parser-forward.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/parser-forward.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ os << "class " << ename (e) << ";";
+ }
+ };
+
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ os << "class " << ename (l) << ";";
+ }
+ };
+
+ //
+ //
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ os << "class " << ename (u) << ";";
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ os << "class " << ename (c) << ";";
+ }
+ };
+ }
+
+ void
+ generate_parser_forward (Context& ctx)
+ {
+ ctx.os << "// Forward declarations" << endl
+ << "//" << endl;
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+
+ ctx.os << endl;
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/parser-forward.hxx b/xsd/xsd/cxx/parser/parser-forward.hxx
new file mode 100644
index 0000000..b5345a5
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-forward.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/parser-forward.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_PARSER_FORWARD_HXX
+#define XSD_CXX_PARSER_PARSER_FORWARD_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_parser_forward (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_PARSER_FORWARD_HXX
diff --git a/xsd/xsd/cxx/parser/parser-header.cxx b/xsd/xsd/cxx/parser/parser-header.cxx
new file mode 100644
index 0000000..327bb07
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-header.cxx
@@ -0,0 +1,1440 @@
+// file : xsd/cxx/parser/parser-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+
+#include <xsd/cxx/parser/parser-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String const& name (ename (e));
+ SemanticGraph::Type& base (e.inherits ().base ());
+
+ os << "class " << type_exp << name << ": public virtual " <<
+ fq_name (base)
+ << "{"
+ << "public:" << endl
+ << "// Parser callbacks. Override them in your " <<
+ "implementation." << endl
+ << "//" << endl;
+
+ os << "// virtual void" << endl
+ << "// pre ();" << endl
+ << endl;
+
+ String const& ret (ret_type (e));
+
+ bool same (ret == ret_type (base));
+
+ os << "virtual " << ret << endl
+ << post_name (e) << " ()" <<
+ (same || ret == L"void" ? ";" : " = 0;");
+
+ if (polymorphic)
+ {
+ os << endl
+ << "public:" << endl
+ << "static const " << char_type << "*" << endl
+ << "_static_type ();"
+ << endl
+ << "virtual const " << char_type << "*" << endl
+ << "_dynamic_type () const;";
+ }
+
+ os << "};";
+ }
+ };
+
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String const& name (ename (l));
+ SemanticGraph::Type& t (l.argumented ().type ());
+
+ String item (unclash (name, "item"));
+
+ os << "class " << type_exp << name << ": public " << list_base
+ << "{"
+ << "public:" << endl
+ << "// Parser callbacks. Override them in your " <<
+ "implementation." << endl
+ << "//" << endl;
+
+ // pre
+ //
+ os << "// virtual void" << endl
+ << "// pre ();" << endl
+ << endl;
+
+ // item
+ //
+ String const& arg (arg_type (t));
+
+ os << "virtual void" << endl
+ << item;
+
+ if (arg == L"void")
+ os << " ();";
+ else
+ os << " (" << arg << ");";
+
+ os << endl;
+
+ // post
+ //
+ String const& ret (ret_type (l));
+
+ os << "virtual " << ret << endl
+ << post_name (l) << " ()" << (ret == L"void" ? ";" : " = 0;")
+ << endl;
+
+ //
+ //
+ os << "// Parser construction API." << endl
+ << "//" << endl;
+
+ // item_parser
+ //
+ os << "void" << endl
+ << unclash (name, "item_parser") << " (" << fq_name (t) << "&);"
+ << endl;
+
+ // parsers
+ //
+ os << "void" << endl
+ << "parsers (" << fq_name (t) << "& /* item */);"
+ << endl;
+
+ // c-tor
+ //
+ os << "// Constructor." << endl
+ << "//" << endl
+ << name << " ();"
+ << endl;
+
+
+ if (polymorphic)
+ {
+ os << "public:" << endl
+ << "static const " << char_type << "*" << endl
+ << "_static_type ();"
+ << endl
+ << "virtual const " << char_type << "*" << endl
+ << "_dynamic_type () const;"
+ << endl;
+ }
+
+ //
+ //
+ os << "// Implementation." << endl
+ << "//" << endl
+ << "protected:" << endl;
+
+ os << "virtual void" << endl
+ << "_xsd_parse_item (const " << string_type << "&);"
+ << endl;
+
+ os << "protected:" << endl
+ << fq_name (t) << "* _xsd_" << item << "_;"
+ << "};";
+ }
+ };
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String const& name (ename (u));
+
+ os << "class " << type_exp << name << ": public " << simple_base
+ << "{"
+ << "public:" << endl
+ << "// Parser callbacks. Override them in your " <<
+ "implementation." << endl
+ << "//" << endl;
+
+ os << "// virtual void" << endl
+ << "// pre ();" << endl
+ << "//" << endl
+ << "// virtual void" << endl
+ << "// _characters (const " << string_type << "&);" << endl
+ << endl;
+
+ String const& ret (ret_type (u));
+
+ os << "virtual " << ret << endl
+ << post_name (u) << " ()" << (ret == L"void" ? ";" : " = 0;");
+
+ if (polymorphic)
+ {
+ os << endl
+ << "public:" << endl
+ << "static const " << char_type << "*" << endl
+ << "_static_type ();"
+ << endl
+ << "virtual const " << char_type << "*" << endl
+ << "_dynamic_type () const;";
+ }
+
+ os << "};";
+ }
+ };
+
+
+ //
+ //
+ struct ParserCallback: Traversal::Member, Context
+ {
+ ParserCallback (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m)) return;
+
+ String const& arg (arg_type (m.type ()));
+
+ os << "virtual void" << endl
+ << ename (m);
+
+ if (arg == L"void")
+ os << " ();";
+ else
+ os << " (" << arg << ");";
+
+ os << endl;
+ }
+ };
+
+
+ //
+ //
+ struct ParserModifier: Traversal::Member, Context
+ {
+ ParserModifier (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ os << "void" << endl
+ << eparser (m) << " (" << fq_name (m.type ()) << "&);"
+ << endl;
+
+ if (polymorphic &&
+ m.is_a<SemanticGraph::Element> () &&
+ !anonymous (m.type ()))
+ {
+ os << "void" << endl
+ << eparser (m) << " (const " << parser_map << "&);"
+ << endl;
+ }
+ }
+ };
+
+ //
+ //
+ struct ParserMember: Traversal::Member, Context
+ {
+ ParserMember (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String type (fq_name (m.type ()));
+
+ os << type << "* " << emember (m) << ";";
+
+ if (polymorphic &&
+ m.is_a<SemanticGraph::Element> () &&
+ !anonymous (m.type ()))
+ {
+ os << "const " << parser_map << "* " << emember_map (m) << ";"
+ << endl;
+ }
+ }
+ };
+
+ //
+ //
+ struct Particle: Traversal::All,
+ Traversal::Choice,
+ Traversal::Sequence,
+ Context
+ {
+ Particle (Context& c)
+ : Context (c)
+ {
+ *this >> contains_particle_ >> *this;
+ }
+
+
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ if (!a.context().count ("comp-number"))
+ return;
+
+ size_t state_count (a.context().get<size_t> ("state-count"));
+
+ os << "void" << endl
+ << "all_0 (unsigned long& state," << endl
+ << "unsigned char* count," << endl
+ << "const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t," << endl
+ << "bool start);"
+ << endl
+ << "unsigned char v_all_first_[" << state_count << "UL];"
+ << "::xsd::cxx::parser::validating::all_stack v_all_count_;"
+ << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Choice& c)
+ {
+ if (!c.context().count ("comp-number"))
+ return;
+
+ size_t n (c.context ().get<size_t> ("comp-number"));
+
+ os << "void" << endl
+ << "choice_" << n << " (unsigned long& state," << endl
+ << "unsigned long& count," << endl
+ << "const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t," << endl
+ << "bool start);"
+ << endl;
+
+ Traversal::Choice::traverse (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Sequence& s)
+ {
+ if (!s.context().count ("comp-number"))
+ return;
+
+ size_t n (s.context ().get<size_t> ("comp-number"));
+
+ os << "void" << endl
+ << "sequence_" << n << " (unsigned long& state," << endl
+ << "unsigned long& count," << endl
+ << "const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t," << endl
+ << "bool start);"
+ << endl;
+
+ Traversal::Sequence::traverse (s);
+ }
+
+ private:
+ Traversal::ContainsParticle contains_particle_;
+ };
+
+
+ //
+ //
+ struct AttributeValidationState: Traversal::Attribute, Context
+ {
+ AttributeValidationState (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ if (!a.optional_p ())
+ {
+ os << "bool " << ename (a) << ";";
+ }
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ parser_callback_ (c),
+ parser_member_ (c),
+ parser_modifier_ (c),
+ attribute_validation_state_ (c)
+ {
+ names_parser_callback_ >> parser_callback_;
+ names_parser_member_ >> parser_member_;
+ names_parser_modifier_ >> parser_modifier_;
+ names_attribute_validation_state_ >> attribute_validation_state_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String const& name (ename (c));
+
+ // In case of an inheritance-by-restriction, we don't need to
+ // generate parser callbacks, etc. since they are the same as in
+ // the base. We only need the parsing/validation code.
+ //
+ bool restriction (restriction_p (c));
+
+ bool he (has<Traversal::Element> (c));
+ bool ha (has<Traversal::Attribute> (c));
+
+ bool hae (has_particle<Traversal::Any> (c));
+ bool haa (has<Traversal::AnyAttribute> (c));
+
+ bool hra (false); // Has required attribute.
+ if (ha)
+ {
+ RequiredAttributeTest test (hra);
+ Traversal::Names names_test (test);
+ names (c, names_test);
+ }
+
+
+ //
+ //
+ os << "class " << type_exp << name << ": public ";
+
+ if (c.inherits_p ())
+ os << "virtual " << fq_name (c.inherits ().base ());
+ else
+ os << complex_base;
+
+ os << "{"
+ << "public:" << endl
+ << "// Parser callbacks. Override them in your " <<
+ "implementation." << endl
+ << "//" << endl;
+
+ os << "// virtual void" << endl
+ << "// pre ();" << endl
+ << endl;
+
+
+ if (!restriction && (ha || he))
+ {
+ names (c, names_parser_callback_);
+ }
+
+ String const& ret (ret_type (c));
+
+ bool same (c.inherits_p () &&
+ ret == ret_type (c.inherits ().base ()));
+
+ os << "virtual " << ret << endl
+ << post_name (c) << " ()" <<
+ (same || ret == L"void" ? ";" : " = 0;")
+ << endl;
+
+ //
+ //
+ if (!restriction && (he || ha))
+ {
+ os << "// Parser construction API." << endl
+ << "//" << endl;
+
+ names (c, names_parser_modifier_);
+
+ os << "void" << endl
+ << "parsers (";
+
+ {
+ ParserParamDecl decl (*this, false);
+ decl.traverse (c);
+ }
+
+ os << ");"
+ << endl;
+ }
+
+ // Default c-tor.
+ //
+ if ((!restriction && (he || ha)) ||
+ (validation && (he || hae || hra)))
+ {
+ os << "// Constructor." << endl
+ << "//" << endl
+ << name << " ();"
+ << endl;
+ }
+
+ if (polymorphic)
+ {
+ os << "public:" << endl
+ << "static const " << char_type << "*" << endl
+ << "_static_type ();"
+ << endl
+ << "virtual const " << char_type << "*" << endl
+ << "_dynamic_type () const;"
+ << endl;
+ }
+
+ // Implementation.
+ //
+ if (he || ha || (validation && (hae || haa)))
+ {
+ os << "// Implementation." << endl
+ << "//" << endl
+ << "protected:" << endl;
+ }
+
+ // element
+ //
+ if (he || (validation && hae))
+ {
+ // _start_element_impl
+ //
+ os << "virtual bool" << endl
+ << "_start_element_impl (const " << string_type << "&," << endl
+ << "const " << string_type << "&," << endl
+ << "const " << string_type << "*);"
+ << endl;
+
+ // end_element
+ //
+ os << "virtual bool" << endl
+ << "_end_element_impl (const " << string_type << "&," << endl
+ << "const " << string_type << "&);"
+ << endl;
+ }
+
+ // attribute
+ //
+ if (validation)
+ {
+ if (ha)
+ {
+ os << "virtual bool" << endl
+ << "_attribute_impl_phase_one (const " << string_type <<
+ "&," << endl
+ << "const " << string_type << "&," << endl
+ << "const " << string_type << "&);" << endl
+ << endl;
+ }
+
+ if (haa)
+ {
+ os << "virtual bool" << endl
+ << "_attribute_impl_phase_two (const " << string_type <<
+ "&," << endl
+ << "const " << string_type << "&," << endl
+ << "const " << string_type << "&);"
+ << endl;
+ }
+ }
+ else
+ {
+ if (ha)
+ {
+ os << "virtual bool" << endl
+ << "_attribute_impl (const " << string_type << "&," << endl
+ << "const " << string_type << "&," << endl
+ << "const " << string_type << "&);"
+ << endl;
+ }
+ }
+
+ // characters
+ //
+ if (validation && c.mixed_p ())
+ {
+ os << "virtual bool" << endl
+ << "_characters_impl (const " << string_type << "&);"
+ << endl;
+ }
+
+ if (!restriction && (he || ha))
+ {
+ os << "protected:" << endl;
+ names (c, names_parser_member_);
+ os << endl;
+ }
+
+ if (validation && (he || hae))
+ {
+ size_t depth (c.context ().get<size_t> ("depth"));
+
+ os << "protected:" << endl;
+
+ os << "struct v_state_descr_"
+ << "{"
+ << "void (" << fq_name (c) << "::*func) (" << endl
+ << "unsigned long&," << endl
+ << "unsigned long&," << endl
+ << "const " << string_type << "&," << endl
+ << "const " << string_type << "&," << endl
+ << "const " << string_type << "*," << endl
+ << "bool);"
+ << "unsigned long state;"
+ << "unsigned long count;"
+ << "};";
+
+ // Allocate one extra slot for the special state.
+ //
+ os << "struct v_state_"
+ << "{"
+ << "v_state_descr_ data[" << depth + 1 << "UL];"
+ << "unsigned long size;"
+ << "};";
+
+ os << "v_state_ v_state_first_;"
+ << "::xsd::cxx::parser::pod_stack v_state_stack_;"
+ << endl;
+
+ os << "virtual void" << endl
+ << "_pre_e_validate ();"
+ << endl;
+
+ os << "virtual void" << endl
+ << "_post_e_validate ();"
+ << endl;
+
+ Particle t (*this);
+ t.dispatch (c.contains_compositor ().compositor ());
+ }
+
+ if (validation && hra)
+ {
+ os << "protected:" << endl;
+
+ os << "struct v_state_attr_"
+ << "{";
+
+ names (c, names_attribute_validation_state_);
+
+ os << "};";
+
+ os << "v_state_attr_ v_state_attr_first_;"
+ << "::xsd::cxx::parser::pod_stack v_state_attr_stack_;"
+ << endl;
+
+ os << "virtual void" << endl
+ << "_pre_a_validate ();"
+ << endl;
+
+ os << "virtual void" << endl
+ << "_post_a_validate ();"
+ << endl;
+ }
+
+ os << "};";
+ }
+
+ private:
+ //
+ //
+ ParserCallback parser_callback_;
+ Traversal::Names names_parser_callback_;
+
+ //
+ //
+ ParserMember parser_member_;
+ Traversal::Names names_parser_member_;
+
+ //
+ //
+ ParserModifier parser_modifier_;
+ Traversal::Names names_parser_modifier_;
+
+ //
+ //
+ AttributeValidationState attribute_validation_state_;
+ Traversal::Names names_attribute_validation_state_;
+ };
+
+ struct FundType : Context,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities
+ {
+ FundType (Context& c)
+ : Context (c), xs_ns_ (xs_ns_name ())
+ {
+ impl_ns_ = "::xsd::cxx::parser::";
+ impl_ns_ += (validation ? L"validating" : L"non_validating");
+
+ if (char_type == L"char")
+ string_type_ = L"::std::string";
+ else if (char_type == L"wchar_t")
+ string_type_ = L"::std::wstring";
+ else
+ string_type_ = L"::std::basic_string< " + char_type + L" >";
+ }
+
+ // anyType & anySimpleType.
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ gen_typedef (t, "void", "any_type_pskel", "any_type_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ gen_typedef (t, "void",
+ "any_simple_type_pskel", "any_simple_type_pimpl");
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ gen_typedef (t, "bool", "boolean_pskel", "boolean_pimpl");
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ gen_typedef (t, "signed char", "byte_pskel", "byte_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ gen_typedef (t, "unsigned char",
+ "unsigned_byte_pskel", "unsigned_byte_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ gen_typedef (t, "short", "short_pskel", "short_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ gen_typedef (t, "unsigned short",
+ "unsigned_short_pskel", "unsigned_short_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ gen_typedef (t, "int", "int_pskel", "int_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ gen_typedef (t, "unsigned int",
+ "unsigned_int_pskel", "unsigned_int_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ gen_typedef (t, "long long", "long_pskel", "long_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ gen_typedef (t, "unsigned long long",
+ "unsigned_long_pskel", "unsigned_long_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ gen_typedef (t, "long long", "integer_pskel", "integer_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ gen_typedef (t, "long long",
+ "negative_integer_pskel", "negative_integer_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ gen_typedef (t, "long long",
+ "non_positive_integer_pskel",
+ "non_positive_integer_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ gen_typedef (t, "unsigned long long",
+ "positive_integer_pskel", "positive_integer_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ gen_typedef (t, "unsigned long long",
+ "non_negative_integer_pskel",
+ "non_negative_integer_pimpl");
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ gen_typedef (t, "float", "float_pskel", "float_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ gen_typedef (t, "double", "double_pskel", "double_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ gen_typedef (t, "double", "decimal_pskel", "decimal_pimpl");
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ gen_typedef (t, string_type_, "string_pskel", "string_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ gen_typedef (t, string_type_,
+ "normalized_string_pskel", "normalized_string_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ gen_typedef (t, string_type_, "token_pskel", "token_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ nmtoken_ = gen_typedef (t, string_type_,
+ "nmtoken_pskel", "nmtoken_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ // NMTOKENS uses NMTOKEN implementation to parse individual items.
+ // As a result, we don't generate NMTOKENS if we didn't generate
+ // NMTOKEN. Here we assume NMTOKEN is handled before NMTOKENS.
+ //
+ if(nmtoken_)
+ gen_typedef (t, xs_ns_ + L"::string_sequence",
+ "nmtokens_pskel", "nmtokens_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ gen_typedef (t, string_type_, "name_pskel", "name_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ gen_typedef (t, string_type_, "ncname_pskel", "ncname_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ gen_typedef (t, string_type_, "language_pskel", "language_pimpl");
+ }
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::qname", "qname_pskel", "qname_pimpl");
+ }
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ gen_typedef (t, string_type_, "id_pskel", "id_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ idref_ = gen_typedef (t, string_type_, "idref_pskel", "idref_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ // IDREFS uses IDREF implementation to parse individual items.
+ // As a result, we don't generate IDREFS if we didn't generate
+ // IDREF. Here we assume IDREF is handled before IDREFS.
+ //
+ if (idref_)
+ gen_typedef (t, xs_ns_ + L"::string_sequence",
+ "idrefs_pskel", "idrefs_pimpl");
+ }
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ gen_typedef (t, string_type_, "uri_pskel", "uri_pimpl");
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ String buffer (auto_ptr + L"< " + xs_ns_ + L"::buffer >");
+ gen_typedef (t, buffer,
+ "base64_binary_pskel", "base64_binary_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ String buffer (auto_ptr + L"< " + xs_ns_ + L"::buffer >");
+ gen_typedef (t, buffer, "hex_binary_pskel", "hex_binary_pimpl");
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::date", "date_pskel", "date_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::date_time",
+ "date_time_pskel", "date_time_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::duration",
+ "duration_pskel", "duration_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::gday", "gday_pskel", "gday_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::gmonth",
+ "gmonth_pskel", "gmonth_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::gmonth_day",
+ "gmonth_day_pskel", "gmonth_day_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::gyear", "gyear_pskel", "gyear_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::gyear_month",
+ "gyear_month_pskel", "gyear_month_pimpl");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ gen_typedef (t, xs_ns_ + L"::time", "time_pskel", "time_pimpl");
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity&)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities&)
+ {
+ }
+
+ private:
+ bool
+ gen_typedef (SemanticGraph::Type& t,
+ String const& type,
+ String const& pskel,
+ String const& pimpl)
+ {
+ if (ret_type (t) == type)
+ {
+ os << "typedef " << impl_ns_ << "::" << pskel << "< " <<
+ char_type << " > " << ename (t) << ";";
+
+ String const& pimpl_name (t.context ().get<String> ("impl"));
+
+ os << "typedef " << impl_ns_ << "::" << pimpl << "< " <<
+ char_type << " > " << pimpl_name << ";"
+ << endl;
+
+ return true;
+ }
+
+ return false;
+ }
+
+ String xs_ns_;
+ String impl_ns_;
+ String string_type_;
+
+ bool idref_;
+ bool nmtoken_;
+ };
+
+ struct FundNamespace: Namespace, Context
+ {
+ FundNamespace (Context& c)
+ : Namespace (c), Context (c)
+ {
+ }
+
+ void
+ traverse (Type& ns)
+ {
+ pre (ns);
+
+ String impl ("::xsd::cxx::parser::");
+ impl += (validation ? L"validating" : L"non_validating");
+
+ String const c (char_type);
+
+ os << "// Built-in XML Schema types mapping." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::string_sequence< " << c <<
+ " > string_sequence;"
+ << "typedef ::xsd::cxx::parser::qname< " << c << " > qname;"
+ << "typedef ::xsd::cxx::parser::buffer buffer;"
+ << "typedef ::xsd::cxx::parser::time_zone time_zone;"
+ << "typedef ::xsd::cxx::parser::gday gday;"
+ << "typedef ::xsd::cxx::parser::gmonth gmonth;"
+ << "typedef ::xsd::cxx::parser::gyear gyear;"
+ << "typedef ::xsd::cxx::parser::gmonth_day gmonth_day;"
+ << "typedef ::xsd::cxx::parser::gyear_month gyear_month;"
+ << "typedef ::xsd::cxx::parser::date date;"
+ << "typedef ::xsd::cxx::parser::time time;"
+ << "typedef ::xsd::cxx::parser::date_time date_time;"
+ << "typedef ::xsd::cxx::parser::duration duration;"
+ << endl;
+
+ os << "// Base parser skeletons." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::parser_base< " << c <<
+ " > parser_base;"
+ << "typedef " << impl << "::empty_content< " << c <<
+ " > empty_content;"
+ << "typedef " << impl << "::simple_content< " << c <<
+ " > simple_content;"
+ << "typedef " << impl << "::complex_content< " << c <<
+ " > complex_content;"
+ << "typedef " << impl << "::list_base< " << c << " > list_base;"
+ << endl;
+
+ if (polymorphic)
+ {
+ os << "// Parser map interface and default implementation." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::parser_map< " << c <<
+ " > parser_map;"
+ << "typedef ::xsd::cxx::parser::parser_map_impl< " << c <<
+ " > parser_map_impl;"
+ << endl;
+ }
+
+ os << "// Parser skeletons and implementations for the XML Schema" << endl
+ << "// built-in types." << endl
+ << "//" << endl;
+
+ names (ns);
+
+ os << "// Exceptions. See xsd/cxx/parser/exceptions.hxx " <<
+ "for details." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::exception< " <<
+ char_type << " > exception;"
+ << endl
+ << "// Parsing diagnostics." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::severity severity;"
+ << "typedef ::xsd::cxx::parser::error< " << c << " > error;"
+ << "typedef ::xsd::cxx::parser::diagnostics< " << c <<
+ " > diagnostics;"
+ << "typedef ::xsd::cxx::parser::parsing< " << c << " > parsing;"
+ << endl;
+
+ os << "// Error handler. See " <<
+ "xsd/cxx/xml/error-handler.hxx for details." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::xml::error_handler< " << c <<
+ " > error_handler;"
+ << endl;
+
+ os << "// Read-only string." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::ro_string< " << c << " > ro_string;"
+ << endl;
+
+ if (xml_parser == L"xerces")
+ {
+ os << "// Parsing flags. See " <<
+ "xsd/cxx/parser/xerces/elements.hxx" << endl
+ << "// for details." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::xerces::flags flags;"
+ << endl;
+
+ os << "// Parsing properties. See " <<
+ "xsd/cxx/parser/xerces/elements.hxx" << endl
+ << "// for details." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::xerces::properties< " << c <<
+ " > properties;"
+ << endl;
+
+ os << "// Document type. See " <<
+ "xsd/cxx/parser/xerces/elements.hxx" << endl
+ << "// for details." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::xerces::document< " << c <<
+ " > document;"
+ << endl;
+
+ }
+ else if (xml_parser == L"expat")
+ {
+ os << "// Document type. See " <<
+ "xsd/cxx/parser/expat/elements.hxx" << endl
+ << "// for details." << endl
+ << "//" << endl
+ << "typedef ::xsd::cxx::parser::expat::document< " << c <<
+ " > document;"
+ << endl;
+ }
+
+ post (ns);
+ }
+ };
+ }
+
+ void
+ generate_parser_header (Context& ctx, bool generate_xml_schema)
+ {
+ String c (ctx.char_type);
+
+ //
+ //
+ if (c == L"char")
+ {
+ ctx.os << "#ifndef XSD_USE_CHAR" << endl
+ << "#define XSD_USE_CHAR" << endl
+ << "#endif" << endl
+ << endl;
+
+ ctx.os << "#ifndef XSD_CXX_PARSER_USE_CHAR" << endl
+ << "#define XSD_CXX_PARSER_USE_CHAR" << endl
+ << "#endif" << endl
+ << endl;
+ }
+ else if (c == L"wchar_t")
+ {
+ ctx.os << "#ifndef XSD_USE_WCHAR" << endl
+ << "#define XSD_USE_WCHAR" << endl
+ << "#endif" << endl
+ << endl;
+
+ ctx.os << "#ifndef XSD_CXX_PARSER_USE_WCHAR" << endl
+ << "#define XSD_CXX_PARSER_USE_WCHAR" << endl
+ << "#endif" << endl
+ << endl;
+ }
+
+ //
+ //
+ NarrowString extern_xml_schema;
+
+ if (!generate_xml_schema)
+ extern_xml_schema = ctx.options.extern_xml_schema ();
+
+ if (extern_xml_schema)
+ {
+ String name (ctx.hxx_expr->replace (extern_xml_schema));
+
+ ctx.os << "#include " << ctx.process_include_path (name) << endl
+ << endl;
+
+ // Generate includes that came from the type map.
+ //
+ if (ctx.schema_root.context ().count ("includes"))
+ {
+ typedef set<String> Includes;
+
+ Includes const& is (
+ ctx.schema_root.context ().get<Includes> ("includes"));
+
+ for (Includes::const_reverse_iterator i (is.rbegin ());
+ i != is.rend (); ++i)
+ {
+ ctx.os << "#include " << *i << endl;
+ }
+
+ ctx.os << endl;
+ }
+ }
+ else
+ {
+ if (ctx.char_type == L"char" &&
+ ctx.xml_parser == L"xerces" &&
+ ctx.char_encoding != L"custom")
+ {
+ ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding << ".hxx>" << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl
+ << "#include <xsd/cxx/parser/exceptions.hxx>" << endl
+ << "#include <xsd/cxx/parser/elements.hxx>" << endl
+ << "#include <xsd/cxx/parser/xml-schema.hxx>" << endl;
+
+ if (ctx.polymorphic)
+ ctx.os << "#include <xsd/cxx/parser/map.hxx>" << endl;
+
+ if (ctx.validation)
+ ctx.os << "#include <xsd/cxx/parser/validating/parser.hxx>" << endl
+ << "#include <xsd/cxx/parser/validating/exceptions.hxx>" << endl
+ << "#include <xsd/cxx/parser/validating/xml-schema-pskel.hxx>" << endl
+ << "#include <xsd/cxx/parser/validating/xml-schema-pimpl.hxx>" << endl;
+ else
+ ctx.os << "#include <xsd/cxx/parser/non-validating/parser.hxx>" << endl
+ << "#include <xsd/cxx/parser/non-validating/xml-schema-pskel.hxx>" << endl
+ << "#include <xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx>" << endl;
+
+ ctx.os << "#include <xsd/cxx/parser/" << ctx.xml_parser <<
+ "/elements.hxx>" << endl
+ << endl;
+
+ // Generate includes that came from the type map.
+ //
+ if (ctx.schema_root.context ().count ("includes"))
+ {
+ typedef set<String> Includes;
+
+ Includes const& is (
+ ctx.schema_root.context ().get<Includes> ("includes"));
+
+ for (Includes::const_reverse_iterator i (is.rbegin ());
+ i != is.rend (); ++i)
+ {
+ ctx.os << "#include " << *i << endl;
+ }
+
+ ctx.os << endl;
+ }
+
+ // Generate fundamental types.
+ //
+ if (generate_xml_schema)
+ {
+ Traversal::Schema schema;
+ Traversal::Names names;
+ FundNamespace ns (ctx);
+
+ schema >> names >> ns;
+
+ Traversal::Names ns_names;
+ FundType type (ctx);
+
+ ns >> ns_names >> type;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ else
+ {
+ Traversal::Schema schema, xsd;
+ Traversal::Implies implies;
+ Traversal::Names names;
+ FundNamespace ns (ctx);
+
+ schema >> implies >> xsd >> names >> ns;
+
+ Traversal::Names ns_names;
+ FundType type (ctx);
+
+ ns >> ns_names >> type;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+
+ // Generate user type mapping.
+ //
+ if (!generate_xml_schema)
+ {
+ Traversal::Schema schema;
+
+ Sources sources;
+ Includes includes (ctx, Includes::header);
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> includes;
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/parser-header.hxx b/xsd/xsd/cxx/parser/parser-header.hxx
new file mode 100644
index 0000000..642da40
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-header.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/parser-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_PARSER_HEADER_HXX
+#define XSD_CXX_PARSER_PARSER_HEADER_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_parser_header (Context&, bool generate_xml_schema);
+ }
+}
+
+#endif // XSD_CXX_PARSER_PARSER_HEADER_HXX
diff --git a/xsd/xsd/cxx/parser/parser-inline.cxx b/xsd/xsd/cxx/parser/parser-inline.cxx
new file mode 100644
index 0000000..6705d5b
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-inline.cxx
@@ -0,0 +1,399 @@
+// file : xsd/cxx/parser/parser-inline.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/parser-inline.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String const& name (ename (l));
+ SemanticGraph::Type& t (l.argumented ().type ());
+
+ String item (unclash (name, "item"));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // item_parser
+ //
+ os << inl
+ << "void " << name << "::" << endl
+ << unclash (name, "item_parser") << " (" <<
+ fq_name (t) << "& " << item << ")"
+ << "{"
+ << "this->_xsd_" << item << "_ = &" << item << ";"
+ << "}";
+
+ // parsers
+ //
+ os << inl
+ << "void " << name << "::" << endl
+ << "parsers (" << fq_name (t) << "& " << item << ")"
+ << "{"
+ << "this->_xsd_" << item << "_ = &" << item << ";"
+ << "}";
+
+ // c-tor
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " ()" << endl
+ << ": _xsd_" << item << "_ (0)"
+ << "{"
+ << "}";
+ }
+ };
+
+
+ //
+ //
+ struct ParserModifier: Traversal::Member, Context
+ {
+ ParserModifier (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& scope (ename (m.scope ()));
+ String const& parser (eparser (m));
+
+ bool poly (polymorphic &&
+ m.is_a<SemanticGraph::Element> () &&
+ !anonymous (m.type ()));
+
+ os << inl
+ << "void " << scope << "::" << endl
+ << parser << " (" << fq_name (m.type ()) << "& p)"
+ << "{"
+ << "this->" << emember (m) << " = &p;"
+ << "}";
+
+ if (poly)
+ {
+ os << inl
+ << "void " << scope << "::" << endl
+ << parser << " (const " << parser_map << "& m)"
+ << "{"
+ << "this->" << emember_map (m) << " = &m;"
+ << "}";
+ }
+ }
+ };
+
+
+ //
+ //
+ struct ParserMemberSet: Traversal::Member, Context
+ {
+ ParserMemberSet (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m)) return;
+
+ String const& name (ename (m));
+
+ os << "this->" << emember (m) << " = &" << name << ";";
+ }
+ };
+
+
+ //
+ //
+ struct ParserMemberInit: Traversal::Member, Context
+ {
+ ParserMemberInit (Context& c)
+ : Context (c), first_ (true)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m)) return;
+
+ if (first_)
+ first_ = false;
+ else
+ os << "," << endl << " ";
+
+ os << emember (m) << " (0)";
+
+ if (polymorphic &&
+ m.is_a<SemanticGraph::Element> () &&
+ !anonymous (m.type ()))
+ {
+ os << "," << endl
+ << " " << emember_map (m) << " (0)";
+ }
+ }
+
+ bool
+ comma () const
+ {
+ return !first_;
+ }
+
+ private:
+ bool first_;
+ };
+
+ struct ParserBaseSet: Traversal::Complex,
+ Traversal::List,
+ Context
+ {
+ ParserBaseSet (Context& c)
+ : Context (c), member_ (c)
+ {
+ inherits_ >> *this;
+ names_ >> member_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c, inherits_);
+
+ if (!restriction_p (c))
+ names (c, names_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ String const& name (ename (l));
+ String item (unclash (name, "item"));
+
+ os << "this->_xsd_" << item << "_ = &" << name << "_item;";
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+
+ ParserMemberSet member_;
+ Traversal::Names names_;
+ };
+
+ struct Particle: Traversal::All, Context
+ {
+ Particle (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ if (!a.context().count ("comp-number"))
+ return;
+
+ size_t state_count (a.context().get<size_t> ("state-count"));
+
+ os << "," << endl
+ << " v_all_count_ (" << state_count << "UL, v_all_first_)";
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ parser_modifier_ (c),
+ parser_base_set_ (c),
+ parser_member_set_ (c),
+ particle_ (c)
+ {
+ names_parser_modifier_ >> parser_modifier_;
+ inherits_parser_base_set_ >> parser_base_set_;
+ names_parser_member_set_ >> parser_member_set_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ bool he (has<Traversal::Element> (c));
+ bool ha (has<Traversal::Attribute> (c));
+
+ bool hae (has_particle<Traversal::Any> (c));
+
+ bool hra (false); // Has required attribute.
+ if (ha)
+ {
+ RequiredAttributeTest test (hra);
+ Traversal::Names names_test (test);
+ names (c, names_test);
+ }
+
+ bool restriction (restriction_p (c));
+
+ if (!((!restriction && (he || ha)) ||
+ (validation && (he || hae || hra))))
+ return;
+
+ String const& name (ename (c));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ if (!restriction && (he || ha))
+ {
+ // <name>_parser ()
+ //
+ names (c, names_parser_modifier_);
+
+
+ // parsers ()
+ //
+
+ os << inl
+ << "void " << name << "::" << endl
+ << "parsers (";
+
+ {
+ ParserParamDecl decl (*this, true);
+ decl.traverse (c);
+ }
+
+ os << ")"
+ << "{";
+
+ inherits (c, inherits_parser_base_set_);
+ names (c, names_parser_member_set_);
+
+ os << "}";
+ }
+
+ // Default c-tor.
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " ()" << endl
+ << ": ";
+
+ bool comma (false);
+
+ if (!restriction && (he || ha))
+ {
+ ParserMemberInit member_init (*this);
+ Traversal::Names names_member_init (member_init);
+
+ names (c, names_member_init);
+
+ comma = member_init.comma ();
+ }
+
+ if (validation && (he || hae))
+ {
+ if (comma)
+ os << "," << endl << " ";
+
+ os << "v_state_stack_ (sizeof (v_state_), &v_state_first_)";
+
+ particle_.dispatch (c.contains_compositor ().compositor ());
+
+ comma = true;
+ }
+
+ if (validation && (hra))
+ {
+ if (comma)
+ os << "," << endl << " ";
+
+ os << "v_state_attr_stack_ (sizeof (v_state_attr_), " <<
+ "&v_state_attr_first_)";
+ }
+
+ os << "{"
+ << "}";
+ }
+
+ private:
+ //
+ //
+ ParserModifier parser_modifier_;
+ Traversal::Names names_parser_modifier_;
+
+ //
+ //
+ ParserBaseSet parser_base_set_;
+ Traversal::Inherits inherits_parser_base_set_;
+
+ //
+ //
+ ParserMemberSet parser_member_set_;
+ Traversal::Names names_parser_member_set_;
+
+ //
+ //
+ Particle particle_;
+ };
+ }
+
+ void
+ generate_parser_inline (Context& ctx)
+ {
+ // Emit "weak" header includes that are used in the file-per-type
+ // compilation model.
+ //
+ if (!ctx.options.generate_inline ())
+ {
+ Traversal::Schema schema;
+ Includes includes (ctx, Includes::source);
+
+ schema >> includes;
+ schema.dispatch (ctx.schema_root);
+ }
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ List list (ctx);
+ Complex complex (ctx);
+
+ names >> list;
+ names >> complex;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/parser-inline.hxx b/xsd/xsd/cxx/parser/parser-inline.hxx
new file mode 100644
index 0000000..aee0cdf
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-inline.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/parser-inline.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_PARSER_INLINE_HXX
+#define XSD_CXX_PARSER_PARSER_INLINE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_parser_inline (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_PARSER_INLINE_HXX
diff --git a/xsd/xsd/cxx/parser/parser-source.cxx b/xsd/xsd/cxx/parser/parser-source.cxx
new file mode 100644
index 0000000..2887f96
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-source.cxx
@@ -0,0 +1,957 @@
+// file : xsd/cxx/parser/parser-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/parser/parser-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String const& name (ename (e));
+ String const& ret (ret_type (e));
+
+ SemanticGraph::Type& base (e.inherits ().base ());
+
+ bool same (ret == ret_type (base));
+
+ if (same || ret == L"void" || polymorphic)
+ {
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (same || ret == L"void")
+ {
+ os << ret << " " << name << "::" << endl
+ << post_name (e) << " ()"
+ << "{";
+
+ if (same)
+ {
+ if (ret == L"void")
+ os << post_name (base) << " ();";
+ else
+ os << "return " << post_name (base) << " ();";
+ }
+
+ os << "}";
+ }
+
+ if (polymorphic)
+ {
+ String id (e.name ());
+
+ if (String ns = xml_ns_name (e))
+ {
+ id += L' ';
+ id += ns;
+ }
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_static_type ()"
+ << "{"
+ << "return " << strlit (id) << ";"
+ << "}";
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_dynamic_type () const"
+ << "{"
+ << "return _static_type ();"
+ << "}";
+
+ if (validation)
+ {
+ bool gen (!anonymous (e));
+
+ // We normally don't need to enter anonymous types into
+ // the inheritance map. The only exception is when an
+ // anonymous types is defined inside an element that
+ // is a member of a substitution group.
+ //
+ if (!gen)
+ {
+ // The first instance that this anonymous type classifies
+ // is the prototype for others if any. If this type does
+ // not classify anything (e.g., it is a base), then we
+ // don't need to do anything.
+ //
+ if (e.classifies_begin () != e.classifies_end ())
+ {
+ SemanticGraph::Instance& i (
+ e.classifies_begin ()->instance ());
+
+ if (SemanticGraph::Element* e =
+ dynamic_cast<SemanticGraph::Element*> (&i))
+ {
+ if (e->substitutes_p ())
+ gen = true;
+ }
+ }
+ }
+
+ if (gen)
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::parser::validating::inheritance_map_entry< " <<
+ char_type << " >" << endl
+ << "_xsd_" << name << "_inheritance_map_entry_ (" << endl
+ << name << "::_static_type ()," << endl
+ << fq_name (base) << "::_static_type ());"
+ << endl;
+ }
+ }
+ }
+ }
+ };
+
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String const& name (ename (l));
+ SemanticGraph::Type& t (l.argumented ().type ());
+
+ String item (unclash (name, "item"));
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // item
+ //
+ String const& arg (arg_type (t));
+
+ os << "void " << name << "::" << endl
+ << item;
+
+ if (arg == L"void")
+ os << " ()";
+ else
+ os << " (" << arg << ")";
+
+ os << "{"
+ << "}";
+
+ // post
+ //
+ if (ret_type (l) == L"void")
+ os << "void " << name << "::" << endl
+ << post_name (l) << " ()"
+ << "{"
+ << "}";
+
+ // parse_item
+ //
+ String inst (L"_xsd_" + item + L"_");
+ String const& post (post_name (t));
+
+ os << "void " << name << "::" << endl
+ << "_xsd_parse_item (const " << string_type << "& v)"
+ << "{"
+ << "if (this->" << inst << ")"
+ << "{"
+ << "this->" << inst << "->pre ();"
+ << "this->" << inst << "->_pre_impl ();"
+ << "this->" << inst << "->_characters (v);"
+ << "this->" << inst << "->_post_impl ();";
+
+ if (ret_type (t) == L"void")
+ os << "this->" << inst << "->" << post << " ();"
+ << "this->" << item << " ();";
+ else
+ os << "this->" << item << " (this->" << inst << "->" <<
+ post << " ());";
+
+ os << "}"
+ << "}";
+
+ //
+ //
+ if (polymorphic)
+ {
+ String id (l.name ());
+
+ if (String ns = xml_ns_name (l))
+ {
+ id += L' ';
+ id += ns;
+ }
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_static_type ()"
+ << "{"
+ << "return " << strlit (id) << ";"
+ << "}";
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_dynamic_type () const"
+ << "{"
+ << "return _static_type ();"
+ << "}";
+ }
+ }
+ };
+
+ //
+ //
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String const& name (ename (u));
+ String const& ret (ret_type (u));
+
+ if (ret == L"void" || polymorphic)
+ {
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (ret == L"void")
+ {
+ os << "void " << name << "::" << endl
+ << post_name (u) << " ()"
+ << "{"
+ << "}";
+ }
+
+ if (polymorphic)
+ {
+ String id (u.name ());
+
+ if (String ns = xml_ns_name (u))
+ {
+ id += L' ';
+ id += ns;
+ }
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_static_type ()"
+ << "{"
+ << "return " << strlit (id) << ";"
+ << "}";
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_dynamic_type () const"
+ << "{"
+ << "return _static_type ();"
+ << "}";
+ }
+ }
+ };
+
+ //
+ //
+ struct StartElement: Traversal::Element, Context
+ {
+ StartElement (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ bool poly (polymorphic && !anonymous (e.type ()));
+
+ os << "if (";
+
+ if (poly && e.global_p ())
+ os << "(";
+
+ if (e.qualified_p () && e.namespace_ ().name ())
+ {
+ os << "n == " << strlit (e.name ()) << " && " <<
+ "ns == " << strlit (e.namespace_ ().name ());
+ }
+ else
+ {
+ os << "n == " << strlit (e.name ()) << " && ns.empty ()";
+ }
+
+ // Only a globally-defined element can be a subst-group root.
+ //
+ if (poly && e.global_p ())
+ {
+ os << ") ||" << endl
+ << "::xsd::cxx::parser::substitution_map_instance< " <<
+ char_type << " > ().check (" << endl
+ << "ns, n, " << strlit (e.namespace_ ().name ()) <<
+ ", " << strlit (e.name ()) << ", t)";
+ }
+
+ os << ")"
+ << "{";
+
+ String inst;
+
+ if (poly)
+ {
+ SemanticGraph::Type& t (e.type ());
+ inst = "p";
+
+ // For pre-computing length.
+ //
+ String type_id (t.name ());
+
+ if (String type_ns = xml_ns_name (t))
+ {
+ type_id += L' ';
+ type_id += type_ns;
+ }
+
+ String fq_type (fq_name (t));
+ String const& member (emember (e));
+ String const& member_map (emember_map (e));
+
+ os << fq_type << "* p = 0;"
+ << endl
+ << "if (t == 0 && this->" << member << " != 0)" << endl
+ << inst << " = this->" << member << ";"
+ << "else"
+ << "{"
+ << string_type << " ts (" << fq_type <<
+ "::_static_type (), " << type_id.size () << "UL);"
+ << endl
+ << "if (t == 0)" << endl
+ << "t = &ts;"
+ << endl
+ << "if (this->" << member << " != 0 && *t == ts)" << endl
+ << inst << " = this->" << member << ";"
+ << "else if (this->" << member_map << " != 0)" << endl
+ << inst << " = dynamic_cast< " << fq_type <<
+ "* > (" << endl
+ << "this->" << member_map << "->find (*t));"
+ << "}";
+ }
+ else
+ inst = L"this->" + emember (e);
+
+ os << "this->" << complex_base << "::context_.top ().parser_ = " <<
+ inst << ";"
+ << endl
+ << "if (" << inst << ")" << endl
+ << inst << "->pre ();" // _start_element calls _pre
+ << endl
+ << "return true;"
+ << "}";
+ }
+ };
+
+
+ //
+ //
+ struct EndElement: Traversal::Element, Context
+ {
+ EndElement (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ bool poly (polymorphic && !anonymous (e.type ()));
+ String const& name (ename (e));
+
+ os << "if (";
+
+ if (poly && e.global_p ())
+ os << "(";
+
+ if (e.qualified_p () && e.namespace_ ().name ())
+ {
+ os << "n == " << strlit (e.name ()) << " && " <<
+ "ns == " << strlit (e.namespace_ ().name ());
+ }
+ else
+ {
+ os << "n == " << strlit (e.name ()) << " && ns.empty ()";
+ }
+
+ // Only a globally-defined element can be a subst-group root.
+ //
+ if (poly && e.global_p ())
+ {
+ os << ") ||" << endl
+ << "::xsd::cxx::parser::substitution_map_instance< " <<
+ char_type << " > ().check (" << endl
+ << "ns, n, " << strlit (e.namespace_ ().name ()) <<
+ ", " << strlit (e.name ()) << ")";
+ }
+
+ os << ")"
+ << "{";
+
+ // _end_element calls post
+ //
+
+ SemanticGraph::Type& type (e.type ());
+ String const& post (post_name (type));
+ String inst;
+
+ if (poly)
+ {
+ String const& fq_type (fq_name (type));
+ inst = "p";
+
+ os << fq_type << "* p =" << endl
+ << "dynamic_cast< " << fq_type << "* > (" << endl
+ << "this->" << complex_base << "::context_.top ().parser_);"
+ << endl;
+ }
+ else
+ inst = L"this->" + emember (e);
+
+ os << "if (" << inst << ")";
+
+ if (ret_type (type) == L"void")
+ os << "{"
+ << inst << "->" << post << " ();"
+ << "this->" << name << " ();"
+ << "}";
+ else
+ os << endl
+ << "this->" << name << " (" << inst << "->" << post << " ());"
+ << endl;
+
+ os << "return true;"
+ << "}";
+ }
+ };
+
+ //
+ //
+ struct Attribute: Traversal::Attribute, Context
+ {
+ Attribute (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& name (ename (a));
+ String const& inst (emember (a));
+
+ if (a.qualified_p () && a.namespace_ ().name ())
+ {
+ os << "if (n == " << strlit (a.name ()) << " && " <<
+ "ns == " << strlit (a.namespace_ ().name ()) << ")"
+ << "{";
+ }
+ else
+ {
+ os << "if (n == " << strlit (a.name ()) << " && ns.empty ())"
+ << "{";
+ }
+
+ SemanticGraph::Type& type (a.type ());
+ String const& post (post_name (type));
+ String const& ret (ret_type (type));
+
+ os << "if (this->" << inst << ")"
+ << "{"
+ << "this->" << inst << "->pre ();"
+ << "this->" << inst << "->_pre_impl ();"
+ << "this->" << inst << "->_characters (v);"
+ << "this->" << inst << "->_post_impl ();";
+
+ if (ret == L"void")
+ os << "this->" << inst << "->" << post << " ();"
+ << "this->" << name << " ();";
+ else
+ os << "this->" << name << " (this->" << inst << "->" <<
+ post << " ());";
+
+ os << "}"
+ << "return true;"
+ << "}";
+ }
+ };
+
+ //
+ //
+ struct ParserCallback: Traversal::Member, Context
+ {
+ ParserCallback (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& arg (arg_type (m.type ()));
+
+ os << "void " << ename (m.scope ()) << "::" << endl
+ << ename (m);
+
+ if (arg == L"void")
+ os << " ()";
+ else
+ os << " (" << arg << ")";
+
+ os << "{"
+ << "}";
+ }
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ parser_callback_ (c),
+ start_element_ (c),
+ end_element_ (c),
+ attribute_ (c)
+ {
+ names_parser_callback_ >> parser_callback_;
+ names_start_element_ >> start_element_;
+ names_end_element_ >> end_element_;
+ names_attribute_ >> attribute_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ bool he (has<Traversal::Element> (c));
+ bool ha (has<Traversal::Attribute> (c));
+
+ String const& ret (ret_type (c));
+ bool same (c.inherits_p () &&
+ ret == ret_type (c.inherits ().base ()));
+
+ String const& name (ename (c));
+
+ if ((he || ha || same || ret == L"void") || polymorphic)
+ {
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (polymorphic)
+ {
+ String id (c.name ());
+
+ if (String ns = xml_ns_name (c))
+ {
+ id += L' ';
+ id += ns;
+ }
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_static_type ()"
+ << "{"
+ << "return " << strlit (id) << ";"
+ << "}";
+
+ os << "const " << char_type << "* " << name << "::" << endl
+ << "_dynamic_type () const"
+ << "{"
+ << "return _static_type ();"
+ << "}";
+
+ if (c.inherits_p () && validation)
+ {
+ bool gen (!anonymous (c));
+
+ // We normally don't need to enter anonymous types into
+ // the inheritance map. The only exception is when an
+ // anonymous types is defined inside an element that
+ // is a member of a substitution group.
+ //
+ if (!gen)
+ {
+ // The first instance that this anonymous type classifies
+ // is the prototype for others if any. If this type does
+ // not classify anything (e.g., it is a base), then we
+ // don't need to do anything.
+ //
+ if (c.classifies_begin () != c.classifies_end ())
+ {
+ SemanticGraph::Instance& i (
+ c.classifies_begin ()->instance ());
+
+ if (SemanticGraph::Element* e =
+ dynamic_cast<SemanticGraph::Element*> (&i))
+ {
+ if (e->substitutes_p ())
+ gen = true;
+ }
+ }
+ }
+
+ if (gen)
+ {
+ SemanticGraph::Type& base (c.inherits ().base ());
+
+ os << "static" << endl
+ << "const ::xsd::cxx::parser::validating::inheritance_map_entry< " <<
+ char_type << " >" << endl
+ << "_xsd_" << name << "_inheritance_map_entry_ (" << endl
+ << name << "::_static_type ()," << endl
+ << fq_name (base) << "::_static_type ());"
+ << endl;
+ }
+ }
+ }
+
+ if (!(he || ha || same || ret == L"void"))
+ return;
+
+ // Parser callbacks.
+ //
+ if (!restriction_p (c))
+ names (c, names_parser_callback_);
+
+ if (same || ret == L"void")
+ {
+ os << ret << " " << name << "::" << endl
+ << post_name (c) << " ()"
+ << "{";
+
+ if (same)
+ {
+ SemanticGraph::Type& base (c.inherits ().base ());
+
+ if (ret == L"void")
+ os << post_name (base) << " ();";
+ else
+ os << "return " << post_name (base) << " ();";
+ }
+
+ os << "}";
+ }
+
+ // The rest is parsing/validation code which is generated in
+ // *-validation-source.cxx.
+ //
+ if (validation)
+ return;
+
+ // Don't use restriction_p here since we don't want special
+ // treatment of anyType.
+ //
+ bool restriction (
+ c.inherits_p () &&
+ c.inherits ().is_a<SemanticGraph::Restricts> ());
+
+ // _start_element_impl & _end_element_impl
+ //
+ if (he)
+ {
+ os << "bool " << name << "::" << endl
+ << "_start_element_impl (const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "* t)"
+ << "{"
+ << "XSD_UNUSED (t);"
+ << endl;
+
+ if (!restriction)
+ {
+ os << "if (this->";
+
+ if (c.inherits_p ())
+ os << fq_name (c.inherits ().base ());
+ else
+ os << complex_base;
+
+ os << "::_start_element_impl (ns, n, t))" << endl
+ << "return true;"
+ << endl;
+ }
+
+ names (c, names_start_element_);
+
+ os << "return false;"
+ << "}";
+
+
+ // _end_element_impl
+ //
+ os << "bool " << name << "::" << endl
+ << "_end_element_impl (const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n)"
+ << "{";
+
+ if (!restriction)
+ {
+ os << "if (this->";
+
+ if (c.inherits_p () && !restriction)
+ os << fq_name (c.inherits ().base ());
+ else
+ os << complex_base;
+
+ os << "::_end_element_impl (ns, n))" << endl
+ << "return true;"
+ << endl;
+ }
+
+ names (c, names_end_element_);
+
+ os << "return false;"
+ << "}";
+ }
+
+
+ if (ha)
+ {
+ // _attribute_impl
+ //
+ os << "bool " << name << "::" << endl
+ << "_attribute_impl (const " << string_type << "& ns," << endl
+ << "const " << string_type << "& n," << endl
+ << "const " << string_type << "& v)"
+ << "{";
+
+ if (!restriction)
+ {
+ os << "if (this->";
+
+ if (c.inherits_p ())
+ os << fq_name (c.inherits ().base ());
+ else
+ os << complex_base;
+
+ os << "::_attribute_impl (ns, n, v))" << endl
+ << "return true;"
+ << endl;
+ }
+
+ names (c, names_attribute_);
+
+ os << "return false;"
+ << "}";
+ }
+ }
+
+ private:
+ //
+ //
+ ParserCallback parser_callback_;
+ Traversal::Names names_parser_callback_;
+
+ //
+ //
+ StartElement start_element_;
+ Traversal::Names names_start_element_;
+
+ //
+ //
+ EndElement end_element_;
+ Traversal::Names names_end_element_;
+
+ //
+ //
+ Attribute attribute_;
+ Traversal::Names names_attribute_;
+ };
+
+
+ // Generate substitution group map entries.
+ //
+ struct GlobalElement: Traversal::Element, Context
+ {
+ GlobalElement (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (e.substitutes_p ())
+ {
+ String name (escape (e.name ()));
+ Type& r (e.substitutes ().root ());
+
+ SemanticGraph::Type& type (e.type ());
+
+ os << "// Substitution map entry for " << comment (e.name ()) << "." << endl
+ << "//" << endl
+ << "static" << endl
+ << "const ::xsd::cxx::parser::substitution_map_entry< " <<
+ char_type << " >" << endl
+ << "_xsd_" << name << "_substitution_map_entry_ (" << endl
+ << strlit (e.namespace_ ().name ()) << "," << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (r.namespace_ ().name ()) << "," << endl
+ << strlit (r.name ()) << "," << endl
+ << fq_name (type) << "::_static_type ());"
+ << endl;
+ }
+ }
+ };
+ }
+
+ void
+ generate_parser_source (Context& ctx)
+ {
+ if (ctx.polymorphic)
+ {
+ ctx.os << "#include <xsd/cxx/parser/substitution-map.hxx>" << endl;
+
+ if (ctx.validation)
+ ctx.os << "#include <xsd/cxx/parser/validating/inheritance-map.hxx>" << endl
+ << endl;
+ else
+ ctx.os << endl;
+
+ bool import_maps (ctx.options.import_maps ());
+ bool export_maps (ctx.options.export_maps ());
+
+ if (import_maps || export_maps)
+ {
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{"
+ << "namespace parser"
+ << "{"
+ << "#ifdef _MSC_VER" << endl;
+
+ if (export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "substitution_map_init< " << ctx.char_type << " >;";
+
+ if (import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "substitution_map_init< " << ctx.char_type << " >;";
+
+ if (ctx.validation && export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "inheritance_map_init< " << ctx.char_type << " >;";
+
+ if (ctx.validation && import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "inheritance_map_init< " << ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
+ << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "substitution_map_init< " << ctx.char_type << " >;";
+
+ if (ctx.validation)
+ ctx.os << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "inheritance_map_init< " << ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
+ << "template struct XSD_MAP_VISIBILITY " <<
+ "substitution_map_init< " << ctx.char_type << " >;";
+
+ if (ctx.validation)
+ ctx.os << "template struct XSD_MAP_VISIBILITY " <<
+ "inheritance_map_init< " << ctx.char_type << " >;";
+
+ ctx.os << "#endif" << endl
+ << "}" // parser
+ << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+ }
+
+ ctx.os << "static" << endl
+ << "const ::xsd::cxx::parser::substitution_map_init< " <<
+ ctx.char_type << " >" << endl
+ << "_xsd_substitution_map_init_;"
+ << endl;
+
+ if (ctx.validation)
+ {
+ ctx.os << "static" << endl
+ << "const ::xsd::cxx::parser::validating::inheritance_map_init< " <<
+ ctx.char_type << " >" << endl
+ << "_xsd_inheritance_map_init_;"
+ << endl;
+ }
+ }
+
+ // Emit "weak" header includes that are used in the file-per-type
+ // compilation model.
+ //
+ if (ctx.options.generate_inline ())
+ {
+ Traversal::Schema schema;
+ Includes includes (ctx, Includes::source);
+
+ schema >> includes;
+ schema.dispatch (ctx.schema_root);
+ }
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names schema_names;
+
+ Namespace ns (ctx);
+ Traversal::Names names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> names;
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+ GlobalElement global_element (ctx);
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ if (ctx.polymorphic)
+ names >> global_element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/parser-source.hxx b/xsd/xsd/cxx/parser/parser-source.hxx
new file mode 100644
index 0000000..3598a00
--- /dev/null
+++ b/xsd/xsd/cxx/parser/parser-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/parser/parser-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_PARSER_SOURCE_HXX
+#define XSD_CXX_PARSER_PARSER_SOURCE_HXX
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ void
+ generate_parser_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_PARSER_PARSER_SOURCE_HXX
diff --git a/xsd/xsd/cxx/parser/print-impl-common.hxx b/xsd/xsd/cxx/parser/print-impl-common.hxx
new file mode 100644
index 0000000..14bfbc2
--- /dev/null
+++ b/xsd/xsd/cxx/parser/print-impl-common.hxx
@@ -0,0 +1,641 @@
+// file : xsd/cxx/parser/print-impl-common.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_PRINT_IMPL_COMMON_HXX
+#define XSD_CXX_PARSER_PRINT_IMPL_COMMON_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/parser/elements.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ struct PrintCall: Traversal::Type,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Context
+ {
+ PrintCall (Context& c, String const& tag, String const& arg)
+ : Context (c), tag_ (tag), arg_ (arg)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type&)
+ {
+ gen_user_type ();
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ if (default_type (t, "bool"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ if (default_type (t, "signed char"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") <<
+ " << static_cast<short> (" << arg_ << ") << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ if (default_type (t, "unsigned char"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") <<
+ " << static_cast<unsigned short> (" << arg_ << ") << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ if (default_type (t, "short"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ if (default_type (t, "unsigned short"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ if (default_type (t, "int"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ if (default_type (t, "unsigned int"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ if (default_type (t, "long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ if (default_type (t, "unsigned long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ if (default_type (t, "long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ if (default_type (t, "long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ if (default_type (t, "long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ if (default_type (t, "unsigned long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ if (default_type (t, "unsigned long long"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ if (default_type (t, "float"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ if (default_type (t, "double"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ if (default_type (t, "double"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ gen_string (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ gen_string (t);
+ }
+
+ // String sequences.
+ //
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ gen_sequence (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ gen_sequence (t);
+ }
+
+ // QName
+ //
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::qname"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << ";"
+ << endl
+ << "if (" << arg_ << ".prefix ().empty ())" << endl
+ << cout_inst << " << " << arg_ << ".name ();"
+ << "else" << endl
+ << cout_inst << " << " << arg_ << ".prefix () << " << L <<
+ "':' << " << arg_ << ".name ();"
+ << endl
+ << cout_inst << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ gen_buffer (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ gen_buffer (t);
+ }
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::date"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << endl
+ << " << " << arg_ << ".year () << '-'" << endl
+ << " << " << arg_ << ".month () << '-'" << endl
+ << " << " << arg_ << ".day ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::date_time"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << endl
+ << " << " << arg_ << ".year () << '-'" << endl
+ << " << " << arg_ << ".month () << '-'" << endl
+ << " << " << arg_ << ".day () << 'T'" << endl
+ << " << " << arg_ << ".hours () << ':'" << endl
+ << " << " << arg_ << ".minutes () << ':'" << endl
+ << " << " << arg_ << ".seconds ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::duration"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << ";"
+ << endl
+ << "if (" << arg_ << ".negative ())" << endl
+ << cout_inst << " << '-';"
+ << endl
+ << cout_inst << " << 'P'" << endl
+ << " << " << arg_ << ".years () << 'Y'" << endl
+ << " << " << arg_ << ".months () << 'M'" << endl
+ << " << " << arg_ << ".days () << " << L << "\"DT\"" << endl
+ << " << " << arg_ << ".hours () << 'H'" << endl
+ << " << " << arg_ << ".minutes () << 'M'" << endl
+ << " << " << arg_ << ".seconds () << 'S'"
+ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::gday"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ---") <<
+ " << " << arg_ << ".day ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::gmonth"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": --") <<
+ " << " << arg_ << ".month ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::gmonth_day"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": --") << endl
+ << " << " << arg_ << ".month () << '-'" << endl
+ << " << " << arg_ << ".day ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::gyear"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << ".year ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::gyear_month"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << endl
+ << " << " << arg_ << ".year () << '-'" << endl
+ << " << " << arg_ << ".month ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ if (default_type (t, xs_ns_name () + L"::time"))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << endl
+ << " << " << arg_ << ".hours () << ':'" << endl
+ << " << " << arg_ << ".minutes () << ':'" << endl
+ << " << " << arg_ << ".seconds ();";
+
+ gen_time_zone ();
+ }
+ else
+ gen_user_type ();
+ }
+
+ private:
+ bool
+ default_type (SemanticGraph::Type& t, String const& def_type)
+ {
+ return ret_type (t) == def_type;
+ }
+
+ void
+ gen_user_type ()
+ {
+ os << "// TODO" << endl
+ << "//" << endl;
+ }
+
+ void
+ gen_string (SemanticGraph::Type& t)
+ {
+ if ((char_type == L"char" && default_type (t, "::std::string")) ||
+ (char_type == L"wchar_t" && default_type (t, "::std::wstring")))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << " <<
+ arg_ << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ void
+ gen_sequence (SemanticGraph::Type& t)
+ {
+ String type (xs_ns_name () + L"::string_sequence");
+
+ if (default_type (t, type))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << ";"
+ << endl;
+
+ os << "for (" << type << "::const_iterator i (" << arg_ <<
+ ".begin ()), e (" << arg_ << ".end ());" << endl
+ << "i != e;)"
+ << "{"
+ << cout_inst << " << *i++;"
+ << "if (i != e)" << endl
+ << cout_inst << " << ' ';"
+ << "}"
+ << cout_inst << " << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ void
+ gen_buffer (SemanticGraph::Type& t)
+ {
+ String type (auto_ptr + L"< " + xs_ns_name () + L"::buffer >");
+
+ if (default_type (t, type))
+ {
+ os << cout_inst << " << " << strlit (tag_ + L": ") << " << "
+ << arg_ << "->size () << " << L << "\" bytes\" << std::endl;";
+ }
+ else
+ gen_user_type ();
+ }
+
+ void
+ gen_time_zone ()
+ {
+ os << endl
+ << "if (" << arg_ << ".zone_present ())"
+ << "{"
+ << "if (" << arg_ << ".zone_hours () < 0)" << endl
+ << cout_inst << " << " << arg_ << ".zone_hours () << ':' << -" <<
+ arg_ << ".zone_minutes ();"
+ << "else" << endl
+ << cout_inst << " << '+' << " << arg_ << ".zone_hours () << " <<
+ "':' << " << arg_ << ".zone_minutes ();";
+
+ os << "}"
+ << cout_inst << " << std::endl;";
+ }
+
+ private:
+ String tag_;
+ String arg_;
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_PRINT_IMPL_COMMON_HXX
diff --git a/xsd/xsd/cxx/parser/state-processor.cxx b/xsd/xsd/cxx/parser/state-processor.cxx
new file mode 100644
index 0000000..b380895
--- /dev/null
+++ b/xsd/xsd/cxx/parser/state-processor.cxx
@@ -0,0 +1,319 @@
+// file : xsd/cxx/parser/state-processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <vector>
+#include <iostream>
+
+#include <xsd/cxx/parser/state-processor.hxx>
+
+#include <xsd/cxx/parser/elements.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ typedef vector<SemanticGraph::Particle*> Particles;
+
+ /*
+ void
+ print (Particles const& p)
+ {
+ using std::wcerr;
+ using std::endl;
+
+ wcerr << "prefixes: " << endl;
+
+ for (Particles::const_iterator i (p.begin ()); i != p.end (); ++i)
+ {
+ if (SemanticGraph::Element* e =
+ dynamic_cast<SemanticGraph::Element*> (*i))
+ {
+ wcerr << e->name () << endl;
+ }
+ else
+ {
+ wcerr << "<any>" << endl;
+ }
+ }
+
+ wcerr << endl;
+ }
+ */
+
+ //
+ //
+ struct Particle: Traversal::All,
+ Traversal::Choice,
+ Traversal::Sequence
+ {
+ Particle (size_t& all,
+ size_t& choice,
+ size_t& sequence,
+ size_t& depth)
+ : all_ (all),
+ choice_ (choice),
+ sequence_ (sequence),
+ depth_ (depth)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ using SemanticGraph::Compositor;
+
+ // Go over particles, collecting "prefix" particles in prefixes_,
+ // assigning state numbers and calculating effective minOccurs.
+ // If all prefixes of this compositor have minOccurs = 0, then
+ // the compositor itself effectively has minOccurs = 0 regardless
+ // of the actual value specified in the schema.
+ //
+ // Note that we don't need to care about depth since the 'all'
+ // compositor cannot contain any nested compositors.
+ //
+
+ size_t state (0);
+ size_t min (0);
+
+ for (Compositor::ContainsIterator ci (a.contains_begin ());
+ ci != a.contains_end (); ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ // The 'all' compositor can only include elements.
+ //
+ prefixes_.push_back (&p);
+
+ if (min == 0 && ci->min () != 0)
+ min = 1;
+
+ p.context ().set ("prefix", true);
+ p.context ().set ("state", state++);
+ }
+
+ if (!prefixes_.empty ())
+ {
+ a.context ().set ("comp-number", choice_++);
+ a.context ().set ("prefixes", prefixes_);
+ a.context ().set ("state-count", size_t (prefixes_.size ()));
+
+ // effective-min = min * actual-min
+ //
+ if (min == 1)
+ min = a.min ();
+
+ a.context ().set ("effective-min", min);
+
+ // print (prefixes_);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Choice& c)
+ {
+ using SemanticGraph::Compositor;
+
+ // Go over particles, collecting "prefix" particles in prefixes_,
+ // assigning state numbers and calculating effective minOccurs.
+ // If any prefix of this compositor have minOccurs = 0, then the
+ // compositor itself effectively has minOccurs = 0 regardless of
+ // the actual value specified in the schema.
+ //
+
+ size_t state (0);
+ size_t min (1);
+
+ for (Compositor::ContainsIterator ci (c.contains_begin ());
+ ci != c.contains_end (); ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<SemanticGraph::Element> () ||
+ p.is_a<SemanticGraph::Any> ())
+ {
+ prefixes_.push_back (&p);
+
+ if (min == 1 && ci->min () == 0)
+ min = 0;
+ }
+ else
+ {
+ size_t depth (0);
+ Particle t (all_, choice_, sequence_, depth);
+ t.dispatch (p);
+
+ if (t.prefixes_.empty ())
+ continue; // Skip empty compositors.
+
+ if (++depth > depth_) // One for this compositor.
+ depth_ = depth;
+
+ prefixes_.insert (prefixes_.end (),
+ t.prefixes_.begin ().base (),
+ t.prefixes_.end ().base ());
+
+ if (min == 1 &&
+ p.context ().get<size_t> ("effective-min") == 0)
+ min = 0;
+ }
+
+ p.context ().set ("prefix", true);
+ p.context ().set ("state", state++);
+ }
+
+ if (!prefixes_.empty ())
+ {
+ c.context ().set ("comp-number", choice_++);
+ c.context ().set ("prefixes", prefixes_);
+
+ // effective-min = min * actual-min
+ //
+ if (min == 1)
+ min = c.min ();
+
+ c.context ().set ("effective-min", min);
+
+ // print (prefixes_);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Sequence& s)
+ {
+ using SemanticGraph::Compositor;
+
+ // Go over particles, collecting "prefix" particles in prefixes_,
+ // assigning state numbers and calculating effective minOccurs.
+ // If all prefixes of this compositor have minOccurs = 0, then
+ // the compositor itself effectively has minOccurs = 0 regardless
+ // of the actual value specified in the schema.
+ //
+
+ bool prefix (true);
+ size_t state (0);
+ size_t min (0);
+
+ for (Compositor::ContainsIterator ci (s.contains_begin ());
+ ci != s.contains_end (); ++ci)
+ {
+ SemanticGraph::Particle& p (ci->particle ());
+
+ if (p.is_a<SemanticGraph::Element> () ||
+ p.is_a<SemanticGraph::Any> ())
+ {
+ if (prefix)
+ {
+ prefixes_.push_back (&p);
+
+ if (ci->min () != 0)
+ min = 1;
+ }
+ }
+ else
+ {
+ size_t depth (0);
+ Particle t (all_, choice_, sequence_, depth);
+ t.dispatch (p);
+
+ if (t.prefixes_.empty ())
+ continue; // Skip empty compositors.
+
+ if (++depth > depth_) // One for this compositor.
+ depth_ = depth;
+
+ if (prefix)
+ {
+ prefixes_.insert (prefixes_.end (),
+ t.prefixes_.begin ().base (),
+ t.prefixes_.end ().base ());
+
+ if (p.context ().get<size_t> ("effective-min") != 0)
+ min = 1;
+ }
+ }
+
+ p.context ().set ("state", state++);
+
+ if (prefix)
+ p.context ().set ("prefix", true);
+
+ if (prefix && min != 0)
+ prefix = false;
+ }
+
+ if (!prefixes_.empty ())
+ {
+ s.context ().set ("comp-number", sequence_++);
+ s.context ().set ("prefixes", prefixes_);
+
+ // effective-min = min * actual-min
+ //
+ if (min == 1)
+ min = s.min ();
+
+ s.context ().set ("effective-min", min);
+
+ // print (prefixes_);
+ }
+ }
+
+ private:
+ Particles prefixes_;
+
+ size_t& all_;
+ size_t& choice_;
+ size_t& sequence_;
+
+ size_t& depth_;
+ };
+
+
+ //
+ //
+ struct Complex: Traversal::Complex
+ {
+ virtual void
+ traverse (Type& c)
+ {
+ if (c.contains_compositor_p ())
+ {
+ size_t all (0), choice (0), sequence (0), depth (0);
+ Particle t (all, choice, sequence, depth);
+ t.dispatch (c.contains_compositor ().compositor ());
+
+ // Set the maximum stack depth for this type. Used to
+ // allocate fixed-size state stack.
+ //
+ c.context ().set ("depth", depth + 1);
+ }
+ }
+ };
+ }
+
+ void StateProcessor::
+ process (SemanticGraph::Schema& tu, SemanticGraph::Path const&)
+ {
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+
+ schema >> sources >> schema;
+ schema >> schema_names >> ns >> ns_names;
+
+ Complex complex_type;
+
+ ns_names >> complex_type;
+
+ schema.dispatch (tu);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/state-processor.hxx b/xsd/xsd/cxx/parser/state-processor.hxx
new file mode 100644
index 0000000..eacc14a
--- /dev/null
+++ b/xsd/xsd/cxx/parser/state-processor.hxx
@@ -0,0 +1,25 @@
+// file : xsd/cxx/parser/state-processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_STATE_PROCESSOR_HXX
+#define XSD_CXX_PARSER_STATE_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+
+#include <xsd/types.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class StateProcessor
+ {
+ public:
+ void
+ process (XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file);
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_STATE_PROCESSOR_HXX
diff --git a/xsd/xsd/cxx/parser/type-processor.cxx b/xsd/xsd/cxx/parser/type-processor.cxx
new file mode 100644
index 0000000..6496b2a
--- /dev/null
+++ b/xsd/xsd/cxx/parser/type-processor.cxx
@@ -0,0 +1,347 @@
+// file : xsd/cxx/parser/type-processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+
+#include <xsd/cxx/parser/elements.hxx>
+#include <xsd/cxx/parser/type-processor.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ //
+ //
+ struct Type: Traversal::Type
+ {
+ Type (SemanticGraph::Schema& schema,
+ TypeMap::Namespaces& type_map,
+ bool add_includes)
+ : schema_ (schema),
+ type_map_ (type_map),
+ add_includes_ (add_includes)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& type)
+ {
+ using TypeMap::Namespace;
+ using TypeMap::Namespaces;
+
+ SemanticGraph::Context& tc (type.context ());
+
+ // There are two situations where we may try to process the
+ // same type more than once. The first is when the type is
+ // used in several element declarations in the same schema.
+ // The second situation only occurs when we are in the file-
+ // per-type mode. In this case the type was processed as part
+ // of another root schema. In the second case, while the ret
+ // and arg types are assumed to be the same, we need to re-
+ // match the type in order to add include directives to the
+ // new root schema.
+ //
+ bool set (true);
+
+ if (tc.count ("ret-type"))
+ {
+ SemanticGraph::Schema* s (
+ tc.get<SemanticGraph::Schema*> ("root-schema"));
+
+ if (&schema_ == s)
+ return;
+
+ set = false;
+ }
+
+ SemanticGraph::Namespace& ns (
+ dynamic_cast<SemanticGraph::Namespace&> (type.scope ()));
+
+ String ns_name (ns.name ());
+ String t_name (type.name ());
+
+ //std::wcerr << "traversing: " << ns_name << "#" << t_name << endl;
+
+ for (Namespaces::const_iterator n (type_map_.begin ());
+ n != type_map_.end (); ++n)
+ {
+ // Check if the namespace matches.
+ //
+ bool ns_match;
+
+ if (!n->xsd_name ().empty ())
+ {
+ ns_match = n->xsd_name ().match (ns_name);
+ }
+ else
+ ns_match = ns_name.empty ();
+
+ //std::wcerr << "considering ns expr: " << n->xsd_name ()
+ // << " for " << ns_name
+ // << ": " << (ns_match ? "+" : "-") << endl;
+
+ if (ns_match)
+ {
+ // Namespace matched. See if there is a type that matches.
+ //
+ for (Namespace::TypesIterator t (n->types_begin ());
+ t != n->types_end (); ++t)
+ {
+ if (t->xsd_name ().match (t_name))
+ {
+ if (set)
+ {
+ // Got a match. See if the namespace has the C++
+ // namespace mapping.
+ //
+ String cxx_ns;
+
+ if (n->has_cxx_name ())
+ {
+ if (!n->xsd_name ().empty ())
+ {
+ cxx_ns = n->xsd_name ().replace (
+ ns_name, n->cxx_name (), true);
+ }
+ else
+ cxx_ns = n->cxx_name ();
+
+ cxx_ns += L"::";
+ }
+
+ // Figure out ret and arg type names.
+ //
+ String ret_type (cxx_ns);
+
+ ret_type += t->xsd_name ().replace (
+ t_name, t->cxx_ret_name (), true);
+
+ String arg_type;
+
+ if (t->cxx_arg_name ())
+ {
+ arg_type = cxx_ns;
+ arg_type += t->xsd_name ().replace (
+ t_name, t->cxx_arg_name (), true);
+ }
+ else
+ {
+ if (ret_type == L"void")
+ arg_type = ret_type;
+ else
+ {
+ wchar_t last (ret_type[ret_type.size () - 1]);
+
+ // If it is already a pointer or reference then use
+ // it as is.
+ //
+ if (last == L'*' || last == L'&')
+ arg_type = ret_type;
+ else
+ arg_type = L"const " + ret_type + L"&";
+ }
+ }
+
+ tc.set ("ret-type", ret_type);
+ tc.set ("arg-type", arg_type);
+
+ //std::wcerr << t_name << " -> " << ret_type << endl;
+ }
+
+ tc.set ("root-schema", &schema_);
+
+ // See of we need to add any includes to the translations
+ // unit.
+ //
+ if (add_includes_)
+ {
+ if (n->includes_begin () != n->includes_end ())
+ {
+ typedef std::set<String> Includes;
+
+ if (!schema_.context ().count ("includes"))
+ schema_.context ().set ("includes", Includes ());
+
+ Includes& is (
+ schema_.context ().get<Includes> ("includes"));
+
+ for (Namespace::IncludesIterator i (n->includes_begin ());
+ i != n->includes_end (); ++i)
+ {
+ is.insert (*i);
+ }
+ }
+ }
+
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ private:
+ SemanticGraph::Schema& schema_;
+ TypeMap::Namespaces& type_map_;
+ bool add_includes_;
+ };
+
+
+ //
+ //
+ struct GlobalType: Traversal::Type,
+ Traversal::List,
+ Traversal::Complex,
+ Traversal::Enumeration
+ {
+ GlobalType (SemanticGraph::Schema& schema,
+ TypeMap::Namespaces& type_map,
+ bool add_includes)
+ : type_ (schema, type_map, add_includes)
+ {
+ inherits_ >> type_;
+ names_ >> instance_ >> belongs_ >> type_;
+ argumented_ >> type_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ type_.traverse (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ type_.traverse (l);
+ Traversal::List::argumented (l, argumented_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ type_.traverse (c);
+ Complex::inherits (c, inherits_);
+ Complex::names (c, names_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Enumeration& e)
+ {
+ type_.traverse (e);
+ Complex::inherits (e, inherits_);
+ }
+
+ private:
+ Parser::Type type_;
+ Traversal::Names names_;
+ Traversal::Instance instance_;
+ Traversal::Inherits inherits_;
+ Traversal::Belongs belongs_;
+ Traversal::Argumented argumented_;
+ };
+
+ void
+ process_impl (options const& ops,
+ XSDFrontend::SemanticGraph::Schema& tu,
+ bool gen_driver,
+ TypeMap::Namespaces& type_map)
+ {
+ if (tu.names_begin ()->named ().name () ==
+ L"http://www.w3.org/2001/XMLSchema")
+ {
+ // XML Schema namespace.
+ //
+ Traversal::Schema schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ GlobalType global_type (tu, type_map, true);
+
+ schema >> schema_names >> ns >> ns_names >> global_type;
+
+ schema.dispatch (tu);
+ }
+ else
+ {
+ // If --extern-xml-schema is specified, then we don't want
+ // includes from the XML Schema type map.
+ //
+ bool extern_xml_schema (ops.extern_xml_schema ());
+
+ //
+ //
+ Traversal::Schema schema;
+ Traversal::Schema xs_schema;
+ Sources sources;
+ Traversal::Implies implies;
+
+ schema >> sources >> schema;
+ schema >> implies >> xs_schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ GlobalType global_type (tu, type_map, true);
+
+ schema >> schema_names >> ns >> ns_names >> global_type;
+
+ Traversal::Names xs_schema_names;
+ Traversal::Namespace xs_ns;
+ Traversal::Names xs_ns_names;
+ GlobalType xs_global_type (tu, type_map, !extern_xml_schema);
+
+ xs_schema >> xs_schema_names >> xs_ns >> xs_ns_names >>
+ xs_global_type;
+
+ schema.dispatch (tu);
+
+ // If we are generating the test driver, make sure the root
+ // element type is processed.
+ //
+ if (gen_driver && ops.generate_test_driver ())
+ {
+ // Figure out the root element. Validator should have made sure
+ // it is unique.
+ //
+ SemanticGraph::Element* root (0);
+ {
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ RootElement root_element (ops, root);
+
+ schema >> schema_names >> ns >> ns_names >> root_element;
+
+ schema.dispatch (tu);
+ }
+
+ global_type.dispatch (root->type ());
+ }
+ }
+ }
+ }
+
+ void TypeProcessor::
+ process (options const& ops,
+ XSDFrontend::SemanticGraph::Schema& s,
+ bool gen_driver,
+ TypeMap::Namespaces& tm)
+ {
+ process_impl (ops, s, gen_driver, tm);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/type-processor.hxx b/xsd/xsd/cxx/parser/type-processor.hxx
new file mode 100644
index 0000000..6800024
--- /dev/null
+++ b/xsd/xsd/cxx/parser/type-processor.hxx
@@ -0,0 +1,31 @@
+// file : xsd/cxx/parser/type-processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_TYPE_PROCESSOR_HXX
+#define XSD_CXX_PARSER_TYPE_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+
+#include <xsd/types.hxx>
+
+#include <xsd/type-map/type-map.hxx>
+
+#include <xsd/cxx/parser/options.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class TypeProcessor
+ {
+ public:
+ void
+ process (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ bool gen_driver,
+ TypeMap::Namespaces&);
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_TYPE_PROCESSOR_HXX
diff --git a/xsd/xsd/cxx/parser/validator.cxx b/xsd/xsd/cxx/parser/validator.cxx
new file mode 100644
index 0000000..83429cf
--- /dev/null
+++ b/xsd/xsd/cxx/parser/validator.cxx
@@ -0,0 +1,718 @@
+// file : xsd/cxx/parser/validator.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+#include <iostream>
+
+#include <xsd/cxx/parser/validator.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/parser/elements.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Parser
+ {
+ namespace
+ {
+ class ValidationContext: public Context
+ {
+ public:
+ ValidationContext (SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ Parser::options const& ops,
+ const WarningSet& disabled_warnings,
+ bool& valid_)
+ : Context (std::wcerr, root, path, ops, 0, 0, 0, 0),
+ disabled_warnings_ (disabled_warnings),
+ disabled_warnings_all_ (false),
+ valid (valid_),
+ subst_group_warning_issued (subst_group_warning_issued_),
+ subst_group_warning_issued_ (false)
+ {
+ }
+
+ public:
+ bool
+ is_disabled (char const* w)
+ {
+ return disabled_warnings_all_ ||
+ disabled_warnings_.find (w) != disabled_warnings_.end ();
+ }
+
+ public:
+ String
+ xpath (SemanticGraph::Nameable& n)
+ {
+ if (n.is_a<SemanticGraph::Namespace> ())
+ return L"<namespace-level>"; // There is a bug if you see this.
+
+ assert (n.named_p ());
+
+ SemanticGraph::Scope& scope (n.scope ());
+
+ if (scope.is_a<SemanticGraph::Namespace> ())
+ return n.name ();
+
+ return xpath (scope) + L"/" + n.name ();
+ }
+
+ protected:
+ ValidationContext (ValidationContext& c)
+ : Context (c),
+ disabled_warnings_ (c.disabled_warnings_),
+ disabled_warnings_all_ (c.disabled_warnings_all_),
+ valid (c.valid),
+ subst_group_warning_issued (c.subst_group_warning_issued)
+ {
+ }
+
+ protected:
+ const WarningSet& disabled_warnings_;
+ bool disabled_warnings_all_;
+ bool& valid;
+ bool& subst_group_warning_issued;
+ bool subst_group_warning_issued_;
+ };
+
+ //
+ //
+ struct Any: Traversal::Any, ValidationContext
+ {
+ Any (ValidationContext& c)
+ : ValidationContext (c)
+ {
+ }
+
+ struct Element: Traversal::Element, ValidationContext
+ {
+ Element (ValidationContext& c, SemanticGraph::Any& any)
+ : ValidationContext (c),
+ any_ (any),
+ ns_ (any.definition_namespace ().name ())
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e)) return;
+
+ using SemanticGraph::Any;
+
+ bool q (e.qualified_p ());
+ String ns (q ? e.namespace_ ().name () : "");
+
+ for (Any::NamespaceIterator i (any_.namespace_begin ());
+ i != any_.namespace_end (); ++i)
+ {
+ bool failed (false);
+
+ if (*i == L"##any")
+ {
+ failed = true;
+ }
+ else if (*i == L"##other")
+ {
+ if (ns_)
+ {
+ // Note that here I assume that ##other does not
+ // include names without target namespace. This
+ // is not what the spec says but that seems to be
+ // the consensus.
+ //
+ failed = q && ns != ns_;
+ }
+ else
+ {
+ // No target namespace.
+ //
+ failed = q && ns != L"";
+ }
+ }
+ else if (*i == L"##local")
+ {
+ failed = !q || ns == L"";
+ }
+ else if (*i == L"##targetNamespace")
+ {
+ failed = (q && ns_ == ns) || (!q && ns_ == L"");
+ }
+ else
+ {
+ failed = q && *i == ns;
+ }
+
+ if (failed)
+ {
+ Any& a (any_);
+
+ os << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": warning P001: namespace '" << *i << "' allows for "
+ << "element '" << e.name () << "'" << endl;
+
+ os << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": warning P001: generated code may not associate element '"
+ << e.name () << "' correctly if it appears in place of "
+ << "this wildcard" << endl;
+
+ os << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: element '" << e.name () << "' is defined "
+ << "here" << endl;
+
+ os << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": info: turn on validation to ensure correct "
+ << "association" << endl;
+ }
+ }
+ }
+
+ private:
+ SemanticGraph::Any& any_;
+ String ns_;
+ };
+
+ struct Complex: Traversal::Complex
+ {
+ Complex ()
+ : up_ (true), down_ (true)
+ {
+ }
+
+ virtual void
+ post (Type& c)
+ {
+ // Go down the inheritance hierarchy.
+ //
+ if (down_)
+ {
+ bool up = up_;
+ up_ = false;
+
+ if (c.inherits_p ())
+ dispatch (c.inherits ().base ());
+
+ up_ = up;
+ }
+
+ // Go up the inheritance hierarchy.
+ //
+ if (up_)
+ {
+ bool down = down_;
+ down_ = false;
+
+ for (Type::BegetsIterator i (c.begets_begin ());
+ i != c.begets_end (); ++i)
+ {
+ dispatch (i->derived ());
+ }
+
+ down_ = down;
+ }
+ }
+
+ private:
+ bool up_, down_;
+ };
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ using SemanticGraph::Compositor;
+
+ // Find our complex type.
+ //
+ Compositor* c (&a.contained_particle ().compositor ());
+
+ while(!c->contained_compositor_p ())
+ c = &c->contained_particle ().compositor ();
+
+ SemanticGraph::Complex& type (
+ dynamic_cast<SemanticGraph::Complex&> (
+ c->contained_compositor ().container ()));
+
+ Complex complex;
+ Traversal::Names names;
+ Element element (*this, a);
+
+ complex >> names >> element;
+
+ complex.dispatch (type);
+ }
+ };
+
+
+ //
+ //
+ struct Traverser: Traversal::Schema,
+ Traversal::Complex,
+ Traversal::Type,
+ Traversal::Element,
+ ValidationContext
+ {
+ Traverser (ValidationContext& c)
+ : ValidationContext (c),
+ any_ (c)
+ {
+ *this >> sources_ >> *this;
+ *this >> schema_names_ >> ns_ >> names_ >> *this;
+
+ // Any
+ //
+ if (!validation && !is_disabled ("P001"))
+ {
+ *this >> contains_compositor_ >> compositor_ >> contains_particle_;
+ contains_particle_ >> compositor_;
+ contains_particle_ >> any_;
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ using SemanticGraph::Schema;
+
+ traverse (static_cast<SemanticGraph::Type&> (c));
+
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& t (c.inherits ().base ());
+
+ if (t.named_p () &&
+ types_.find (
+ t.scope ().name () + L"#" + t.name ()) == types_.end ())
+ {
+ // Don't worry about types that are in included/imported
+ // schemas.
+ //
+ Schema& s (dynamic_cast<Schema&> (t.scope ().scope ()));
+
+ if (&s == &schema_root || sources_p (schema_root, s))
+ {
+ valid = false;
+
+ wcerr << c.file () << ":" << c.line () << ":" << c.column ()
+ << ": error: type '" << xpath (c) << "' inherits from "
+ << "yet undefined type '" << xpath (t) << "'" << endl;
+
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << ": info: '" << xpath (t) << "' is defined here"
+ << endl;
+
+ wcerr << c.file () << ":" << c.line () << ":" << c.column ()
+ << ": info: inheritance from a yet-undefined type is "
+ << "not supported" << endl;
+
+ wcerr << c.file () << ":" << c.line () << ":" << c.column ()
+ << ": info: re-arrange your schema and try again"
+ << endl;
+ }
+ }
+ }
+
+ Complex::traverse (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ if (t.named_p ())
+ {
+ types_.insert (t.scope ().name () + L"#" + t.name ());
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (is_disabled ("P002"))
+ return;
+
+ if (e.substitutes_p () &&
+ !options.generate_polymorphic () &&
+ !subst_group_warning_issued)
+ {
+ subst_group_warning_issued = true;
+
+ os << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": warning P002: substitution groups are used but "
+ << "--generate-polymorphic was not specified" << endl;
+
+ os << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: generated code may not be able to parse "
+ << "some conforming instances" << endl;
+ }
+ }
+
+ // Return true if root sources s.
+ //
+ bool
+ sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
+ {
+ using SemanticGraph::Schema;
+ using SemanticGraph::Sources;
+
+ for (Schema::UsesIterator i (root.uses_begin ());
+ i != root.uses_end (); ++i)
+ {
+ if (i->is_a<Sources> ())
+ {
+ if (&i->schema () == &s || sources_p (i->schema (), s))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private:
+ set<String> types_;
+
+ Sources sources_;
+
+ Traversal::Names schema_names_;
+ Traversal::Namespace ns_;
+
+ Traversal::Names names_;
+
+ // Any.
+ //
+ Any any_;
+ Traversal::Compositor compositor_;
+ Traversal::ContainsParticle contains_particle_;
+ Traversal::ContainsCompositor contains_compositor_;
+ };
+
+
+ struct AnonymousType: Traversal::Schema,
+ Traversal::Complex,
+ Traversal::Element,
+ Traversal::Attribute,
+ ValidationContext
+ {
+ AnonymousType (ValidationContext& c)
+ : ValidationContext (c),
+ anonymous_error_issued_ (false)
+ {
+ *this >> sources_ >> *this;
+ *this >> schema_names_ >> ns_ >> names_ >> *this;
+ *this >> names_;
+ }
+
+ bool
+ traverse_common (SemanticGraph::Member& m)
+ {
+ SemanticGraph::Type& t (m.type ());
+
+ if (!t.named_p ()
+ && !t.is_a<SemanticGraph::Fundamental::IdRef> ()
+ && !t.is_a<SemanticGraph::Fundamental::IdRefs> ())
+ {
+ if (!anonymous_error_issued_)
+ {
+ valid = false;
+ anonymous_error_issued_ = true;
+
+ wcerr << t.file ()
+ << ": error: anonymous types detected"
+ << endl;
+
+ wcerr << t.file ()
+ << ": info: "
+ << "anonymous types are not supported in this mapping"
+ << endl;
+
+ wcerr << t.file ()
+ << ": info: consider explicitly naming these types or "
+ << "remove the --preserve-anonymous option to "
+ << "automatically name them"
+ << endl;
+
+ if (!options.show_anonymous ())
+ wcerr << t.file ()
+ << ": info: use --show-anonymous option to see these "
+ << "types" << endl;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e)) return;
+
+ if (traverse_common (e))
+ {
+ if (options.show_anonymous ())
+ {
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": error: element '" << xpath (e) << "' "
+ << "is of anonymous type" << endl;
+ }
+ }
+ else
+ Traversal::Element::traverse (e);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ if (traverse_common (a))
+ {
+ if (options.show_anonymous ())
+ {
+ wcerr << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": error: attribute '" << xpath (a) << "' "
+ << "is of anonymous type" << endl;
+ }
+ }
+ else
+ Traversal::Attribute::traverse (a);
+ }
+
+ private:
+ bool anonymous_error_issued_;
+
+ set<String> types_;
+
+ Sources sources_;
+
+ Traversal::Names schema_names_;
+ Traversal::Namespace ns_;
+
+ Traversal::Names names_;
+ };
+
+ struct GlobalElement: Traversal::Element, ValidationContext
+ {
+ GlobalElement (ValidationContext& c, SemanticGraph::Element*& element)
+ : ValidationContext (c), element_ (element)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!valid)
+ return;
+
+ if (options.root_element_first ())
+ {
+ if (element_ == 0)
+ element_ = &e;
+ }
+ else if (options.root_element_last ())
+ {
+ element_ = &e;
+ }
+ else if (String name = options.root_element ())
+ {
+ if (e.name () == name)
+ element_ = &e;
+ }
+ else
+ {
+ if (element_ == 0)
+ element_ = &e;
+ else
+ {
+ wcerr << schema_root.file () << ": error: unable to generate "
+ << "the test driver without a unique document root"
+ << endl;
+
+ wcerr << schema_root.file () << ": info: use --root-element-* "
+ << "options to specify the document root" << endl;
+
+ valid = false;
+ }
+ }
+ }
+
+ private:
+ SemanticGraph::Element*& element_;
+ };
+
+ }
+
+ bool Validator::
+ validate (options const& ops,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ bool gen_driver,
+ const WarningSet& disabled_warnings)
+ {
+ bool valid (true);
+ ValidationContext ctx (root, path, ops, disabled_warnings, valid);
+
+ //
+ //
+ if (ops.char_type () != "char" &&
+ ops.char_type () != "wchar_t" &&
+ !ctx.is_disabled ("P003"))
+ {
+ wcerr << "warning P003: unknown base character type '" <<
+ ops.char_type ().c_str () << "'" << endl;
+ }
+
+ //
+ //
+ if (ops.xml_parser () != "xerces" &&
+ ops.xml_parser () != "expat" &&
+ !ctx.is_disabled ("P004"))
+ {
+ wcerr << "warning P004: unknown underlying XML parser '" <<
+ ops.xml_parser ().c_str () << "'" << endl;
+ }
+
+ //
+ //
+ if (ops.xml_parser () == "expat" &&
+ ops.char_type () == "wchar_t")
+ {
+ wcerr << "error: using expat with wchar_t is not supported"
+ << endl;
+
+ return false;
+ }
+
+ //
+ //
+ if (ops.xml_parser () == "expat" &&
+ !ops.char_encoding ().empty () &&
+ ops.char_encoding () != "utf8")
+ {
+ wcerr << "error: using expat with character encoding other than "
+ << "utf8 is not supported"
+ << endl;
+
+ return false;
+ }
+
+ //
+ //
+ if (ops.generate_validation () && ops.suppress_validation ())
+ {
+ wcerr << "error: mutually exclusive options specified: "
+ << "--generate-validation and --suppress-validation"
+ << endl;
+
+ return false;
+ }
+
+ //
+ //
+ if (ops.generate_noop_impl () && ops.generate_print_impl ())
+ {
+ wcerr << "error: mutually exclusive options specified: "
+ << "--generate-noop-impl and --generate-print-impl"
+ << endl;
+
+ return false;
+ }
+
+ //
+ //
+ {
+ bool ref (ops.root_element_first ());
+ bool rel (ops.root_element_last ());
+ bool re (ops.root_element ());
+
+ if ((ref && rel) || (ref && re) || (rel && re))
+ {
+ wcerr << "error: mutually exclusive options specified: "
+ << "--root-element-last, --root-element-first, and "
+ << "--root-element"
+ << endl;
+
+ return false;
+ }
+ }
+
+ //
+ //
+ bool import_maps (ops.import_maps ());
+ bool export_maps (ops.export_maps ());
+
+ if (import_maps && export_maps)
+ {
+ wcerr << "error: --import-maps and --export-maps are "
+ << "mutually exclusive" << endl;
+
+ return false;
+ }
+
+ if (import_maps && !ctx.polymorphic)
+ {
+ wcerr << "error: --import-maps can only be specified together with "
+ << "--generate-polymorphic" << endl;
+
+ return false;
+ }
+
+ if (export_maps && !ctx.polymorphic)
+ {
+ wcerr << "error: --export-maps can only be specified together with "
+ << "--generate-polymorphic" << endl;
+
+ return false;
+ }
+
+ // Test for anonymout types.
+ //
+ {
+ AnonymousType traverser (ctx);
+ traverser.dispatch (root);
+ }
+
+
+ // Test the rest.
+ //
+ if (valid)
+ {
+ Traverser traverser (ctx);
+ traverser.dispatch (root);
+ }
+
+ // Test that the document root is unique.
+ //
+ if (valid && gen_driver)
+ {
+ SemanticGraph::Element* element (0);
+
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ GlobalElement global_element (ctx, element);
+
+ schema >> schema_names >> ns >> ns_names >> global_element;
+
+ schema.dispatch (root);
+
+ if (valid && element == 0)
+ {
+ wcerr << root.file () << ": error: unable to generate the "
+ << "test driver without a global element (document root)"
+ << endl;
+
+ valid = false;
+ }
+ }
+
+ return valid;
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/parser/validator.hxx b/xsd/xsd/cxx/parser/validator.hxx
new file mode 100644
index 0000000..daffdc8
--- /dev/null
+++ b/xsd/xsd/cxx/parser/validator.hxx
@@ -0,0 +1,30 @@
+// file : xsd/cxx/parser/validator.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_PARSER_VALIDATOR_HXX
+#define XSD_CXX_PARSER_VALIDATOR_HXX
+
+#include <xsd/xsd.hxx>
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/parser/elements.hxx>
+#include <xsd/cxx/parser/options.hxx>
+
+namespace CXX
+{
+ namespace Parser
+ {
+ class Validator
+ {
+ public:
+ bool
+ validate (options const&,
+ SemanticGraph::Schema&,
+ SemanticGraph::Path const& tu,
+ bool gen_driver,
+ const WarningSet& disabled_warnings);
+ };
+ }
+}
+
+#endif // XSD_CXX_PARSER_VALIDATOR_HXX
diff --git a/xsd/xsd/cxx/tree/counter.cxx b/xsd/xsd/cxx/tree/counter.cxx
new file mode 100644
index 0000000..94bcc87
--- /dev/null
+++ b/xsd/xsd/cxx/tree/counter.cxx
@@ -0,0 +1,260 @@
+// file : xsd/cxx/tree/counter.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/counter.hxx>
+
+#include <iostream>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct Member: Traversal::Member
+ {
+ Member (size_t& complexity)
+ : complexity_ (complexity)
+ {
+ }
+
+ virtual void
+ traverse (Type&)
+ {
+ complexity_++;
+ }
+
+ size_t& complexity_;
+ };
+
+ struct Any: Traversal::Any, Traversal::AnyAttribute
+ {
+ Any (size_t& complexity)
+ : complexity_ (complexity)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any&)
+ {
+ complexity_++;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute&)
+ {
+ complexity_++;
+ }
+
+ size_t& complexity_;
+ };
+
+ struct TypeBase: Traversal::List,
+ Traversal::Union,
+ Traversal::Enumeration,
+ Traversal::Complex,
+ Context
+ {
+ TypeBase (Context& c, size_t& complexity)
+ : Context (c), complexity_ (complexity)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::List&)
+ {
+ complexity_++;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Union&)
+ {
+ complexity_++;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Enumeration& e)
+ {
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ complexity_ += (string_based ? 1 : 2);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ complexity_++; // One for the type itself.
+
+ // Plus some for each member.
+ //
+ Any any (complexity_);
+ Member member (complexity_);
+ Traversal::Names names;
+
+ names >> member;
+
+ if (options.generate_wildcard ())
+ names >> any;
+
+ Complex::names (c, names);
+ }
+
+ private:
+ size_t& complexity_;
+ };
+
+
+ //
+ //
+ struct GlobalType: Traversal::Type, Context
+
+ {
+ GlobalType (Context& c, Counts& counts)
+ : Context (c), counts_ (counts)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ counts_.global_types++;
+
+ size_t complexity (0);
+ TypeBase type (*this, complexity);
+ type.dispatch (t);
+
+ counts_.complexity_total += complexity;
+ counts_.complexity.push_back (complexity);
+ }
+
+ private:
+ Counts& counts_;
+ };
+
+ //
+ //
+ struct GlobalElement: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ GlobalElement (Context& c, Counts& counts)
+ : GlobalElementBase (c),
+ Context (c),
+ counts_ (counts),
+ last_ (0)
+ {
+ }
+
+ ~GlobalElement ()
+ {
+ if (last_ != 0)
+ {
+ last_->context ().set ("last", true);
+ count_last ();
+ }
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ // Check if the previous element we saw needs to be generated.
+ //
+ if (last_ != 0)
+ count_last ();
+
+ last_ = &e;
+
+ if (counts_.global_elements == 0)
+ e.context ().set ("first", true);
+
+ counts_.global_elements++;
+ }
+
+ private:
+ void
+ count_last ()
+ {
+ if (generate_p (*last_))
+ {
+ counts_.generated_global_elements++;
+
+ size_t complexity (0);
+
+ if (doc_root_p (*last_))
+ {
+ if (options.generate_element_type ())
+ {
+ complexity += 1; // For c-tors and d-tor.
+
+ if (!options.suppress_parsing ())
+ complexity += 1;
+
+ if (options.generate_serialization ())
+ complexity += 1;
+ }
+ else
+ {
+ if (!options.suppress_parsing ())
+ complexity += 6; // 13 parsing functions.
+
+ if (options.generate_serialization ())
+ complexity += 4; // 8 serialization functions.
+ }
+ }
+
+ if (complexity == 0)
+ {
+ // This element must be a substitution group members. For
+ // such elements we are only generating an entry in a map.
+ // We will assign it a complexity of 1 so that we don't
+ // end up with the total complexity that is less than the
+ // number of elements and types.
+ //
+ complexity = 1;
+ }
+
+ counts_.complexity_total += complexity;
+ counts_.complexity.push_back (complexity);
+ }
+ }
+
+ private:
+ Counts& counts_;
+ SemanticGraph::Element* last_;
+ };
+ }
+
+ Counts Counter::
+ count (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& path)
+ {
+ Counts counts;
+ Context ctx (std::wcerr, tu, path, ops, counts, false, 0, 0, 0, 0);
+
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ GlobalType global_type (ctx, counts);
+ GlobalElement global_element (ctx, counts);
+
+ schema >> schema_names >> ns >> ns_names;
+
+ ns_names >> global_element;
+ ns_names >> global_type;
+
+ schema.dispatch (tu);
+
+ return counts;
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/counter.hxx b/xsd/xsd/cxx/tree/counter.hxx
new file mode 100644
index 0000000..bc1dc79
--- /dev/null
+++ b/xsd/xsd/cxx/tree/counter.hxx
@@ -0,0 +1,25 @@
+// file : xsd/cxx/tree/counter.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_COUNTER_HXX
+#define XSD_CXX_TREE_COUNTER_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+#include <xsd/cxx/tree/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class Counter
+ {
+ public:
+ Counts
+ count (options const&,
+ SemanticGraph::Schema&,
+ SemanticGraph::Path const&);
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_COUNTER_HXX
diff --git a/xsd/xsd/cxx/tree/default-value.cxx b/xsd/xsd/cxx/tree/default-value.cxx
new file mode 100644
index 0000000..aefeda3
--- /dev/null
+++ b/xsd/xsd/cxx/tree/default-value.cxx
@@ -0,0 +1,1273 @@
+// file : xsd/cxx/tree/default-value.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/default-value.hxx>
+
+using std::hex;
+using std::dec;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ void
+ normalize (String& s)
+ {
+ size_t n (s.size ());
+
+ for (size_t i (0); i < n; ++i)
+ {
+ wchar_t& c (s[i]);
+
+ if (c == 0x0D || // carriage return
+ c == 0x09 || // tab
+ c == 0x0A)
+ c = 0x20;
+ }
+ }
+
+ void
+ collapse (String& s)
+ {
+ size_t n (s.size ()), j (0);
+ bool subs (false), trim (true);
+
+ for (size_t i (0); i < n; ++i)
+ {
+ wchar_t c (s[i]);
+
+ if (c == 0x20 || c == 0x09 || c == 0x0A)
+ subs = true;
+ else
+ {
+ if (subs)
+ {
+ subs = false;
+
+ if (!trim)
+ s[j++] = 0x20;
+ }
+
+ if (trim)
+ trim = false;
+
+ s[j++] = c;
+ }
+ }
+
+ s.resize (j);
+ }
+
+ void
+ strip_zeros (String& s)
+ {
+ size_t n (s.size ()), i (0);
+
+ if (n > 0 && (s[i] == '-' || s[i] == '+'))
+ i++;
+
+ size_t j (i);
+
+ bool strip (true);
+
+ for (; i < n; ++i)
+ {
+ wchar_t c (s[i]);
+
+ if (c == '0')
+ {
+ if (!strip)
+ s[j++] = c;
+ }
+ else
+ {
+ s[j++] = c;
+
+ if (strip)
+ strip = false;
+ }
+ }
+
+ if (strip && j < n)
+ s[j++] = '0'; // There was nothing except zeros so add one back.
+
+ s.resize (j);
+ }
+
+ void
+ make_float (String& s)
+ {
+ if (s.find ('.') == String::npos &&
+ s.find ('e') == String::npos &&
+ s.find ('E') == String::npos)
+ s += L".0";
+ }
+ }
+
+ //
+ // IsLiteralValue
+ //
+
+ IsLiteralValue::
+ IsLiteralValue (bool& r)
+ : IsFundamentalType (r)
+ {
+ *this >> inherits_ >> *this;
+ }
+
+ void IsLiteralValue::
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c);
+ }
+
+ //
+ // LiteralValue
+ //
+
+ LiteralValue::
+ LiteralValue (Context& c)
+ : Context (c)
+ {
+ *this >> inherits_ >> *this;
+ }
+
+ String LiteralValue::
+ dispatch (SemanticGraph::Node& type, String const& value)
+ {
+ literal_.clear ();
+ value_ = value;
+ Traversal::NodeBase::dispatch (type);
+ return literal_;
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c);
+ }
+
+ // Boolean.
+ //
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Boolean&)
+ {
+ collapse (value_);
+ literal_ = (value_ == L"true" || value_ == L"1") ? L"true" : L"false";
+ }
+
+ // Integral types.
+ //
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Byte&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_;
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::UnsignedByte&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"U";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Short&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_;
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::UnsignedShort&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"U";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Int&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_;
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::UnsignedInt&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"U";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Long&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_;
+ literal_ += L"LL";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::UnsignedLong&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_;
+ literal_ += L"ULL";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Integer&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"LL";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"LL";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"ULL";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::PositiveInteger&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"ULL";
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::NegativeInteger&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ literal_ = value_ + L"LL";
+ }
+
+ // Floats.
+ //
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ collapse (value_);
+
+ if (value_ == L"NaN")
+ {
+ literal_ = L"::std::numeric_limits< " + fq_name (t) +
+ L" >::quiet_NaN ()";
+ }
+ else if (value_ == L"INF")
+ {
+ literal_ = L"::std::numeric_limits< " + fq_name (t) +
+ L" >::infinity ()";
+ }
+ else if (value_ == L"-INF")
+ {
+ literal_ = L"- ::std::numeric_limits< " + fq_name (t) +
+ L" >::infinity ()";
+ }
+ else
+ {
+ strip_zeros (value_);
+ make_float (value_);
+ literal_ = value_ + L"F";
+ }
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ collapse (value_);
+
+ if (value_ == L"NaN")
+ {
+ literal_ = L"::std::numeric_limits< " + fq_name (t) +
+ L" >::quiet_NaN ()";
+ }
+ else if (value_ == L"INF")
+ {
+ literal_ = L"::std::numeric_limits< " + fq_name (t) +
+ L" >::infinity ()";
+ }
+ else if (value_ == L"-INF")
+ {
+ literal_ = L"- ::std::numeric_limits< " + fq_name (t) +
+ L" >::infinity ()";
+ }
+ else
+ {
+ strip_zeros (value_);
+ make_float (value_);
+ literal_ = value_;
+ }
+ }
+
+ void LiteralValue::
+ traverse (SemanticGraph::Fundamental::Decimal&)
+ {
+ collapse (value_);
+ strip_zeros (value_);
+ make_float (value_);
+ literal_ = value_;
+ }
+
+ //
+ // InitKind
+ //
+
+ InitKind::
+ InitKind (Kind& r)
+ : r_ (r)
+ {
+ *this >> inherits_ >> *this;
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::List&)
+ {
+ r_ = function;
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c);
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::Fundamental::Base64Binary&)
+ {
+ r_ = data;
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::Fundamental::HexBinary&)
+ {
+ r_ = data;
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::Fundamental::NameTokens&)
+ {
+ r_ = function;
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::Fundamental::IdRefs&)
+ {
+ r_ = function;
+ }
+
+ void InitKind::
+ traverse (SemanticGraph::Fundamental::Entities&)
+ {
+ r_ = function;
+ }
+
+ //
+ // InitValue
+ //
+
+ InitValue::
+ InitValue (Context& c)
+ : Context (c), type_name_ (c), literal_value_ (c)
+ {
+ }
+
+ void InitValue::
+ dispatch (SemanticGraph::Node& type, String const& value)
+ {
+ value_ = value;
+ Traversal::NodeBase::dispatch (type);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::List& l)
+ {
+ collapse (value_);
+
+ if (!value_)
+ return;
+
+ SemanticGraph::Type& t (l.argumented ().type ());
+
+ String ov (value_);
+ size_t b (0);
+
+ for (size_t e (ov.find (' ')); ; e = ov.find (' ', b))
+ {
+ String v (ov, b, e != String::npos ? e - b : e);
+
+ os << "{";
+ type_name_.dispatch (t);
+ os << " tmp (";
+
+ String lit (literal_value_.dispatch (t, v));
+
+ if (lit)
+ os << lit;
+ else
+ {
+ value_ = v;
+ Traversal::NodeBase::dispatch (t);
+ }
+
+ os << ");"
+ << "r.push_back (tmp);"
+ << "}";
+
+ if (e == String::npos)
+ break;
+
+ b = e + 1;
+ }
+
+ value_ = ov;
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Union&)
+ {
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Complex& c)
+ {
+ Traversal::NodeBase::dispatch (ultimate_base (c));
+ }
+
+ // anyType & anySimpleType.
+ //
+ void InitValue::
+ traverse (SemanticGraph::AnyType& t)
+ {
+ os << fq_name (t) << " (" << strlit (value_) << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ os << fq_name (t) << " (" << strlit (value_) << ")";
+ }
+
+ // Strings.
+ //
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::String&)
+ {
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::NormalizedString&)
+ {
+ normalize (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Token&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::NameToken&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::NameTokens&)
+ {
+ string_sequence_type (
+ dynamic_cast<SemanticGraph::Type&> (
+ xs_ns ().find ("NMTOKEN").first->named ()));
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Name&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::NCName&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Language&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ // Qualified name.
+ //
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ size_t p (value_.rfind ('#'));
+
+ if (p != String::npos)
+ {
+ String ns (value_, 0, p);
+ String qname (value_, p + 1, String::npos);
+
+ collapse (ns);
+ collapse (qname);
+
+ p = qname.find (':');
+
+ String name;
+ if (p != String::npos)
+ name.assign (qname, p + 1, String::npos);
+ else
+ name = qname;
+
+ os << fq_name (t) << " (" << strlit (ns) << ", " <<
+ strlit (name) << ")";
+ }
+ else
+ {
+ // Unqualified name.
+ //
+ collapse (value_);
+ os << fq_name (t) << " (" << strlit (value_) << ")";
+ }
+ }
+
+ // ID/IDREF.
+ //
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Id&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::IdRef&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::IdRefs&)
+ {
+ string_sequence_type (
+ dynamic_cast<SemanticGraph::Type&> (
+ xs_ns ().find ("IDREF").first->named ()));
+ }
+
+ // URI.
+ //
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::AnyURI&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ // Binary.
+ //
+ static unsigned char
+ base64_decode (unsigned char c)
+ {
+ unsigned char r = 0xFF;
+
+ if (c >= 'A' && c <= 'Z')
+ r = static_cast<unsigned char> (c - 'A');
+ else if (c >= 'a' && c <= 'z')
+ r = static_cast<unsigned char> (c - 'a' + 26);
+ else if (c >= '0' && c <= '9')
+ r = static_cast<unsigned char> (c - '0' + 52);
+ else if (c == '+')
+ r = 62;
+ else if (c == '/')
+ r = 63;
+
+ return r;
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ collapse (value_);
+
+ if (dispatch_count_++ == 0)
+ {
+ if (value_)
+ {
+ os << "unsigned char " << data_ << "[] = {";
+
+ // Decode.
+ //
+ size_t size (value_.size ());
+
+ // Remove all whitespaces.
+ //
+ {
+ size_t j (0);
+ bool subs (false);
+
+ for (size_t i (0); i < size; ++i)
+ {
+ wchar_t c (value_[i]);
+
+ if (c == 0x20 || c == 0x0A || c == 0x0D || c == 0x09)
+ subs = true;
+ else
+ {
+ if (subs)
+ subs = false;
+
+ value_[j++] = c;
+ }
+ }
+
+ size = j;
+ value_.resize (size, '\0');
+ }
+
+ // Our length should be a multiple of four.
+ //
+ size_t quad_count (size / 4);
+
+ // Source and destination indexes.
+ //
+ size_t si (0), di (0);
+
+ // Process all quads except the last one.
+ //
+ unsigned short v;
+ unsigned char b1, b2, b3, b4;
+
+ wchar_t prev_fill (os.fill ('0'));
+
+ for (size_t q (0); q < quad_count - 1; ++q)
+ {
+ b1 = base64_decode (value_[si++]);
+ b2 = base64_decode (value_[si++]);
+ b3 = base64_decode (value_[si++]);
+ b4 = base64_decode (value_[si++]);
+
+ if (q != 0)
+ os << ", ";
+
+ if (di % 9 == 0)
+ os << endl;
+
+ os << hex;
+
+ v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
+ os.width (2);
+ os << "0x" << v;
+
+ v = static_cast<unsigned char> ((b2 << 4) | (b3 >> 2));
+ os.width (2);
+ os << ", 0x" << v;
+
+ v = static_cast<unsigned char> ((b3 << 6) | b4);
+ os.width (2);
+ os << ", 0x" << v;
+
+ os << dec;
+
+ di += 3;
+ }
+
+ // Process the last quad. The first two octets are always there.
+ //
+ b1 = base64_decode (value_[si++]);
+ b2 = base64_decode (value_[si++]);
+
+ wchar_t e3 (value_[si++]), e4 (value_[si++]);
+
+ if (quad_count != 1)
+ os << ", ";
+
+ if (di % 9 == 0)
+ os << endl;
+
+ if (e4 == '=')
+ {
+ if (e3 == '=')
+ {
+ // Two pads. Last 4 bits in b2 should be zero.
+ //
+ v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
+ os << "0x" << hex << v << dec;
+ di++;
+ }
+ else
+ {
+ // One pad. Last 2 bits in b3 should be zero.
+ //
+ b3 = base64_decode (e3);
+
+ os << hex;
+
+ v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
+ os.width (2);
+ os << "0x" << v;
+
+ v = static_cast<unsigned char> ((b2 << 4) | (b3 >> 2));
+ os.width (2);
+ os << ", 0x" << v;
+
+ os << dec;
+
+ di += 2;
+ }
+ }
+ else
+ {
+ // No pads.
+ //
+ b3 = base64_decode (e3);
+ b4 = base64_decode (e4);
+
+ os << hex;
+
+ v = static_cast<unsigned char> ((b1 << 2) | (b2 >> 4));
+ os.width (2);
+ os << "0x" << v;
+
+ v = static_cast<unsigned char> ((b2 << 4) | (b3 >> 2));
+ os.width (2);
+ os << ", 0x" << v;
+
+ v = static_cast<unsigned char> ((b3 << 6) | b4);
+ os.width (2);
+ os << ", 0x" << v;
+
+ os << dec;
+
+ di += 3;
+ }
+
+ os.fill (prev_fill);
+
+ os << "};";
+ }
+ }
+ else
+ {
+ os << fq_name (t) << " (";
+
+ if (value_)
+ os << data_ << "," << endl
+ << "sizeof (" << data_ << ")," << endl
+ << "sizeof (" << data_ << ")," << endl
+ << "false";
+ else
+ os << "0";
+
+
+ os << ")";
+ }
+ }
+
+ static unsigned char
+ hex_decode (unsigned char c)
+ {
+ unsigned char r = 0xFF;
+
+ if (c >= '0' && c <= '9')
+ r = static_cast<unsigned char> (c - '0');
+ else if (c >= 'A' && c <= 'F')
+ r = static_cast<unsigned char> (10 + (c - 'A'));
+ else if (c >= 'a' && c <= 'f')
+ r = static_cast<unsigned char> (10 + (c - 'a'));
+
+ return r;
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ collapse (value_);
+
+ if (dispatch_count_++ == 0)
+ {
+ if (value_)
+ {
+ os << "unsigned char " << data_ << "[] = {";
+
+ // Decode.
+ //
+ size_t n (value_.size () / 2);
+ wchar_t prev_fill (os.fill ('0'));
+
+ for (size_t i (0); i < n; ++i)
+ {
+ unsigned char h (hex_decode (value_[2 * i]));
+ unsigned char l (hex_decode (value_[2 * i + 1]));
+
+ if (h == 0xFF || l == 0xFF)
+ break;
+
+ if (i != 0)
+ os << ", ";
+
+ if (i % 9 == 0)
+ os << endl;
+
+ unsigned short v = static_cast<unsigned char> ((h << 4) | l);
+ os.width (2);
+ os << "0x" << hex << v << dec;
+ }
+
+ os.fill (prev_fill);
+
+ os << "};";
+ }
+ }
+ else
+ {
+ os << fq_name (t) << " (";
+
+ if (value_)
+ os << data_ << "," << endl
+ << "sizeof (" << data_ << ")," << endl
+ << "sizeof (" << data_ << ")," << endl
+ << "false";
+ else
+ os << "0";
+
+
+ os << ")";
+ }
+ }
+
+ // Date/time.
+ //
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ // date := [-]CCYY[N]*-MM-DD[Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ size_t b (0);
+ size_t e (value_.find ('-', value_[0] == '-' ? 5 : 4));
+ String year (value_, 0, e);
+
+ b = e + 1;
+ String month (value_, b, 2);
+
+ b += 3;
+ String day (value_, b, 2);
+
+ strip_zeros (year);
+ strip_zeros (month);
+ strip_zeros (day);
+
+ os << fq_name (t) << " (" << year << ", " << month << ", " << day;
+ time_zone (b + 2);
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ // date_time := [-]CCYY[N]*-MM-DDTHH:MM:SS[.S+][Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ size_t b (0);
+ size_t e (value_.find ('-', value_[0] == '-' ? 5 : 4));
+ String year (value_, 0, e);
+ b = e + 1;
+
+ String month (value_, b, 2);
+ b += 3;
+
+ String day (value_, b, 2);
+ b += 3;
+
+ String hours (value_, b, 2);
+ b += 3;
+
+ String minutes (value_, b, 2);
+ b += 3;
+
+ e = b + 2;
+ for (; e < value_.size (); ++e)
+ {
+ wchar_t c (value_[e]);
+
+ if (c == 'Z' || c == '+' || c == '-')
+ break;
+ }
+
+ String seconds (value_, b, e - b);
+
+ strip_zeros (year);
+ strip_zeros (month);
+ strip_zeros (day);
+ strip_zeros (hours);
+ strip_zeros (minutes);
+ strip_zeros (seconds);
+ make_float (seconds);
+
+ os << fq_name (t) << " ("
+ << year << ", " << month << ", " << day << ", "
+ << hours << ", " << minutes << ", " << seconds;
+ time_zone (e);
+ os << ")";
+ }
+
+ namespace
+ {
+ size_t
+ find_delim (String const& s, size_t pos)
+ {
+ for (; pos < s.size (); ++pos)
+ {
+ wchar_t c (s[pos]);
+
+ if (c == 'Y' || c == 'D' || c == 'M' || c == 'H' ||
+ c == 'M' || c == 'S' || c == 'T')
+ break;
+ }
+
+ return pos;
+ }
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ // duration := [-]P[nY][nM][nD][TnHnMn[.n+]S]
+ //
+ collapse (value_);
+
+ size_t b (1), e, n (value_.size ());
+
+ os << fq_name (t) << " (";
+
+ if (value_[0] == '-')
+ {
+ os << "true, ";
+ b++;
+ }
+ else
+ os << "false, ";
+
+ e = find_delim (value_, b);
+
+ if (e < n && value_[e] == 'Y')
+ {
+ String v (value_, b, e - b);
+ strip_zeros (v);
+ os << v << ", ";
+
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+ else
+ os << "0, ";
+
+ if (e < n && value_[e] == 'M')
+ {
+ String v (value_, b, e - b);
+ strip_zeros (v);
+ os << v << ", ";
+
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+ else
+ os << "0, ";
+
+ if (e < n && value_[e] == 'D')
+ {
+ String v (value_, b, e - b);
+ strip_zeros (v);
+ os << v << ", ";
+
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+ else
+ os << "0, ";
+
+ if (e < n && value_[e] == 'T')
+ {
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+
+ if (e < n && value_[e] == 'H')
+ {
+ String v (value_, b, e - b);
+ strip_zeros (v);
+ os << v << ", ";
+
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+ else
+ os << "0, ";
+
+ if (e < n && value_[e] == 'M')
+ {
+ String v (value_, b, e - b);
+ strip_zeros (v);
+ os << v << ", ";
+
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+ else
+ os << "0, ";
+
+ if (e < n && value_[e] == 'S')
+ {
+ String v (value_, b, e - b);
+ strip_zeros (v);
+ make_float (v);
+ os << v;
+
+ b = e + 1;
+ e = find_delim (value_, b);
+ }
+ else
+ os << "0.0";
+
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ // gday := ---DD[Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ String day (value_, 3, 2);
+ strip_zeros (day);
+
+ os << fq_name (t) << " (" << day;
+ time_zone (5);
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ // gmonth := --MM[Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ String month (value_, 2, 2);
+ strip_zeros (month);
+
+ os << fq_name (t) << " (" << month;
+ time_zone (4);
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ // gmonth_day := --MM-DD[Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ String month (value_, 2, 2);
+ String day (value_, 5, 2);
+
+ strip_zeros (month);
+ strip_zeros (day);
+
+ os << fq_name (t) << " (" << month << ", " << day;
+ time_zone (7);
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ // gyear := [-]CCYY[N]*[Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ size_t pos (value_[0] == '-' ? 5 : 4);
+ for (; pos < value_.size (); ++pos)
+ {
+ wchar_t c (value_[pos]);
+
+ if (c == 'Z' || c == '+' || c == '-')
+ break;
+ }
+
+ String year (value_, 0, pos);
+ strip_zeros (year);
+
+ os << fq_name (t) << " (" << year;
+ time_zone (pos);
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ // gyear_month := [-]CCYY[N]*-MM[Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ size_t pos (value_.find ('-', value_[0] == '-' ? 5 : 4));
+
+ String year (value_, 0, pos);
+ String month (value_, pos + 1, 2);
+
+ strip_zeros (year);
+ strip_zeros (month);
+
+ os << fq_name (t) << " (" << year << ", " << month;
+ time_zone (pos + 3);
+ os << ")";
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ // time := HH:MM:SS[.S+][Z|(+|-)HH:MM]
+ //
+ collapse (value_);
+
+ String hours (value_, 0, 2);
+ String minutes (value_, 3, 2);
+
+ size_t e (8);
+ for (; e < value_.size (); ++e)
+ {
+ wchar_t c (value_[e]);
+
+ if (c == 'Z' || c == '+' || c == '-')
+ break;
+ }
+
+ String seconds (value_, 6, e - 6);
+
+ strip_zeros (hours);
+ strip_zeros (minutes);
+ strip_zeros (seconds);
+ make_float (seconds);
+
+ os << fq_name (t) << " (" << hours << ", " << minutes << ", " << seconds;
+ time_zone (e);
+ os << ")";
+ }
+
+ void InitValue::
+ time_zone (size_t pos)
+ {
+ // time_zone := Z|(+|-)HH:MM
+ //
+ if (pos < value_.size ())
+ {
+ String h, m;
+
+ if (value_[pos] == 'Z')
+ {
+ h = "0";
+ m = "0";
+ }
+ else
+ {
+ if (value_[pos] == '-')
+ {
+ h = "-";
+ m = "-";
+ }
+
+ h.append (value_, pos + 1, 2);
+ m.append (value_, pos + 4, 2);
+
+ strip_zeros (h);
+ strip_zeros (m);
+ }
+
+ os << ", " << h << ", " << m;
+ }
+ }
+
+ // Entity.
+ //
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Entity&)
+ {
+ collapse (value_);
+ os << strlit (value_);
+ }
+
+ void InitValue::
+ traverse (SemanticGraph::Fundamental::Entities&)
+ {
+ string_sequence_type (
+ dynamic_cast<SemanticGraph::Type&> (
+ xs_ns ().find ("ENTITY").first->named ()));
+ }
+
+ void InitValue::
+ string_sequence_type (SemanticGraph::Type& t)
+ {
+ collapse (value_);
+
+ if (!value_)
+ return;
+
+ size_t b (0);
+
+ for (size_t e (value_.find (' ')); ; e = value_.find (' ', b))
+ {
+ String v (value_, b, e != String::npos ? e - b : e);
+
+ os << "{";
+ type_name_.dispatch (t);
+ os << " tmp (" << strlit (v) << ");"
+ << "r.push_back (tmp);"
+ << "}";
+
+ if (e == String::npos)
+ break;
+
+ b = e + 1;
+ }
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/default-value.hxx b/xsd/xsd/cxx/tree/default-value.hxx
new file mode 100644
index 0000000..5485669
--- /dev/null
+++ b/xsd/xsd/cxx/tree/default-value.hxx
@@ -0,0 +1,355 @@
+// file : xsd/cxx/tree/default-value.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_DEFAULT_VALUE_HXX
+#define XSD_CXX_TREE_DEFAULT_VALUE_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ struct IsLiteralValue: IsFundamentalType, Traversal::Complex
+ {
+ IsLiteralValue (bool& r);
+
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ private:
+ Traversal::Inherits inherits_;
+ };
+
+ struct LiteralValue: Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Complex,
+
+ Context
+ {
+ LiteralValue (Context&);
+
+ String
+ dispatch (SemanticGraph::Node& type, String const& value);
+
+ // Handle inheritance.
+ //
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean&);
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger&);
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal&);
+
+ private:
+ String value_;
+ String literal_;
+
+ Traversal::Inherits inherits_;
+ };
+
+ // Some initialization (e.g., list) need a function body while others
+ // (e.g., *binary) require extra data.
+ //
+ struct InitKind: Traversal::List,
+ Traversal::Complex,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::IdRefs,
+ Traversal::Fundamental::Entities
+ {
+ enum Kind
+ {
+ simple,
+ data,
+ function
+ };
+
+ // Should be simple initially.
+ //
+ InitKind (Kind& r);
+
+ virtual void
+ traverse (SemanticGraph::List&);
+
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities&);
+
+ private:
+ Kind& r_;
+ Traversal::Inherits inherits_;
+ };
+
+ struct InitValue: Traversal::List,
+ Traversal::Union,
+ Traversal::Complex,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities,
+
+ Context
+ {
+ InitValue (Context&);
+
+ void
+ data (String const& data)
+ {
+ data_ = data;
+ dispatch_count_ = 0;
+ }
+
+ void
+ dispatch (SemanticGraph::Node& type, String const& value);
+
+ virtual void
+ traverse (SemanticGraph::List&);
+
+ virtual void
+ traverse (SemanticGraph::Union&);
+
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ // anyType & anySimpleType.
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType&);
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType&);
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language&);
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName&);
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs&);
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI&);
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary&);
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time&);
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity&);
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities&);
+
+ private:
+ void
+ string_sequence_type (SemanticGraph::Type& element_type);
+
+ void
+ time_zone (size_t pos);
+
+ private:
+ String value_;
+ String data_;
+ size_t dispatch_count_;
+ MemberTypeName type_name_;
+ LiteralValue literal_value_;
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_DEFAULT_VALUE_HXX
diff --git a/xsd/xsd/cxx/tree/elements.cxx b/xsd/xsd/cxx/tree/elements.cxx
new file mode 100644
index 0000000..fc080c8
--- /dev/null
+++ b/xsd/xsd/cxx/tree/elements.cxx
@@ -0,0 +1,1409 @@
+// file : xsd/cxx/tree/elements.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ // Context
+ //
+ Context::
+ Context (std::wostream& o,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ options_type const& ops,
+ Counts const& counts_,
+ bool generate_xml_schema__,
+ StringLiteralMap const* map,
+ Regex const* fe,
+ Regex const* he,
+ Regex const* ie)
+ : CXX::Context (o, root, path, ops, map),
+ options (ops),
+ counts (counts_),
+ any_type (any_type_),
+ any_simple_type (any_simple_type_),
+ element_type (element_type_),
+ container (container_),
+ flags_type (flags_type_),
+ qname_type (qname_type_),
+ xs_string_type (xs_string_type_),
+ properties_type (properties_type_),
+ error_handler_type (error_handler_type_),
+ list_stream_type (list_stream_type_),
+ namespace_infomap_type (namespace_infomap_type_),
+ parser_type (parser_type_),
+ std_ostream_type (std_ostream_type_),
+ ostream_type (ostream_type_),
+ istream_type (istream_type_),
+ xerces_ns (xerces_ns_),
+ dom_auto_ptr (dom_auto_ptr_),
+ dom_node_key (dom_node_key_),
+ as_double_type (as_double_type_),
+ as_decimal_type (as_decimal_type_),
+ generate_xml_schema (generate_xml_schema_),
+ doxygen (doxygen_),
+ polymorphic (ops.generate_polymorphic ()),
+ polymorphic_all (ops.polymorphic_type_all ()),
+ poly_plate (ops.polymorphic_plate ()),
+ detach (ops.generate_detach ()),
+ fwd_expr (fe),
+ hxx_expr (he),
+ ixx_expr (ie),
+ ns_scope (ns_scope_),
+ regex_custom_type_map (regex_custom_type_map_),
+ direct_custom_type_map (direct_custom_type_map_),
+ qname_type_ (L"::xsd::cxx::xml::qualified_name< " + char_type + L" >"),
+ parser_type_ (L"::xsd::cxx::xml::dom::parser< " + char_type + L" >"),
+ generate_xml_schema_ (generate_xml_schema__),
+ doxygen_ (ops.generate_doxygen ()),
+ ns_scope_stack (ns_scope_stack_),
+ cxx_uq_id_expr_ (L"^[a-zA-Z_]\\w*$"),
+ cxx_uq_id_expr (cxx_uq_id_expr_)
+ {
+ SemanticGraph::Namespace& xs (xs_ns ());
+ SemanticGraph::Context& xsc (xs.context ());
+
+ // Cache some often-used names from the XML Schema namespace
+ // if names have already been processed.
+ //
+ if (xsc.count ("container"))
+ {
+ String xs_name (ns_name (xs));
+
+ any_type = fq_name (xs.find ("anyType").first->named ());
+ any_simple_type = fq_name (xs.find ("anySimpleType").first->named ());
+ xs_string_type = fq_name (xs.find ("string").first->named ());
+
+ container = xs_name + L"::" + xsc.get<String> ("container");
+ flags_type = xs_name + L"::" + xsc.get<String> ("flags");
+
+ if (ops.generate_element_type ())
+ element_type = xs_name + L"::" + xsc.get<String> ("element-type");
+
+ properties_type = xs_name + L"::" + xsc.get<String> ("properties");
+
+ if (!ops.suppress_parsing () || ops.generate_serialization ())
+ {
+ error_handler_type = xs_name + L"::" +
+ xsc.get<String> ("error-handler");
+ }
+
+ dom_auto_ptr_ = xs_name + (std >= cxx_version::cxx11
+ ? L"::dom::unique_ptr"
+ : L"::dom::auto_ptr");
+
+ dom_node_key_ = xs_name + L"::dom::" +
+ xsc.get<String> ("tree-node-key");
+
+ if (ops.generate_serialization ())
+ {
+ as_double_type_ = xs_name + L"::" +
+ xsc.get<String> ("as-double");
+
+ as_decimal_type_ = xs_name + L"::" +
+ xsc.get<String> ("as-decimal");
+
+ list_stream_type = xs_name + L"::" +
+ xsc.get<String> ("list-stream");
+
+ namespace_infomap_type = xs_name + L"::" +
+ xsc.get<String> ("namespace-infomap");
+ }
+
+ // istream and ostream are templates and for now use the same
+ // names regardless of the naming convention.
+ //
+ if (!ops.generate_extraction ().empty ())
+ istream_type = xs_name + L"::istream";
+
+ if (!ops.generate_insertion ().empty ())
+ ostream_type = xs_name + L"::ostream";
+ }
+
+ // Xerces-C++ namespace. IntelliSense for some reason does not like
+ // it fully-qualified (maybe because it's a namespace alias).
+ //
+ if (ops.generate_intellisense ())
+ xerces_ns = "xercesc";
+ else
+ xerces_ns = "::xercesc";
+
+ //
+ //
+ if (char_type == L"char")
+ std_ostream_type_ = L"::std::ostream";
+ else if (char_type == L"wchar_t")
+ std_ostream_type_ = L"::std::wostream";
+ else
+ std_ostream_type_ = L"::std::basic_ostream< " + char_type + L" >";
+
+ // Custom type mapping.
+ //
+
+ // Direct custom type mapping.
+ //
+ {
+ NarrowStrings const& v (ops.custom_type ());
+
+ for (NarrowStrings::const_iterator i (v.begin ()),
+ e (v.end ()); i != e; ++i)
+ {
+ String s (*i);
+
+ if (s.empty ())
+ throw InvalidCustomTypeMapping (s, "mapping string is empty");
+
+ // Split the string in two parts at the last '='.
+ //
+ size_t pos (s.rfind ('='));
+
+ // If no delimiter found then both type and base are empty.
+ //
+ if (pos == String::npos)
+ {
+ direct_custom_type_map[s].type.clear ();
+ direct_custom_type_map[s].base.clear ();
+ continue;
+ }
+
+ String name (s, 0, pos);
+ String rest (s, pos + 1);
+
+ // See if we've got the base part after '/'.
+ //
+ pos = rest.rfind ('/');
+
+ String type, base;
+
+ if (pos != String::npos)
+ {
+ type.assign (rest, 0, pos);
+ base.assign (rest, pos + 1, String::npos);
+ }
+ else
+ type = rest;
+
+ // type can be a potentially-qualified template-id. base is
+ // an unqualified C++ name.
+ //
+
+ if (!base.empty () && !cxx_uq_id_expr.match (base))
+ throw InvalidCustomTypeMapping (s, "invalid C++ identifier");
+
+ direct_custom_type_map[name].type = type;
+ direct_custom_type_map[name].base = base;
+ }
+ }
+
+ // Regex custom type mapping.
+ //
+ {
+ NarrowStrings const& v (ops.custom_type_regex ());
+
+ for (NarrowStrings::const_iterator i (v.begin ()),
+ e (v.end ()); i != e; ++i)
+ {
+ String s (*i);
+
+ if (s.empty ())
+ throw InvalidCustomTypeMapping (s, "mapping string is empty");
+
+ wchar_t delimiter (s[0]);
+
+ // First get pattern.
+ //
+ size_t pos (s.find (delimiter, 1));
+
+ if (pos == String::npos)
+ throw InvalidCustomTypeMapping (
+ s, "missing pattern-substitution separator");
+
+ String pat (s, 1, pos - 1);
+ String rest (s, pos + 1);
+
+ String type, base;
+
+ // See if we've got type and base.
+ //
+ if (!rest.empty ())
+ {
+ pos = rest.find (delimiter);
+
+ if (pos == String::npos)
+ throw InvalidCustomTypeMapping (
+ s, "missing pattern-substitution separator");
+
+ type.assign (rest, 0, pos);
+ rest = String (rest, pos + 1);
+
+ if (!rest.empty ())
+ {
+ pos = rest.find (delimiter);
+
+ if (pos == String::npos)
+ throw InvalidCustomTypeMapping (
+ s, "missing pattern-substitution separator");
+
+ base.assign (rest, 0, pos);
+ rest = String (rest, pos + 1);
+
+ if (!rest.empty ())
+ throw InvalidCustomTypeMapping (s, "invalid format");
+ }
+ }
+
+ regex_custom_type_map.push_back (
+ RegexCustomTypeMapInfo (WideRegexPat (pat), type, base));
+ }
+ }
+ }
+
+ Context::
+ Context (Context& c)
+ : CXX::Context (c),
+ options (c.options),
+ counts (c.counts),
+ any_type (c.any_type),
+ any_simple_type (c.any_simple_type),
+ element_type (c.element_type),
+ container (c.container),
+ flags_type (c.flags_type),
+ qname_type (c.qname_type),
+ xs_string_type (c.xs_string_type),
+ properties_type (c.properties_type),
+ error_handler_type (c.error_handler_type),
+ list_stream_type (c.list_stream_type),
+ namespace_infomap_type (c.namespace_infomap_type),
+ parser_type (c.parser_type),
+ std_ostream_type (c.std_ostream_type),
+ ostream_type (c.ostream_type),
+ istream_type (c.istream_type),
+ xerces_ns (c.xerces_ns),
+ dom_auto_ptr (c.dom_auto_ptr),
+ dom_node_key (c.dom_node_key),
+ as_double_type (c.as_double_type),
+ as_decimal_type (c.as_decimal_type),
+ generate_xml_schema (c.generate_xml_schema),
+ doxygen (c.doxygen),
+ polymorphic (c.polymorphic),
+ polymorphic_all (c.polymorphic_all),
+ poly_plate (c.poly_plate),
+ detach (c.detach),
+ fwd_expr (c.fwd_expr),
+ hxx_expr (c.hxx_expr),
+ ixx_expr (c.ixx_expr),
+ ns_scope (c.ns_scope),
+ regex_custom_type_map (c.regex_custom_type_map),
+ direct_custom_type_map (c.direct_custom_type_map),
+ ns_scope_stack (c.ns_scope_stack),
+ cxx_uq_id_expr (c.cxx_uq_id_expr)
+ {
+ }
+
+ Context::
+ Context (Context& c, std::wostream& o)
+ : CXX::Context (c, o),
+ options (c.options),
+ counts (c.counts),
+ any_type (c.any_type),
+ any_simple_type (c.any_simple_type),
+ element_type (c.element_type),
+ container (c.container),
+ flags_type (c.flags_type),
+ qname_type (c.qname_type),
+ xs_string_type (c.xs_string_type),
+ properties_type (c.properties_type),
+ error_handler_type (c.error_handler_type),
+ list_stream_type (c.list_stream_type),
+ namespace_infomap_type (c.namespace_infomap_type),
+ parser_type (c.parser_type),
+ std_ostream_type (c.std_ostream_type),
+ ostream_type (c.ostream_type),
+ istream_type (c.istream_type),
+ xerces_ns (c.xerces_ns),
+ dom_auto_ptr (c.dom_auto_ptr),
+ dom_node_key (c.dom_node_key),
+ as_double_type (c.as_double_type),
+ as_decimal_type (c.as_decimal_type),
+ generate_xml_schema (c.generate_xml_schema),
+ doxygen (c.doxygen),
+ polymorphic (c.polymorphic),
+ polymorphic_all (c.polymorphic_all),
+ poly_plate (c.poly_plate),
+ detach (c.detach),
+ fwd_expr (c.fwd_expr),
+ hxx_expr (c.hxx_expr),
+ ixx_expr (c.ixx_expr),
+ ns_scope (c.ns_scope),
+ regex_custom_type_map (c.regex_custom_type_map),
+ direct_custom_type_map (c.direct_custom_type_map),
+ ns_scope_stack (c.ns_scope_stack),
+ cxx_uq_id_expr (c.cxx_uq_id_expr)
+ {
+ }
+
+ void Context::
+ update_ns_scope ()
+ {
+ ns_scope.clear ();
+
+ bool first (true);
+
+ for (NamespaceStack::iterator i (ns_scope_stack.begin ());
+ i != ns_scope_stack.end ();
+ ++i)
+ {
+ // We only qualify names until the namespace level.
+ //
+ if (first)
+ first = false;
+ else
+ ns_scope += L"::";
+
+ ns_scope += *i;
+ }
+ }
+
+ bool Context::
+ custom_type (SemanticGraph::Type const& t, String& r) const
+ {
+ String const& name (t.name ());
+
+ // First search the direct mapping.
+ //
+ {
+ DirectCustomTypeMap::const_iterator i (
+ direct_custom_type_map.find (name));
+
+ if (i != direct_custom_type_map.end ())
+ {
+ r = i->second.type;
+ return true;
+ }
+ }
+
+
+ // Second search the regex mapping.
+ //
+ for (RegexCustomTypeMap::const_iterator
+ i (regex_custom_type_map.begin ()),
+ e (regex_custom_type_map.end ());
+ i != e; ++i)
+ {
+ if (i->pat.match (name))
+ {
+ // Empty type sub tells us to use the original name.
+ //
+ if (i->type_sub.empty ())
+ {
+ r.clear ();
+ return true;
+ }
+
+ r = i->pat.replace (name, i->type_sub);
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ String Context::
+ custom_type (SemanticGraph::Type const& t) const
+ {
+ String r;
+ if (custom_type (t, r))
+ {
+ // Empty type name tells us to use the original name.
+ //
+ if (r.empty ())
+ r = ename (t);
+ }
+
+ return r;
+ }
+
+ bool Context::
+ renamed_type (SemanticGraph::Type const& t, String& r) const
+ {
+ String const& name (t.name ());
+
+ // First search the direct mapping.
+ //
+ {
+ DirectCustomTypeMap::const_iterator i (
+ direct_custom_type_map.find (name));
+
+ if (i != direct_custom_type_map.end ())
+ {
+ r = i->second.base;
+ return true;
+ }
+ }
+
+
+ // Second search the regex mapping.
+ //
+ for (RegexCustomTypeMap::const_iterator
+ i (regex_custom_type_map.begin ()),
+ e (regex_custom_type_map.end ());
+ i != e; ++i)
+ {
+ if (i->pat.match (name))
+ {
+ if (!i->base_sub.empty ())
+ {
+ r = i->pat.replace (name, i->base_sub);
+ }
+ else
+ r.clear ();
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ void Context::
+ write_annotation (SemanticGraph::Annotation& a)
+ {
+ String const& doc (a.documentation ());
+ wchar_t const* s (doc.c_str ());
+ size_t size (doc.size ());
+
+ // Remove leading and trailing whitespaces.
+ //
+ while (*s == wchar_t (0x20) || *s == wchar_t (0x0A) ||
+ *s == wchar_t (0x0D) || *s == wchar_t (0x09))
+ {
+ s++;
+ size--;
+ }
+
+ if (size != 0)
+ {
+ wchar_t const* e (s + size - 1);
+
+ while (e > s &&
+ (*e == wchar_t (0x20) || *e == wchar_t (0x0A) ||
+ *e == wchar_t (0x0D) || *e == wchar_t (0x09)))
+ --e;
+
+ size = s <= e ? e - s + 1 : 0;
+ }
+
+ if (size != 0)
+ {
+ os << " * ";
+
+ // Go over the data, forcing newline after 80 chars and adding
+ // ' * ' after each new line.
+ //
+ wchar_t const* last_space (0);
+ wchar_t const* b (s);
+ wchar_t const* e (s);
+ bool after_newline (false);
+ bool rogue (false);
+
+ for (; e < s + size; ++e)
+ {
+ unsigned int u (unicode_char (e)); // May advance e.
+
+ // We are going to treat \v and \f as rogue here even though
+ // they can be present in C++ source code.
+ //
+ if (u > 127 || (u < 32 && u != '\t' && u != '\n'))
+ rogue = true;
+
+ if (u == ' ' || u == '\t')
+ {
+ if (after_newline)
+ {
+ if (e == b)
+ b++; // Skip leading spaces after newline.
+
+ continue;
+ }
+ else
+ last_space = e;
+ }
+ else if (after_newline)
+ {
+ os << " * ";
+ after_newline = false;
+ }
+
+ if (u == '\n')
+ {
+ write_rogue_text (b, e - b + 1, rogue);
+
+ b = e + 1;
+ last_space = 0;
+ after_newline = true;
+ rogue = false;
+ continue;
+ }
+
+ if (e - b >= 70 && last_space != 0)
+ {
+ write_rogue_text (b, last_space - b, rogue);
+ os << endl;
+
+ b = last_space + 1;
+ last_space = 0;
+ after_newline = true;
+ // Cannot reset rogue since we don't output the whole string.
+ }
+ }
+
+ if (e != b)
+ write_rogue_text (b, e - b, rogue);
+
+ if (!after_newline)
+ os << endl;
+ }
+ }
+
+ void Context::
+ write_rogue_text (wchar_t const* s, size_t size, bool rogue)
+ {
+ if (!rogue)
+ os.write (s, size);
+ else
+ {
+ for (wchar_t const* p (s); p < s + size; ++p)
+ {
+ unsigned int u (unicode_char (p)); // May advance p.
+
+ // We are going to treat \v and \f as rogue here even though
+ // they can be present in C++ source code.
+ //
+ if (u > 127 || (u < 32 && u != '\t' && u != '\n'))
+ os.put ('?');
+ else
+ os.put (static_cast<wchar_t> (u));
+ }
+ }
+ }
+
+ bool Context::
+ polymorphic_p (SemanticGraph::Type& t)
+ {
+ // IDREF templates cannot be polymorphic.
+ //
+ if (!t.named_p () &&
+ (t.is_a<SemanticGraph::Fundamental::IdRef> () ||
+ t.is_a<SemanticGraph::Fundamental::IdRefs> ()))
+ return false;
+
+ if (polymorphic_all)
+ {
+ bool fund (false);
+ IsFundamentalType test (fund);
+ test.dispatch (t);
+ return !fund;
+ }
+ else
+ return t.context ().get<bool> ("polymorphic");
+ }
+
+ bool Context::
+ anonymous_substitutes_p (SemanticGraph::Type& t)
+ {
+ // IDREF templates cannot match.
+ //
+ if (!t.named_p () &&
+ (t.is_a<SemanticGraph::Fundamental::IdRef> () ||
+ t.is_a<SemanticGraph::Fundamental::IdRefs> ()))
+ return false;
+
+ // See which elements this type classifies.
+ //
+ for (SemanticGraph::Type::ClassifiesIterator i (t.classifies_begin ()),
+ e (t.classifies_end ()); i != e; ++i)
+ {
+ if (SemanticGraph::Element* e =
+ dynamic_cast<SemanticGraph::Element*> (&i->instance ()))
+ {
+ if (e->substitutes_p ())
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // GenerateDefautCtor
+ //
+ GenerateDefaultCtor::
+ GenerateDefaultCtor (Context& c, bool& generate, bool no_base)
+ : Context (c), generate_ (generate), no_base_ (no_base)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ void GenerateDefaultCtor::
+ traverse (SemanticGraph::Complex& c)
+ {
+ // Make sure we figure out if we have any required members before
+ // we base our decision on the base type.
+ //
+ Complex::names (c, names_);
+
+ if (!generate_)
+ Complex::inherits (c, inherits_);
+ }
+
+ void GenerateDefaultCtor::
+ traverse (SemanticGraph::Type&)
+ {
+ if (!no_base_)
+ generate_ = true;
+ }
+
+ void GenerateDefaultCtor::
+ traverse (SemanticGraph::Enumeration&)
+ {
+ if (!no_base_)
+ generate_ = true;
+ }
+
+ void GenerateDefaultCtor::
+ traverse (SemanticGraph::Element& e)
+ {
+ if (!skip (e) && min (e) == 1 && max (e) == 1)
+ generate_ = true;
+ }
+
+ void GenerateDefaultCtor::
+ traverse (SemanticGraph::Attribute& a)
+ {
+ if (min (a) == 1 && !a.fixed_p ())
+ generate_ = true;
+ }
+
+ void GenerateDefaultCtor::
+ traverse (SemanticGraph::Any& a)
+ {
+ if (options.generate_wildcard () &&
+ min (a) == 1 && max (a) == 1)
+ generate_ = true;
+ }
+
+
+ // GenerateFromBaseCtor
+ //
+ GenerateFromBaseCtor::
+ GenerateFromBaseCtor (Context& c, bool& generate)
+ : generate_ (generate),
+ custom_ (false),
+ traverser_ (c, generate, custom_)
+ {
+ inherits_ >> traverser_;
+ }
+
+ void GenerateFromBaseCtor::
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c, inherits_);
+
+ if (!generate_ && custom_)
+ {
+ // We have a customized type in the hierarchy. In this case we
+ // want to generate the c-tor unless base and ultimate-base are
+ // the same (see CtorArgs).
+ //
+ SemanticGraph::Type& b (c.inherits ().base ());
+ generate_ = b.is_a<SemanticGraph::Complex> () &&
+ !b.is_a<SemanticGraph::Enumeration> ();
+ }
+ }
+
+ GenerateFromBaseCtor::Traverser::
+ Traverser (Context& c, bool& generate, bool& custom)
+ : Context (c), generate_ (generate), custom_ (custom)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ void GenerateFromBaseCtor::Traverser::
+ traverse (SemanticGraph::Type& t)
+ {
+ if (!custom_)
+ {
+ String tmp;
+ custom_ = custom_type (t, tmp);
+ }
+ }
+
+ void GenerateFromBaseCtor::Traverser::
+ traverse (SemanticGraph::Complex& c)
+ {
+ names (c, names_);
+
+ if (!generate_)
+ inherits (c, inherits_);
+
+ if (!generate_)
+ traverse (static_cast<SemanticGraph::Type&> (c));
+ }
+
+ void GenerateFromBaseCtor::Traverser::
+ traverse (SemanticGraph::Element& e)
+ {
+ if (!skip (e) && min (e) == 1 && max (e) == 1)
+ generate_ = true;
+ }
+
+ void GenerateFromBaseCtor::Traverser::
+ traverse (SemanticGraph::Attribute& a)
+ {
+ if (min (a) == 1 && !a.fixed_p ())
+ generate_ = true;
+ }
+
+ void GenerateFromBaseCtor::Traverser::
+ traverse (SemanticGraph::Any& a)
+ {
+ if (options.generate_wildcard () &&
+ min (a) == 1 && max (a) == 1)
+ generate_ = true;
+ }
+
+ // HasComplexNonOptArgs
+ //
+ HasComplexPolyNonOptArgs::
+ HasComplexPolyNonOptArgs (Context& c,
+ bool base,
+ bool& complex,
+ bool& poly,
+ bool& clash)
+ : Context (c),
+ complex_ (complex),
+ poly_ (poly),
+ clash_ (clash)
+ {
+ if (base)
+ *this >> inherits_ >> *this;
+
+ *this >> names_ >> *this;
+ }
+
+ void HasComplexPolyNonOptArgs::
+ traverse (SemanticGraph::Complex& c)
+ {
+ // No optimizations: need to check every arg for clashes.
+ //
+ inherits (c, inherits_);
+ names (c, names_);
+ }
+
+ void HasComplexPolyNonOptArgs::
+ traverse (SemanticGraph::Element& e)
+ {
+ if (!skip (e) && min (e) == 1 && max (e) == 1)
+ {
+ bool poly (polymorphic && polymorphic_p (e.type ()));
+
+ bool simple (true);
+ IsSimpleType t (simple);
+ t.dispatch (e.type ());
+
+ if (poly)
+ poly_ = true;
+
+ if (!simple)
+ complex_ = true;
+
+ if (poly && simple)
+ clash_ = false;
+ }
+ }
+
+ // FromBaseCtorArg
+ //
+ FromBaseCtorArg::
+ FromBaseCtorArg (Context& c, CtorArgType at, bool arg)
+ : Context (c), arg_type_ (at), arg_ (arg)
+ {
+ }
+
+ void FromBaseCtorArg::
+ traverse (SemanticGraph::Any& a)
+ {
+ if (!options.generate_wildcard ())
+ return;
+
+ if (min (a) == 1 && max (a) == 1)
+ {
+ String const& name (ename (a));
+
+ os << "," << endl
+ << "const " << xerces_ns << "::DOMElement&";
+
+ if (arg_)
+ os << " " << name;
+ }
+ }
+
+ void FromBaseCtorArg::
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ if (min (e) == 1 && max (e) == 1)
+ {
+ String const& name (ename (e));
+
+ os << "," << endl;
+
+ bool ptr (false);
+
+ switch (arg_type_)
+ {
+ case CtorArgType::complex_auto_ptr:
+ {
+ bool simple (true);
+ IsSimpleType t (simple);
+ t.dispatch (e.type ());
+ ptr = !simple;
+ break;
+ }
+ case CtorArgType::poly_auto_ptr:
+ {
+ ptr = polymorphic && polymorphic_p (e.type ());
+ break;
+ }
+ case CtorArgType::type:
+ break;
+ }
+
+ if (ptr)
+ os << auto_ptr << "< " << etype (e) << " >";
+ else
+ os << "const " << etype (e) << "&";
+
+ if (arg_)
+ os << " " << name;
+ }
+ }
+
+ void FromBaseCtorArg::
+ traverse (SemanticGraph::Attribute& a)
+ {
+ // Note that we are not going to include attributes with
+ // default or required fixed values here. Instead we are
+ // going to default-initialize them.
+ //
+ if (min (a) == 1 && !a.fixed_p ())
+ {
+ String const& name (ename (a));
+
+ os << "," << endl
+ << "const " << etype (a) << "&";
+
+ if (arg_)
+ os << " " << name;
+ }
+ }
+
+ // CtorArgs
+ //
+ CtorArgs::
+ CtorArgs (Context& c, CtorArgType at)
+ : Context (c),
+ arg_type_ (at),
+ base_arg_ (0),
+ first_ (true),
+ member_name_ (c)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ CtorArgs::
+ CtorArgs (Context& c, CtorArgType at, String& base_arg)
+ : Context (c),
+ arg_type_ (at),
+ base_arg_ (&base_arg),
+ first_ (true),
+ member_name_ (c)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ void CtorArgs::
+ traverse (SemanticGraph::Type& t)
+ {
+ os << comma () << "const ";
+
+ member_name_.dispatch (t);
+
+ os << "&";
+
+ if (base_arg_ != 0)
+ {
+ // IDREF templates don't have a name.
+ //
+ *base_arg_ = t.named_p ()
+ ? (L"_xsd_" + ename (t) + L"_base")
+ : L"_xsd_base";
+
+ os << " " << *base_arg_;
+ }
+ }
+
+ void CtorArgs::
+ traverse (SemanticGraph::Enumeration& e)
+ {
+ os << comma () << "const ";
+
+ member_name_.traverse (e);
+
+ os << "&";
+
+ if (base_arg_ != 0)
+ {
+ *base_arg_ = L"_xsd_" + ename (e) + L"_base";
+
+ os << " " << *base_arg_;
+ }
+ }
+
+ void CtorArgs::
+ traverse (SemanticGraph::Any& a)
+ {
+ if (!options.generate_wildcard ())
+ return;
+
+ if (min (a) == 1 && max (a) == 1)
+ {
+ os << comma () << "const " << xerces_ns << "::DOMElement&";
+
+ if (base_arg_ != 0)
+ os << " " << ename (a);
+ }
+ }
+
+ void CtorArgs::
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ if (min (e) == 1 && max (e) == 1)
+ {
+ bool ptr (false);
+
+ switch (arg_type_)
+ {
+ case CtorArgType::complex_auto_ptr:
+ {
+ bool simple (true);
+ IsSimpleType t (simple);
+ t.dispatch (e.type ());
+ ptr = !simple;
+ break;
+ }
+ case CtorArgType::poly_auto_ptr:
+ {
+ ptr = polymorphic && polymorphic_p (e.type ());
+ break;
+ }
+ case CtorArgType::type:
+ break;
+ }
+
+ if (ptr)
+ os << comma () << auto_ptr << "< " << etype (e) << " >";
+ else
+ os << comma () << "const " << etype (e) << "&";
+
+ if (base_arg_ != 0)
+ os << " " << ename (e);
+ }
+ }
+
+ void CtorArgs::
+ traverse (SemanticGraph::Attribute& a)
+ {
+ // Note that we are not going to include attributes with
+ // default or required fixed values here. Instead we are
+ // going to default-initialize them.
+ //
+ if (min (a) == 1 && !a.fixed_p ())
+ {
+ os << comma () << "const " << etype (a) << "&";
+
+ if (base_arg_ != 0)
+ os << " " << ename (a);
+ }
+ }
+
+ String CtorArgs::
+ comma ()
+ {
+ bool tmp (first_);
+ first_ = false;
+ return tmp ? "" : ",\n";
+ }
+
+
+ // CtorArgsWithoutBase
+ //
+ CtorArgsWithoutBase::
+ CtorArgsWithoutBase (Context& c, CtorArgType at, bool arg, bool first)
+ : Context (c), arg_type_ (at), arg_ (arg), first_ (first)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ void CtorArgsWithoutBase::
+ traverse (SemanticGraph::Any& a)
+ {
+ if (!options.generate_wildcard ())
+ return;
+
+ if (min (a) == 1 && max (a) == 1)
+ {
+ os << comma () << "const " << xerces_ns << "::DOMElement&";
+
+ if (arg_)
+ os << " " << ename (a);
+ }
+ }
+
+ void CtorArgsWithoutBase::
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ if (min (e) == 1 && max (e) == 1)
+ {
+ bool ptr (false);
+
+ switch (arg_type_)
+ {
+ case CtorArgType::complex_auto_ptr:
+ {
+ bool simple (true);
+ IsSimpleType t (simple);
+ t.dispatch (e.type ());
+ ptr = !simple;
+ break;
+ }
+ case CtorArgType::poly_auto_ptr:
+ {
+ ptr = polymorphic && polymorphic_p (e.type ());
+ break;
+ }
+ case CtorArgType::type:
+ break;
+ }
+
+ if (ptr)
+ os << comma () << auto_ptr << "< " << etype (e) << " >";
+ else
+ os << comma () << "const " << etype (e) << "&";
+
+ if (arg_)
+ os << " " << ename (e);
+ }
+ }
+
+ void CtorArgsWithoutBase::
+ traverse (SemanticGraph::Attribute& a)
+ {
+ // Note that we are not going to include attributes with
+ // default or required fixed values here. Instead we are
+ // going to default-initialize them.
+ //
+ if (min (a) == 1 && !a.fixed_p ())
+ {
+ os << comma () << "const " << etype (a) << "&";
+
+ if (arg_)
+ os << " " << ename (a);
+ }
+ }
+
+ String CtorArgsWithoutBase::
+ comma ()
+ {
+ bool tmp (first_);
+ first_ = false;
+ return tmp ? "" : ",\n";
+ }
+
+ // GlobalElementBase
+ //
+ bool GlobalElementBase::
+ generate_p (SemanticGraph::Element& e)
+ {
+ if (e.substitutes_p () && ctx_.polymorphic)
+ return true;
+
+ if (!doc_root_p (e))
+ return false;
+
+ // If we are not generating element types nor parsing/serialization
+ // code then we won't generate anything from it.
+ //
+ if (!ctx_.options.generate_element_type () &&
+ ctx_.options.suppress_parsing () &&
+ !ctx_.options.generate_serialization ())
+ return false;
+
+ return true;
+ }
+
+ bool GlobalElementBase::
+ doc_root_p (SemanticGraph::Element& e)
+ {
+ if (!ctx_.options.root_element_first () &&
+ !ctx_.options.root_element_last () &&
+ !ctx_.options.root_element_all () &&
+ !ctx_.options.root_element_none () &&
+ ctx_.options.root_element ().empty ())
+ return true; // By default treat them all.
+
+ if (ctx_.options.root_element_none ())
+ return false;
+
+ if (ctx_.options.root_element_all ())
+ return true;
+
+ if (ctx_.options.root_element_first () &&
+ e.context ().count ("first") != 0)
+ return true;
+
+ if (ctx_.options.root_element_last () &&
+ e.context ().count ("last") != 0)
+ return true;
+
+ NarrowStrings const& names (ctx_.options.root_element ());
+
+ // Hopefully nobody will specify more than a handful of names ;-).
+ //
+ for (NarrowStrings::const_iterator i (names.begin ());
+ i != names.end (); ++i)
+ {
+ String name (*i);
+
+ if (e.name () == name)
+ return true;
+ }
+
+ return false;
+ }
+
+ // Namespace
+ //
+ Namespace::
+ Namespace (Context& c,
+ size_t first,
+ size_t last)
+ : CXX::Namespace (c, *this),
+ GlobalElementBase (c),
+ ctx_ (c),
+ first_ (first),
+ last_ (last),
+ count_ (0)
+ {
+ }
+
+ void Namespace::
+ traverse (Type& ns)
+ {
+ using SemanticGraph::Element;
+
+ if (first_ > last_)
+ CXX::Namespace::traverse (ns);
+ else
+ {
+ bool opened (false);
+
+ for (Type::NamesIterator i (ns.names_begin ());
+ i != ns.names_end (); ++i)
+ {
+ SemanticGraph::Nameable& n (i->named ());
+
+ if (n.is_a<SemanticGraph::Type> () ||
+ (n.is_a<Element> () && generate_p (dynamic_cast<Element&> (n))))
+ {
+ if (count_ >= first_ && count_ <= last_)
+ {
+ if (!opened)
+ {
+ opened = true;
+ pre (ns);
+ }
+
+ edge_traverser ().dispatch (*i);
+ }
+
+ ++count_;
+ }
+ }
+
+ if (opened)
+ post (ns);
+ }
+ }
+
+ void Namespace::
+ enter (Type&, String const& name, bool)
+ {
+ ctx_.enter_ns_scope (name);
+ }
+
+ void Namespace::
+ leave ()
+ {
+ ctx_.leave_ns_scope ();
+ }
+
+ // Includes
+ //
+ void TypeForward::
+ traverse (SemanticGraph::Type& t)
+ {
+ String const& name (ename (t));
+
+ if (String custom = custom_type (t))
+ {
+ String new_name;
+ renamed_type (t, new_name);
+
+ if (new_name)
+ os << "class " << new_name << ";";
+
+ if (custom == name)
+ os << "class " << name << ";";
+ else
+ os << "typedef " << custom << " " << name << ";";
+ }
+ else
+ os << "class " << name << ";";
+ }
+
+ void Includes::
+ traverse_ (SemanticGraph::Uses& u)
+ {
+ // Support for weak (forward) inclusion used in the file-per-type
+ // compilation model.
+ //
+ Type t (type_);
+ bool weak (u.context ().count ("weak"));
+ SemanticGraph::Schema& s (u.schema ());
+
+ if (weak && t == header)
+ {
+ // Generate forward declarations.
+ //
+ if (forward_)
+ t = forward;
+ else
+ {
+ schema_.dispatch (s);
+ return;
+ }
+ }
+
+ if (t == source && !weak)
+ {
+ if (u.user ().context ().count ("type-schema"))
+ {
+ // Strong include into a type schema -- this is a base class.
+ // We have already included its header in our header so it
+ // would seem we don't need to do anything here. There is one
+ // subtle issue, however: Our constructors include arguments
+ // for base members which we simply pass to the base. The base
+ // header has only forward declarations for its members. This
+ // is not a problem if we pass references to base members --
+ // forward declarations are sufficient for this case. The
+ // problematic case is when we pass them as auto/unique_ptr.
+ // Because we pass them by value (which is done to support
+ // unique_ptr move semantics), the compiler needs to be able
+ // to destroy the member, presumably if an exception is thrown.
+ // And for that forward declarations are not enough.
+ //
+ // So what we are going to do here is include all the base
+ // member headers (transitively), just like the base's source
+ // file does.
+ //
+ // Note that we only do this for source since in the inline
+ // case the necessary files are already pulled via the the
+ // .ixx file includes.
+ //
+ Traversal::Schema schema;
+ schema >> *this;
+ schema.dispatch (s);
+ }
+
+ return;
+ }
+
+ SemanticGraph::Path path (
+ s.context ().count ("renamed")
+ ? s.context ().get<SemanticGraph::Path> ("renamed")
+ : u.path ());
+ path.normalize ();
+
+ // Try to use the portable representation of the path. If that
+ // fails, fall back to the native representation.
+ //
+ NarrowString path_str;
+ try
+ {
+ path_str = path.posix_string ();
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ path_str = path.string ();
+ }
+
+ String inc_path;
+
+ switch (t)
+ {
+ case forward:
+ {
+ inc_path = ctx_.fwd_expr->replace (path_str);
+ break;
+ }
+ case header:
+ case source:
+ {
+ inc_path = ctx_.hxx_expr->replace (path_str);
+ break;
+ }
+ case inline_:
+ {
+ if (weak)
+ {
+ inc_path = ctx_.hxx_expr->replace (path_str);
+ ctx_.os << "#include " << ctx_.process_include_path (inc_path)
+ << endl;
+ }
+
+ inc_path = ctx_.ixx_expr->replace (path_str);
+ break;
+ }
+ }
+
+ ctx_.os << "#include " << ctx_.process_include_path (inc_path) << endl
+ << endl;
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/elements.hxx b/xsd/xsd/cxx/tree/elements.hxx
new file mode 100644
index 0000000..ed5eb77
--- /dev/null
+++ b/xsd/xsd/cxx/tree/elements.hxx
@@ -0,0 +1,2118 @@
+// file : xsd/cxx/tree/elements.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_ELEMENTS_HXX
+#define XSD_CXX_TREE_ELEMENTS_HXX
+
+#include <map>
+#include <set>
+#include <deque>
+#include <vector>
+#include <sstream>
+
+#include <libcutl/re.hxx>
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/elements.hxx>
+
+#include <xsd/cxx/tree/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ struct Counts
+ {
+ Counts ()
+ : global_types (0),
+ global_elements (0),
+ generated_global_elements (0),
+ complexity_total (0)
+ {
+ }
+
+ size_t global_types;
+ size_t global_elements;
+ size_t generated_global_elements;
+
+ // Complexity value for each global type and generated global
+ // element, in order.
+ //
+ std::vector<size_t> complexity;
+ size_t complexity_total;
+ };
+
+ struct InvalidCustomTypeMapping
+ {
+ InvalidCustomTypeMapping (String const& mapping,
+ String const& reason)
+ : mapping_ (mapping), reason_ (reason)
+ {
+ }
+
+ String const&
+ mapping () const
+ {
+ return mapping_;
+ }
+
+ String const&
+ reason () const
+ {
+ return reason_;
+ }
+
+ private:
+ String mapping_;
+ String reason_;
+ };
+
+ // A set of potentially qualified XML Schema type names.
+ //
+ struct TypeNameSet
+ {
+ template <typename I>
+ TypeNameSet (I begin, I end)
+ {
+ for (; begin != end; ++begin)
+ insert (*begin);
+ }
+
+ void
+ insert (String const& name)
+ {
+ size_t p (name.rfind ('#'));
+
+ if (p == String::npos)
+ unames_.insert (name);
+ else
+ qnames_.insert (name);
+ }
+
+ bool
+ find (SemanticGraph::Type& t)
+ {
+ if (!unames_.empty ())
+ {
+ if (unames_.find (t.name ()) != unames_.end ())
+ return true;
+ }
+
+ if (!qnames_.empty ())
+ {
+ if (qnames_.find (t.scope ().name () + L"#" + t.name ()) !=
+ qnames_.end ())
+ return true;
+ }
+
+ return false;
+ }
+
+ private:
+ typedef std::set<String> StringSet;
+
+ StringSet unames_;
+ StringSet qnames_;
+ };
+
+ //
+ //
+ class Context: public CXX::Context
+ {
+ public:
+ typedef cutl::re::regexsub Regex;
+ typedef cutl::re::wregex WideRegexPat;
+
+ typedef Tree::options options_type;
+
+ struct DirectCustomTypeMapInfo
+ {
+ DirectCustomTypeMapInfo (String const& t = L"",
+ String const& b = L"")
+ : type (t), base (b)
+ {
+ }
+
+ String type;
+ String base;
+ };
+
+ struct RegexCustomTypeMapInfo
+ {
+ RegexCustomTypeMapInfo (WideRegexPat const& p,
+ String const& t,
+ String const& b)
+ : pat (p), type_sub (t), base_sub (b)
+ {
+ }
+
+ WideRegexPat pat;
+ String type_sub;
+ String base_sub;
+ };
+
+ typedef std::vector<RegexCustomTypeMapInfo> RegexCustomTypeMap;
+ typedef std::map<String, DirectCustomTypeMapInfo> DirectCustomTypeMap;
+
+ public:
+ Context (std::wostream& o,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ options_type const& ops,
+ Counts const& counts_,
+ bool generate_xml_schema,
+ StringLiteralMap const*,
+ Regex const* fwd_expr,
+ Regex const* hxx_expr,
+ Regex const* ixx_expr);
+
+ protected:
+ Context (Context& c);
+ Context (Context& c, std::wostream& o);
+
+ // Custom type mapping.
+ //
+ public:
+ // Returns empty string if custom mapping is not required.
+ //
+ String
+ custom_type (SemanticGraph::Type const&) const;
+
+ // Returns true if custom mapping is required. name is
+ // populated with the custom type name or empty if the
+ // original name should be used.
+ //
+ bool
+ custom_type (SemanticGraph::Type const&, String& name) const;
+
+ // Returns true if this type has been renamed as part of the
+ // customization process. If the function returns true, the
+ // name string is populated with the new name or empty if
+ // the type should not be generated at all.
+ //
+ bool
+ renamed_type (SemanticGraph::Type const&, String& name) const;
+
+ public:
+ // Performs a number of processing steps, including forcing a new
+ // line after 80 characters as well as "commentizing" the text by
+ // adding '* ' after each newline.
+ //
+ void
+ write_annotation (SemanticGraph::Annotation&);
+
+ //
+ //
+ public:
+ static bool
+ ordered_p (SemanticGraph::Type const& t)
+ {
+ return t.context ().count ("ordered") &&
+ t.context ().get<bool> ("ordered");
+ }
+
+ // Check if we are generating mixed support for this type. We only
+ // do it for ordered types.
+ //
+ static bool
+ mixed_p (SemanticGraph::Complex const& c)
+ {
+ return c.mixed_p () && ordered_p (c);
+ }
+
+ bool
+ polymorphic_p (SemanticGraph::Type&);
+
+ bool
+ anonymous_p (SemanticGraph::Type const& t)
+ {
+ return t.context ().count ("anonymous");
+ }
+
+ // Return true if this anonymous type is defined in an element
+ // that belongs to a substitution group.
+ //
+ bool
+ anonymous_substitutes_p (SemanticGraph::Type&);
+
+ // Escaped names.
+ //
+ public:
+ // Accessor name.
+ //
+ static String const&
+ eaname (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("aname");
+ }
+
+ static String const&
+ eaname (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<String> ("aname");
+ }
+
+ static String const&
+ eaname (SemanticGraph::AnyAttribute const& a)
+ {
+ return a.context ().get<String> ("aname");
+ }
+
+ // Modifier name.
+ //
+ static String const&
+ emname (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("mname");
+ }
+
+ static String const&
+ emname (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<String> ("mname");
+ }
+
+ static String const&
+ emname (SemanticGraph::AnyAttribute const& a)
+ {
+ return a.context ().get<String> ("mname");
+ }
+
+ // Detach name.
+ //
+ static String const&
+ edname (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("dname");
+ }
+
+ //
+ //
+ static String const&
+ etype (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("type");
+ }
+
+ static String const&
+ etraits (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("traits");
+ }
+
+ static String const&
+ econtainer (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("container");
+ }
+
+ static String const&
+ econtainer (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<String> ("container");
+ }
+
+ static String const&
+ econtainer (SemanticGraph::AnyAttribute const& a)
+ {
+ return a.context ().get<String> ("container");
+ }
+
+ static String const&
+ eiterator (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("iterator");
+ }
+
+ static String const&
+ eiterator (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<String> ("iterator");
+ }
+
+ static String const&
+ eiterator (SemanticGraph::AnyAttribute const& a)
+ {
+ return a.context ().get<String> ("iterator");
+ }
+
+ static String const&
+ econst_iterator (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("const-iterator");
+ }
+
+ static String const&
+ econst_iterator (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<String> ("const-iterator");
+ }
+
+ static String const&
+ econst_iterator (SemanticGraph::AnyAttribute const& a)
+ {
+ return a.context ().get<String> ("const-iterator");
+ }
+
+ static String const&
+ emember (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("member");
+ }
+
+ static String const&
+ emember (SemanticGraph::Any const& a)
+ {
+ return a.context ().get<String> ("member");
+ }
+
+ static String const&
+ emember (SemanticGraph::AnyAttribute const& a)
+ {
+ return a.context ().get<String> ("member");
+ }
+
+ static String const&
+ edefault_value (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("default-value");
+ }
+
+ static String const&
+ edefault_value_member (SemanticGraph::Member const& m)
+ {
+ return m.context ().get<String> ("default-value-member");
+ }
+
+ // Underlying enum value type.
+ //
+ static String const&
+ evalue (SemanticGraph::Enumeration const& e)
+ {
+ return e.context ().get<String> ("value");
+ }
+
+ // dom_document
+ //
+ static bool
+ edom_document_p (SemanticGraph::Complex const& c)
+ {
+ return c.context ().count ("dom-document");
+ }
+
+ static String const&
+ edom_document (SemanticGraph::Complex const& c)
+ {
+ return c.context ().get<String> ("dom-document");
+ }
+
+ static bool
+ edom_document_member_p (SemanticGraph::Complex const& c)
+ {
+ return c.context ().count ("dom-document-member");
+ }
+
+ static String const&
+ edom_document_member (SemanticGraph::Complex const& c)
+ {
+ return c.context ().get<String> ("dom-document-member");
+ }
+
+ // Parsing and serialization function names.
+ //
+ static String const&
+ eparser (SemanticGraph::Element const& e)
+ {
+ return e.context ().get<String> ("parser");
+ }
+
+ static String const&
+ eserializer (SemanticGraph::Element const& e)
+ {
+ return e.context ().get<String> ("serializer");
+ }
+
+ public:
+ void
+ enter_ns_scope (String const& name)
+ {
+ ns_scope_stack.push_back (name);
+ update_ns_scope ();
+ }
+
+ void
+ leave_ns_scope ()
+ {
+ ns_scope_stack.pop_back ();
+ update_ns_scope ();
+ }
+
+ private:
+ void
+ update_ns_scope ();
+
+ private:
+ // Write text that may contain characters that we will have
+ // to escape (indicated by the rogue flag).
+ //
+ void
+ write_rogue_text (wchar_t const* s, size_t size, bool rogue);
+
+ public:
+ options_type const& options;
+ Counts const& counts;
+ String& any_type;
+ String& any_simple_type;
+ String& element_type;
+ String& container;
+ String& flags_type;
+ String& qname_type;
+ String& xs_string_type;
+ String& properties_type;
+ String& error_handler_type;
+ String& list_stream_type;
+ String& namespace_infomap_type;
+ String& parser_type;
+ String& std_ostream_type;
+ String& ostream_type;
+ String& istream_type;
+ String& xerces_ns;
+ String& dom_auto_ptr;
+ String& dom_node_key;
+ String& as_double_type;
+ String& as_decimal_type;
+
+ bool& generate_xml_schema;
+ bool& doxygen;
+ bool polymorphic;
+ bool polymorphic_all;
+ unsigned long poly_plate;
+ bool detach;
+
+ Regex const* fwd_expr;
+ Regex const* hxx_expr;
+ Regex const* ixx_expr;
+
+ String& ns_scope;
+
+ RegexCustomTypeMap& regex_custom_type_map;
+ DirectCustomTypeMap& direct_custom_type_map;
+
+ private:
+ String any_type_;
+ String any_simple_type_;
+ String element_type_;
+ String container_;
+ String flags_type_;
+ String qname_type_;
+ String xs_string_type_;
+ String properties_type_;
+ String error_handler_type_;
+ String list_stream_type_;
+ String namespace_infomap_type_;
+ String parser_type_;
+ String std_ostream_type_;
+ String ostream_type_;
+ String istream_type_;
+ String xerces_ns_;
+ String dom_auto_ptr_;
+ String dom_node_key_;
+ String as_double_type_;
+ String as_decimal_type_;
+
+ bool generate_xml_schema_;
+ bool doxygen_;
+
+ typedef std::deque<String> NamespaceStack;
+ typedef std::deque<String> ScopeStack;
+
+ String ns_scope_;
+
+ NamespaceStack& ns_scope_stack;
+ NamespaceStack ns_scope_stack_;
+
+ RegexCustomTypeMap regex_custom_type_map_;
+ DirectCustomTypeMap direct_custom_type_map_;
+
+ private:
+ WideRegexPat const cxx_uq_id_expr_;
+ WideRegexPat const& cxx_uq_id_expr;
+ };
+
+ // Check whether this Schema type maps to a fundamental C++ type.
+ //
+ struct IsFundamentalType: Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal
+
+ {
+ IsFundamentalType (bool& r)
+ : r_ (r)
+ {
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger&)
+ {
+ r_ = true;
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean&)
+ {
+ r_ = true;
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal&)
+ {
+ r_ = true;
+ }
+
+ private:
+ bool& r_;
+ };
+
+ // Check whether this is a string-based type.
+ //
+ struct IsStringBasedType: Traversal::Complex,
+ Traversal::Union,
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language
+ {
+ IsStringBasedType (bool& r)
+ : r_ (r)
+ {
+ *this >> inherits_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c, inherits_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Union&)
+ {
+ // Current mapping of union is string-based.
+ //
+ r_ = true;
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName&)
+ {
+ r_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language&)
+ {
+ r_ = true;
+ }
+
+ private:
+ bool& r_;
+ Traversal::Inherits inherits_;
+ };
+
+
+ // Check whether this is a enumeration-based type.
+ //
+ struct IsEnumBasedType: Traversal::Complex
+ {
+ IsEnumBasedType (SemanticGraph::Enumeration*& e)
+ : enum_ (e)
+ {
+ *this >> inherits_;
+
+ inherits_ >> *this;
+ inherits_ >> enum_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ inherits (c, inherits_);
+ }
+
+ private:
+ struct Enumeration: Traversal::Enumeration
+ {
+ Enumeration (SemanticGraph::Enumeration*& e)
+ : e_ (e)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (e_ == 0)
+ e_ = &e;
+ }
+
+ private:
+ SemanticGraph::Enumeration*& e_;
+ };
+
+
+ private:
+ Enumeration enum_;
+ Traversal::Inherits inherits_;
+ };
+
+
+ //
+ //
+ struct MemberTypeName : Context,
+ Traversal::Type,
+ Traversal::List,
+ Traversal::Union,
+ Traversal::Complex,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities
+
+ {
+ MemberTypeName (Context& c)
+ : Context (c)
+ {
+ }
+
+ MemberTypeName (Context& c, std::wostream& o)
+ : Context (c, o)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type&)
+ {
+ abort ();
+ }
+
+ virtual void
+ traverse (SemanticGraph::List& l)
+ {
+ os << fq_name (l);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Union& u)
+ {
+ os << fq_name (u);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ os << fq_name (c);
+ }
+
+ // anyType & anySimpleType.
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ os << fq_name (t);
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ os << fq_name (t);
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ os << fq_name (t);
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ os << fq_name (t);
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ os << fq_name (t);
+ }
+
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ os << fq_name (t);
+ }
+
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ if (t.named_p ())
+ {
+ // IDREF<anyType>
+ //
+ os << fq_name (t);
+ }
+ else
+ {
+ SemanticGraph::Nameable& ncname (
+ xs_ns ().find ("NCName").first->named ());
+
+ os << "::xsd::cxx::tree::idref< " << char_type << ", " <<
+ fq_name (ncname) << ", " <<
+ type_name (t.argumented ().type ()) << " >";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ if (t.named_p ())
+ {
+ // IDREFS<anyType>
+ //
+ os << fq_name (t);
+ }
+ else
+ {
+ SemanticGraph::Nameable& ncname (
+ xs_ns ().find ("NCName").first->named ());
+
+ os << "::xsd::cxx::tree::idrefs< " << char_type << ", " <<
+ any_simple_type << ", ::xsd::cxx::tree::idref< " <<
+ char_type << ", " << fq_name (ncname) << ", " <<
+ type_name (t.argumented ().type ()) << " > >";
+ }
+ }
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ os << fq_name (t);
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ os << fq_name (t);
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ os << fq_name (t);
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity& t)
+ {
+ os << fq_name (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities& t)
+ {
+ os << fq_name (t);
+ }
+
+ private:
+ // For idref/idrefs
+ //
+ String
+ type_name (SemanticGraph::Type& t)
+ {
+ // This type is always named.
+ //
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ //
+ //
+ struct BaseTypeName : MemberTypeName
+ {
+ BaseTypeName (Context& c)
+ : MemberTypeName (c)
+ {
+ }
+
+ BaseTypeName (Context& c, std::wostream& o)
+ : MemberTypeName (c, o)
+ {
+ }
+
+ virtual void
+ fundamental_base (SemanticGraph::Type& t)
+ {
+ os << "::xsd::cxx::tree::fundamental_base< " <<
+ fq_name (t) << ", " << char_type << ", " <<
+ any_simple_type << " >";
+ }
+
+ // Integrals.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ fundamental_base (t);
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ fundamental_base (t);
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ fundamental_base (t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ os << "::xsd::cxx::tree::fundamental_base< " <<
+ fq_name (t) << ", " << char_type << ", " <<
+ any_simple_type << ", " <<
+ "::xsd::cxx::tree::schema_type::double_ >";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ os << "::xsd::cxx::tree::fundamental_base< " <<
+ fq_name (t) << ", " << char_type << ", " <<
+ any_simple_type << ", " <<
+ "::xsd::cxx::tree::schema_type::decimal >";
+ }
+ };
+
+ // Initial value should be true.
+ //
+ struct IsSimpleType: Traversal::Complex,
+ Traversal::Member,
+ Traversal::Any,
+ Traversal::AnyAttribute
+ {
+ IsSimpleType (bool& v)
+ : v_ (v)
+ {
+ *this >> names_ >> *this;
+ *this >> inherits_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ if (c.mixed_p ())
+ v_ = false;
+
+ if (v_)
+ names (c, names_);
+
+ if (v_)
+ inherits (c, inherits_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member&)
+ {
+ v_ = false;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any&)
+ {
+ v_ = false;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute&)
+ {
+ v_ = false;
+ }
+
+ private:
+ bool& v_;
+ Traversal::Names names_;
+ Traversal::Inherits inherits_;
+ };
+
+ // Test whether we need to generate default c-tor. Note that we are not
+ // interested in anyAttribute since it is always mapped to a sequence.
+ //
+ struct GenerateDefaultCtor: Traversal::Complex,
+ Traversal::Enumeration,
+ Traversal::Type,
+ Traversal::Element,
+ Traversal::Attribute,
+ Traversal::Any,
+ Context
+ {
+ // generate should initially be false.
+ //
+ GenerateDefaultCtor (Context&, bool& generate, bool no_base);
+
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ virtual void
+ traverse (SemanticGraph::Type&);
+
+ virtual void
+ traverse (SemanticGraph::Enumeration&);
+
+ virtual void
+ traverse (SemanticGraph::Element&);
+
+ virtual void
+ traverse (SemanticGraph::Attribute&);
+
+ virtual void
+ traverse (SemanticGraph::Any&);
+
+ private:
+ bool& generate_;
+ bool no_base_;
+
+ private:
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+ };
+
+ // Test whether we need to generate from-base c-tor.
+ //
+ struct GenerateFromBaseCtor: Traversal::Complex
+ {
+ // generate should initially be false.
+ //
+ GenerateFromBaseCtor (Context& c, bool& generate);
+
+ virtual void
+ traverse (SemanticGraph::Complex& c);
+
+ private:
+ bool& generate_;
+ bool custom_;
+
+ // Note that we are not interested in anyAttribute since it is always
+ // mapped to a sequence.
+ //
+ struct Traverser: Traversal::Type,
+ Traversal::Complex,
+ Traversal::Element,
+ Traversal::Attribute,
+ Traversal::Any,
+ Context
+ {
+ Traverser (Context& c, bool& generate, bool& custom);
+
+ virtual void
+ traverse (SemanticGraph::Type&);
+
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ virtual void
+ traverse (SemanticGraph::Attribute&);
+
+ virtual void
+ traverse (SemanticGraph::Element&);
+
+ virtual void
+ traverse (SemanticGraph::Any&);
+
+ private:
+ bool& generate_;
+ bool& custom_;
+
+ private:
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+ } traverser_;
+
+ Traversal::Inherits inherits_;
+ };
+
+ // Test whether the type has any non-optional element of complex
+ // (has attributes/elements) and polymorpjic types.
+ //
+ struct HasComplexPolyNonOptArgs: Traversal::Complex,
+ Traversal::Element,
+ Context
+ {
+ // complex and poly should initially be false. clash
+ // should initially be true.
+ //
+ HasComplexPolyNonOptArgs (Context& c,
+ bool including_base,
+ bool& complex,
+ bool& poly,
+ bool& clash);
+
+ virtual void
+ traverse (SemanticGraph::Complex&);
+
+ virtual void
+ traverse (SemanticGraph::Element&);
+
+ private:
+ bool& complex_;
+ bool& poly_;
+ bool& clash_;
+
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+ };
+
+ // Contructor argument types.
+ //
+ struct CtorArgType
+ {
+ enum Value
+ {
+ type,
+ complex_auto_ptr,
+ poly_auto_ptr
+ };
+
+ CtorArgType (Value v = Value (0)) : v_ (v) {}
+ operator Value () const {return v_;}
+
+ private:
+ Value v_;
+ };
+
+ // Immediate non-optional member. Note that AnyAttribute is always
+ // mapped to a sequence.
+ //
+ struct FromBaseCtorArg: Traversal::Any,
+ Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ FromBaseCtorArg (Context& c, CtorArgType, bool arg);
+
+ virtual void
+ traverse (SemanticGraph::Any&);
+
+ virtual void
+ traverse (SemanticGraph::Attribute&);
+
+ virtual void
+ traverse (SemanticGraph::Element&);
+
+ private:
+ CtorArgType arg_type_;
+ bool arg_;
+ };
+
+ // List of all non-optional members and a simple base. Note that
+ // AnyAttribute is always mapped to a sequence.
+ //
+ struct CtorArgs: Traversal::Complex,
+ Traversal::Enumeration,
+ Traversal::Type,
+ Traversal::Any,
+ Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ // The second version outputs the argument name and stores
+ // in in the base_arg string.
+ //
+ CtorArgs (Context&, CtorArgType);
+ CtorArgs (Context&, CtorArgType, String& base_arg);
+
+ virtual void
+ traverse (SemanticGraph::Type&);
+
+ virtual void
+ traverse (SemanticGraph::Enumeration&);
+
+ virtual void
+ traverse (SemanticGraph::Any&);
+
+ virtual void
+ traverse (SemanticGraph::Attribute&);
+
+ virtual void
+ traverse (SemanticGraph::Element&);
+
+ private:
+ String
+ comma ();
+
+ private:
+ CtorArgType arg_type_;
+ String base_;
+ String* base_arg_;
+ bool first_;
+
+ private:
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+
+ MemberTypeName member_name_;
+ };
+
+
+ // Check whether we need to generate c-tor without the base argument.
+ //
+ struct GenerateWithoutBaseCtor: Traversal::List,
+ Traversal::Union,
+ Traversal::Complex,
+ Traversal::Enumeration,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary
+ {
+ // generate should initially be false.
+ //
+ GenerateWithoutBaseCtor (bool& generate)
+ : generate_ (generate)
+ {
+ *this >> inherits_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::List&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Union&)
+ {
+ // No default initialization.
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ Complex::inherits (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Enumeration&)
+ {
+ // No default initialization.
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyType&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::String&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary&)
+ {
+ generate_ = true;
+ }
+
+ private:
+ bool& generate_;
+ Traversal::Inherits inherits_;
+ };
+
+
+ // List of all non-optional members sans simple base. Note that
+ // AnyAttribute is always mapped to a sequence.
+ //
+ struct CtorArgsWithoutBase: Traversal::Complex,
+ Traversal::Any,
+ Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ CtorArgsWithoutBase (Context& c, CtorArgType, bool arg, bool first);
+
+ virtual void
+ traverse (SemanticGraph::Any&);
+
+ virtual void
+ traverse (SemanticGraph::Element&);
+
+ virtual void
+ traverse (SemanticGraph::Attribute&);
+
+ private:
+ String
+ comma ();
+
+ private:
+ CtorArgType arg_type_;
+ bool arg_;
+ bool first_;
+
+ private:
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+ };
+
+ //
+ //
+ struct GlobalElementBase
+ {
+ GlobalElementBase (Context& c)
+ : ctx_ (c)
+ {
+ }
+
+ bool
+ generate_p (SemanticGraph::Element&);
+
+ bool
+ doc_root_p (SemanticGraph::Element&);
+
+ private:
+ Context& ctx_;
+ };
+
+
+ //
+ //
+ struct Namespace: CXX::Namespace,
+ GlobalElementBase,
+ CXX::Namespace::ScopeTracker
+ {
+ Namespace (Context&,
+ size_t first = 1,
+ size_t last = 0);
+
+ virtual void
+ traverse (Type&);
+
+ protected:
+ virtual void
+ enter (Type&, String const& name, bool last);
+
+ virtual void
+ leave ();
+
+ protected:
+ Context& ctx_;
+
+ private:
+ size_t first_;
+ size_t last_;
+ size_t count_;
+ };
+
+ //
+ //
+ struct DocumentedNamespace: Namespace
+ {
+ DocumentedNamespace (Context& c)
+ : Namespace (c)
+ {
+ }
+
+ virtual void
+ enter (Type& ns, String const& name, bool last)
+ {
+ Namespace::enter (ns, name, last);
+
+ // Only add documentation to the innermost namespace.
+ //
+ if (ctx_.doxygen && name && last)
+ {
+ ctx_.os << "/**" << endl
+ << " * @brief C++ namespace for the %" <<
+ ctx_.comment (ns.name ()) << endl
+ << " * schema namespace." << endl
+ << " */" << endl;
+ }
+ }
+ };
+
+ //
+ //
+ struct TypeForward: Traversal::Type, Context
+ {
+ TypeForward (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t);
+ };
+
+ struct Includes: Traversal::Imports,
+ Traversal::Includes
+ {
+ enum Type
+ {
+ forward,
+ header,
+ inline_,
+ source
+ };
+
+ Includes (Context& c, Type type)
+ : ctx_ (c),
+ type_ (type),
+ forward_ (c.options.generate_forward ()),
+ namespace_ (c),
+ type_forward_ (c)
+ {
+ schema_ >> schema_names_ >> namespace_ >> names_ >> type_forward_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Imports& i)
+ {
+ traverse_ (i);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Includes& i)
+ {
+ traverse_ (i);
+ }
+
+ private:
+ void
+ traverse_ (SemanticGraph::Uses&);
+
+ private:
+ Context& ctx_;
+ Type type_;
+ bool forward_;
+
+ Traversal::Schema schema_;
+ Traversal::Names schema_names_;
+ Namespace namespace_;
+ Traversal::Names names_;
+ TypeForward type_forward_;
+ };
+
+ //
+ //
+ struct FundIncludes: Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+ Context
+ {
+ FundIncludes (Context& c, String const& prefix)
+ : Context (c), prefix_ (prefix),
+ long_ (false), unsigned_long_ (false)
+ {
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ gen_include (t, "byte.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ gen_include (t, "unsigned-byte.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ gen_include (t, "short.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ gen_include (t, "unsigned-short.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ gen_include (t, "int.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ gen_include (t, "unsigned-int.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ if (!long_)
+ long_ = gen_include (t, "long.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ if (!unsigned_long_)
+ unsigned_long_ = gen_include (t, "unsigned-long.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ if (!long_)
+ long_ = gen_include (t, "long.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ if (!long_)
+ long_ = gen_include (t, "long.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ if (!unsigned_long_)
+ unsigned_long_ = gen_include (t, "unsigned-long.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ if (!unsigned_long_)
+ unsigned_long_ = gen_include (t, "unsigned-long.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ if (!long_)
+ long_ = gen_include (t, "long.hxx");
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ gen_include (t, "boolean.hxx");
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ gen_include (t, "float.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ gen_include (t, "double.hxx");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ gen_include (t, "decimal.hxx");
+ }
+
+ private:
+ bool
+ gen_include (SemanticGraph::Type& t, String const& file)
+ {
+ String custom;
+
+ // XML Schema built-in type customization is only possible when
+ // we are generating separate header.
+ //
+ if (generate_xml_schema && custom_type (t, custom))
+ {
+ String new_name;
+ renamed_type (t, new_name);
+
+ if (!new_name)
+ return false;
+ }
+
+ os << "#include <xsd/cxx/tree/" << prefix_ << "/" << file << ">"
+ << endl;
+
+ return true;
+ }
+
+ private:
+ String prefix_;
+ bool long_;
+ bool unsigned_long_;
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_ELEMENTS_HXX
diff --git a/xsd/xsd/cxx/tree/fundamental-header.hxx b/xsd/xsd/cxx/tree/fundamental-header.hxx
new file mode 100644
index 0000000..a470154
--- /dev/null
+++ b/xsd/xsd/cxx/tree/fundamental-header.hxx
@@ -0,0 +1,1335 @@
+// file : xsd/cxx/tree/fundamental-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_FUNDAMENTAL_HEADER_HXX
+#define XSD_CXX_TREE_FUNDAMENTAL_HEADER_HXX
+
+#include <set>
+#include <vector>
+#include <algorithm>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ struct FundamentalNamespace : DocumentedNamespace,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities,
+ Context
+ {
+ FundamentalNamespace (Context& c)
+ : DocumentedNamespace (c),
+ Context (c),
+ export_ (c.options.export_xml_schema () && type_exp)
+ {
+ *this >> names_ >> *this;
+
+ if (export_)
+ xs_ns_ = ns_name (xs_ns ());
+ }
+
+ void
+ gen_typedef (String const& name,
+ String const& type,
+ String const& arg1 = L"",
+ String const& arg2 = L"",
+ String const& arg3 = L"",
+ bool export_type = true)
+ {
+ os << "typedef " << type;
+
+ // Use unqualified arguments since we are in the same
+ // namespace.
+ //
+ if (arg1)
+ {
+ os << arg1;
+
+ if (arg2)
+ {
+ os << ", " << arg2;
+
+ if (arg3)
+ os << ", " << arg3;
+ }
+
+ os << " >";
+ }
+
+ os << " " << name << ";";
+
+ if (export_type && export_ && type.find (L'<') != String::npos)
+ {
+ String s (type);
+
+ // Use qualified arguments.
+ //
+ if (arg1)
+ {
+ s += xs_ns_;
+ s += L"::";
+ s += arg1;
+
+ if (arg2)
+ {
+ s += L", ";
+ s += xs_ns_;
+ s += L"::";
+ s += arg2;
+
+ if (arg3)
+ {
+ s += L", ";
+ s += xs_ns_;
+ s += L"::";
+ s += arg3;
+ }
+ }
+
+ s += " >";
+ }
+
+ if (exports_set_.count (s) == 0)
+ {
+ exports_.push_back (s);
+ exports_set_.insert (s);
+ }
+ }
+ }
+
+ String
+ built_in_type (SemanticGraph::Type& t,
+ String const& type,
+ String const& arg1 = L"",
+ String const& arg2 = L"",
+ String const& arg3 = L"")
+ {
+ String custom;
+
+ String name (ename (t));
+
+ // XML Schema built-in type customization is only possible when
+ // we are generating separate header.
+ //
+ if (generate_xml_schema && custom_type (t, custom))
+ {
+ if (custom.empty ())
+ custom = name;
+
+ String new_name;
+ renamed_type (t, new_name);
+
+ if (new_name)
+ {
+ gen_typedef (new_name, type, arg1, arg2, arg3);
+
+ if (doxygen)
+ os << endl;
+ }
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief C++ type corresponding to the " <<
+ comment (t.name ()) << " XML Schema" << endl
+ << " * built-in type." << endl
+ << " */" << endl;
+
+ if (custom == name)
+ os << "class " << name << ";";
+ else
+ os << "typedef " << custom << " " << name << ";";
+
+ if (doxygen)
+ os << endl;
+ }
+ else
+ {
+ // Otherwise generate simple typedef.
+ //
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief C++ type corresponding to the " <<
+ comment (t.name ()) << " XML Schema" << endl
+ << " * built-in type." << endl
+ << " */" << endl;
+
+ gen_typedef (name, type, arg1, arg2, arg3);
+
+ if (doxygen)
+ os << endl;
+ }
+
+ return name;
+ }
+
+ // anyType and anySimpleType
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ os << "// anyType and anySimpleType." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ type_ = built_in_type (t, "::xsd::cxx::tree::type");
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ simple_type_ = built_in_type (
+ t, L"::xsd::cxx::tree::simple_type< " + char_type + L", ", type_);
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Alias for the anyType type." << endl
+ << " */" << endl;
+
+ gen_typedef (xs_ns ().context().get<String> ("container"),
+ "::xsd::cxx::tree::type");
+
+ os << endl;
+
+ if (doxygen)
+ os << endl;
+ }
+
+ // Integrals.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ os << "// 8-bit" << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "signed char");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ built_in_type (t, "unsigned char");
+ os << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ os << "// 16-bit" << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "short");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ built_in_type (t, "unsigned short");
+ os << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ os << "// 32-bit" << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "int");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ built_in_type (t, "unsigned int");
+ os << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ os << "// 64-bit" << endl
+ << "//" <<endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "long long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ built_in_type (t, "unsigned long long");
+ os << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ os << "// Supposed to be arbitrary-length integral types." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "long long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ built_in_type (t, "long long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ built_in_type (t, "unsigned long long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ built_in_type (t, "unsigned long long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ built_in_type (t, "long long");
+ os << endl;
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ os << "// Boolean." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "bool");
+
+ os << endl;
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ os << "// Floating-point types." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (t, "float");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ double_ = built_in_type (t, "double");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ decimal_ = built_in_type (t, "double");
+ os << endl;
+ }
+
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ os << "// String types." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ string_ = built_in_type (
+ t, L"::xsd::cxx::tree::string< " + char_type + L", ", simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ norm_string_ = built_in_type (
+ t,
+ L"::xsd::cxx::tree::normalized_string< " + char_type + L", ",
+ string_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ token_ = built_in_type (
+ t, L"::xsd::cxx::tree::token< " + char_type + L", ", norm_string_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ nmtoken_ = built_in_type (
+ t, L"::xsd::cxx::tree::nmtoken< " + char_type + L", ", token_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::nmtokens< " + char_type + L", ",
+ simple_type_,
+ nmtoken_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ name_ = built_in_type (
+ t, L"::xsd::cxx::tree::name< " + char_type + L", ", token_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ ncname_ = built_in_type (
+ t, L"::xsd::cxx::tree::ncname< " + char_type + L", ", name_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ built_in_type (
+ t, L"::xsd::cxx::tree::language< " + char_type + L", ", token_);
+
+ os << endl;
+ }
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ os << "// ID/IDREF." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (
+ t, L"::xsd::cxx::tree::id< " + char_type + L", ", ncname_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ idref_ = built_in_type (
+ t, L"::xsd::cxx::tree::idref< " + char_type + L", ", ncname_, type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::idrefs< " + char_type + L", ",
+ simple_type_,
+ idref_);
+
+ os << endl;
+ }
+
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ os << "// URI." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ uri_ = built_in_type (
+ t, L"::xsd::cxx::tree::uri< " + char_type + L", ", simple_type_);
+
+ os << endl;
+ }
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ os << "// Qualified name." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::qname< " + char_type + L", ",
+ simple_type_,
+ uri_,
+ ncname_);
+
+ os << endl;
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ os << "// Binary." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Binary buffer type." << endl
+ << " */" << endl;
+
+ gen_typedef (xs_ns ().context().get<String> ("buffer"),
+ L"::xsd::cxx::tree::buffer< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::base64_binary< " + char_type + L", ",
+ simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::hex_binary< " + char_type + L", ",
+ simple_type_);
+
+ os << endl;
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ os << "// Date/time." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Time zone type." << endl
+ << " */" << endl;
+
+ gen_typedef (xs_ns ().context().get<String> ("time-zone"),
+ "::xsd::cxx::tree::time_zone");
+
+ if (doxygen)
+ os << endl;
+
+ built_in_type (
+ t, L"::xsd::cxx::tree::date< " + char_type + L", ", simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::date_time< " + char_type + L", ",
+ simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::duration< " + char_type + L", ",
+ simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ built_in_type (
+ t, L"::xsd::cxx::tree::gday< " + char_type + L", ", simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ built_in_type (
+ t, L"::xsd::cxx::tree::gmonth< " + char_type + L", ", simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::gmonth_day< " + char_type + L", ",
+ simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ built_in_type (
+ t, L"::xsd::cxx::tree::gyear< " + char_type + L", ", simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::gyear_month< " + char_type + L", ",
+ simple_type_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ built_in_type (
+ t, L"::xsd::cxx::tree::time< " + char_type + L", ", simple_type_);
+
+ os << endl;
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity& t)
+ {
+ os << "// Entity." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl;
+
+ entity_ = built_in_type (
+ t, L"::xsd::cxx::tree::entity< " + char_type + L", ", ncname_);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities& t)
+ {
+ built_in_type (
+ t,
+ L"::xsd::cxx::tree::entities< " + char_type + L", ",
+ simple_type_,
+ entity_);
+
+ os << endl;
+ }
+
+ virtual void
+ post (SemanticGraph::Namespace& n)
+ {
+ SemanticGraph::Context& c (xs_ns ().context());
+
+ bool parsing (!options.suppress_parsing ());
+ bool serialization (options.generate_serialization ());
+ bool element_map (options.generate_element_map ());
+
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Content order sequence entry." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("content-order"),
+ "::xsd::cxx::tree::content_order");
+ }
+
+ if (options.generate_element_type ())
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Base class for element types." << endl
+ << " */" << endl;
+ else
+ os << "// Base class for element types." << endl
+ << "//" << endl;
+
+ gen_typedef (
+ c.get<String> ("element-type"),
+ L"::xsd::cxx::tree::element_type< " + char_type + L", ",
+ type_);
+
+ os << endl;
+ }
+
+ if (element_map)
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Root element map." << endl
+ << " */" << endl;
+ else
+ os << "// Root element map." << endl
+ << "//" << endl;
+
+ gen_typedef (
+ c.get<String> ("element-map"),
+ L"::xsd::cxx::tree::element_map< " + char_type + L", ",
+ type_);
+
+ os << endl;
+ }
+
+ if (serialization)
+ {
+ os << "// Namespace information and list stream. Used in" << endl
+ << "// serialization functions." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Namespace serialization information." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("namespace-info"),
+ L"::xsd::cxx::xml::dom::namespace_info< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Namespace serialization information map." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("namespace-infomap"),
+ L"::xsd::cxx::xml::dom::namespace_infomap< " +
+ char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief List serialization stream." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("list-stream"),
+ L"::xsd::cxx::tree::list_stream< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Serialization wrapper for the %double type." << endl
+ << " */" << endl;
+
+ // Do not export as_double and as_decimal since they are already
+ // instantiated.
+ //
+ gen_typedef (c.get<String> ("as-double"),
+ L"::xsd::cxx::tree::as_double< ",
+ double_,
+ "",
+ "",
+ false);
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Serialization wrapper for the %decimal type." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("as-decimal"),
+ L"::xsd::cxx::tree::as_decimal< ",
+ decimal_,
+ "",
+ "",
+ false);
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Simple type facet." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("facet"), "::xsd::cxx::tree::facet");
+
+ os << endl;
+ }
+
+ //@@ Can't change names of ostream/istream since they are
+ // templates.
+ //
+ if (!options.generate_insertion ().empty ())
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Data representation output stream template." << endl
+ << " */" << endl;
+ else
+ os << "// Data representation output stream template." << endl
+ << "//" << endl;
+
+ os << "using ::xsd::cxx::tree::ostream;"
+ << endl;
+ }
+
+ if (!options.generate_extraction ().empty ())
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Data representation input stream template." << endl
+ << " */" << endl;
+ else
+ os << "// Data representation input stream template." << endl
+ << "//" << endl;
+
+ os << "using ::xsd::cxx::tree::istream;"
+ << endl;
+ }
+
+ os << "// Flags and properties." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Parsing and serialization flags." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("flags"), "::xsd::cxx::tree::flags");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Parsing properties." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("properties"),
+ L"::xsd::cxx::tree::properties< " + char_type + L" >");
+ os << endl;
+
+
+ //
+ //
+ if (parsing || serialization)
+ {
+ os << "// Parsing/serialization diagnostics." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Error severity." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("severity"),
+ "::xsd::cxx::tree::severity");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Error condition." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("error"),
+ L"::xsd::cxx::tree::error< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief List of %error conditions." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("diagnostics"),
+ L"::xsd::cxx::tree::diagnostics< " + char_type + L" >");
+ os << endl;
+ }
+
+ //
+ //
+ os << "// Exceptions." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Root of the C++/Tree %exception hierarchy." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("exception"),
+ L"::xsd::cxx::tree::exception< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that the size argument exceeds" <<
+ endl
+ << " * the capacity argument." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("bounds"),
+ L"::xsd::cxx::tree::bounds< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that a duplicate ID value" <<
+ endl
+ << " * was encountered in the object model." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("duplicate-id"),
+ L"::xsd::cxx::tree::duplicate_id< " + char_type + L" >");
+
+ if (parsing)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating a parsing failure." << endl
+ << " */" << endl;
+
+ gen_typedef (c.get<String> ("parsing"),
+ L"::xsd::cxx::tree::parsing< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that an expected element" <<
+ endl
+ << " * was not encountered." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("expected-element"),
+ L"::xsd::cxx::tree::expected_element< " + char_type + L" >");
+ }
+
+ if (parsing || serialization)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that an unexpected " <<
+ "element" << endl
+ << " * was encountered." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("unexpected-element"),
+ L"::xsd::cxx::tree::unexpected_element< " + char_type + L" >");
+ }
+
+ if (parsing)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that an expected " <<
+ "attribute" << endl
+ << " * was not encountered." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("expected-attribute"),
+ L"::xsd::cxx::tree::expected_attribute< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that an unexpected " <<
+ "enumerator" << endl
+ << " * was encountered." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("unexpected-enumerator"),
+ L"::xsd::cxx::tree::unexpected_enumerator< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that the text content " <<
+ "was" << endl
+ << " * expected for an element." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("expected-text-content"),
+ L"::xsd::cxx::tree::expected_text_content< " + char_type + L" >");
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that a prefix-namespace" <<
+ endl
+ << " * mapping was not provided." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("no-prefix-mapping"),
+ L"::xsd::cxx::tree::no_prefix_mapping< " + char_type + L" >");
+ }
+
+ if (options.generate_polymorphic ())
+ {
+ if (parsing || serialization)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that the type " <<
+ "information" << endl
+ << " * is not available for a type." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("no-type-info"),
+ L"::xsd::cxx::tree::no_type_info< " + char_type + L" >");
+ }
+
+ if (parsing)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that the types are not" <<
+ endl
+ << " * related by inheritance." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("not-derived"),
+ L"::xsd::cxx::tree::not_derived< " + char_type + L" >");
+ }
+ }
+
+ if (element_map)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating that parsing or " <<
+ "serialization" << endl
+ << " * information is not available for an element." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("no-element-info"),
+ L"::xsd::cxx::tree::no_element_info< " + char_type + L" >");
+ }
+
+ if (serialization)
+ {
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Exception indicating a serialization " <<
+ "failure." << endl
+ << " */" << endl;
+
+ gen_typedef (
+ c.get<String> ("serialization"),
+ L"::xsd::cxx::tree::serialization< " + char_type + L" >");
+ }
+
+ os << endl;
+
+ if (parsing || serialization)
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Error handler callback interface." << endl
+ << " */" << endl;
+ else
+ os << "// Error handler callback interface." << endl
+ << "//" << endl;
+
+ gen_typedef (
+ c.get<String> ("error-handler"),
+ L"::xsd::cxx::xml::error_handler< " + char_type + L" >");
+
+ os << endl;
+ }
+
+ if (parsing || serialization)
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief DOM interaction." << endl
+ << " */" << endl;
+ else
+ os << "// DOM interaction." << endl
+ << "//" << endl;
+
+ os << "namespace dom"
+ << "{";
+
+ // @@ Disregarding current naming convention by using the
+ // fixed name (even in C++11, template alias is not yet
+ // widely supported).
+ //
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Automatic pointer for DOMDocument." << endl
+ << " */" << endl;
+ else
+ os << "// Automatic pointer for DOMDocument." << endl
+ << "//" << endl;
+
+ if (std >= cxx_version::cxx11)
+ os << "using ::xsd::cxx::xml::dom::unique_ptr;";
+ else
+ os << "using ::xsd::cxx::xml::dom::auto_ptr;";
+
+ os << endl;
+
+ if (parsing)
+ {
+ if (!generate_xml_schema)
+ {
+ String g (L"XSD_CXX_TREE_TREE_NODE_KEY" + ns_name (n));
+
+ std::transform (g.begin (), g.end(), g.begin (), upcase);
+ g = escape (g); // Make it a C++ id.
+
+ os << "#ifndef " << g << endl
+ << "#define " << g << endl;
+ }
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief DOM user data key for back pointers to " <<
+ "tree nodes." << endl
+ << " */" << endl;
+ else
+ os << "// DOM user data key for back pointers to tree nodes." << endl
+ << "//" << endl;
+
+ os << "const XMLCh* const " << c.get<String> ("tree-node-key") <<
+ " = ::xsd::cxx::tree::user_data_keys::node;";
+
+ if (!generate_xml_schema)
+ os << "#endif" << endl;
+ }
+
+ os << "}"; // namespace dom
+ }
+
+ if (element_map)
+ {
+ if (doxygen)
+ os << "//@cond" << endl
+ << endl;
+
+ if (!generate_xml_schema)
+ {
+ String g (L"XSD_CXX_TREE_ELEMENT_MAP_INIT" + ns_name (n));
+
+ std::transform (g.begin (), g.end(), g.begin (), upcase);
+ g = escape (g); // Make it a C++ id.
+
+ os << "#ifndef " << g << endl
+ << "#define " << g << endl;
+ }
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::element_map_init< " <<
+ char_type << ", " << type_ << " >" << endl
+ << "_xsd_element_map_init;";
+
+ if (!generate_xml_schema)
+ os << "#endif" << endl;
+
+ if (doxygen)
+ os << endl
+ << "//@endcond" << endl;
+ }
+
+ Namespace::post (n);
+
+ // Generate exports.
+ //
+ if (export_)
+ {
+ StringSet ns_set;
+
+ for (StringList::const_iterator i (exports_.begin ());
+ i != exports_.end (); ++i)
+ {
+ String const& e (*i);
+
+ // 12 is to skip ::xsd::cxx::
+ //
+ ns_set.insert (String (e, 12, e.rfind (':', e.find ('<')) - 13));
+ }
+
+ os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{";
+
+ for (StringSet::const_iterator i (ns_set.begin ());
+ i != ns_set.end (); ++i)
+ {
+ String const& ns (*i);
+ String prefix (L"::xsd::cxx::" + ns);
+
+ size_t n (1);
+ for (size_t b (0), e (ns.find (':')); ; n++)
+ {
+ os << "namespace " << String (ns, b, e)
+ << "{";
+
+ if (e == String::npos)
+ break;
+
+ b = e + 2;
+ e = ns.find (':', b);
+ }
+
+ for (StringList::const_iterator i (exports_.begin ());
+ i != exports_.end (); ++i)
+ {
+ String const& e (*i);
+ String ens (e, 12, e.rfind (':', e.find ('<')) - 13);
+
+ if (ns == ens)
+ {
+ String type (e, e.rfind (':', e.find ('<')) + 1);
+ os << "template class " << type_exp << type << ";";
+ }
+ }
+
+ while (n--)
+ os << "}";
+ }
+
+ os << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+ }
+ }
+
+ private:
+ typedef std::set<String> StringSet;
+ typedef std::vector<String> StringList;
+
+ bool export_;
+ StringList exports_;
+ StringSet exports_set_;
+ String xs_ns_;
+
+ Traversal::Names names_;
+
+ String type_;
+ String simple_type_;
+ String string_;
+ String norm_string_;
+ String token_;
+ String nmtoken_;
+ String name_;
+ String ncname_;
+ String idref_;
+ String uri_;
+ String entity_;
+
+ String double_;
+ String decimal_;
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_FUNDAMENTAL_HEADER_HXX
diff --git a/xsd/xsd/cxx/tree/generator.cxx b/xsd/xsd/cxx/tree/generator.cxx
new file mode 100644
index 0000000..5601f4e
--- /dev/null
+++ b/xsd/xsd/cxx/tree/generator.cxx
@@ -0,0 +1,1227 @@
+// file : xsd/cxx/tree/generator.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <vector>
+#include <algorithm>
+#include <iostream>
+#include <fstream>
+
+#include <libcutl/re.hxx>
+#include <libcutl/shared-ptr.hxx>
+
+#include <libcutl/compiler/code-stream.hxx>
+#include <libcutl/compiler/cxx-indenter.hxx>
+#include <libcutl/compiler/sloc-counter.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/generators/dependencies.hxx>
+
+#include <xsd/version.hxx>
+
+#include <xsd/cxx/tree/generator.hxx>
+
+#include <xsd/cxx/tree/elements.hxx>
+
+#include <xsd/cxx/tree/counter.hxx>
+#include <xsd/cxx/tree/validator.hxx>
+#include <xsd/cxx/tree/name-processor.hxx>
+#include <xsd/cxx/tree/order-processor.hxx>
+#include <xsd/cxx/tree/polymorphism-processor.hxx>
+
+#include <xsd/cxx/tree/tree-forward.hxx>
+#include <xsd/cxx/tree/tree-header.hxx>
+#include <xsd/cxx/tree/tree-inline.hxx>
+#include <xsd/cxx/tree/tree-source.hxx>
+
+#include <xsd/cxx/tree/parser-header.hxx>
+#include <xsd/cxx/tree/parser-source.hxx>
+
+#include <xsd/cxx/tree/stream-header.hxx>
+#include <xsd/cxx/tree/stream-source.hxx>
+
+#include <xsd/cxx/tree/serialization-header.hxx>
+#include <xsd/cxx/tree/serialization-source.hxx>
+
+#include <xsd/cxx/tree/stream-insertion-header.hxx>
+#include <xsd/cxx/tree/stream-insertion-source.hxx>
+#include <xsd/cxx/tree/stream-extraction-source.hxx>
+
+#include <xsd/cxx/tree/options.hxx>
+
+using namespace std;
+using namespace cutl;
+using namespace XSDFrontend::SemanticGraph;
+
+//
+//
+typedef std::wifstream WideInputFileStream;
+typedef std::wofstream WideOutputFileStream;
+
+namespace CXX
+{
+ namespace
+ {
+ char const copyright_gpl[] =
+ "// Copyright (c) " XSD_COPYRIGHT ".\n"
+ "//\n"
+ "// This program was generated by CodeSynthesis XSD, an XML Schema to\n"
+ "// C++ data binding compiler.\n"
+ "//\n"
+ "// This program is free software; you can redistribute it and/or modify\n"
+ "// it under the terms of the GNU General Public License version 2 as\n"
+ "// published by the Free Software Foundation.\n"
+ "//\n"
+ "// This program is distributed in the hope that it will be useful,\n"
+ "// but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "// GNU General Public License for more details.\n"
+ "//\n"
+ "// You should have received a copy of the GNU General Public License\n"
+ "// along with this program; if not, write to the Free Software\n"
+ "// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n"
+ "//\n"
+ "// In addition, as a special exception, Code Synthesis Tools CC gives\n"
+ "// permission to link this program with the Xerces-C++ library (or with\n"
+ "// modified versions of Xerces-C++ that use the same license as Xerces-C++),\n"
+ "// and distribute linked combinations including the two. You must obey\n"
+ "// the GNU General Public License version 2 in all respects for all of\n"
+ "// the code used other than Xerces-C++. If you modify this copy of the\n"
+ "// program, you may extend this exception to your version of the program,\n"
+ "// but you are not obligated to do so. If you do not wish to do so, delete\n"
+ "// this exception statement from your version.\n"
+ "//\n"
+ "// Furthermore, Code Synthesis Tools CC makes a special exception for\n"
+ "// the Free/Libre and Open Source Software (FLOSS) which is described\n"
+ "// in the accompanying FLOSSE file.\n"
+ "//\n\n";
+
+ char const copyright_proprietary[] =
+ "// Copyright (c) " XSD_COPYRIGHT ".\n"
+ "//\n"
+ "// This program was generated by CodeSynthesis XSD, an XML Schema\n"
+ "// to C++ data binding compiler, in the Proprietary License mode.\n"
+ "// You should have received a proprietary license from Code Synthesis\n"
+ "// Tools CC prior to generating this code. See the license text for\n"
+ "// conditions.\n"
+ "//\n\n";
+ }
+
+ void Tree::Generator::
+ usage ()
+ {
+ CXX::Tree::options::print_usage (wcout);
+ CXX::options::print_usage (wcout);
+ }
+
+ namespace
+ {
+ void
+ open (WideInputFileStream& ifs, NarrowString const& path)
+ {
+ try
+ {
+ Path fs_path (path);
+ ifs.open (fs_path.string ().c_str (),
+ std::ios_base::in | std::ios_base::binary);
+
+ if (!ifs.is_open ())
+ {
+ wcerr << path.c_str () << ": error: unable to open in read mode"
+ << endl;
+
+ throw Tree::Generator::Failed ();
+ }
+ }
+ catch (InvalidPath const&)
+ {
+ wcerr << "error: '" << path.c_str () << "' is not a valid "
+ << "filesystem path" << endl;
+
+ throw Tree::Generator::Failed ();
+ }
+ }
+
+ void
+ append (WideOutputFileStream& os,
+ NarrowString const& path,
+ WideInputFileStream& default_is)
+ {
+ using std::ios_base;
+
+ if (path)
+ {
+ WideInputFileStream is;
+ open (is, path);
+ os << is.rdbuf ();
+ }
+ else if (default_is.is_open ())
+ {
+ os << default_is.rdbuf ();
+ default_is.seekg (0, ios_base::beg);
+ }
+ }
+
+ void
+ append (WideOutputFileStream& os,
+ NarrowStrings const& primary,
+ NarrowStrings const& def)
+ {
+ NarrowStrings const& v (primary.empty () ? def : primary);
+
+ for (NarrowStrings::const_iterator i (v.begin ()), e (v.end ());
+ i != e; ++i)
+ {
+ os << i->c_str () << endl;
+ }
+ }
+ }
+
+
+ size_t Tree::Generator::
+ generate (Tree::options const& ops,
+ Schema& schema,
+ Path const& file_path,
+ bool fpt,
+ StringLiteralMap const& string_literal_map,
+ const WarningSet& disabled_warnings,
+ FileList& file_list,
+ AutoUnlinks& unlinks)
+ {
+ using cutl::shared_ptr;
+ typedef cutl::re::regexsub Regex;
+
+ typedef vector<Path> Paths;
+ typedef vector<shared_ptr<WideOutputFileStream> > WideOutputFileStreams;
+
+ try
+ {
+ // Do option validation.
+ //
+ if (ops.parts () < 1)
+ {
+ wcerr << "error: invalid value for option --parts: " <<
+ ops.parts () << endl;
+ throw Failed ();
+ }
+
+ // Get counts.
+ //
+ Counts counts;
+ {
+ Counter counter;
+ counts = counter.count (ops, schema, file_path);
+
+ /*
+ wcerr << "global type count: " << counts.global_types << endl;
+ wcerr << "global element count: " << counts.global_elements << endl;
+ wcerr << "generated global element count: " <<
+ counts.generated_global_elements << endl;
+
+ wcerr << "total complexity: " << counts.complexity_total << endl;
+ wcerr << "complexity vector size: " << counts.complexity.size ()
+ << endl;
+ */
+ }
+
+ // Evaluate the graph for possibility of generating something useful.
+ //
+ {
+ Validator validator;
+ if (!validator.validate (
+ ops, schema, file_path, disabled_warnings, counts))
+ throw Failed ();
+ }
+
+ bool gen_cxx (!ops.generate_dep_only ());
+
+ // Process ordered types.
+ //
+ if (gen_cxx)
+ {
+ OrderProcessor proc;
+ if (!proc.process (ops, schema, file_path))
+ throw Failed ();
+ }
+
+ // Process names.
+ //
+ if (gen_cxx)
+ {
+ NameProcessor proc;
+ if (!proc.process (ops, schema, file_path, string_literal_map))
+ throw Failed ();
+ }
+
+ // Process polymorphic types.
+ //
+ if (gen_cxx &&
+ ops.generate_polymorphic () &&
+ !ops.polymorphic_type_all ())
+ {
+ PolymorphismProcessor proc;
+ if (!proc.process (ops, schema, file_path, disabled_warnings))
+ throw Failed ();
+ }
+
+ // Parts.
+ //
+ size_t parts (ops.parts ());
+ size_t units (counts.global_types + counts.generated_global_elements);
+ size_t units_per_part (units / parts);
+
+ if (parts != 1 && units_per_part < 1)
+ {
+ wcerr << "error: too many parts specified: " << parts << endl;
+ throw Failed ();
+ }
+
+ size_t complexity_per_part (counts.complexity_total / parts);
+
+
+ NarrowString parts_suffix (ops.parts_suffix ());
+
+ //
+ //
+ bool generate_xml_schema (ops.generate_xml_schema ());
+
+ // We could be compiling several schemas at once in which case
+ // handling of the --generate-xml-schema option gets tricky: we
+ // will need to rely on the presence of the --extern-xml-schema
+ // to tell us which (fake) schema file corresponds to XML Schema.
+ //
+ if (generate_xml_schema)
+ {
+ if (NarrowString name = ops.extern_xml_schema ())
+ {
+ if (file_path.string () != name)
+ generate_xml_schema = false;
+ }
+ }
+
+ bool header (true);
+ bool inline_ (ops.generate_inline () && !generate_xml_schema);
+ bool forward (ops.generate_forward () && !generate_xml_schema);
+ bool source (!generate_xml_schema);
+ bool gen_dep ((ops.generate_dep () || ops.generate_dep_only ()) &&
+ !generate_xml_schema);
+
+ if (ops.generate_dep_only () && generate_xml_schema)
+ {
+ wcerr << "error: no dependency information can be generated for "
+ "XML Schema header" << endl;
+ throw Failed ();
+ }
+
+ if (gen_dep && fpt)
+ {
+ wcerr << "error: dependency generation not support in the " <<
+ "file-per-type mode" << endl;
+ throw Failed ();
+ }
+
+ // Generate code.
+ //
+ NarrowString name (file_path.leaf ().string ());
+
+ NarrowString hxx_suffix (ops.hxx_suffix ());
+ NarrowString ixx_suffix (ops.ixx_suffix ());
+ NarrowString cxx_suffix (ops.cxx_suffix ());
+ NarrowString fwd_suffix (ops.fwd_suffix ());
+ NarrowString dep_suffix (ops.dep_suffix ());
+
+ Regex hxx_expr (ops.hxx_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + hxx_suffix + "#"
+ : ops.hxx_regex ());
+
+ Regex ixx_expr (ops.ixx_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + ixx_suffix + "#"
+ : ops.ixx_regex ());
+
+ Regex cxx_expr (ops.cxx_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + cxx_suffix + "#"
+ : ops.cxx_regex ());
+
+ Regex fwd_expr (ops.fwd_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + fwd_suffix + "#"
+ : ops.fwd_regex ());
+
+ Regex dep_expr (ops.dep_regex ().empty ()
+ ? "#^(.+?)(\\.[^./\\\\]+)?$#$1" + dep_suffix + "#"
+ : ops.dep_regex ());
+
+ if (header && !hxx_expr.match (name))
+ {
+ wcerr << "error: header expression '" <<
+ hxx_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (inline_ && !ixx_expr.match (name))
+ {
+ wcerr << "error: inline expression '" <<
+ ixx_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (source && parts == 1 && !cxx_expr.match (name))
+ {
+ wcerr << "error: source expression '" <<
+ cxx_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (forward && !fwd_expr.match (name))
+ {
+ wcerr << "error: forward expression '" <<
+ fwd_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ if (gen_dep && !dep_expr.match (name))
+ {
+ wcerr << "error: dependency expression '" <<
+ dep_expr.regex ().str ().c_str () << "' does not match '" <<
+ name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ NarrowString hxx_name (header ? hxx_expr.replace (name) : NarrowString ());
+ NarrowString ixx_name (inline_ ? ixx_expr.replace (name) : NarrowString ());
+ NarrowString fwd_name (forward ? fwd_expr.replace (name) : NarrowString ());
+ NarrowString dep_name (gen_dep ? dep_expr.replace (name) : NarrowString ());
+
+ Path hxx_path (hxx_name);
+ Path ixx_path (ixx_name);
+ Path fwd_path (fwd_name);
+ Path dep_path (dep_name);
+ Paths cxx_paths;
+
+ if (source)
+ {
+ if (parts > 1)
+ {
+ for (size_t i (0); i < parts; ++i)
+ {
+ std::ostringstream os;
+ os << i;
+
+ Regex expr (
+ "#^(.+?)(\\.[^./\\\\]+)?$#$1" + parts_suffix + os.str () + "$2#");
+
+ NarrowString part_name (expr.replace (name));
+
+ if (!cxx_expr.match (part_name))
+ {
+ wcerr << "error: source expression '" <<
+ cxx_expr.regex ().str ().c_str () << "' does not match '" <<
+ part_name.c_str () << "'" << endl;
+ throw Failed ();
+ }
+
+ cxx_paths.push_back (Path (cxx_expr.replace (part_name)));
+ }
+ }
+ else
+ cxx_paths.push_back (Path (cxx_expr.replace (name)));
+ }
+
+ Path out_dir;
+
+ if (NarrowString dir = ops.output_dir ())
+ {
+ try
+ {
+ out_dir = Path (dir);
+ }
+ catch (InvalidPath const&)
+ {
+ wcerr << dir.c_str () << ": error: invalid path" << endl;
+ throw Failed ();
+ }
+ }
+
+ if (fpt && !generate_xml_schema)
+ {
+ // In the file-per-type mode the schema files are always local
+ // unless the user added the directory so that we propagate this
+ // to the output files.
+ //
+ Path fpt_dir (file_path.directory ());
+
+ if (!fpt_dir.empty ())
+ out_dir /= fpt_dir;
+ }
+
+ if (!out_dir.empty ())
+ {
+ hxx_path = out_dir / hxx_path;
+ ixx_path = out_dir / ixx_path;
+ fwd_path = out_dir / fwd_path;
+ dep_path = out_dir / dep_path;
+
+ for (Paths::iterator i (cxx_paths.begin ());
+ i != cxx_paths.end (); ++i)
+ *i = out_dir / *i;
+ }
+
+ //
+ //
+ WideOutputFileStream hxx;
+ WideOutputFileStream ixx;
+ WideOutputFileStream fwd;
+ WideOutputFileStream dep;
+ WideOutputFileStreams cxx;
+
+ // DEP
+ //
+ if (gen_dep)
+ {
+ dep.open (dep_path.string ().c_str (), ios_base::out);
+
+ if (!dep.is_open ())
+ {
+ wcerr << dep_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (dep_path);
+ file_list.push_back (dep_path.string ());
+ }
+
+ // FWD
+ //
+ if (gen_cxx && forward)
+ {
+ fwd.open (fwd_path.string ().c_str (), ios_base::out);
+
+ if (!fwd.is_open ())
+ {
+ wcerr << fwd_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (fwd_path);
+ file_list.push_back (fwd_path.string ());
+ }
+
+ // HXX
+ //
+ if (gen_cxx && header)
+ {
+ hxx.open (hxx_path.string ().c_str (), ios_base::out);
+
+ if (!hxx.is_open ())
+ {
+ wcerr << hxx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (hxx_path);
+ file_list.push_back (hxx_path.string ());
+ }
+
+ // IXX
+ //
+ if (gen_cxx && inline_)
+ {
+ ixx.open (ixx_path.string ().c_str (), ios_base::out);
+
+ if (!ixx.is_open ())
+ {
+ wcerr << ixx_path << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (ixx_path);
+ file_list.push_back (ixx_path.string ());
+ }
+
+ // CXX
+ //
+ if (gen_cxx && source)
+ {
+ for (Paths::iterator i (cxx_paths.begin ());
+ i != cxx_paths.end (); ++i)
+ {
+ shared_ptr<WideOutputFileStream> s (
+ new (shared) WideOutputFileStream (
+ i->string ().c_str (), ios_base::out));
+
+ if (!s->is_open ())
+ {
+ wcerr << *i << ": error: unable to open in write mode" << endl;
+ throw Failed ();
+ }
+
+ unlinks.add (*i);
+ file_list.push_back (i->string ());
+ cxx.push_back (s);
+ }
+ }
+
+ // Print copyright and license.
+ //
+ char const* copyright (
+ ops.proprietary_license () ? copyright_proprietary : copyright_gpl);
+
+ if (gen_cxx && header)
+ hxx << copyright;
+
+ if (gen_cxx && forward)
+ fwd << copyright;
+
+ if (ops.generate_doxygen ())
+ {
+ // Use native path format.
+ //
+ hxx << "/**" << endl
+ << " * @file" << endl
+ << " * @brief Generated from " << name.c_str () << "." << endl
+ << " */" << endl
+ << endl;
+
+ }
+
+ if (gen_cxx && inline_)
+ ixx << copyright;
+
+ if (gen_cxx && source)
+ {
+ for (WideOutputFileStreams::iterator i (cxx.begin ());
+ i != cxx.end (); ++i)
+ **i << copyright;
+ }
+
+
+ // Prologue.
+ //
+ WideInputFileStream prologue;
+ {
+ NarrowString name (ops.prologue_file ());
+
+ if (name)
+ open (prologue, name);
+ }
+
+ // Epilogue.
+ //
+ WideInputFileStream epilogue;
+ {
+ NarrowString name (ops.epilogue_file ());
+
+ if (name)
+ open (epilogue, name);
+ }
+
+ // SLOC counter.
+ //
+ size_t sloc_total (0);
+ bool show_sloc (ops.show_sloc ());
+
+ typedef
+ compiler::ostream_filter<compiler::cxx_indenter, wchar_t>
+ ind_filter;
+
+ typedef
+ compiler::ostream_filter<compiler::sloc_counter, wchar_t>
+ sloc_filter;
+
+ //
+ //
+ Regex guard_expr ("/([a-z])([A-Z])/$1_$2/"); // Split words.
+ NarrowString guard_prefix (ops.guard_prefix ());
+
+ if (!guard_prefix)
+ guard_prefix = file_path.directory ().string ();
+
+ if (guard_prefix)
+ guard_prefix += '_';
+
+ // DEP
+ //
+ if (gen_dep)
+ {
+ NarrowString target;
+ NarrowStrings const& ts (ops.dep_target ());
+
+ if (!ts.empty ())
+ {
+ for (NarrowStrings::const_iterator i (ts.begin ());
+ i != ts.end (); ++i)
+ target += (target.empty () ? "" : " \\\n") + *i;
+ }
+ else
+ {
+ target = hxx_path.string ();
+
+ if (forward)
+ target += " \\\n" + fwd_path.string ();
+
+ if (inline_)
+ target += " \\\n" + ixx_path.string ();
+
+ for (Paths::iterator i (cxx_paths.begin ());
+ i != cxx_paths.end (); ++i)
+ target += " \\\n" + i->string ();
+
+ target += " \\\n" + dep_path.string ();
+ }
+
+ dep << target.c_str () << ':';
+
+ XSDFrontend::Generators::Dependencies gen;
+ Paths prq (gen.generate (schema, file_path));
+
+ for (Paths::iterator i (prq.begin ()); i != prq.end (); ++i)
+ dep << " \\" << endl
+ << " " << *i;
+
+ dep << endl;
+
+ // If requested, generate phony rules for included/imported schemas
+ // but not the main file which is the first in the list.
+ //
+ if (ops.dep_phony () && prq.size () > 1)
+ {
+ for (Paths::iterator i (prq.begin () + 1); i != prq.end (); ++i)
+ dep << endl
+ << *i << ':' << endl;
+ }
+ }
+
+ // FWD
+ //
+ if (gen_cxx && forward)
+ {
+ Context ctx (fwd,
+ schema,
+ file_path,
+ ops,
+ counts,
+ generate_xml_schema,
+ &string_literal_map,
+ &fwd_expr,
+ &hxx_expr,
+ &ixx_expr);
+
+ sloc_filter sloc (fwd);
+
+ // Guard
+ //
+ String guard (guard_expr.replace (guard_prefix + fwd_name));
+ guard = ctx.escape (guard); // make a c++ id
+ std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
+
+ fwd << "#ifndef " << guard << endl
+ << "#define " << guard << endl
+ << endl;
+
+ if (ctx.std >= cxx_version::cxx11)
+ {
+ fwd << "#ifndef XSD_CXX11" << endl
+ << "#define XSD_CXX11" << endl
+ << "#endif" << endl
+ << endl;
+ }
+
+ if (ctx.char_type == L"char")
+ {
+ fwd << "#ifndef XSD_USE_CHAR" << endl
+ << "#define XSD_USE_CHAR" << endl
+ << "#endif" << endl
+ << endl;
+
+ fwd << "#ifndef XSD_CXX_TREE_USE_CHAR" << endl
+ << "#define XSD_CXX_TREE_USE_CHAR" << endl
+ << "#endif" << endl
+ << endl;
+ }
+ else if (ctx.char_type == L"wchar_t")
+ {
+ fwd << "#ifndef XSD_USE_WCHAR" << endl
+ << "#define XSD_USE_WCHAR" << endl
+ << "#endif" << endl
+ << endl;
+
+ fwd << "#ifndef XSD_CXX_TREE_USE_WCHAR" << endl
+ << "#define XSD_CXX_TREE_USE_WCHAR" << endl
+ << "#endif" << endl
+ << endl;
+ }
+
+ // Copy prologue.
+ //
+ fwd << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (fwd, ops.fwd_prologue (), ops.prologue ());
+ append (fwd, ops.fwd_prologue_file (), prologue);
+
+ fwd << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ // Version check.
+ //
+ fwd << "#include <xsd/cxx/version.hxx>" << endl
+ << endl
+ << "#if (LIBXSD_VERSION != " << XSD_VERSION << "L)" << endl
+ << "#error XSD runtime version mismatch" << endl
+ << "#endif" << endl
+ << endl;
+
+ fwd << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ ind_filter ind (fwd); // We don't want to indent prologues/epilogues.
+ generate_forward (ctx);
+ }
+
+ fwd << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ fwd << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (fwd, ops.fwd_epilogue_file (), epilogue);
+ append (fwd, ops.fwd_epilogue (), ops.epilogue ());
+
+ fwd << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ fwd << "#endif // " << guard << endl;
+
+ if (show_sloc)
+ wcerr << fwd_path << ": " << sloc.stream ().count () << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+
+ // HXX
+ //
+ if (gen_cxx && header)
+ {
+ Context ctx (hxx,
+ schema,
+ file_path,
+ ops,
+ counts,
+ generate_xml_schema,
+ &string_literal_map,
+ &fwd_expr,
+ &hxx_expr,
+ &ixx_expr);
+
+ sloc_filter sloc (hxx);
+
+ // Guard
+ //
+ String guard (guard_expr.replace (guard_prefix + hxx_name));
+ guard = ctx.escape (guard); // make a c++ id
+ std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
+
+ hxx << "#ifndef " << guard << endl
+ << "#define " << guard << endl
+ << endl;
+
+ if (!forward)
+ {
+ if (ctx.std >= cxx_version::cxx11)
+ {
+ hxx << "#ifndef XSD_CXX11" << endl
+ << "#define XSD_CXX11" << endl
+ << "#endif" << endl
+ << endl;
+ }
+
+ if (ctx.char_type == L"char")
+ {
+ hxx << "#ifndef XSD_USE_CHAR" << endl
+ << "#define XSD_USE_CHAR" << endl
+ << "#endif" << endl
+ << endl;
+
+ hxx << "#ifndef XSD_CXX_TREE_USE_CHAR" << endl
+ << "#define XSD_CXX_TREE_USE_CHAR" << endl
+ << "#endif" << endl
+ << endl;
+ }
+ else if (ctx.char_type == L"wchar_t")
+ {
+ hxx << "#ifndef XSD_USE_WCHAR" << endl
+ << "#define XSD_USE_WCHAR" << endl
+ << "#endif" << endl
+ << endl;
+
+ hxx << "#ifndef XSD_CXX_TREE_USE_WCHAR" << endl
+ << "#define XSD_CXX_TREE_USE_WCHAR" << endl
+ << "#endif" << endl
+ << endl;
+ }
+ }
+ else if (!generate_xml_schema)
+ {
+ // Generate it before the prologue so that we get the above
+ // defines.
+ //
+ hxx << "#include " << ctx.process_include_path (fwd_name)
+ << endl << endl;
+ }
+
+ // Copy prologue.
+ //
+ hxx << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (hxx, ops.hxx_prologue (), ops.prologue ());
+ append (hxx, ops.hxx_prologue_file (), prologue);
+
+ hxx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ // Version check.
+ //
+ hxx << "#include <xsd/cxx/config.hxx>" << endl
+ << endl
+ << "#if (LIBXSD_VERSION != " << XSD_VERSION << "L)" << endl
+ << "#error XSD runtime version mismatch" << endl
+ << "#endif" << endl
+ << endl;
+
+ hxx << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ ind_filter ind (hxx); // We don't want to indent prologues/epilogues.
+
+ if (!generate_xml_schema && !forward)
+ generate_forward (ctx);
+
+ generate_tree_header (ctx);
+
+ if (!generate_xml_schema)
+ {
+ if (ops.generate_ostream ())
+ generate_stream_header (ctx);
+
+ if (!ops.generate_element_type () && !ops.suppress_parsing ())
+ generate_parser_header (ctx);
+
+ if (ops.generate_serialization ())
+ generate_serialization_header (ctx);
+
+ if (!ops.generate_insertion ().empty ())
+ generate_stream_insertion_header (ctx);
+ }
+ }
+
+ if (inline_)
+ {
+ hxx << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
+ << "#include " << ctx.process_include_path (ixx_name) << endl
+ << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
+ << endl;
+ }
+
+ hxx << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ hxx << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (hxx, ops.hxx_epilogue_file (), epilogue);
+ append (hxx, ops.hxx_epilogue (), ops.epilogue ());
+
+ hxx << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ hxx << "#endif // " << guard << endl;
+
+ if (show_sloc)
+ wcerr << hxx_path << ": " << sloc.stream ().count () << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+
+
+ // IXX
+ //
+ if (gen_cxx && inline_)
+ {
+ Context ctx (ixx,
+ schema,
+ file_path,
+ ops,
+ counts,
+ generate_xml_schema,
+ &string_literal_map,
+ &fwd_expr,
+ &hxx_expr,
+ &ixx_expr);
+
+ sloc_filter sloc (ixx);
+
+ // Guard
+ //
+ String guard (guard_expr.replace (guard_prefix + ixx_name));
+ guard = ctx.escape (guard); // make a c++ id
+ std::transform (guard.begin (), guard.end(), guard.begin (), upcase);
+
+ ixx << "#ifndef " << guard.c_str () << endl
+ << "#define " << guard.c_str () << endl
+ << endl;
+
+ // Copy prologue.
+ //
+ ixx << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (ixx, ops.ixx_prologue (), ops.prologue ());
+ append (ixx, ops.ixx_prologue_file (), prologue);
+
+ ixx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ ind_filter ind (ixx); // We don't want to indent prologues/epilogues.
+ generate_tree_inline (ctx, 1, 0);
+ }
+
+ // Copy epilogue.
+ //
+ ixx << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (ixx, ops.ixx_epilogue_file (), epilogue);
+ append (ixx, ops.ixx_epilogue (), ops.epilogue ());
+
+ ixx << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ ixx << "#endif // " << guard.c_str () << endl;
+
+ if (show_sloc)
+ wcerr << ixx_path << ": " << sloc.stream ().count () << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+
+ // CXX
+ //
+ if (gen_cxx && source)
+ {
+ size_t first_unit (0); // First unit in the current part.
+
+ for (size_t part (0); part < parts; ++part)
+ {
+ // Figure out the range of units for this part.
+ //
+ size_t last_unit (first_unit);
+
+ if (units != 0)
+ {
+ size_t complexity (counts.complexity[last_unit]);
+
+ while (complexity < complexity_per_part)
+ {
+ // Make sure there will be at least one unit for each part left.
+ //
+ if ((last_unit + 1) >= units ||
+ (units - (last_unit + 1) - 1) < (parts - part - 1))
+ break;
+
+ // Check if the increase in complexity should be kept in this
+ // part or moved to the next.
+ //
+ size_t new_complexity (
+ complexity + counts.complexity[last_unit + 1]);
+
+ if (new_complexity > complexity_per_part)
+ {
+ if ((new_complexity - complexity_per_part) >
+ (counts.complexity[last_unit + 1] / 2))
+ break;
+ }
+
+ last_unit++;
+ complexity = new_complexity;
+ }
+
+ if (part + 1 == parts)
+ {
+ // Last part.
+ //
+ last_unit = units - 1;
+ }
+ }
+
+ //
+ //
+ size_t first (first_unit);
+ size_t last (last_unit);
+
+ first_unit = last_unit + 1;
+
+ //wcerr << "[" << first << ", " << last << "]: " << complexity
+ // << endl;
+
+ WideOutputFileStream& os (*cxx[part]);
+
+ Context ctx (os,
+ schema,
+ file_path,
+ ops,
+ counts,
+ generate_xml_schema,
+ &string_literal_map,
+ &fwd_expr,
+ &hxx_expr,
+ &ixx_expr);
+
+ sloc_filter sloc (os);
+
+ // Copy prologue.
+ //
+ os << "// Begin prologue." << endl
+ << "//" << endl;
+
+ append (os, ops.cxx_prologue (), ops.prologue ());
+ append (os, ops.cxx_prologue_file (), prologue);
+
+ os << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ os << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
+ os << "#include " << ctx.process_include_path (hxx_name) << endl
+ << endl;
+
+ // Generate.
+ //
+ {
+ // We don't want to indent prologues/epilogues.
+ //
+ ind_filter ind (os);
+
+ if (!inline_)
+ generate_tree_inline (ctx, first, last);
+
+ generate_tree_source (ctx, first, last);
+
+ if (ops.generate_ostream ())
+ generate_stream_source (ctx, first, last);
+
+ if (!ops.generate_element_type () && !ops.suppress_parsing ())
+ generate_parser_source (ctx, first, last);
+
+ if (ops.generate_serialization ())
+ generate_serialization_source (ctx, first, last);
+
+ if (!ops.generate_extraction ().empty ())
+ generate_stream_extraction_source (ctx);
+
+ if (!ops.generate_insertion ().empty ())
+ generate_stream_insertion_source (ctx);
+ }
+
+ os << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ os << "// Begin epilogue." << endl
+ << "//" << endl;
+
+ append (os, ops.cxx_epilogue_file (), epilogue);
+ append (os, ops.cxx_epilogue (), ops.epilogue ());
+
+ os << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
+ if (show_sloc)
+ wcerr << cxx_paths[part] << ": " << sloc.stream ().count ()
+ << endl;
+
+ sloc_total += sloc.stream ().count ();
+ }
+ }
+
+ return sloc_total;
+ }
+ catch (UnrepresentableCharacter const& e)
+ {
+ wcerr << "error: character at position " << e.position () << " "
+ << "in string '" << e.string () << "' is unrepresentable in "
+ << "the target encoding" << endl;
+
+ wcerr << "info: use the --custom-literals option to provide custom "
+ << "string literals mapping" << endl;
+
+ throw Failed ();
+ }
+ catch (NoNamespaceMapping const& e)
+ {
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": error: unable to map XML Schema namespace '" << e.ns ()
+ << "' to C++ namespace" << endl;
+
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: use the --namespace-map or --namespace-regex option "
+ << "to provide custom mapping" << endl;
+
+ throw Failed ();
+ }
+ catch (InvalidNamespaceMapping const& e)
+ {
+ wcerr << "error: invalid XML to C++ namespace mapping specified: "
+ << "'" << e.mapping () << "': " << e.reason () << endl;
+
+ throw Failed ();
+ }
+ catch (InvalidCustomTypeMapping const& e)
+ {
+ wcerr << "error: invalid custom type mapping specified: "
+ << "'" << e.mapping () << "': " << e.reason () << endl;
+
+ throw Failed ();
+ }
+ catch (cutl::re::format const& e)
+ {
+ wcerr << "error: invalid regex: '" <<
+ e.regex ().c_str () << "': " <<
+ e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ catch (cutl::re::wformat const& e)
+ {
+ wcerr << "error: invalid regex: '" <<
+ e.regex () << "': " << e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/generator.hxx b/xsd/xsd/cxx/tree/generator.hxx
new file mode 100644
index 0000000..a9b96fe
--- /dev/null
+++ b/xsd/xsd/cxx/tree/generator.hxx
@@ -0,0 +1,44 @@
+// file : xsd/cxx/tree/generator.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_GENERATOR_HXX
+#define XSD_CXX_TREE_GENERATOR_HXX
+
+#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
+#include <libxsd-frontend/semantic-graph/schema.hxx>
+
+#include <xsd/xsd.hxx>
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/literal-map.hxx>
+#include <xsd/cxx/tree/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class Generator
+ {
+ public:
+ static void
+ usage ();
+
+ struct Failed {};
+
+ static size_t
+ generate (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file,
+ bool file_per_type,
+ StringLiteralMap const&,
+ const WarningSet& disabled_warnings,
+ FileList& file_list,
+ AutoUnlinks& unlinks);
+
+ private:
+ Generator ();
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_GENERATOR_HXX
diff --git a/xsd/xsd/cxx/tree/name-processor.cxx b/xsd/xsd/cxx/tree/name-processor.cxx
new file mode 100644
index 0000000..e26a5d8
--- /dev/null
+++ b/xsd/xsd/cxx/tree/name-processor.cxx
@@ -0,0 +1,2399 @@
+// file : xsd/cxx/tree/name-processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+#include <map>
+#include <vector>
+#include <sstream>
+#include <iostream>
+
+#include <libcutl/re.hxx>
+
+#include <xsd/cxx/tree/default-value.hxx>
+#include <xsd/cxx/tree/name-processor.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ //
+ //
+ typedef set<String> NameSet;
+
+ class Context: public Tree::Context
+ {
+ public:
+ struct Failed {};
+
+ Context (Tree::options const& ops,
+ Counts const& counts,
+ bool generate_xml_schema,
+ SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ StringLiteralMap const& map)
+ : Tree::Context (std::wcerr,
+ root,
+ path,
+ ops,
+ counts,
+ generate_xml_schema,
+ &map,
+ 0,
+ 0,
+ 0),
+ global_type_names (global_type_names_),
+ global_element_names (global_element_names_),
+ detach (ops.generate_detach ()),
+ type_regex (type_regex_),
+ accessor_regex (accessor_regex_),
+ one_accessor_regex (one_accessor_regex_),
+ opt_accessor_regex (opt_accessor_regex_),
+ seq_accessor_regex (seq_accessor_regex_),
+ modifier_regex (modifier_regex_),
+ one_modifier_regex (one_modifier_regex_),
+ opt_modifier_regex (opt_modifier_regex_),
+ seq_modifier_regex (seq_modifier_regex_),
+ parser_regex (parser_regex_),
+ serializer_regex (serializer_regex_),
+ const_regex (const_regex_),
+ enumerator_regex (enumerator_regex_),
+ element_type_regex (element_type_regex_)
+ {
+ NarrowString tn (options.type_naming ());
+ NarrowString fn (options.function_naming ());
+
+ // Type name regex.
+ //
+ {
+ // Predefined rules. The most frequently used come last: global
+ // names, two components (<name>,type), three components
+ // (<name>,const,iterator), and one component (value in enum).
+ //
+ if (tn == "knr")
+ {
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+),([^,]+)/$1_$2_$3_$4/");
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+)/$1_$2/");
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+)/$1/");
+
+ /*
+ type_regex.push_back ("/([^,]+)/$1/");
+ type_regex.push_back ("/([^,]+),([^,]+),([^,]+),([^,]+)/$1_$2_$3_$4/");
+ type_regex.push_back ("/([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
+ type_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
+ type_regex.push_back ("/[^ ]* (.+)/$1/");
+ */
+ }
+ else
+ {
+ // Upper camel case or Java.
+ //
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3\\u$4/");
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3/");
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+),([^,]+)/\\u$1\\u$2/");
+ type_regex.push_back ("/(?:[^ ]* )?([^,]+)/\\u$1/");
+
+ /*
+ type_regex.push_back ("/([^,]+)/\\u$1/");
+ type_regex.push_back ("/([^,]+),([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3\\u$4/");
+ type_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\u$1\\u$2\\u$3/");
+ type_regex.push_back ("/([^,]+),([^,]+)/\\u$1\\u$2/");
+ type_regex.push_back ("/[^ ]* (.+)/\\u$1/");
+ */
+
+ }
+
+ compile_regex (options.type_regex (), type_regex, "type");
+ }
+
+ // Accessor name regex.
+ //
+ {
+ // Predefined rules. The most frequently used come last: one
+ // component, three components (<name>,default,value) and two
+ // component (dom,document).
+ //
+ if (fn == "knr")
+ {
+ accessor_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
+ accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
+ accessor_regex.push_back ("/([^,]+)/$1/");
+ }
+ else if (fn == "lcc")
+ {
+ accessor_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
+ accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\l$1\\u$2\\u$3/");
+ accessor_regex.push_back ("/([^,]+)/\\l$1/");
+ }
+ else
+ {
+ // Java: add get.
+ //
+ accessor_regex.push_back ("/([^,]+),([^,]+)/get\\u$1\\u$2/");
+ accessor_regex.push_back ("/([^,]+),([^,]+),([^,]+)/get\\u$1\\u$2\\u$3/");
+ accessor_regex.push_back ("/([^,]+)/get\\u$1/");
+ }
+
+ compile_regex (options.accessor_regex (),
+ accessor_regex,
+ "accessor");
+
+ compile_regex (options.one_accessor_regex (),
+ one_accessor_regex,
+ "one accessor");
+
+ compile_regex (options.opt_accessor_regex (),
+ opt_accessor_regex,
+ "optional accessor");
+
+ compile_regex (options.seq_accessor_regex (),
+ seq_accessor_regex,
+ "sequence accessor");
+ }
+
+ // Modifier name regex.
+ //
+ {
+ if (fn == "knr")
+ {
+ // any,attribute
+ //
+ modifier_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
+ }
+ else if (fn == "lcc")
+ {
+ modifier_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
+ modifier_regex.push_back ("/([^,]+)/\\l$1/");
+ }
+ else
+ {
+ // Java: add set.
+ //
+ modifier_regex.push_back ("/([^,]+),([^,]+)/set\\u$1\\u$2/");
+ modifier_regex.push_back ("/([^,]+)/set\\u$1/");
+ modifier_regex.push_back ("/detach,([^,]+)/detach\\u$1/");
+ }
+
+ compile_regex (options.modifier_regex (),
+ modifier_regex,
+ "modifier");
+
+ compile_regex (options.one_modifier_regex (),
+ one_modifier_regex,
+ "one modifier");
+
+ compile_regex (options.opt_modifier_regex (),
+ opt_modifier_regex,
+ "optional modifier");
+
+ compile_regex (options.seq_modifier_regex (),
+ seq_modifier_regex,
+ "sequence modifier");
+ }
+
+ // Parser name regex.
+ //
+ {
+ if (fn == "lcc")
+ {
+ parser_regex.push_back ("/(.+)/\\l$1/");
+ }
+ else if (fn == "java")
+ {
+ // Java: add parse.
+ //
+ parser_regex.push_back ("/(.+)/parse\\u$1/");
+ }
+
+ compile_regex (options.parser_regex (), parser_regex, "parser");
+ }
+
+ // Serializer name regex.
+ //
+ {
+ if (fn == "lcc")
+ {
+ serializer_regex.push_back ("/(.+)/\\l$1/");
+ }
+ else if (fn == "java")
+ {
+ // Java: add serialize.
+ //
+ serializer_regex.push_back ("/(.+)/serialize\\u$1/");
+ }
+
+ compile_regex (options.serializer_regex (),
+ serializer_regex,
+ "serializer");
+ }
+
+ // Const regex.
+ //
+ {
+ if (fn == "knr")
+ {
+ const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/$1_$2_$3/");
+ const_regex.push_back ("/([^,]+),([^,]+)/$1_$2/");
+ }
+ else if (fn == "lcc")
+ {
+ const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\l$1_\\u$2_\\u$3/");
+ const_regex.push_back ("/([^,]+),([^,]+)/\\l$1\\u$2/");
+ }
+ else
+ {
+ // Java: all uppercase.
+ //
+ const_regex.push_back ("/([^,]+),([^,]+),([^,]+)/\\U$1_$2_$3/");
+ const_regex.push_back ("/([^,]+),([^,]+)/\\U$1_$2/");
+ }
+
+ compile_regex (options.const_regex (), const_regex, "const");
+ }
+
+ // Enumerator name regex.
+ //
+ {
+ // By default map an empty enumerator to the 'empty' word.
+ //
+ enumerator_regex.push_back ("/^$/empty/");
+
+ compile_regex (options.enumerator_regex (),
+ enumerator_regex,
+ "enumerator");
+ }
+
+ // Element type regex.
+ //
+ compile_regex (options.element_type_regex (),
+ element_type_regex,
+ "element_type");
+ }
+
+ protected:
+ Context (Context& c)
+ : Tree::Context (c),
+ global_type_names (c.global_type_names),
+ global_element_names (c.global_element_names),
+ detach (c.detach),
+ type_regex (c.type_regex),
+ accessor_regex (c.accessor_regex),
+ one_accessor_regex (c.one_accessor_regex),
+ opt_accessor_regex (c.opt_accessor_regex),
+ seq_accessor_regex (c.seq_accessor_regex),
+ modifier_regex (c.modifier_regex),
+ one_modifier_regex (c.one_modifier_regex),
+ opt_modifier_regex (c.opt_modifier_regex),
+ seq_modifier_regex (c.seq_modifier_regex),
+ parser_regex (c.parser_regex),
+ serializer_regex (c.serializer_regex),
+ const_regex (c.const_regex),
+ enumerator_regex (c.enumerator_regex),
+ element_type_regex (c.element_type_regex)
+ {
+ }
+
+ public:
+ typedef cutl::re::wregexsub Regex;
+ typedef cutl::re::wformat RegexFormat;
+
+ struct RegexVector: vector<Regex>
+ {
+ void
+ push_back (String const& r)
+ {
+ vector<Regex>::push_back (Regex (r));
+ }
+ };
+
+ String
+ process_regex (String const& name,
+ RegexVector const& rv,
+ String const& id)
+ {
+ bool trace (options.name_regex_trace ());
+
+ if (trace)
+ os << id << " name: '" << name << "'" << endl;
+
+ for (RegexVector::const_reverse_iterator i (rv.rbegin ());
+ i != rv.rend (); ++i)
+ {
+ if (trace)
+ os << "try: '" << i->regex () << "' : ";
+
+ if (i->match (name))
+ {
+ String r (i->replace (name));
+
+ if (trace)
+ os << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace)
+ os << '-' << endl;
+ }
+
+ return name;
+ }
+
+ String
+ process_regex (String const& name,
+ RegexVector const& primary,
+ RegexVector const& backup,
+ String const& id)
+ {
+ bool trace (options.name_regex_trace ());
+
+ if (trace)
+ os << id << " name: '" << name << "'" << endl;
+
+ for (RegexVector::const_reverse_iterator i (primary.rbegin ());
+ i != primary.rend (); ++i)
+ {
+ if (trace)
+ os << "try: '" << i->regex () << "' : ";
+
+ if (i->match (name))
+ {
+ String r (i->replace (name));
+
+ if (trace)
+ os << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace)
+ os << '-' << endl;
+ }
+
+ for (RegexVector::const_reverse_iterator i (backup.rbegin ());
+ i != backup.rend (); ++i)
+ {
+ if (trace)
+ os << "try: '" << i->regex () << "' : ";
+
+ if (i->match (name))
+ {
+ String r (i->replace (name));
+
+ if (trace)
+ os << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace)
+ os << '-' << endl;
+ }
+
+ return name;
+ }
+
+ String
+ process_regex (String const& ns,
+ String const& name,
+ RegexVector const& rv,
+ String const& id)
+ {
+ String s (ns + L' ' + name);
+ bool trace (options.name_regex_trace ());
+
+ if (trace)
+ os << id << " name: '" << s << "'" << endl;
+
+ for (RegexVector::const_reverse_iterator i (rv.rbegin ());
+ i != rv.rend (); ++i)
+ {
+ if (trace)
+ os << "try: '" << i->regex () << "' : ";
+
+ if (i->match (s))
+ {
+ String r (i->replace (s));
+
+ if (trace)
+ os << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace)
+ os << '-' << endl;
+ }
+
+ return name;
+ }
+
+ String
+ process_regex (String const& ns,
+ String const& name,
+ RegexVector const& primary,
+ RegexVector const& backup,
+ String const& id)
+ {
+ String s (ns + L' ' + name);
+ bool trace (options.name_regex_trace ());
+
+ if (trace)
+ os << id << " name: '" << s << "'" << endl;
+
+ for (RegexVector::const_reverse_iterator i (primary.rbegin ());
+ i != primary.rend (); ++i)
+ {
+ if (trace)
+ os << "try: '" << i->regex () << "' : ";
+
+ if (i->match (s))
+ {
+ String r (i->replace (s));
+
+ if (trace)
+ os << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace)
+ os << '-' << endl;
+ }
+
+ for (RegexVector::const_reverse_iterator i (backup.rbegin ());
+ i != backup.rend (); ++i)
+ {
+ if (trace)
+ os << "try: '" << i->regex () << "' : ";
+
+ if (i->match (s))
+ {
+ String r (i->replace (s));
+
+ if (trace)
+ os << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace)
+ os << '-' << endl;
+ }
+
+ return name;
+ }
+
+ public:
+ String
+ find_name (String const& base_name,
+ NameSet& set,
+ bool insert = true)
+ {
+ String name (base_name);
+
+ for (size_t i (1); set.find (name) != set.end (); ++i)
+ {
+ std::wostringstream os;
+ os << i;
+ name = base_name + os.str ();
+ }
+
+ if (insert)
+ set.insert (name);
+
+ return name;
+ }
+
+ private:
+ void
+ compile_regex (NarrowStrings const& sv,
+ RegexVector& rv,
+ String const& id)
+ {
+ for (NarrowStrings::const_iterator i (sv.begin ()); i != sv.end ();
+ ++i)
+ {
+ try
+ {
+ rv.push_back (*i);
+ }
+ catch (RegexFormat const& e)
+ {
+ os << "error: invalid " << id << " name regex: '" <<
+ e.regex () << "': " << e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+ }
+
+ private:
+ map<String, NameSet> global_type_names_;
+ map<String, NameSet> global_element_names_;
+
+ RegexVector type_regex_;
+ RegexVector accessor_regex_;
+ RegexVector one_accessor_regex_;
+ RegexVector opt_accessor_regex_;
+ RegexVector seq_accessor_regex_;
+ RegexVector modifier_regex_;
+ RegexVector one_modifier_regex_;
+ RegexVector opt_modifier_regex_;
+ RegexVector seq_modifier_regex_;
+ RegexVector parser_regex_;
+ RegexVector serializer_regex_;
+ RegexVector const_regex_;
+ RegexVector enumerator_regex_;
+ RegexVector element_type_regex_;
+
+ public:
+ map<String, NameSet>& global_type_names;
+ map<String, NameSet>& global_element_names;
+
+ bool detach;
+
+ RegexVector& type_regex;
+ RegexVector& accessor_regex;
+ RegexVector& one_accessor_regex;
+ RegexVector& opt_accessor_regex;
+ RegexVector& seq_accessor_regex;
+ RegexVector& modifier_regex;
+ RegexVector& one_modifier_regex;
+ RegexVector& opt_modifier_regex;
+ RegexVector& seq_modifier_regex;
+ RegexVector& parser_regex;
+ RegexVector& serializer_regex;
+ RegexVector& const_regex;
+ RegexVector& enumerator_regex;
+ RegexVector& element_type_regex;
+ };
+
+ //
+ //
+ struct Enumerator: Traversal::Enumerator, Context
+ {
+ Enumerator (Context& c, NameSet& set)
+ : Context (c), set_ (set)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ // Process the name with enumerator name regex.
+ //
+ String name (
+ process_regex (e.name (), enumerator_regex, L"enumerator"));
+
+ // Escape and unclash.
+ //
+ name = find_name (escape (name), set_);
+ e.context ().set ("name", name);
+ }
+
+ private:
+ NameSet& set_;
+ };
+
+ //
+ //
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ // Use processed name.
+ //
+ String name (e.context ().get<String> ("name"));
+
+ // If renamed name is empty then we are not generating
+ // anything for this type and name processing is not
+ // required.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ NameSet enum_set;
+ enum_set.insert (name);
+
+ Enumerator enumerator (*this, enum_set);
+ Traversal::Names names (enumerator);
+
+ Traversal::Enumeration::names (e, names);
+
+ // Assign name to the value type. First process the name
+ // with type name regex.
+ //
+ String value_name (
+ escape (process_regex ("value", type_regex, L"type")));
+ e.context ().set ("value", find_name (value_name, enum_set));
+ }
+ };
+
+ //
+ //
+ struct PrimaryMember: Traversal::Member, Context
+ {
+ PrimaryMember (Context& c, NameSet& name_set, NameSet& stem_set)
+ : Context (c), name_set_ (name_set), stem_set_ (stem_set)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (Tree::Context::skip (m))
+ return;
+
+ String stem (find_name (m.name (), stem_set_));
+
+ m.context ().set ("stem", stem);
+ m.context ().set ("name",
+ find_name (escape (stem), name_set_, false));
+ }
+
+ private:
+ NameSet& name_set_;
+ NameSet& stem_set_;
+ };
+
+ //
+ //
+ struct DerivedMember: Traversal::Member, Context
+ {
+ DerivedMember (Context& c, NameSet& name_set)
+ : Context (c), name_set_ (name_set)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (Tree::Context::skip (m))
+ return;
+
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (m.scope ()));
+
+ size_t max (Tree::Context::max (m));
+ size_t min (Tree::Context::min (m));
+
+ String const& s (m.context ().get<String> ("stem"));
+ String const& b (m.context ().get<String> ("name"));
+
+ bool def_attr (m.default_p () &&
+ m.is_a<SemanticGraph::Attribute> ());
+
+ // Accessors/modifiers. Note that we postpone inserting
+ // the names into the name_set to avoid over-escaping.
+ //
+ String an, mn;
+
+ if (max != 1)
+ {
+ an = find_name (
+ escape (process_regex (s,
+ seq_accessor_regex,
+ accessor_regex,
+ L"sequence accessor")),
+ name_set_,
+ false);
+
+ mn = find_name (
+ escape (process_regex (s,
+ seq_modifier_regex,
+ modifier_regex,
+ L"sequence modifier")),
+ name_set_,
+ false);
+ }
+ else if (min == 0 && !def_attr)
+ {
+ an = find_name (
+ escape (process_regex (s,
+ opt_accessor_regex,
+ accessor_regex,
+ L"optional accessor")),
+ name_set_,
+ false);
+
+ mn = find_name (
+ escape (process_regex (s,
+ opt_modifier_regex,
+ modifier_regex,
+ L"optional modifier")),
+ name_set_,
+ false);
+ }
+ else
+ {
+ an = find_name (
+ escape (process_regex (s,
+ one_accessor_regex,
+ accessor_regex,
+ L"one accessor")),
+ name_set_,
+ false);
+
+ mn = find_name (
+ escape (process_regex (s,
+ one_modifier_regex,
+ modifier_regex,
+ L"one modifier")),
+ name_set_,
+ false);
+ }
+
+ m.context ().set ("aname", an);
+ m.context ().set ("mname", mn);
+
+ name_set_.insert (b);
+
+ if (an != b)
+ name_set_.insert (an);
+
+ if (mn != b && mn != an)
+ name_set_.insert (mn);
+
+ // Detach.
+ //
+ if (detach && max == 1 && (min == 1 || def_attr))
+ {
+ String dn (find_name (
+ escape (process_regex (L"detach," + s,
+ one_modifier_regex,
+ modifier_regex,
+ L"one modifier")),
+ name_set_));
+
+ m.context ().set ("dname", dn);
+ }
+
+ // Types.
+ //
+ m.context ().set (
+ "type",
+ find_name (
+ escape (process_regex (s + L",type", type_regex, L"type")),
+ name_set_));
+
+ m.context ().set (
+ "traits",
+ find_name (
+ escape (process_regex (s + L",traits", type_regex, L"type")),
+ name_set_));
+
+ if (max != 1)
+ {
+ m.context ().set (
+ "container",
+ find_name (
+ escape (process_regex (s + L",sequence", type_regex, L"type")),
+ name_set_));
+
+ m.context ().set (
+ "iterator",
+ find_name (
+ escape (process_regex (s + L",iterator", type_regex, L"type")),
+ name_set_));
+
+ m.context ().set (
+ "const-iterator",
+ find_name (
+ escape (
+ process_regex (s + L",const,iterator", type_regex, L"type")),
+ name_set_));
+ }
+ else if (min == 0 && !def_attr)
+ {
+ m.context ().set (
+ "container",
+ find_name (
+ escape (process_regex (s + L",optional", type_regex, L"type")),
+ name_set_));
+ }
+
+ // Data member.
+ //
+ m.context ().set ("member", find_name (b + L"_", name_set_));
+
+ // Default value.
+ //
+ if (m.default_p ())
+ {
+ bool simple (true);
+
+ if (m.is_a<SemanticGraph::Element> ())
+ {
+ IsSimpleType test (simple);
+ test.dispatch (m.type ());
+ }
+
+ if (simple)
+ {
+ String an (
+ escape (
+ process_regex (
+ s + L",default,value", accessor_regex, L"accessor")));
+
+ m.context ().set ("default-value", find_name (an, name_set_));
+
+ bool lit (false);
+ {
+ IsLiteralValue test (lit);
+ test.dispatch (m.type ());
+ }
+
+ if (!lit)
+ {
+ m.context ().set (
+ "default-value-member",
+ find_name (b + L"_default_value_", name_set_));
+ }
+ }
+ }
+
+ // Element id.
+ //
+ if (m.is_a<SemanticGraph::Element> () && ordered_p (c))
+ {
+ String id (
+ escape (
+ process_regex (
+ s + L",id", const_regex, L"const")));
+
+ m.context ().set ("ordered-id-name", find_name (id, name_set_));
+ }
+ }
+
+ private:
+ NameSet& name_set_;
+ };
+
+
+ //
+ //
+ struct Any: Traversal::Any, Traversal::AnyAttribute, Context
+ {
+ Any (Context& c,
+ NameSet& name_set,
+ NameSet& stem_set,
+ bool& has_wildcard)
+ : Context (c),
+ name_set_ (name_set),
+ stem_set_ (stem_set),
+ has_wildcard_ (has_wildcard)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
+
+ size_t max (Tree::Context::max (a));
+ size_t min (Tree::Context::min (a));
+
+ String s (find_name (L"any", stem_set_));
+
+ String b (find_name (escape (s), name_set_, false));
+ a.context ().set ("name", b);
+
+ // Accessors/modifiers. Note that we postpone inserting the
+ // names into the name_set to avoid over-escaping.
+ //
+ String an, mn;
+
+ if (max != 1)
+ {
+ an = find_name (
+ escape (process_regex (s,
+ seq_accessor_regex,
+ accessor_regex,
+ L"sequence accessor")),
+ name_set_,
+ false);
+
+ mn = find_name (
+ escape (process_regex (s,
+ seq_modifier_regex,
+ modifier_regex,
+ L"sequence modifier")),
+ name_set_,
+ false);
+ }
+ else if (min == 0)
+ {
+ an = find_name (
+ escape (process_regex (s,
+ opt_accessor_regex,
+ accessor_regex,
+ L"optional accessor")),
+ name_set_,
+ false);
+
+ mn = find_name (
+ escape (process_regex (s,
+ opt_modifier_regex,
+ modifier_regex,
+ L"optional modifier")),
+ name_set_,
+ false);
+ }
+ else
+ {
+ an = find_name (
+ escape (process_regex (s,
+ one_accessor_regex,
+ accessor_regex,
+ L"one accessor")),
+ name_set_,
+ false);
+
+ mn = find_name (
+ escape (process_regex (s,
+ one_modifier_regex,
+ modifier_regex,
+ L"one modifier")),
+ name_set_,
+ false);
+ }
+
+ a.context ().set ("aname", an);
+ a.context ().set ("mname", mn);
+
+ name_set_.insert (b);
+
+ if (an != b)
+ name_set_.insert (an);
+
+ if (mn != b && mn != an)
+ name_set_.insert (mn);
+
+ // Types
+ //
+ if (max != 1)
+ {
+ a.context ().set (
+ "container",
+ find_name (
+ escape (process_regex (s + L",sequence", type_regex, L"type")),
+ name_set_));
+
+ a.context ().set (
+ "iterator",
+ find_name (
+ escape (process_regex (s + L",iterator", type_regex, L"type")),
+ name_set_));
+
+ a.context ().set (
+ "const-iterator",
+ find_name (
+ escape (
+ process_regex (s + L",const,iterator", type_regex, L"type")),
+ name_set_));
+ }
+ else if (min == 0)
+ {
+ a.context ().set (
+ "container",
+ find_name (
+ escape (process_regex (s + L",optional", type_regex, L"type")),
+ name_set_));
+ }
+
+ // Data member.
+ //
+ a.context ().set ("member", find_name (b + L"_", name_set_));
+
+ // Wildcard id.
+ //
+ if (ordered_p (c))
+ {
+ String id (
+ escape (
+ process_regex (
+ s + L",id", const_regex, L"const")));
+
+ a.context ().set ("ordered-id-name", find_name (id, name_set_));
+ }
+
+ if (!has_wildcard_)
+ has_wildcard_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String s (find_name (L"any,attribute", stem_set_));
+
+ String b (find_name (escape (s), name_set_, false));
+ a.context ().set ("name", b);
+
+ // Accessors/modifiers. Note that we postpone inserting the
+ // names into the name_set to avoid over-escaping.
+ //
+ String an (
+ find_name (
+ escape (process_regex (s, accessor_regex, L"accessor")),
+ name_set_,
+ false));
+
+ String mn (
+ find_name (
+ escape (process_regex (s, modifier_regex, L"modifier")),
+ name_set_,
+ false));
+
+ a.context ().set ("aname", an);
+ a.context ().set ("mname", mn);
+
+ name_set_.insert (b);
+
+ if (an != b)
+ name_set_.insert (an);
+
+ if (mn != b && mn != an)
+ name_set_.insert (mn);
+
+ // Types
+ //
+ a.context ().set (
+ "container",
+ find_name (
+ escape (process_regex (s + L",set", type_regex, L"type")),
+ name_set_));
+
+ a.context ().set (
+ "iterator",
+ find_name (
+ escape (process_regex (s + L",iterator", type_regex, L"type")),
+ name_set_));
+
+ a.context ().set (
+ "const-iterator",
+ find_name (
+ escape (
+ process_regex (s + L",const,iterator", type_regex, L"type")),
+ name_set_));
+
+ // Data member.
+ //
+ a.context ().set ("member", find_name (b + L"_", name_set_));
+
+ if (!has_wildcard_)
+ has_wildcard_ = true;
+ }
+
+ private:
+ NameSet& name_set_;
+ NameSet& stem_set_;
+ bool& has_wildcard_;
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ // We leave this set around to allow other mappings to use
+ // this information.
+ //
+ ctx.set ("cxx-tree-name-processor-stem-set", NameSet ());
+ ctx.set ("cxx-tree-name-processor-member-set", NameSet ());
+
+ // Use processed name.
+ //
+ String name (ctx.get<String> ("name"));
+
+ // If renamed name is empty then we are not generating
+ // anything for this type and name processing is not
+ // required.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ NameSet& stem_set (
+ ctx.get<NameSet> ("cxx-tree-name-processor-stem-set"));
+
+ NameSet& member_set (
+ ctx.get<NameSet> ("cxx-tree-name-processor-member-set"));
+
+ stem_set.insert (c.name ());
+ member_set.insert (name);
+
+ // Add our base's stems and members to the initial list.
+ //
+ if (c.inherits_p ())
+ {
+ // @@ What if this types name is the same as one of base's
+ // members?
+ //
+ SemanticGraph::Type& base (c.inherits ().base ());
+
+ if (base.is_a<SemanticGraph::Complex> () &&
+ !base.is_a<SemanticGraph::Enumeration> ())
+ {
+ if (!base.context ().count (
+ "cxx-tree-name-processor-member-set"))
+ {
+ dispatch (base);
+ }
+
+ NameSet const& base_stem_set (
+ base.context ().get<NameSet> (
+ "cxx-tree-name-processor-stem-set"));
+
+ stem_set.insert (base_stem_set.begin (), base_stem_set.end ());
+
+ NameSet const& base_member_set (
+ base.context ().get<NameSet> (
+ "cxx-tree-name-processor-member-set"));
+
+ member_set.insert (base_member_set.begin (),
+ base_member_set.end ());
+ }
+ }
+
+ // First assign the "primary" names.
+ //
+ {
+ PrimaryMember member (*this, member_set, stem_set);
+ Traversal::Names names (member);
+
+ Complex::names (c, names);
+ }
+
+ // Derived names for members.
+ //
+ {
+ DerivedMember member (*this, member_set);
+ Traversal::Names names (member);
+
+ Complex::names (c, names);
+ }
+
+ // Names for the mixed content.
+ //
+ if (mixed_p (c))
+ {
+ // Check if we already have the mixed content down inheritance
+ // hierarchy.
+ //
+ using SemanticGraph::Complex;
+
+ for (Complex* p (&c); p->inherits_p ();)
+ {
+ if (Complex* b = dynamic_cast<Complex*> (
+ &p->inherits ().base ()))
+ {
+ if (mixed_p (*b))
+ {
+ SemanticGraph::Context& bctx (b->context ());
+ ctx.set ("mixed-type", bctx.get<String> ("mixed-type"));
+ ctx.set ("mixed-const-iterator",
+ bctx.get<String> ("mixed-const-iterator"));
+ ctx.set ("mixed-ordered-id-name",
+ bctx.get<String> ("mixed-ordered-id-name"));
+ ctx.set ("mixed-aname", bctx.get<String> ("mixed-aname"));
+ ctx.set ("mixed-member", bctx.get<String> ("mixed-member"));
+ ctx.set ("mixed-in-base", true);
+ break;
+ }
+
+ p = b;
+ }
+ else
+ break;
+ }
+
+ // If not, set up the names.
+ //
+ if (!ctx.count ("mixed-in-base"))
+ {
+ String s (find_name (L"text,content", stem_set));
+ String n (find_name (escape (s), member_set, false));
+
+ String an (find_name (
+ escape (process_regex (s,
+ seq_accessor_regex,
+ accessor_regex,
+ L"sequence accessor")),
+ member_set,
+ false));
+
+ String mn (find_name (
+ escape (process_regex (s,
+ seq_modifier_regex,
+ modifier_regex,
+ L"sequence modifier")),
+ member_set,
+ false));
+
+ ctx.set ("mixed-aname", an);
+ ctx.set ("mixed-mname", mn);
+
+ member_set.insert (name);
+
+ if (an != n)
+ member_set.insert (an);
+
+ if (mn != n && mn != an)
+ member_set.insert (mn);
+
+ // Types.
+ //
+ ctx.set (
+ "mixed-type",
+ find_name (
+ escape (process_regex (s + L",type", type_regex, L"type")),
+ member_set));
+
+ ctx.set (
+ "mixed-container",
+ find_name (
+ escape (process_regex (s + L",sequence", type_regex, L"type")),
+ member_set));
+
+ ctx.set (
+ "mixed-iterator",
+ find_name (
+ escape (process_regex (s + L",iterator", type_regex, L"type")),
+ member_set));
+
+ ctx.set (
+ "mixed-const-iterator",
+ find_name (
+ escape (
+ process_regex (s + L",const,iterator", type_regex, L"type")),
+ member_set));
+
+ // Text content id.
+ //
+ ctx.set (
+ "mixed-ordered-id-name",
+ find_name (
+ escape (
+ process_regex (s + L",id", const_regex, L"const")),
+ member_set));
+
+ // Data member.
+ //
+ ctx.set ("mixed-member", find_name (n + L"_", member_set));
+ }
+ }
+
+ // Names for wildcards.
+ //
+ if (options.generate_wildcard ())
+ {
+ bool has_wildcard (false);
+ Any any (*this, member_set, stem_set, has_wildcard);
+ Traversal::Names names (any);
+ Complex::names (c, names);
+
+ // Assign names for dom_document.
+ //
+ if (has_wildcard)
+ {
+ // Check if we already have dom_document down inheritance
+ // hierarchy.
+ //
+ for (SemanticGraph::Complex* p (&c); p->inherits_p ();)
+ {
+ if (SemanticGraph::Complex* base =
+ dynamic_cast<SemanticGraph::Complex*> (
+ &p->inherits ().base ()))
+ {
+ if (base->context ().count ("dom-document"))
+ {
+ c.context ().set (
+ "dom-document",
+ base->context ().get<String> ("dom-document"));
+ break;
+ }
+
+ p = base;
+ }
+ else
+ break;
+ }
+
+ // If not, set up the names.
+ //
+ if (!c.context ().count ("dom-document"))
+ {
+ String stem (find_name (L"dom,document", stem_set));
+
+ String an (
+ escape (
+ process_regex (stem, accessor_regex, L"accessor")));
+
+ c.context ().set ("dom-document", find_name (an, member_set));
+
+ c.context ().set (
+ "dom-document-member",
+ find_name (escape (stem + L"_"), member_set));
+ }
+ }
+ }
+
+ // Names for the order container.
+ //
+ if (ordered_p (c))
+ {
+ // Check if we already have the order container down
+ // inheritance hierarchy.
+ //
+ using SemanticGraph::Complex;
+
+ for (Complex* p (&c); p->inherits_p ();)
+ {
+ if (Complex* b = dynamic_cast<Complex*> (
+ &p->inherits ().base ()))
+ {
+ if (ordered_p (*b))
+ {
+ SemanticGraph::Context& bctx (b->context ());
+ ctx.set ("order-type", bctx.get<String> ("order-type"));
+ ctx.set ("order-const-iterator",
+ bctx.get<String> ("order-const-iterator"));
+ ctx.set ("order-aname", bctx.get<String> ("order-aname"));
+ ctx.set ("order-member", bctx.get<String> ("order-member"));
+ ctx.set ("order-in-base", true);
+ break;
+ }
+
+ p = b;
+ }
+ else
+ break;
+ }
+
+ // If not, set up the names.
+ //
+ if (!ctx.count ("order-in-base"))
+ {
+ String s (find_name (L"content,order", stem_set));
+ String n (find_name (escape (s), member_set, false));
+
+ String an (find_name (
+ escape (process_regex (s,
+ seq_accessor_regex,
+ accessor_regex,
+ L"sequence accessor")),
+ member_set,
+ false));
+
+ String mn (find_name (
+ escape (process_regex (s,
+ seq_modifier_regex,
+ modifier_regex,
+ L"sequence modifier")),
+ member_set,
+ false));
+
+ ctx.set ("order-aname", an);
+ ctx.set ("order-mname", mn);
+
+ member_set.insert (name);
+
+ if (an != n)
+ member_set.insert (an);
+
+ if (mn != n && mn != an)
+ member_set.insert (mn);
+
+ // Types.
+ //
+ ctx.set (
+ "order-type",
+ find_name (
+ escape (process_regex (s + L",type", type_regex, L"type")),
+ member_set));
+
+ ctx.set (
+ "order-container",
+ find_name (
+ escape (process_regex (s + L",sequence", type_regex, L"type")),
+ member_set));
+
+ ctx.set (
+ "order-iterator",
+ find_name (
+ escape (process_regex (s + L",iterator", type_regex, L"type")),
+ member_set));
+
+ ctx.set (
+ "order-const-iterator",
+ find_name (
+ escape (
+ process_regex (s + L",const,iterator", type_regex, L"type")),
+ member_set));
+
+ // Data member.
+ //
+ ctx.set ("order-member", find_name (n + L"_", member_set));
+ }
+ }
+ }
+ };
+
+
+ //
+ //
+ struct GlobalType: Traversal::Type, Context
+ {
+ GlobalType (Context& c, NameSet& set)
+ : Context (c), set_ (set)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ // Process the name with type name regex.
+ //
+ String name (process_regex (
+ namespace_ (t).name (),
+ t.name (),
+ type_regex,
+ L"type"));
+
+ // Escape and unclash.
+ //
+ name = find_name (escape (name), set_);
+ t.context ().set ("name", name);
+
+ // Also add renamed name if any.
+ //
+ if (renamed_type (t, name) && name)
+ set_.insert (name);
+ }
+
+ private:
+ NameSet& set_;
+ };
+
+
+ //
+ //
+ struct GlobalElement: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ GlobalElement (Context& c,
+ NameSet const& type_set,
+ NameSet& element_set)
+ : GlobalElementBase (c),
+ Context (c),
+ type_set_ (type_set),
+ element_set_ (element_set)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ // First we need to figure out if we need to process this
+ // global element.
+ //
+ if (!generate_p (e))
+ return;
+
+ if (options.generate_element_type ())
+ {
+ SemanticGraph::Context& ec (e.context ());
+
+ String name;
+
+ if (doc_root_p (e))
+ {
+ name = find_name (
+ escape (
+ process_regex (
+ namespace_ (e).name (),
+ e.name (),
+ element_type_regex,
+ type_regex,
+ L"element type")));
+
+ // Assign inner names.
+ //
+ NameSet set;
+ set.insert (name);
+
+ ec.set (
+ "type",
+ Context::find_name (
+ escape (process_regex (L"value,type", type_regex, L"type")),
+ set));
+
+ ec.set (
+ "traits",
+ Context::find_name (
+ escape (process_regex (L"value,traits", type_regex, L"type")),
+ set));
+
+ String an (Context::find_name (
+ escape (process_regex ("value",
+ one_accessor_regex,
+ accessor_regex,
+ L"one accessor")),
+ set,
+ false));
+
+ String mn (Context::find_name (
+ escape (process_regex ("value",
+ one_modifier_regex,
+ modifier_regex,
+ L"one modifier")),
+ set,
+ false));
+
+ ec.set ("aname", an);
+ ec.set ("mname", mn);
+
+ set.insert (an);
+
+ if (an != mn)
+ set.insert (mn);
+
+ // Detach.
+ //
+ if (detach)
+ {
+ String dn (Context::find_name (
+ escape (process_regex (L"detach,value",
+ one_modifier_regex,
+ modifier_regex,
+ L"one modifier")),
+ set));
+
+ ec.set ("dname", dn);
+ }
+
+ // Assign name() and namespace_() names.
+ //
+ ec.set (
+ "element-name",
+ Context::find_name (
+ escape (
+ process_regex ("name", accessor_regex, L"modifier")),
+ set));
+
+ ec.set (
+ "element-ns",
+ Context::find_name (
+ escape (
+ process_regex ("namespace", accessor_regex, L"modifier")),
+ set));
+
+ // Data members.
+ //
+ ec.set ("member", Context::find_name ("value_", set));
+ ec.set ("element-name-member",
+ Context::find_name ("name_", set));
+ ec.set ("element-ns-member",
+ Context::find_name ("namespace__", set));
+ }
+ else
+ name = find_name (escape (e.name ()));
+
+ ec.set ("name", name);
+ element_set_.insert (name);
+ }
+ else
+ {
+ // Make sure the name is unique among global elements and
+ // does not collide with a global type name.
+ //
+ String base (find_name (escape (e.name ())));
+ e.context ().set ("name", base);
+
+ String n (e.name ());
+
+ // Assign the parsing function name.
+ //
+ String p;
+
+ if (!options.suppress_parsing () && doc_root_p (e))
+ {
+ p = find_name (
+ escape (
+ process_regex (n, parser_regex, L"parsing function")));
+
+ e.context ().set ("parser", p);
+ }
+
+ // Assign the serialization function name.
+ //
+ String s;
+
+ if (options.generate_serialization () && doc_root_p (e))
+ {
+ s = find_name (
+ escape (
+ process_regex (
+ n, serializer_regex, L"serialization function")));
+
+ e.context ().set ("serializer", s);
+ }
+
+ // Add the names to the set only after processing parsing and
+ // serialization function names so that we do not over-escape
+ // them.
+ //
+ element_set_.insert (base);
+
+ if (p && p != base)
+ element_set_.insert (p);
+
+ if (s && s != base && s != p)
+ element_set_.insert (s);
+ }
+ }
+
+ private:
+ String
+ find_name (String const& name)
+ {
+ String r (name);
+
+ // If we are conflicting with a type name let's first try to
+ // simply append an underscore and only resort to ugly names
+ // like name1, etc., if this fails.
+ //
+ if (type_set_.find (r) != type_set_.end ())
+ r += L"_";
+
+ for (size_t i (1);
+ element_set_.find (r) != element_set_.end () ||
+ type_set_.find (r) != type_set_.end (); ++i)
+ {
+ std::wostringstream os;
+ os << i;
+ r = name + os.str ();
+ }
+
+ return r;
+ }
+
+ private:
+ NameSet const& type_set_;
+ NameSet& element_set_;
+ };
+
+ struct NamespacePassOne: Traversal::Namespace, Context
+ {
+ NamespacePassOne (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& ns)
+ {
+ NameSet& type_set (global_type_names[ns.name ()]);
+
+ GlobalType type (*this, type_set);
+ Traversal::Names names (type);
+
+ Traversal::Namespace::names (ns, names);
+ Traversal::Namespace::names (ns);
+ }
+ };
+
+
+ struct NamespacePassThree: Traversal::Namespace, Context
+ {
+ NamespacePassThree (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& ns)
+ {
+ String const& name (ns.name ());
+
+ NameSet const& type_set (global_type_names[name]);
+ NameSet& element_set (global_element_names[name]);
+
+ GlobalElement element (*this, type_set, element_set);
+ Traversal::Names names (element);
+
+ Traversal::Namespace::names (ns, names);
+ }
+ };
+
+
+ struct FundamentalNamespace: Traversal::Namespace,
+
+ Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities,
+
+ Context
+ {
+ FundamentalNamespace (Context& c)
+ : Context (c)
+ {
+ *this >> names_ >> *this;
+ }
+
+ void
+ process_name (SemanticGraph::Type& t, String const& name)
+ {
+ String r (
+ process_regex (
+ namespace_ (t).name (), name, type_regex, L"type"));
+
+ t.context ().set ("name", escape (r));
+ }
+
+ void
+ process_name (SemanticGraph::Namespace& n,
+ String const& name,
+ char const* key)
+ {
+ String r (process_regex (name, type_regex, L"type"));
+ n.context ().set (key, escape (r));
+ }
+
+ // anyType and anySimpleType
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ process_name (t, "type");
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ process_name (t, "simple,type");
+ }
+
+ // Integrals.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ process_name (t, "byte");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ process_name (t, "unsigned,byte");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ process_name (t, "short");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ process_name (t, "unsigned,short");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ process_name (t, "int");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ process_name (t, "unsigned,int");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ process_name (t, "long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ process_name (t, "unsigned,long");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ process_name (t, "integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ process_name (t, "non,positive,integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ process_name (t, "non,negative,integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ process_name (t, "positive,integer");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ process_name (t, "negative,integer");
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ process_name (t, "boolean");
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ process_name (t, "float");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ process_name (t, "double");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ process_name (t, "decimal");
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ process_name (t, "string");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ process_name (t, "normalized,string");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ process_name (t, "token");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ process_name (t, "nmtoken");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ process_name (t, "nmtokens");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ process_name (t, "name");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ process_name (t, "ncname");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ process_name (t, "language");
+ }
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ process_name (t, "id");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ process_name (t, "idref");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ process_name (t, "idrefs");
+ }
+
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ process_name (t, "uri");
+ }
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ process_name (t, "qname");
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ process_name (t, "base64,binary");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ process_name (t, "hex,binary");
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ process_name (t, "date");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ process_name (t, "date,time");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ process_name (t, "duration");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ process_name (t, "gday");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ process_name (t, "gmonth");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ process_name (t, "gmonth,day");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ process_name (t, "gyear");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ process_name (t, "gyear,month");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ process_name (t, "time");
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity& t)
+ {
+ process_name (t, "entity");
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities& t)
+ {
+ process_name (t, "entities");
+ }
+
+ virtual void
+ post (SemanticGraph::Namespace& n)
+ {
+ // Assign names to extra stuff in the XML Schema namespace.
+ //
+ process_name (n, "container", "container");
+ process_name (n, "buffer", "buffer");
+ process_name (n, "time,zone", "time-zone");
+
+ process_name (n, "content,order", "content-order");
+
+ if (options.generate_element_type ())
+ process_name (n, "element,type", "element-type");
+
+ if (options.generate_element_map ())
+ process_name (n, "element,map", "element-map");
+
+ if (options.generate_serialization ())
+ {
+ process_name (n, "namespace,info", "namespace-info");
+ process_name (n, "namespace,infomap", "namespace-infomap");
+ process_name (n, "list,stream", "list-stream");
+ process_name (n, "as,double", "as-double");
+ process_name (n, "as,decimal", "as-decimal");
+ process_name (n, "facet", "facet");
+ }
+
+ if (!options.generate_insertion ().empty ())
+ {
+ process_name (n, "ostream", "ostream");
+ }
+
+ if (!options.generate_extraction ().empty ())
+ {
+ process_name (n, "istream", "istream");
+ }
+
+ process_name (n, "flags", "flags");
+ process_name (n, "properties", "properties");
+
+ NarrowString fn (options.function_naming ());
+
+ if (fn == "knr")
+ n.context ().set ("tree-node-key", String ("tree_node_key"));
+ else
+ n.context ().set ("tree-node-key", String ("treeNodeKey"));
+
+ process_name (n, "exception", "exception");
+ process_name (n, "parsing", "parsing");
+ process_name (n, "expected,element", "expected-element");
+ process_name (n, "unexpected,element", "unexpected-element");
+ process_name (n, "expected,attribute", "expected-attribute");
+ process_name (n, "unexpected,enumerator", "unexpected-enumerator");
+ process_name (n, "expected,text,content", "expected-text-content");
+ process_name (n, "no,type,info", "no-type-info");
+ process_name (n, "no,element,info", "no-element-info");
+ process_name (n, "not,derived", "not-derived");
+ process_name (n, "duplicate,id", "duplicate-id");
+ process_name (n, "serialization", "serialization");
+ process_name (n, "no,namespace,mapping", "no-namespace-mapping");
+ process_name (n, "no,prefix,mapping", "no-prefix-mapping");
+ process_name (n, "xsi,already,in,use", "xsi-already-in-use");
+ process_name (n, "bounds", "bounds");
+
+ process_name (n, "severity", "severity");
+ process_name (n, "error", "error");
+ process_name (n, "diagnostics", "diagnostics");
+
+ if (!options.suppress_parsing () ||
+ options.generate_serialization ())
+ {
+ process_name (n, "error,handler", "error-handler");
+ }
+
+ Namespace::post (n);
+ }
+
+ private:
+ Traversal::Names names_;
+ };
+
+
+ // Go into sourced/included/imported schemas while making sure
+ // we don't process the same stuff more than once.
+ //
+ struct UsesPassOne: Traversal::Uses
+ {
+ virtual void
+ traverse (Type& u)
+ {
+ SemanticGraph::Schema& s (u.schema ());
+
+ if (!s.context ().count ("cxx-tree-name-processor-pass-1"))
+ {
+ s.context ().set ("cxx-tree-name-processor-pass-1", true);
+ Traversal::Uses::traverse (u);
+ }
+ }
+ };
+
+ struct UsesPassThree: Traversal::Uses
+ {
+ virtual void
+ traverse (Type& u)
+ {
+ SemanticGraph::Schema& s (u.schema ());
+
+ if (!s.context ().count ("cxx-tree-name-processor-pass-3"))
+ {
+ s.context ().set ("cxx-tree-name-processor-pass-3", true);
+ Traversal::Uses::traverse (u);
+ }
+ }
+ };
+
+ // Go into implied schemas while making sure we don't process
+ // the same stuff more than once.
+ //
+ struct Implies: Traversal::Implies
+ {
+ virtual void
+ traverse (SemanticGraph::Implies& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count ("cxx-tree-name-processor-seen"))
+ {
+ s.context ().set ("cxx-tree-name-processor-seen", true);
+ Traversal::Implies::traverse (i);
+ }
+ }
+ };
+
+ bool
+ process_impl (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& file,
+ StringLiteralMap const& map)
+ {
+ try
+ {
+ Counts counts;
+ Context ctx (ops, counts, false, tu, file, map);
+
+ if (tu.names_begin ()->named ().name () ==
+ L"http://www.w3.org/2001/XMLSchema")
+ {
+ // XML Schema namespace.
+ //
+ Traversal::Schema xs_schema;
+ Traversal::Names xs_schema_names;
+ FundamentalNamespace xs_ns (ctx);
+
+ xs_schema >> xs_schema_names >> xs_ns;
+
+ xs_schema.dispatch (tu);
+ }
+ else
+ {
+
+ // Pass one - assign names to global types. This pass cannot
+ // be combined with pass two because of possible recursive
+ // schema inclusions. Also note that we check first if this
+ // schema has already been processed which may happen in the
+ // file-per-type compilation mode.
+ //
+ if (!tu.context ().count ("cxx-tree-name-processor-pass-1"))
+ {
+ Traversal::Schema schema;
+ Traversal::Schema xs_schema;
+ UsesPassOne uses;
+ Implies implies;
+
+ schema >> uses >> schema;
+ schema >> implies >> xs_schema;
+
+ Traversal::Names schema_names;
+ Traversal::Names xs_schema_names;
+ NamespacePassOne ns (ctx);
+ FundamentalNamespace xs_ns (ctx);
+
+ schema >> schema_names >> ns;
+ xs_schema >> xs_schema_names >> xs_ns;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set ("cxx-tree-name-processor-pass-1", true);
+
+ schema.dispatch (tu);
+ }
+
+ // Pass two - assign names inside complex types. Here
+ // we don't need to go into included/imported schemas.
+ //
+ {
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+
+ schema >> schema_names >> ns >> ns_names;
+
+ Complex complex (ctx);
+ Traversal::Enumeration enumeration; // Avoid fallback on complex.
+
+ ns_names >> complex;
+ ns_names >> enumeration;
+
+ schema.dispatch (tu);
+ }
+
+ // Pass three - assign names to global elements as well as
+ // inside enums. Also note that we check first if this schema
+ // has already been processed which may happen in the file-per-
+ // type compilation mode.
+ //
+ if (!tu.context ().count ("cxx-tree-name-processor-pass-3"))
+ {
+ Traversal::Schema schema;
+ UsesPassThree uses;
+
+ schema >> uses >> schema;
+
+ Traversal::Names schema_names;
+ NamespacePassThree ns (ctx);
+ Traversal::Namespace ns_enum;
+
+ schema >> schema_names;
+
+ schema_names >> ns;
+ schema_names >> ns_enum;
+
+ Traversal::Names ns_names;
+ Enumeration enumeration (ctx);
+
+ ns_enum >> ns_names >> enumeration;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set ("cxx-tree-name-processor-pass-3", true);
+
+ schema.dispatch (tu);
+ }
+ }
+ }
+ catch (Context::Failed const&)
+ {
+ // Diagnostics has already been issued.
+ //
+ return false;
+ }
+
+ return true;
+ }
+ }
+
+ bool NameProcessor::
+ process (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& file,
+ StringLiteralMap const& map)
+ {
+ return process_impl (ops, tu, file, map);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/name-processor.hxx b/xsd/xsd/cxx/tree/name-processor.hxx
new file mode 100644
index 0000000..632b05e
--- /dev/null
+++ b/xsd/xsd/cxx/tree/name-processor.hxx
@@ -0,0 +1,28 @@
+// file : xsd/cxx/tree/name-processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_NAME_PROCESSOR_HXX
+#define XSD_CXX_TREE_NAME_PROCESSOR_HXX
+
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/tree/elements.hxx>
+#include <xsd/cxx/tree/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class NameProcessor
+ {
+ public:
+ bool
+ process (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file,
+ StringLiteralMap const&);
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_NAME_PROCESSOR_HXX
diff --git a/xsd/xsd/cxx/tree/options.cli b/xsd/xsd/cxx/tree/options.cli
new file mode 100644
index 0000000..1f0b23f
--- /dev/null
+++ b/xsd/xsd/cxx/tree/options.cli
@@ -0,0 +1,479 @@
+// file : xsd/cxx/tree/options.cli
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include <cstddef>; // std::size_t
+
+include <xsd/types.hxx>; // NarrowString, NarrowStrings
+
+include <xsd/cxx/options.cli>;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class options: CXX::options
+ {
+ // Polymorphism.
+ //
+ bool --generate-polymorphic
+ {
+ "Generate polymorphism-aware code. Specify this option if you use
+ substitution groups or \cb{xsi:type}. Use the \cb{--polymorphic-type}
+ or \cb{--polymorphic-type-all} option to specify which type
+ hierarchies are polymorphic."
+ };
+
+ NarrowStrings --polymorphic-type
+ {
+ "<type>",
+ "Indicate that <type> is a root of a polymorphic type hierarchy. The
+ compiler can often automatically determine which types are
+ polymorphic based on the substitution group declarations. However,
+ you may need to use this option if you are not using substitution
+ groups or if substitution groups are defined in another schema. You
+ need to specify this option when compiling every schema file that
+ references <type>. The <type> argument is an XML Schema type name
+ that can be optionally qualified with a namespace in the
+ \c{\i{namespace}\b{#}\i{name}} form."
+ };
+
+ bool --polymorphic-type-all
+ {
+ "Indicate that all types should be treated as polymorphic."
+ };
+
+ unsigned long --polymorphic-plate = 0
+ {
+ "<num>",
+ "Specify the polymorphic map plate the generated code should register
+ on. This functionality is primarily useful to segregate multiple
+ schemas that define the same polymorphic types."
+ };
+
+ // Ordered content.
+ //
+ NarrowStrings --ordered-type
+ {
+ "<type>",
+ "Indicate that element order in <type> is significant. An example
+ would be a complex type with unbounded choice as a content model
+ where the element order in XML has application-specific semantics.
+ For ordered types the compiler generates a special container data
+ member and a corresponding set of accessors and modifiers that are
+ used to capture the order of elements and, for mixed content, of
+ text.
+
+ The <type> argument is an XML Schema type name that can be optionally
+ qualified with a namespace in the \c{\i{namespace}\b{#}\i{name}} form.
+ Note also that you will need to specify this option when compiling
+ every schema file that has other ordered types derived from this
+ type."
+ };
+
+ bool --ordered-type-derived
+ {
+ "Automatically treat types derived from ordered bases as also
+ ordered. This is primarily useful if you would like to be able
+ to iterate over the complete content using the content order
+ container."
+ };
+
+ bool --ordered-type-mixed
+ {
+ "Automatically treat complex types with mixed content as ordered."
+ };
+
+ bool --ordered-type-all
+ {
+ "Indicate that element order in all types is significant."
+ };
+
+ NarrowString --order-container
+ {
+ "<type>",
+ "Specify a custom class template that should be used as a container
+ for the content order in ordered types instead of the default
+ \cb{std::vector}. See \cb{--ordered-type} for more information on
+ ordered type. This option is primarily useful if you need to
+ perform more complex lookups in the content order container, for
+ example by element id. In this case, a container like Boost
+ multi-index may be more convenient. Note that if using a custom
+ container, you will also most likely need to include the relevant
+ headers using the \cb{--hxx-prologue*} options."
+ };
+
+ // Features.
+ //
+ bool --generate-serialization
+ {
+ "Generate serialization functions. Serialization functions convert
+ the object model back to XML."
+ };
+
+ bool --generate-ostream
+ {
+ "Generate ostream insertion operators (\cb{operator<<}) for generated
+ types. This allows one to easily print a fragment or the whole object
+ model for debugging or logging."
+ };
+
+ bool --generate-doxygen
+ {
+ "Generate documentation comments suitable for extraction by the
+ Doxygen documentation system. Documentation from annotations is
+ added to the comments if present in the schema."
+ };
+
+ bool --generate-comparison
+ {
+ "Generate comparison operators (\cb{operator==} and \cb{operator!=})
+ for complex types. Comparison is performed member-wise."
+ };
+
+ bool --generate-default-ctor
+ {
+ "Generate default constructors even for types that have required
+ members. Required members of an instance constructed using such a
+ constructor are not initialized and accessing them results in
+ undefined behavior."
+ };
+
+ bool --generate-from-base-ctor
+ {
+ "Generate constructors that expect an instance of a base type
+ followed by all required members."
+ };
+
+ bool --suppress-assignment
+ {
+ "Suppress the generation of copy assignment operators for complex
+ types. If this option is specified, the copy assignment operators
+ for such types are declared private and left unimplemented."
+ };
+
+ bool --generate-detach
+ {
+ "Generate detach functions for required elements and attributes.
+ Detach functions for optional and sequence cardinalities are
+ provided by the respective containers. These functions, for
+ example, allow you to move sub-trees in the object model either
+ within the same tree or between different trees."
+ };
+
+ bool --generate-wildcard
+ {
+ "Generate accessors and modifiers as well as parsing and serialization
+ code for XML Schema wildcards (\cb{any} and \cb{anyAttribute}). XML
+ content matched by wildcards is presented as DOM fragments. Note
+ that you need to initialize the Xerces-C++ runtime if you are using
+ this option."
+ };
+
+ bool --generate-any-type
+ {
+ "Extract and store content of the XML Schema \cb{anyType} type as a
+ DOM fragment. Note that you need to initialize the Xerces-C++ runtime
+ if you are using this option."
+ };
+
+ NarrowStrings --generate-insertion
+ {
+ "<os>",
+ "Generate data representation stream insertion operators for the <os>
+ output stream type. Repeat this option to specify more than one
+ stream type. The ACE CDR stream (\cb{ACE_OutputCDR}) and RPC XDR
+ are recognized by the compiler and the necessary \cb{#include}
+ directives are automatically generated. For custom stream types use
+ the \cb{--hxx-prologue*} options to provide the necessary
+ declarations."
+ };
+
+ NarrowStrings --generate-extraction
+ {
+ "<is>",
+ "Generate data representation stream extraction constructors for the
+ <is> input stream type. Repeat this option to specify more than one
+ stream type. The ACE CDR stream (\cb{ACE_InputCDR}) and RPC XDR are
+ recognized by the compiler and the necessary \cb{#include} directives
+ are automatically generated. For custom stream types use the
+ \cb{--hxx-prologue*} options to provide the necessary declarations."
+ };
+
+ bool --generate-forward
+ {
+ "Generate a separate header file with forward declarations for the
+ types being generated."
+ };
+
+ bool --suppress-parsing
+ {
+ "Suppress the generation of the parsing functions and constructors.
+ Use this option to reduce the generated code size when parsing from
+ XML is not needed."
+ };
+
+ bool --generate-element-type
+ {
+ "Generate types instead of parsing and serialization functions for
+ root elements. This is primarily useful to distinguish object models
+ with the same root type but with different root elements."
+ };
+
+ bool --generate-element-map
+ {
+ "Generate a root element map that allows uniform parsing and
+ serialization of multiple root elements. This option is only valid
+ together with \cb{--generate-element-type}."
+ };
+
+ bool --generate-intellisense
+ {
+ "Generate workarounds for IntelliSense bugs in Visual Studio 2005
+ (8.0). When this option is used, the resulting code is slightly
+ more verbose. IntelliSense in Visual Studio 2008 (9.0) and later
+ does not require these workarounds. Support for IntelliSense in
+ Visual Studio 2003 (7.1) is improved with this option but is
+ still incomplete."
+ };
+
+ bool --omit-default-attributes
+ {
+ "Omit attributes with default and fixed values from serialized XML
+ documents."
+ };
+
+ // Naming.
+ //
+ NarrowString --type-naming = "knr"
+ {
+ "<style>",
+ "Specify the type naming convention that should be used in the
+ generated code. Valid styles are \cb{knr} (default), \cb{ucc},
+ and \cb{java}. See the NAMING CONVENTION section below for more
+ information."
+ };
+
+ NarrowString --function-naming = "knr"
+ {
+ "<style>",
+ "Specify the function naming convention that should be used in the
+ generated code. Valid styles are \cb{knr} (default), \cb{lcc}, and
+ \cb{java}. See the NAMING CONVENTION section below for more
+ information."
+ };
+
+ NarrowStrings --type-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema type names to C++ type names. See the NAMING CONVENTION
+ section below for more information."
+ };
+
+ NarrowStrings --accessor-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes to C++ accessor function
+ names. See the NAMING CONVENTION section below for more information."
+ };
+
+ NarrowStrings --one-accessor-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes with cardinality one to
+ C++ accessor function names. See the NAMING CONVENTION section
+ below for more information."
+ };
+
+ NarrowStrings --opt-accessor-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes with cardinality optional
+ to C++ accessor function names. See the NAMING CONVENTION section
+ below for more information."
+ };
+
+ NarrowStrings --seq-accessor-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes with cardinality sequence
+ to C++ accessor function names. See the NAMING CONVENTION section
+ below for more information."
+ };
+
+ NarrowStrings --modifier-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes to C++ modifier function
+ names. See the NAMING CONVENTION section below for more information."
+ };
+
+ NarrowStrings --one-modifier-regex
+
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes with cardinality one to C++
+ modifier function names. See the NAMING CONVENTION section below
+ for more information."
+ };
+
+ NarrowStrings --opt-modifier-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes with cardinality optional
+ to C++ modifier function names. See the NAMING CONVENTION section
+ below for more information."
+ };
+
+ NarrowStrings --seq-modifier-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema names of elements/attributes with cardinality sequence
+ to C++ modifier function names. See the NAMING CONVENTION section
+ below for more information."
+ };
+
+ NarrowStrings --parser-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema element names to C++ parsing function names. See the
+ NAMING CONVENTION section below for more information."
+ };
+
+ NarrowStrings --serializer-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema element names to C++ serialization function names. See
+ the NAMING CONVENTION section below for more information."
+ };
+
+ NarrowStrings --const-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema-derived names to C++ constant names. See the NAMING
+ CONVENTION section below for more information."
+ };
+
+ NarrowStrings --enumerator-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema enumeration values to C++ enumerator names. See the
+ NAMING CONVENTION section below for more information."
+ };
+
+ NarrowStrings --element-type-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate
+ XML Schema element names to C++ element type names. See the NAMING
+ CONVENTION section below for more information."
+ };
+
+ bool --name-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with
+ the name transformation options. Use this option to find out why
+ your regular expressions don't do what you expected them to do."
+ };
+
+ // Root element.
+ //
+ bool --root-element-first
+ {
+ "Treat only the first global element as a document root. By default
+ all global elements are considered document roots."
+ };
+
+ bool --root-element-last
+ {
+ "Treat only the last global element as a document root. By default
+ all global elements are considered document roots."
+ };
+
+ bool --root-element-all
+ {
+ "Treat all global elements as document roots. This is the default
+ behavior. By explicitly specifying this option you can suppress
+ the warning that is issued if more than one global element is
+ defined."
+ };
+
+ bool --root-element-none
+ {
+ "Do not treat any global elements as document roots. By default all
+ global elements are considered document roots."
+ };
+
+ NarrowStrings --root-element
+ {
+ "<element>",
+ "Treat only <element> as a document root. Repeat this option to
+ specify more than one root element."
+ };
+
+ // Custom type.
+ //
+ NarrowStrings --custom-type
+ {
+ "<map>",
+ "Use a custom C++ type instead of the generated class. The <map>
+ argument is in the form \c{\i{name}[\b{=}\i{type}[\b{/}\i{base}]]},
+ where \i{name} is a type name as defined in XML Schema and \i{type}
+ is a C++ type name that should be used instead. If \i{type} is not
+ present or empty then the custom type is assumed to have the same
+ name and be defined in the same namespace as the generated class
+ would have. If \i{base} is specified then the generated class is
+ still generated but with that name."
+ };
+
+ NarrowStrings --custom-type-regex
+ {
+ "<regex>",
+ "Use custom C++ types instead of the generated classes. The <regex>
+ argument is in the form
+ \c{\b{/}\i{name-pat}\b{/}[\i{type-sub}\b{/}[\i{base-sub}\b{/}]]},
+ where \i{name-pat} is a regex pattern that will be matched against
+ type names as defined in XML Schema and \i{type-sub} is a C++ type
+ name substitution that should be used instead. If \i{type-sub} is
+ not present or its substitution results in an empty string then
+ the custom type is assumed to have the same name and be defined
+ in the same namespace as the generated class would have. If
+ \i{base-sub} is present and its substitution results in a
+ non-empty string then the generated class is still generated
+ but with the result of this substitution as its name. The pattern
+ and substitutions are in the Perl regular expression format.
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ // Parts.
+ //
+ std::size_t --parts = 1
+ {
+ "<num>",
+ "Split generated source code into <num> parts. This is useful when
+ translating large, monolithic schemas and a C++ compiler is not
+ able to compile the resulting source code at once (usually due
+ to insufficient memory)."
+ };
+
+ NarrowString --parts-suffix = "-"
+ {
+ "<suffix>",
+ "Use <suffix> instead of the default '\cb{-}' to separate the file
+ name from the part number."
+ };
+ };
+ }
+}
diff --git a/xsd/xsd/cxx/tree/order-processor.cxx b/xsd/xsd/cxx/tree/order-processor.cxx
new file mode 100644
index 0000000..ccc3dc5
--- /dev/null
+++ b/xsd/xsd/cxx/tree/order-processor.cxx
@@ -0,0 +1,243 @@
+// file : xsde/cxx/tree/order-processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <iostream>
+
+#include <xsd/cxx/tree/elements.hxx>
+#include <xsd/cxx/tree/order-processor.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct Member: Traversal::Element, Traversal::Any
+ {
+ Member (size_t count): count_ (count) {}
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (Context::skip (e))
+ return;
+
+ e.context ().set ("ordered-id", count_++);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ a.context ().set ("ordered-id", count_++);
+ }
+
+ size_t count_;
+ };
+
+ //
+ //
+ struct Type: Traversal::Complex
+ {
+ Type (TypeNameSet& ordered_types, bool derived, bool mixed, bool all)
+ : ordered_types_ (ordered_types),
+ derived_ (derived),
+ mixed_ (mixed),
+ all_ (all)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ if (!ctx.count ("ordered"))
+ {
+ // First process our base.
+ //
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& b (c.inherits ().base ());
+
+ if (!b.context ().count ("ordered"))
+ dispatch (b);
+ }
+
+ // See if our base (not necessarily immediate) is ordered.
+ //
+ using SemanticGraph::Complex;
+
+ Complex* b (0);
+
+ for (Complex* p (&c); p->inherits_p ();)
+ {
+ if ((b = dynamic_cast<Complex*> (&p->inherits ().base ())))
+ {
+ if (Context::ordered_p (*b))
+ break;
+
+ p = b;
+ }
+ else
+ break;
+ }
+
+ bool o (all_ ||
+ (derived_ && b != 0 && Context::ordered_p (*b)) ||
+ (mixed_ && c.mixed_p ()) ||
+ ordered_types_.find (c));
+ ctx.set ("ordered", o);
+
+ // Assign ids to elements and wildcards, calculate total count.
+ //
+ if (o)
+ {
+ size_t count (
+ b != 0 && Context::ordered_p (*b)
+ ? b->context ().get<size_t> ("ordered-count")
+ : 1);
+
+ ctx.set ("ordered-start", count);
+
+ Member m (count);
+ Traversal::Names n (m);
+ names (c, n);
+
+ // Assign content id for mixed text.
+ //
+ if (Context::mixed_p (c) && count == 1)
+ ctx.set ("mixed-ordered-id", m.count_++);
+
+ ctx.set ("ordered-count", m.count_);
+ }
+ }
+ }
+
+ private:
+ TypeNameSet& ordered_types_;
+ bool derived_;
+ bool mixed_;
+ bool all_;
+ };
+
+ // Go into sourced/included/imported schemas while making sure
+ // we don't process the same stuff more than once.
+ //
+ struct Uses: Traversal::Sources,
+ Traversal::Includes,
+ Traversal::Imports
+ {
+ Uses (char const* seen_key)
+ : seen_key_ (seen_key)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Sources& sr)
+ {
+ SemanticGraph::Schema& s (sr.schema ());
+
+ if (!s.context ().count (seen_key_))
+ {
+ s.context ().set (seen_key_, true);
+ Traversal::Sources::traverse (sr);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Includes& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count (seen_key_))
+ {
+ s.context ().set (seen_key_, true);
+ Traversal::Includes::traverse (i);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Imports& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count (seen_key_))
+ {
+ s.context ().set (seen_key_, true);
+ Traversal::Imports::traverse (i);
+ }
+ }
+
+ private:
+ char const* seen_key_;
+ };
+
+ char const* seen_key = "cxx-tree-order-processor-seen";
+
+ bool
+ process_impl (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const&)
+ {
+ // Prepare a set of ordered types.
+ //
+ TypeNameSet ordered_types (ops.ordered_type ().begin (),
+ ops.ordered_type ().end ());
+
+ // Root schema in the file-per-type mode is just a bunch
+ // of includes without a namespace.
+ //
+ SemanticGraph::Schema::NamesIterator i (tu.names_begin ());
+
+ // Nothing to do if this is the XML Schema namespace.
+ //
+ if (i == tu.names_end () ||
+ i->named ().name () != L"http://www.w3.org/2001/XMLSchema")
+ {
+ // Note that we check first if this schema has already been
+ // processed which may happen in the file-per-type compilation
+ // mode.
+ //
+ if (!tu.context ().count (seen_key))
+ {
+ Traversal::Schema schema;
+ Uses uses (seen_key);
+
+ schema >> uses >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ Type type (ordered_types,
+ ops.ordered_type_derived (),
+ ops.ordered_type_mixed (),
+ ops.ordered_type_all ());
+
+ schema >> schema_names >> ns >> ns_names >> type;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set (seen_key, true);
+
+ schema.dispatch (tu);
+ }
+ }
+
+ return true;
+ }
+ }
+
+ bool OrderProcessor::
+ process (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& file)
+ {
+ return process_impl (ops, tu, file);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/order-processor.hxx b/xsd/xsd/cxx/tree/order-processor.hxx
new file mode 100644
index 0000000..868547d
--- /dev/null
+++ b/xsd/xsd/cxx/tree/order-processor.hxx
@@ -0,0 +1,29 @@
+// file : xsde/cxx/tree/order-processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_ORDER_PROCESSOR_HXX
+#define XSD_CXX_TREE_ORDER_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+
+#include <xsd/xsd.hxx>
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/tree/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class OrderProcessor
+ {
+ public:
+ bool
+ process (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file);
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_ORDER_PROCESSOR_HXX
diff --git a/xsd/xsd/cxx/tree/parser-header.cxx b/xsd/xsd/cxx/tree/parser-header.cxx
new file mode 100644
index 0000000..9ef9e89
--- /dev/null
+++ b/xsd/xsd/cxx/tree/parser-header.cxx
@@ -0,0 +1,472 @@
+// file : xsd/cxx/tree/parser-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/parser-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct ElementFunction: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ ElementFunction (Context& c)
+ : GlobalElementBase (c), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!doc_root_p (e))
+ return;
+
+ String const& name (eparser (e));
+ String const& error_handler (error_handler_type);
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name Parsing functions for the %" <<
+ comment (e.name ()) << " document root." << endl;
+
+ if (e.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (e.annotation ());
+ }
+
+ os << " */" << endl
+ << "//@{" << endl
+ << endl;
+ }
+
+ if (!doxygen)
+ {
+ os << "// Parse a URI or a local file." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a URI or a local file." << endl
+ << " *" << endl
+ << " * @param uri A URI or a local file name." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function uses exceptions to report parsing errors." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (const " << string_type << "& uri," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a URI or a local file with an error handler." << endl
+ << " *" << endl
+ << " * @param uri A URI or a local file name." << endl
+ << " * @param eh An error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (const " << string_type << "& uri," << endl
+ << error_handler << "& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a URI or a local file with a Xerces-C++ " <<
+ "DOM error" << endl
+ << " * handler." << endl
+ << " *" << endl
+ << " * @param uri A URI or a local file name." << endl
+ << " * @param eh A Xerces-C++ DOM error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (const " << string_type << "& uri," << endl
+ << xerces_ns << "::DOMErrorHandler& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (!doxygen)
+ {
+ os << "// Parse std::istream." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a standard input stream." << endl
+ << " *" << endl
+ << " * @param is A standrad input stream." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function uses exceptions to report parsing errors." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a standard input stream with an error handler." << endl
+ << " *" << endl
+ << " * @param is A standrad input stream." << endl
+ << " * @param eh An error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << error_handler << "& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a standard input stream with a " <<
+ "Xerces-C++ DOM error" << endl
+ << " * handler." << endl
+ << " *" << endl
+ << " * @param is A standrad input stream." << endl
+ << " * @param eh A Xerces-C++ DOM error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << xerces_ns << "::DOMErrorHandler& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a standard input stream with a resource id." << endl
+ << " *" << endl
+ << " * @param is A standrad input stream." << endl
+ << " * @param id A resource id." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * The resource id is used to identify the document " <<
+ "being parsed in" << endl
+ << " * diagnostics as well as to resolve relative paths." << endl
+ << " *" << endl
+ << " * This function uses exceptions to report parsing errors." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << "const " << string_type << "& id," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a standard input stream with a resource " <<
+ "id and an" << endl
+ << " * error handler." << endl
+ << " *" << endl
+ << " * @param is A standrad input stream." << endl
+ << " * @param id A resource id." << endl
+ << " * @param eh An error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * The resource id is used to identify the document " <<
+ "being parsed in" << endl
+ << " * diagnostics as well as to resolve relative paths." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << "const " << string_type << "& id," << endl
+ << error_handler << "& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a standard input stream with a resource " <<
+ "id and a" << endl
+ << " * Xerces-C++ DOM error handler." << endl
+ << " *" << endl
+ << " * @param is A standrad input stream." << endl
+ << " * @param id A resource id." << endl
+ << " * @param eh A Xerces-C++ DOM error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * The resource id is used to identify the document " <<
+ "being parsed in" << endl
+ << " * diagnostics as well as to resolve relative paths." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << "const " << string_type << "& id," << endl
+ << xerces_ns << "::DOMErrorHandler& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (!doxygen)
+ {
+ os << "// Parse xercesc::InputSource." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a Xerces-C++ input source." << endl
+ << " *" << endl
+ << " * @param is A Xerces-C++ input source." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function uses exceptions to report parsing errors." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (" << xerces_ns << "::InputSource& is," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a Xerces-C++ input source with an " <<
+ "error handler." << endl
+ << " *" << endl
+ << " * @param is A Xerces-C++ input source." << endl
+ << " * @param eh An error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (" << xerces_ns << "::InputSource& is," << endl
+ << error_handler << "& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a Xerces-C++ input source with a " <<
+ "Xerces-C++ DOM" << endl
+ << " * error handler." << endl
+ << " *" << endl
+ << " * @param is A Xerces-C++ input source." << endl
+ << " * @param eh A Xerces-C++ DOM error handler." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function reports parsing errors by calling the " <<
+ "error handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (" << xerces_ns << "::InputSource& is," << endl
+ << xerces_ns << "::DOMErrorHandler& eh," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (!doxygen)
+ {
+ os << "// Parse xercesc::DOMDocument." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a Xerces-C++ DOM document." << endl
+ << " *" << endl
+ << " * @param d A Xerces-C++ DOM document." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (const " << xerces_ns << "::DOMDocument& d," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Parse a Xerces-C++ DOM document." << endl
+ << " *" << endl
+ << " * @param d A pointer to the Xerces-C++ DOM document." << endl
+ << " * @param f Parsing flags." << endl
+ << " * @param p Parsing properties. " << endl
+ << " * @return A pointer to the root of the object model." << endl
+ << " *" << endl
+ << " * This function is normally used together with the " <<
+ "keep_dom and" << endl
+ << " * own_dom parsing flags to assign ownership of the DOM " <<
+ "document" << endl
+ << " * to the object model." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << auto_ptr << "< " << type_name (e) << " >" << endl
+ << name << " (" << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d," << endl
+ << flags_type << " f = 0," << endl
+ << "const " << properties_type << "& p = " << properties_type << " ());"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+ }
+
+ private:
+ String
+ type_name (Type& e)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (e.type ());
+
+ return o.str ();
+ }
+ };
+ }
+
+
+ void
+ generate_parser_header (Context& ctx)
+ {
+ ctx.os << "#include <iosfwd>" << endl
+ << endl
+ << "#include <xercesc/sax/InputSource.hpp>" << endl
+ << "#include <xercesc/dom/DOMDocument.hpp>" << endl
+ << "#include <xercesc/dom/DOMErrorHandler.hpp>" << endl
+ << endl;
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names names_ns, names;
+ Namespace ns (ctx);
+ ElementFunction element (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names >> element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/parser-header.hxx b/xsd/xsd/cxx/tree/parser-header.hxx
new file mode 100644
index 0000000..b7860c4
--- /dev/null
+++ b/xsd/xsd/cxx/tree/parser-header.hxx
@@ -0,0 +1,19 @@
+// file : xsd/cxx/tree/parser-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_PARSER_HEADER_HXX
+#define XSD_CXX_TREE_PARSER_HEADER_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_parser_header (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_PARSER_HEADER_HXX
diff --git a/xsd/xsd/cxx/tree/parser-source.cxx b/xsd/xsd/cxx/tree/parser-source.cxx
new file mode 100644
index 0000000..cee5ea6
--- /dev/null
+++ b/xsd/xsd/cxx/tree/parser-source.cxx
@@ -0,0 +1,541 @@
+// file : xsd/cxx/tree/parser-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/parser-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct ElementFunction: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ ElementFunction (Context& c)
+ : GlobalElementBase (c), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!doc_root_p (e))
+ return;
+
+ SemanticGraph::Type& t (e.type ());
+
+ // Check if we need to handle xsi:type and substitution groups.
+ // If this element's type is anonymous then we don't need to do
+ // anything.
+ //
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ // Check if this element is abstract.
+ //
+ bool abst;
+ {
+ SemanticGraph::Complex* tc;
+ abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
+ tc->abstract_p ();
+ }
+
+ // Nothing to do if we are abstract and not polymorphic.
+ //
+ if (abst && !polymorphic)
+ return;
+
+ String const& name (eparser (e));
+ String type (type_name (e));
+ String const& error_handler (error_handler_type);
+
+ // Note that I am using fq-name in function calls because g++ gets
+ // confused if the name is 'type'. (see tests/schema/anonymous)
+ //
+
+ char const* d (std >= cxx_version::cxx11 ? "std::move (d)" : "d");
+
+ // URI.
+ //
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (const " << string_type << "& u," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0," << endl
+ << "(f & " << flags_type << "::keep_dom) == 0);"
+ << endl
+ << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
+ << endl
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
+ << "u, h, p, f";
+
+ if (options.disable_multi_import ())
+ os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
+
+ os << "));"
+ << endl
+ << "h.throw_if_failed< ::xsd::cxx::tree::parsing< " <<
+ char_type << " > > ();"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (const " << string_type << "& u," << endl
+ << error_handler << "& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0," << endl
+ << "(f & " << flags_type << "::keep_dom) == 0);"
+ << endl
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
+ << "u, h, p, f";
+
+ if (options.disable_multi_import ())
+ os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
+
+ os << "));"
+ << endl
+ << "if (!d.get ())" << endl
+ << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (const " << string_type << "& u," << endl
+ << xerces_ns << "::DOMErrorHandler& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
+ << "u, h, p, f";
+
+ if (options.disable_multi_import ())
+ os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
+
+ os << "));"
+ << endl
+ << "if (!d.get ())" << endl
+ << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}";
+
+
+ // istream
+ //
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0," << endl
+ << "(f & " << flags_type << "::keep_dom) == 0);"
+ << endl
+ << "::xsd::cxx::xml::sax::std_input_source isrc (is);"
+ << "return " << fq_name (e, "parser") << " (isrc, f, p);"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << error_handler << "& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0," << endl
+ << "(f & " << flags_type << "::keep_dom) == 0);"
+ << endl
+ << "::xsd::cxx::xml::sax::std_input_source isrc (is);"
+ << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << xerces_ns << "::DOMErrorHandler& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::sax::std_input_source isrc (is);"
+ << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << "const " << string_type << "& sid," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0," << endl
+ << "(f & " << flags_type << "::keep_dom) == 0);"
+ << endl
+ << "::xsd::cxx::xml::sax::std_input_source isrc (is, sid);"
+ << "return " << fq_name (e, "parser") << " (isrc, f, p);"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << "const " << string_type << "& sid," << endl
+ << error_handler << "& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0," << endl
+ << "(f & " << flags_type << "::keep_dom) == 0);"
+ << endl
+ << "::xsd::cxx::xml::sax::std_input_source isrc (is, sid);"
+ << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (::std::istream& is," << endl
+ << "const " << string_type << "& sid," << endl
+ << xerces_ns << "::DOMErrorHandler& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::xml::sax::std_input_source isrc (is, sid);"
+ << "return " << fq_name (e, "parser") << " (isrc, h, f, p);"
+ << "}";
+
+
+ // InputSource.
+ //
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (" << xerces_ns << "::InputSource& i," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
+ << endl
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
+ << "i, h, p, f";
+
+ if (options.disable_multi_import ())
+ os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
+
+ os << "));"
+ << endl
+ << "h.throw_if_failed< ::xsd::cxx::tree::parsing< " <<
+ char_type << " > > ();"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}";
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (" << xerces_ns << "::InputSource& i," << endl
+ << error_handler << "& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
+ << "i, h, p, f";
+
+ if (options.disable_multi_import ())
+ os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
+
+ os << "));"
+ << endl
+ << "if (!d.get ())" << endl
+ << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}";
+
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (" << xerces_ns << "::InputSource& i," << endl
+ << xerces_ns << "::DOMErrorHandler& h," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::parse< " << char_type << " > (" << endl
+ << "i, h, p, f";
+
+ if (options.disable_multi_import ())
+ os << " | ::xsd::cxx::xml::dom::no_muliple_imports";
+
+ os << "));"
+ << endl
+ << "if (!d.get ())" << endl
+ << "throw ::xsd::cxx::tree::parsing< " << char_type << " > ();"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}";
+
+
+ // DOM.
+ //
+
+ bool fund (false);
+ {
+ IsFundamentalType test (fund);
+ test.dispatch (t);
+ }
+
+ // const DOMDocument&
+ //
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (const " << xerces_ns << "::DOMDocument& doc," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "& p)"
+ << "{"
+ << "if (f & " << flags_type << "::keep_dom)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "static_cast< " << xerces_ns <<
+ "::DOMDocument* > (doc.cloneNode (true)));"
+ << endl
+ << "return " << auto_ptr << "< " << type << " > (" << endl
+ << fq_name (e, "parser") << " (" << endl
+ << d << ", f | " << flags_type << "::own_dom, p));"
+ << "}"
+ << "const " << xerces_ns << "::DOMElement& e (*doc.getDocumentElement ());"
+ << "const " << qname_type << " n (" << endl
+ << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
+ << endl;
+
+ if (poly)
+ {
+ os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
+ << "::xsd::cxx::tree::type_factory_map_instance< " <<
+ poly_plate << ", " << char_type << " > ().create (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_().name ()) << "," << endl;
+
+ if (abst)
+ os << "0,";
+ else
+ os << "&::xsd::cxx::tree::factory_impl< " << type << " >,";
+
+ os << endl
+ << "true, true, e, n, f, 0));"
+ << endl
+ << "if (tmp.get () != 0)"
+ << "{"
+ << auto_ptr << "< " << type << " > r (" << endl
+ << "dynamic_cast< " << type << "* > (tmp.get ()));"
+ << endl
+ << "if (r.get ())" << endl
+ << "tmp.release ();"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
+ " > ();"
+ << endl;
+ }
+ else
+ {
+ os << "if (n.name () == " << strlit (e.name ()) << " &&" << endl
+ << "n.namespace_ () == " << strlit (e.namespace_().name ()) << ")"
+ << "{";
+
+ if (fund)
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << "new " << type << " (" << endl
+ << "::xsd::cxx::tree::traits< " << type << ", " <<
+ char_type;
+
+ if (t.is_a<SemanticGraph::Fundamental::Double> ())
+ os << ", ::xsd::cxx::tree::schema_type::double_";
+ else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
+ os << ", ::xsd::cxx::tree::schema_type::decimal";
+
+ os << " >::create (" << endl
+ << "e, f, 0)));";
+ }
+ else
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << "::xsd::cxx::tree::traits< " << type << ", " <<
+ char_type << " >::create (" << endl
+ << "e, f, 0));";
+ }
+ }
+
+ os << "return r;"
+ << "}"
+ << "throw ::xsd::cxx::tree::unexpected_element < " <<
+ char_type << " > (" << endl
+ << "n.name ()," << endl
+ << "n.namespace_ ()," << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_().name ()) << ");"
+ << "}";
+
+
+ // dom::auto_ptr/unique_ptr<DOMDocument>
+ //
+ os << auto_ptr << "< " << type << " >" << endl
+ << name << " (" << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d," << endl
+ << flags_type << " f," << endl
+ << "const " << properties_type << "&)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > c (" << endl
+ << "((f & " << flags_type << "::keep_dom) &&" << endl
+ << "!(f & " << flags_type << "::own_dom))" << endl
+ << "? static_cast< " << xerces_ns << "::DOMDocument* > (" <<
+ "d->cloneNode (true))" << endl
+ << ": 0);"
+ << endl
+ << xerces_ns << "::DOMDocument& doc (c.get () ? *c : *d);"
+ << "const " << xerces_ns << "::DOMElement& e (" <<
+ "*doc.getDocumentElement ());"
+ << endl
+ << "const " << qname_type << " n (" << endl
+ << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
+ << endl
+ << "if (f & " << flags_type << "::keep_dom)" << endl
+ << "doc.setUserData (" << dom_node_key << "," << endl
+ << "(c.get () ? &c : &d)," << endl
+ << "0);"
+ << endl;
+
+ if (poly)
+ {
+ os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
+ << "::xsd::cxx::tree::type_factory_map_instance< " <<
+ poly_plate << ", " << char_type << " > ().create (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_().name ()) << "," << endl;
+
+ if (abst)
+ os << "0,";
+ else
+ os << "&::xsd::cxx::tree::factory_impl< " << type << " >,";
+
+ os << endl
+ << "true, true, e, n, f, 0));"
+ << endl
+ << "if (tmp.get () != 0)"
+ << "{";
+ }
+ else
+ {
+ os << "if (n.name () == " << strlit (e.name ()) << " &&" << endl
+ << "n.namespace_ () == " << strlit (e.namespace_().name ()) << ")"
+ << "{";
+
+ if (fund)
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << "new " << type << " (" << endl
+ << "::xsd::cxx::tree::traits< " << type << ", " <<
+ char_type;
+
+ if (t.is_a<SemanticGraph::Fundamental::Double> ())
+ os << ", ::xsd::cxx::tree::schema_type::double_";
+ else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
+ os << ", ::xsd::cxx::tree::schema_type::decimal";
+
+ os << " >::create (" << endl
+ << "e, f, 0)));";
+ }
+ else
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << "::xsd::cxx::tree::traits< " << type << ", " <<
+ char_type << " >::create (" << endl
+ << "e, f, 0));";
+ }
+ }
+
+ if (poly)
+ {
+ os << endl
+ << auto_ptr << "< " << type << " > r (" << endl
+ << "dynamic_cast< " << type << "* > (tmp.get ()));"
+ << endl
+ << "if (r.get ())" << endl
+ << "tmp.release ();"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
+ " > ();"
+ << endl;
+ }
+
+ os << "return r;"
+ << "}"
+ << "throw ::xsd::cxx::tree::unexpected_element < " <<
+ char_type << " > (" << endl
+ << "n.name ()," << endl
+ << "n.namespace_ ()," << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_().name ()) << ");"
+ << "}";
+ }
+
+ private:
+ String
+ type_name (Type& e)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (e.type ());
+
+ return o.str ();
+ }
+ };
+ }
+
+ void
+ generate_parser_source (Context& ctx, size_t first, size_t last)
+ {
+ ctx.os << "#include <istream>" << endl
+ << "#include <xsd/cxx/xml/sax/std-input-source.hxx>" << endl
+ << "#include <xsd/cxx/tree/error-handler.hxx>" << endl
+ << endl;
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names names_ns, names;
+ Namespace ns (ctx, first, last);
+ ElementFunction element (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names >> element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/parser-source.hxx b/xsd/xsd/cxx/tree/parser-source.hxx
new file mode 100644
index 0000000..1bb70d9
--- /dev/null
+++ b/xsd/xsd/cxx/tree/parser-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/parser-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_PARSER_SOURCE_HXX
+#define XSD_CXX_TREE_PARSER_SOURCE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_parser_source (Context&, size_t first, size_t last);
+ }
+}
+
+#endif // XSD_CXX_TREE_PARSER_SOURCE_HXX
diff --git a/xsd/xsd/cxx/tree/polymorphism-processor.cxx b/xsd/xsd/cxx/tree/polymorphism-processor.cxx
new file mode 100644
index 0000000..4d07c69
--- /dev/null
+++ b/xsd/xsd/cxx/tree/polymorphism-processor.cxx
@@ -0,0 +1,740 @@
+// file : xsde/cxx/tree/polymorphism-processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <iostream>
+
+#include <xsd/cxx/tree/elements.hxx>
+#include <xsd/cxx/tree/polymorphism-processor.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ //
+ //
+ struct Type: Traversal::Type,
+ Traversal::Complex
+ {
+ Type (TypeNameSet& poly_types)
+ : poly_types_ (poly_types)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ SemanticGraph::Context& ctx (t.context ());
+
+ if (!ctx.count ("polymorphic"))
+ ctx.set ("polymorphic", poly_types_.find (t));
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ if (!ctx.count ("polymorphic"))
+ {
+ // First check our base.
+ //
+ bool pb (false);
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& b (c.inherits ().base ());
+
+ if (!b.context ().count ("polymorphic"))
+ dispatch (b);
+
+ pb = b.context ().get<bool> ("polymorphic");
+ }
+
+ ctx.set ("polymorphic", pb || poly_types_.find (c));
+ }
+ }
+
+ private:
+ TypeNameSet& poly_types_;
+ };
+
+ struct FundType: Traversal::AnyType,
+ Traversal::AnySimpleType,
+
+ Traversal::Fundamental::Byte,
+ Traversal::Fundamental::UnsignedByte,
+ Traversal::Fundamental::Short,
+ Traversal::Fundamental::UnsignedShort,
+ Traversal::Fundamental::Int,
+ Traversal::Fundamental::UnsignedInt,
+ Traversal::Fundamental::Long,
+ Traversal::Fundamental::UnsignedLong,
+ Traversal::Fundamental::Integer,
+ Traversal::Fundamental::NonPositiveInteger,
+ Traversal::Fundamental::NonNegativeInteger,
+ Traversal::Fundamental::PositiveInteger,
+ Traversal::Fundamental::NegativeInteger,
+
+ Traversal::Fundamental::Boolean,
+
+ Traversal::Fundamental::Float,
+ Traversal::Fundamental::Double,
+ Traversal::Fundamental::Decimal,
+
+ Traversal::Fundamental::String,
+ Traversal::Fundamental::NormalizedString,
+ Traversal::Fundamental::Token,
+ Traversal::Fundamental::Name,
+ Traversal::Fundamental::NameToken,
+ Traversal::Fundamental::NameTokens,
+ Traversal::Fundamental::NCName,
+ Traversal::Fundamental::Language,
+
+ Traversal::Fundamental::QName,
+
+ Traversal::Fundamental::Id,
+ Traversal::Fundamental::IdRef,
+ Traversal::Fundamental::IdRefs,
+
+ Traversal::Fundamental::AnyURI,
+
+ Traversal::Fundamental::Base64Binary,
+ Traversal::Fundamental::HexBinary,
+
+ Traversal::Fundamental::Date,
+ Traversal::Fundamental::DateTime,
+ Traversal::Fundamental::Duration,
+ Traversal::Fundamental::Day,
+ Traversal::Fundamental::Month,
+ Traversal::Fundamental::MonthDay,
+ Traversal::Fundamental::Year,
+ Traversal::Fundamental::YearMonth,
+ Traversal::Fundamental::Time,
+
+ Traversal::Fundamental::Entity,
+ Traversal::Fundamental::Entities
+ {
+ FundType (TypeNameSet& poly_types, bool& valid)
+ : poly_types_ (poly_types), valid_ (valid)
+ {
+ }
+
+ void
+ check (SemanticGraph::Type& t, bool fund)
+ {
+ SemanticGraph::Context& ctx (t.context ());
+
+ if (poly_types_.find (t))
+ {
+ if (!fund)
+ ctx.set ("polymorphic", true);
+ else
+ {
+ wcerr << "error: built-in type '" << t.name () << "' cannot "
+ << "be polymorphic because it is mapped to a fundamental "
+ << "C++ type"
+ << endl;
+
+ valid_ = false;
+ }
+ }
+ else
+ ctx.set ("polymorphic", false);
+ }
+
+ // anyType & anySimpleType.
+ //
+ virtual void
+ traverse (SemanticGraph::AnyType& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnySimpleType& t)
+ {
+ check (t, false);
+ }
+
+ // Boolean.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Boolean& t)
+ {
+ check (t, true);
+ }
+
+ // Integral types.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Byte& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedByte& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Short& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedShort& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Int& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedInt& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Long& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::UnsignedLong& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Integer& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonPositiveInteger& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NonNegativeInteger& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::PositiveInteger& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NegativeInteger& t)
+ {
+ check (t, true);
+ }
+
+ // Floats.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Float& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Double& t)
+ {
+ check (t, true);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Decimal& t)
+ {
+ check (t, true);
+ }
+
+ // Strings.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::String& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NormalizedString& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Token& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameToken& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NameTokens& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Name& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::NCName& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Language& t)
+ {
+ check (t, false);
+ }
+
+
+ // Qualified name.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::QName& t)
+ {
+ check (t, false);
+ }
+
+
+ // ID/IDREF.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Id& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRef& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::IdRefs& t)
+ {
+ check (t, false);
+ }
+
+ // URI.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::AnyURI& t)
+ {
+ check (t, false);
+ }
+
+ // Binary.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Base64Binary& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::HexBinary& t)
+ {
+ check (t, false);
+ }
+
+
+ // Date/time.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Date& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::DateTime& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Duration& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Day& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Month& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::MonthDay& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Year& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::YearMonth& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Time& t)
+ {
+ check (t, false);
+ }
+
+ // Entity.
+ //
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entity& t)
+ {
+ check (t, false);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Entities& t)
+ {
+ check (t, false);
+ }
+
+ private:
+ TypeNameSet& poly_types_;
+ bool& valid_;
+ };
+
+ struct GlobalElement: Traversal::Element
+ {
+ GlobalElement (TypeNameSet& poly_types,
+ bool& valid,
+ const WarningSet& disabled_warnings)
+ : poly_types_ (poly_types), valid_ (valid), warning_ (true)
+ {
+ if (disabled_warnings.find ("all") != disabled_warnings.end () ||
+ disabled_warnings.find ("T005") != disabled_warnings.end ())
+ warning_ = false;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ using SemanticGraph::Schema;
+
+ if (!e.substitutes_p ())
+ return;
+
+ // If we are a substitution for some element, then mark
+ // that element's type as polymorphic.
+ //
+ Type& r (e.substitutes ().root ());
+ SemanticGraph::Type& rt (r.type ());
+ SemanticGraph::Context& ctx (rt.context ());
+
+ // We may need to override the previous value.
+ //
+ if (ctx.count ("polymorphic") && ctx.get<bool> ("polymorphic"))
+ return;
+
+ // Built-in types that are mapped to fundamental types cannot
+ // be declared polymorphic.
+ //
+ bool fund (false);
+ IsFundamentalType test (fund);
+ test.dispatch (rt);
+
+ if (fund)
+ {
+ wcerr << r.file () << ":" << r.line () << ":" << r.column ()
+ << ": error: built-in type '" << rt.name () << "' "
+ << "is mapped to a fundamental C++ type and is expected "
+ << "to be polymorphic" << endl;
+
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: because type '" << rt.name () << "' is "
+ << "used in a substitution group declared here" << endl;
+
+ valid_ = false;
+ return;
+ }
+
+ ctx.set ("polymorphic", true);
+
+ if (!warning_)
+ return;
+
+ Schema& es (dynamic_cast<Schema&> (e.scope ().scope ()));
+ Schema& rts (dynamic_cast<Schema&> (rt.scope ().scope ()));
+
+ // If the root type and this element are in different schemas
+ // and the root type is not explicitly marked as polymorphic,
+ // then issue a warning.
+ //
+ if (&es != &rts && !sources_p (es, rts) && !poly_types_.find (rt))
+ {
+ wcerr << rt.file () << ":" << rt.line () << ":" << rt.column ()
+ << ": warning T005: assuming type '" << rt.name () << "' "
+ << "is polymorphic" << endl;
+
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: because type '" << rt.name () << "' is "
+ << "used in a substitution group declared here" << endl;
+
+ wcerr << rt.file () << ":" << rt.line () << ":" << rt.column ()
+ << ": info: use --polymorphic-type to indicate this type "
+ << "is polymorphic when compiling schemas that "
+ << "reference it" << endl;
+ }
+ }
+
+ private:
+ // Return true if root sources s.
+ //
+ bool
+ sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
+ {
+ using SemanticGraph::Schema;
+ using SemanticGraph::Sources;
+
+ for (Schema::UsesIterator i (root.uses_begin ());
+ i != root.uses_end (); ++i)
+ {
+ if (i->is_a<Sources> ())
+ {
+ if (&i->schema () == &s || sources_p (i->schema (), s))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private:
+ TypeNameSet& poly_types_;
+ bool& valid_;
+ bool warning_;
+ };
+
+ // Go into sourced/included/imported schemas while making sure
+ // we don't process the same stuff more than once.
+ //
+ struct Uses: Traversal::Sources,
+ Traversal::Includes,
+ Traversal::Imports
+ {
+ Uses (char const* seen_key)
+ : seen_key_ (seen_key)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Sources& sr)
+ {
+ SemanticGraph::Schema& s (sr.schema ());
+
+ if (!s.context ().count (seen_key_))
+ {
+ s.context ().set (seen_key_, true);
+ Traversal::Sources::traverse (sr);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Includes& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count (seen_key_))
+ {
+ s.context ().set (seen_key_, true);
+ Traversal::Includes::traverse (i);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Imports& i)
+ {
+ SemanticGraph::Schema& s (i.schema ());
+
+ if (!s.context ().count (seen_key_))
+ {
+ s.context ().set (seen_key_, true);
+ Traversal::Imports::traverse (i);
+ }
+ }
+
+ private:
+ char const* seen_key_;
+ };
+
+ char const* pass_one_key = "cxx-tree-polymorphism-processor-seen-one";
+ char const* pass_two_key = "cxx-tree-polymorphism-processor-seen-two";
+
+ bool
+ process_impl (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const&,
+ const WarningSet& disabled_warnings)
+ {
+ bool valid (true);
+
+ // Prepare a set of polymorphic types.
+ //
+
+ TypeNameSet poly_types (ops.polymorphic_type ().begin (),
+ ops.polymorphic_type ().end ());
+
+ // Root schema in the file-per-type mode is just a bunch
+ // of includes without a namespace.
+ //
+ SemanticGraph::Schema::NamesIterator i (tu.names_begin ());
+
+ if (i != tu.names_end () &&
+ i->named ().name () == L"http://www.w3.org/2001/XMLSchema")
+ {
+ // XML Schema namespace.
+ //
+ Traversal::Schema schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundType fund_type (poly_types, valid);
+
+ schema >> schema_names >> ns >> ns_names >> fund_type;
+
+ schema.dispatch (tu);
+ }
+ else
+ {
+ // First handle fundamental types.
+ //
+ {
+ Traversal::Schema schema;
+ Traversal::Implies implies;
+ Traversal::Schema xs_schema;
+
+ schema >> implies >> xs_schema;
+
+ Traversal::Names xs_schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundType fund_type (poly_types, valid);
+
+ xs_schema >> xs_schema_names >> ns >> ns_names >> fund_type;
+
+ schema.dispatch (tu);
+ }
+
+ // Note that we check first if this schema has already been
+ // processed which may happen in the file-per-type compilation
+ // mode.
+ //
+ if (!tu.context ().count (pass_two_key))
+ {
+ // Pass one - check substitution groups.
+ //
+ if (valid)
+ {
+ Traversal::Schema schema;
+ Uses uses (pass_one_key);
+
+ schema >> uses >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ GlobalElement element (poly_types, valid, disabled_warnings);
+
+ schema >> schema_names >> ns >> ns_names >> element;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set (pass_one_key, true);
+
+ schema.dispatch (tu);
+ }
+
+ // Pass two - process types.
+ //
+ if (valid)
+ {
+ Traversal::Schema schema;
+ Uses uses (pass_two_key);
+
+ schema >> uses >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ Type type (poly_types);
+
+ schema >> schema_names >> ns >> ns_names >> type;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set (pass_two_key, true);
+
+ schema.dispatch (tu);
+ }
+ }
+ }
+
+ return valid;
+ }
+ }
+
+ bool PolymorphismProcessor::
+ process (options const& ops,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& file,
+ const WarningSet& disabled_warnings)
+ {
+ return process_impl (ops, tu, file, disabled_warnings);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/polymorphism-processor.hxx b/xsd/xsd/cxx/tree/polymorphism-processor.hxx
new file mode 100644
index 0000000..88019a8
--- /dev/null
+++ b/xsd/xsd/cxx/tree/polymorphism-processor.hxx
@@ -0,0 +1,30 @@
+// file : xsde/cxx/tree/polymorphism-processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_POLYMORPHISM_PROCESSOR_HXX
+#define XSD_CXX_TREE_POLYMORPHISM_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+
+#include <xsd/xsd.hxx>
+#include <xsd/types.hxx>
+
+#include <xsd/cxx/tree/options.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class PolymorphismProcessor
+ {
+ public:
+ bool
+ process (options const&,
+ XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file,
+ const WarningSet& disabled_warnings);
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_POLYMORPHISM_PROCESSOR_HXX
diff --git a/xsd/xsd/cxx/tree/serialization-header.cxx b/xsd/xsd/cxx/tree/serialization-header.cxx
new file mode 100644
index 0000000..5434441
--- /dev/null
+++ b/xsd/xsd/cxx/tree/serialization-header.cxx
@@ -0,0 +1,579 @@
+// file : xsd/cxx/tree/serialization-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/serialization-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (list_stream)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << list_stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (list_stream)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << list_stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (list_stream)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << list_stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ bool simple (true);
+ {
+ IsSimpleType t (simple);
+ t.dispatch (c);
+ }
+
+ if (simple)
+ {
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr&, " <<
+ "const " << name << "&);"
+ << endl;
+
+ // operator<< (list_stream)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << list_stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ }
+ };
+
+ struct ElementType: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ ElementType (Context& c)
+ : GlobalElementBase (c), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (doc_root_p (e))
+ {
+ // operator<< (xercesc::DOMElement)
+ //
+ os << inst_exp
+ << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement&, " <<
+ "const " << ename (e) << "&);"
+ << endl;
+ }
+ }
+ };
+
+ struct ElementFunction: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ ElementFunction (Context& c)
+ : GlobalElementBase (c), Context (c)
+ {
+ }
+
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!doc_root_p (e))
+ return;
+
+ String const& name (eserializer (e));
+ String const& error_handler (error_handler_type);
+ String const& namespace_infomap (namespace_infomap_type);
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name Serialization functions for the %" <<
+ comment (e.name ()) << " document root." << endl;
+
+ if (e.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (e.annotation ());
+ }
+
+ os << " */" << endl
+ << "//@{" << endl
+ << endl;
+ }
+
+ if (!doxygen)
+ {
+ os << "// Serialize to std::ostream." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a standard output stream." << endl
+ << " *" << endl
+ << " * @param os A standrad output stream." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param e A character encoding to produce XML in." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * This function uses exceptions to report " <<
+ "serialization errors." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << "void" << endl
+ << name << " (::std::ostream& os," << endl
+ << "const " << type_name (e) << "& x, " << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a standard output stream with an " <<
+ "error handler." << endl
+ << " *" << endl
+ << " * @param os A standrad output stream." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param eh An error handler." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param e A character encoding to produce XML in." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * This function reports serialization errors by " <<
+ "calling the error" << endl
+ << " * handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << "void" << endl
+ << name << " (::std::ostream& os," << endl
+ << "const " << type_name (e) << "& x, " << endl
+ << error_handler << "& eh," << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a standard output stream with a " <<
+ "Xerces-C++ DOM" << endl
+ << " * error handler." << endl
+ << " *" << endl
+ << " * @param os A standrad output stream." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param eh A Xerces-C++ DOM error handler." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param e A character encoding to produce XML in." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * This function reports serialization errors by " <<
+ "calling the error" << endl
+ << " * handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << "void" << endl
+ << name << " (::std::ostream& os," << endl
+ << "const " << type_name (e) << "& x, " << endl
+ << xerces_ns << "::DOMErrorHandler& eh," << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (!doxygen)
+ {
+ os << "// Serialize to xercesc::XMLFormatTarget." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a Xerces-C++ XML format target." << endl
+ << " *" << endl
+ << " * @param ft A Xerces-C++ XML format target." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param e A character encoding to produce XML in." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * This function uses exceptions to report " <<
+ "serialization errors." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << "void" << endl
+ << name << " (" << xerces_ns << "::XMLFormatTarget& ft," << endl
+ << "const " << type_name (e) << "& x, " << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a Xerces-C++ XML format target " <<
+ "with an error" << endl
+ << " * handler." << endl
+ << " *" << endl
+ << " * @param ft A Xerces-C++ XML format target." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param eh An error handler." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param e A character encoding to produce XML in." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * This function reports serialization errors by " <<
+ "calling the error" << endl
+ << " * handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << "void" << endl
+ << name << " (" << xerces_ns << "::XMLFormatTarget& ft," << endl
+ << "const " << type_name (e) << "& x, " << endl
+ << error_handler << "& eh," << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a Xerces-C++ XML format target " <<
+ "with a" << endl
+ << " * Xerces-C++ DOM error handler." << endl
+ << " *" << endl
+ << " * @param ft A Xerces-C++ XML format target." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param eh A Xerces-C++ DOM error handler." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param e A character encoding to produce XML in." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * This function reports serialization errors by " <<
+ "calling the error" << endl
+ << " * handler." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << "void" << endl
+ << name << " (" << xerces_ns << "::XMLFormatTarget& ft," << endl
+ << "const " << type_name (e) << "& x, " << endl
+ << xerces_ns << "::DOMErrorHandler& eh," << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << "const " << string_type << "& e = " << L << "\"UTF-8\"," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (!doxygen)
+ {
+ os << "// Serialize to an existing xercesc::DOMDocument." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to an existing Xerces-C++ DOM document." << endl
+ << " *" << endl
+ << " * @param d A Xerces-C++ DOM document." << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param f Serialization flags." << endl
+ << " *" << endl
+ << " * Note that it is your responsibility to create the " <<
+ "DOM document" << endl
+ << " * with the correct root element as well as set the " <<
+ "necessary" << endl
+ << " * namespace mapping attributes." << endl
+ << " */" << endl;
+ }
+ os << inst_exp
+ << "void" << endl
+ << name << " (" << xerces_ns << "::DOMDocument& d," << endl
+ << "const " << type_name (e) << "& x," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (!doxygen)
+ {
+ os << "// Serialize to a new xercesc::DOMDocument." << endl
+ << "//" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Serialize to a new Xerces-C++ DOM document." << endl
+ << " *" << endl
+ << " * @param x An object model to serialize." << endl
+ << " * @param m A namespace information map." << endl
+ << " * @param f Serialization flags." << endl
+ << " * @return A pointer to the new Xerces-C++ DOM document." << endl
+ << " */" << endl;
+ }
+
+ os << inst_exp
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument >" << endl
+ << name << " (const " << type_name (e) << "& x, " << endl
+ << "const " << namespace_infomap << "& m = " <<
+ namespace_infomap << " ()," << endl
+ << flags_type << " f = 0);"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+ }
+
+ private:
+ String
+ type_name (Type& e)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (e.type ());
+
+ return o.str ();
+ }
+ };
+
+ }
+
+ void
+ generate_serialization_header (Context& ctx)
+ {
+ bool elemen_type (ctx.options.generate_element_type ());
+
+ if (!elemen_type)
+ ctx.os << "#include <iosfwd>" << endl
+ << endl
+ << "#include <xercesc/dom/DOMDocument.hpp>" << endl
+ << "#include <xercesc/dom/DOMErrorHandler.hpp>" << endl
+ << "#include <xercesc/framework/XMLFormatter.hpp>" << endl
+ << endl
+ << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl
+ << endl;
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+ ElementType element_type (ctx);
+ ElementFunction element_function (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ if (elemen_type)
+ names >> element_type;
+ else
+ names >> element_function;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/serialization-header.hxx b/xsd/xsd/cxx/tree/serialization-header.hxx
new file mode 100644
index 0000000..08c58ab
--- /dev/null
+++ b/xsd/xsd/cxx/tree/serialization-header.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/serialization-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_SERIALIZATION_HEADER_HXX
+#define XSD_CXX_TREE_SERIALIZATION_HEADER_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_serialization_header (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_SERIALIZATION_HEADER_HXX
diff --git a/xsd/xsd/cxx/tree/serialization-source.cxx b/xsd/xsd/cxx/tree/serialization-source.cxx
new file mode 100644
index 0000000..3e9fffb
--- /dev/null
+++ b/xsd/xsd/cxx/tree/serialization-source.cxx
@@ -0,0 +1,1468 @@
+// file : xsd/cxx/tree/serialization-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/serialization-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ enum schema_type
+ {
+ st_other,
+ st_double,
+ st_decimal
+ };
+
+ enum schema_type
+ schema_type (SemanticGraph::Type& t)
+ {
+ if (t.is_a<SemanticGraph::Fundamental::Double> ())
+ return st_double;
+ else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
+ return st_decimal;
+ else
+ return st_other;
+ }
+
+
+ //
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String base (L"::xsd::cxx::tree::list< " +
+ item_type_name (item_type) + L", " + char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base += L" >";
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "e << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr& a, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "a << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // operator<< (list_stream)
+ //
+ os << "void" << endl
+ << "operator<< (" << list_stream_type << "& l," << endl
+ << "const " << name << "& i)"
+ << "{"
+ << "l << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // Register with type factory map. If this type is anonymous
+ // but substitutes, then it will be registered as part of the
+ // substitution registration.
+ //
+ if (polymorphic && polymorphic_p (l) && !anonymous_p (l))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (l));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_serializer_init (" << endl
+ << strlit (l.name ()) << "," << endl
+ << strlit (xml_ns_name (l)) << ");"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ String const& base (xs_string_type);
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "e << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr& a, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "a << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // operator<< (list_stream)
+ //
+ os << "void" << endl
+ << "operator<< (" << list_stream_type << "& l," << endl
+ << "const " << name << "& i)"
+ << "{"
+ << "l << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // Register with type factory map. If this type is anonymous
+ // but substitutes, then it will be registered as part of the
+ // substitution registration.
+ //
+ if (polymorphic && polymorphic_p (u) && !anonymous_p (u))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (u));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_serializer_init (" << endl
+ << strlit (u.name ()) << "," << endl
+ << strlit (xml_ns_name (u)) << ");"
+ << endl
+ << endl;
+ }
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_base_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "e << static_cast< const ";
+
+ inherits (e, inherits_base_);
+
+ os << "& > (i);"
+ << "}";
+
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr& a, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "a << static_cast< const ";
+
+ inherits (e, inherits_base_);
+
+ os << "& > (i);"
+ << "}";
+
+
+ // operator<< (list_stream)
+ //
+ os << "void" << endl
+ << "operator<< (" << list_stream_type << "& l," << endl
+ << "const " << name << "& i)"
+ << "{"
+ << "l << static_cast< const ";
+
+ inherits (e, inherits_base_);
+
+ os << "& > (i);"
+ << "}";
+
+
+ // Register with type factory map. If this type is anonymous
+ // but substitutes, then it will be registered as part of the
+ // substitution registration.
+ //
+ if (polymorphic && polymorphic_p (e) && !anonymous_p (e))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (e));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_serializer_init (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (xml_ns_name (e)) << ");"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_base_;
+ BaseTypeName base_;
+ };
+
+ struct Element: Traversal::Element, Context
+ {
+ Element (Context& c, String const& scope_)
+ : Context (c), scope (scope_)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (e.scope ()));
+
+ bool ordered (ordered_p (c));
+
+ String const& aname (eaname (e));
+ String ns (e.qualified_p () ? e.namespace_ ().name () : "");
+ String type (scope + L"::" + etype (e));
+
+ // Check if we need to handle xsi:type and substitution groups.
+ // If this element's type is anonymous then we don't need to do
+ // anything. Note that if the type is anonymous then it can't be
+ // derived from which makes it impossible to substitute or
+ // dynamically-type with xsi:type.
+ //
+ SemanticGraph::Type& t (e.type ());
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ os << "// " << comment (e.name ()) << endl
+ << "//" << endl;
+
+ if (ordered)
+ os << "case " << scope << "::" <<
+ e.context ().get<String> ("ordered-id-name") << ":"
+ << "{";
+
+ if (poly)
+ {
+ os << (ordered ? "" : "{")
+ << "::xsd::cxx::tree::type_serializer_map< " << char_type
+ << " >& tsm (" << endl
+ << "::xsd::cxx::tree::type_serializer_map_instance< " <<
+ poly_plate << ", " << char_type << " > ());"
+ << endl;
+ }
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ if (ordered)
+ os << "const " << type << "& x (i." << aname <<
+ " ()[b->index]);"
+ << endl;
+ else
+ os << "for (" << scope << "::" << econst_iterator (e) << endl
+ << "b (i." << aname << " ().begin ()), " <<
+ "n (i." << aname << " ().end ());" << endl
+ << "b != n; ++b)"
+ << "{";
+
+ char const* x (ordered ? "x" : "*b");
+
+ if (poly)
+ {
+ os << "if (typeid (" << type << ") == typeid (" << x << "))"
+ << "{"
+ << xerces_ns << "::DOMElement& s (" << endl
+ << "::xsd::cxx::xml::dom::create_element (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl
+ << "s << " << x << ";"
+ << "}"
+ << "else" << endl
+ << "tsm.serialize (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (ns) << "," << endl
+ << (e.global_p () ? "true" : "false") << ", " <<
+ (e.qualified_p () ? "true" : "false") << ", e, " << x << ");";
+ }
+ else
+ {
+ os << xerces_ns << "::DOMElement& s (" << endl
+ << "::xsd::cxx::xml::dom::create_element (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl;
+
+ switch (schema_type (t))
+ {
+ case st_other:
+ {
+ os << "s << " << x << ";";
+ break;
+ }
+ case st_double:
+ {
+ os << "s << " << as_double_type << " (" << x << ");";
+ break;
+ }
+ case st_decimal:
+ {
+ os << "s << " << as_decimal_type << " (" << x << ");";
+ break;
+ }
+ }
+ }
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ if (!ordered)
+ os << "if (i." << aname << " ())"
+ << "{";
+
+ if (poly)
+ {
+ os << "const " << type << "& x (*i." << aname << " ());"
+ << "if (typeid (" << type << ") == typeid (x))"
+ << "{"
+ << xerces_ns << "::DOMElement& s (" << endl
+ << "::xsd::cxx::xml::dom::create_element (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl
+ << "s << x;"
+ << "}"
+ << "else" << endl
+ << "tsm.serialize (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (ns) << "," << endl
+ << (e.global_p () ? "true" : "false") << ", " <<
+ (e.qualified_p () ? "true" : "false") << ", e, x);";
+ }
+ else
+ {
+ os << xerces_ns << "::DOMElement& s (" << endl
+ << "::xsd::cxx::xml::dom::create_element (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl;
+
+ switch (schema_type (t))
+ {
+ case st_other:
+ {
+ os << "s << *i." << aname << " ();";
+ break;
+ }
+ case st_double:
+ {
+ os << "s << " << as_double_type << "(*i." << aname << " ());";
+ break;
+ }
+ case st_decimal:
+ {
+ os << "s << " << as_decimal_type << "(*i." << aname << " ());";
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ // one
+ //
+ if (poly)
+ {
+ os << "const " << type << "& x (i." << aname << " ());"
+ << "if (typeid (" << type << ") == typeid (x))"
+ << "{"
+ << xerces_ns << "::DOMElement& s (" << endl
+ << "::xsd::cxx::xml::dom::create_element (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl
+ << "s << x;"
+ << "}"
+ << "else" << endl
+ << "tsm.serialize (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (ns) << "," << endl
+ << (e.global_p () ? "true" : "false") << ", " <<
+ (e.qualified_p () ? "true" : "false") << ", e, x);";
+ }
+ else
+ {
+ if (!ordered)
+ os << "{";
+
+ os << xerces_ns << "::DOMElement& s (" << endl
+ << "::xsd::cxx::xml::dom::create_element (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl;
+
+ switch (schema_type (t))
+ {
+ case st_other:
+ {
+ os << "s << i." << aname << " ();";
+ break;
+ }
+ case st_double:
+ {
+ os << "s << " << as_double_type << "(i." << aname << " ());";
+ break;
+ }
+ case st_decimal:
+ {
+ os << "s << " << as_decimal_type << "(i." << aname << " ());";
+ break;
+ }
+ }
+ }
+ }
+
+ if (ordered)
+ {
+ // See comment for bool text (false); below.
+ //
+ if (mixed_p (c) && c.context ().get<size_t> ("ordered-start") != 1)
+ os << "text = true;";
+
+ os << "continue;"
+ << "}";
+ }
+ else
+ {
+ os << "}";
+
+ if (poly && (max (e) != 1 || min (e) == 0))
+ os << "}"; // There is no extra block for poly one.
+ }
+ }
+
+ private:
+ String scope;
+ };
+
+ struct Any: Traversal::Any, Context
+ {
+ Any (Context& c, String const& scope_)
+ : Context (c), scope (scope_)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
+
+ bool ordered (ordered_p (c));
+
+ String const& aname (eaname (a));
+
+ os << "// " << ename (a) << endl
+ << "//" << endl;
+
+ if (ordered)
+ os << "case " << scope << "::" <<
+ a.context ().get<String> ("ordered-id-name") << ":";
+
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ if (!ordered)
+ os << "for (" << scope << "::" << econst_iterator (a) << endl
+ << "b (i." << aname << " ().begin ()), " <<
+ "n (i." << aname << " ().end ());" << endl
+ << "b != n; ++b)";
+
+ os << "{"
+ << "e.appendChild (" << endl
+ << "e.getOwnerDocument ()->importNode (" << endl
+ << "const_cast< " << xerces_ns <<
+ "::DOMElement* > (&(" <<
+ (ordered ? (L"i." + aname + L" ()[b->index]") : L"*b") <<
+ ")), true));";
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ if (!ordered)
+ os << "if (i." << aname << " ())";
+
+ os << "{"
+ << "e.appendChild (" << endl
+ << "e.getOwnerDocument ()->importNode (" << endl
+ << "const_cast< " << xerces_ns << "::DOMElement* > (&(*i." <<
+ aname << " ())), true));";
+ }
+ else
+ {
+ // one
+ //
+ if (ordered)
+ os << "{";
+
+ os << "e.appendChild (" << endl
+ << "e.getOwnerDocument ()->importNode (" << endl
+ << "const_cast< " << xerces_ns << "::DOMElement* > (&(i." <<
+ aname << " ())), true));"
+ << endl;
+ }
+
+ if (ordered)
+ {
+ // See comment for bool text (false); below.
+ //
+ if (mixed_p (c) && c.context ().get<size_t> ("ordered-start") != 1)
+ os << "text = true;";
+
+ os << "continue;";
+ }
+
+ if (ordered || max (a) != 1 || min (a) == 0)
+ os << "}";
+ }
+
+ private:
+ String scope;
+ };
+
+ struct Attribute: Traversal::Attribute, Context
+ {
+ Attribute (Context& c, String const& scope_)
+ : Context (c), scope (scope_)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& aname (eaname (a));
+ String ns (a.qualified_p () ? a.namespace_ ().name () : "");
+
+ os << "// " << comment (a.name ()) << endl
+ << "//" << endl;
+
+ if (a.optional_p () && !a.default_p ())
+ {
+ os << "if (i." << aname << " ())"
+ << "{"
+ << xerces_ns << "::DOMAttr& a (" << endl
+ << "::xsd::cxx::xml::dom::create_attribute (" << endl
+ << strlit (a.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl;
+
+ switch (schema_type (a.type ()))
+ {
+ case st_other:
+ {
+ os << "a << *i." << aname << " ();";
+ break;
+ }
+ case st_double:
+ {
+ os << "a << " << as_double_type << "(*i." << aname << " ());";
+ break;
+ }
+ case st_decimal:
+ {
+ os << "a << " << as_decimal_type << "(*i." << aname << " ());";
+ break;
+ }
+ }
+
+ os << "}";
+ }
+ else
+ {
+ // Make sure we serialize required fixed attributes.
+ //
+ if (a.optional_p () && options.omit_default_attributes ())
+ {
+ os << "if (i." << aname << " () != " << scope <<
+ "::" << edefault_value (a) << " ())";
+ }
+
+ os << "{"
+ << xerces_ns << "::DOMAttr& a (" << endl
+ << "::xsd::cxx::xml::dom::create_attribute (" << endl
+ << strlit (a.name ()) << "," << endl
+ << (ns ? strlit (ns) + L",\n" : L"")
+ << "e));"
+ << endl;
+
+ switch (schema_type (a.type ()))
+ {
+ case st_other:
+ {
+ os << "a << i." << aname << " ();";
+ break;
+ }
+ case st_double:
+ {
+ os << "a << " << as_double_type << "(i." << aname << " ());";
+ break;
+ }
+ case st_decimal:
+ {
+ os << "a << " << as_decimal_type << "(i." << aname << " ());";
+ break;
+ }
+ }
+
+ os << "}";
+ }
+ }
+
+ private:
+ String scope;
+ };
+
+ struct AnyAttribute: Traversal::AnyAttribute, Context
+ {
+ AnyAttribute (Context& c, String const& scope_)
+ : Context (c), scope (scope_)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& aname (eaname (a));
+
+ os << "// " << ename (a) << endl
+ << "//" << endl;
+
+ os << "for (" << scope << "::" << econst_iterator (a) << endl
+ << "b (i." << aname << " ().begin ()), " <<
+ "n (i." << aname << " ().end ());" << endl
+ << "b != n; ++b)"
+ << "{"
+ << xerces_ns << "::DOMAttr* a (" << endl
+ << "static_cast< " << xerces_ns << "::DOMAttr* > (" << endl
+ << "e.getOwnerDocument ()->importNode (" << endl
+ << "const_cast< " << xerces_ns << "::DOMAttr* > (&(*b)), true)));"
+ << endl
+ << "if (a->getLocalName () == 0)" << endl
+ << "e.setAttributeNode (a);"
+ << "else" << endl
+ << "e.setAttributeNodeNS (a);"
+ << "}";
+ }
+
+ private:
+ String scope;
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
+ "const " << name << "& i)"
+ << "{";
+
+ if (c.inherits_p ())
+ {
+ os << "e << static_cast< const ";
+ inherits (c, inherits_);
+ os << "& > (i);"
+ << endl;
+ }
+ else
+ os << "e << static_cast< const " << any_type << "& > (i);"
+ << endl;
+
+ // Serialize anyAttribute content first so that is gets
+ // overriden by schema-defined attributes.
+ //
+ if (options.generate_wildcard ())
+ {
+ AnyAttribute any_attribute (*this, name);
+ Traversal::Names names (any_attribute);
+
+ Complex::names (c, names);
+ }
+
+ {
+ bool o (ordered_p (c));
+ size_t start, count;
+
+ if (o)
+ {
+ start = ctx.get<size_t> ("ordered-start");
+ count = ctx.get<size_t> ("ordered-count");
+
+ if (start != count)
+ {
+ String const& ci (ctx.get<String> ("order-const-iterator"));
+ String const& an (ctx.get<String> ("order-aname"));
+
+ // If we have mixed content and a base, then we have to
+ // skip the text content until we serialize one of "our"
+ // elements.
+ //
+ if (mixed_p (c) && start != 1)
+ os << "bool text (false);"
+ << endl;
+
+ os << "for (" << name << "::" << ci << endl
+ << "b (i." << an << " ().begin ()), n (i." << an <<
+ " ().end ());" << endl
+ << "b != n; ++b)"
+ << "{"
+ << "switch (b->id)"
+ << "{";
+ }
+ }
+
+ Traversal::Names names;
+ Any any (*this, name);
+ Element element (*this, name);
+
+ names >> element;
+
+ if (options.generate_wildcard ())
+ names >> any;
+
+ Complex::names (c, names);
+
+ if (o)
+ {
+ if (start != count)
+ {
+ if (mixed_p (c))
+ {
+ //@@ propagate mixed-ordered-id to derived
+
+ os << "// text_content" << endl
+ << "//" << endl
+ << "case " << name << "::" <<
+ ctx.get<String> ("mixed-ordered-id-name") << ":"
+ << "{";
+
+ // See the comment above.
+ //
+ if (start != 1)
+ os << "if (text)" << endl;
+
+ os << "e.appendChild (" << endl
+ << "e.getOwnerDocument ()->createTextNode (" << endl
+ << "::xsd::cxx::xml::string (" << endl
+ << "i." << ctx.get<String> ("mixed-aname") <<
+ " ()[b->index].c_str ()).c_str ()));";
+
+ // os << "e << i." << ctx.get<String> ("mixed-aname") <<
+ // " ()[b->index];";
+
+ os << "continue;"
+ << "}";
+ }
+
+ // Ignore content before our id range and stop serializing
+ // if we see anything past. This handles inheritance.
+ //
+ os << "default:"
+ << "{";
+
+ if (start != 1)
+ os << "if (b->id < " << start << "UL)" << endl
+ << "continue;";
+
+ os << "break;" // Stop (see break below).
+ << "}";
+
+ os << "}" // switch
+ << "break;" // Unknown element past our elements.
+ << "}"; // for
+ }
+ }
+ }
+
+ {
+ Attribute attribute (*this, name);
+ Traversal::Names names (attribute);
+ Complex::names (c, names);
+ }
+
+ os << "}";
+
+ bool simple (true);
+ {
+ IsSimpleType t (simple);
+ t.dispatch (c);
+ }
+
+ if (simple)
+ {
+ bool hb (c.inherits_p ());
+
+ // operator<< (xercesc::DOMAttr)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMAttr&" <<
+ (hb ? " a" : "") << ", " <<
+ "const " << name << "&" << (hb ? " i" : "") << ")"
+ << "{";
+
+ if (hb)
+ {
+ os << "a << static_cast< const ";
+
+ inherits (c, inherits_);
+
+ os << "& > (i);";
+ }
+
+ os << "}";
+
+
+ // operator<< (list_stream)
+ //
+ os << "void" << endl
+ << "operator<< (" << list_stream_type << "&" <<
+ (hb ? " l" : "") << "," << endl
+ << "const " << name << "&" << (hb ? " i" : "") << ")"
+ << "{";
+
+ if (hb)
+ {
+ os << "l << static_cast< const ";
+
+ inherits (c, inherits_);
+
+ os << "& > (i);";
+ }
+
+ os << "}";
+ }
+
+ // Register with type factory map. If this type is anonymous
+ // but substitutes, then it will be registered as part of the
+ // substitution registration.
+ //
+ if (polymorphic &&
+ polymorphic_p (c) &&
+ !c.abstract_p () &&
+ !anonymous_p (c))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (c));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_serializer_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_serializer_init (" << endl
+ << strlit (c.name ()) << "," << endl
+ << strlit (xml_ns_name (c)) << ");"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+ BaseTypeName base_;
+ };
+
+
+ // Generate substitution group map entry.
+ //
+ struct GlobalElement: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ GlobalElement (Context& c)
+ : GlobalElementBase (c), Context (c), type_name_ (c)
+ {
+ belongs_ >> type_name_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (polymorphic && e.substitutes_p ())
+ {
+ Type& r (e.substitutes ().root ());
+
+ String const& name (ename (e));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::element_serializer_initializer< " <<
+ poly_plate << ", " << char_type << ", ";
+
+ belongs (e, belongs_);
+
+ os << " >" << endl
+ << "_xsd_" << name << "_element_serializer_init (" << endl
+ << strlit (r.name ()) << "," << endl
+ << strlit (r.namespace_ ().name ()) << "," << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_ ().name ()) << ");"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ Traversal::Belongs belongs_;
+ MemberTypeName type_name_;
+
+ };
+
+ struct ElementType: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ ElementType (Context& c)
+ : GlobalElementBase (c),
+ Context (c),
+ element_map_ (c.options.generate_element_map ())
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (doc_root_p (e))
+ {
+ String const& name (ename (e));
+
+ // operator<< (xercesc::DOMElement)
+ //
+ os << "void" << endl
+ << "operator<< (" << xerces_ns << "::DOMElement& e, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "e << i." << eaname (e) << " ();"
+ << "}";
+
+ // Element map registration.
+ //
+ if (element_map_)
+ {
+ SemanticGraph::Context& ec (e.context ());
+ String const& aname (ec.get<String> ("element-name"));
+ String const& ans (ec.get<String> ("element-ns"));
+
+ os << "static " << endl
+ << "const ::xsd::cxx::tree::serializer_init< " <<
+ name << ", " << char_type << ", " << any_type << " >" << endl
+ << "_xsd_" << name << "_serializer_init (" <<
+ name << "::" << aname << " (), " <<
+ name << "::" << ans << " ());"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ bool element_map_;
+ };
+
+ struct ElementFunction: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ ElementFunction (Context& c)
+ : GlobalElementBase (c), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!doc_root_p (e))
+ return;
+
+ String const& name (eserializer (e));
+ String ns (e.namespace_ ().name ());
+ String const& error_handler (error_handler_type);
+ String const& namespace_infomap (namespace_infomap_type);
+
+ SemanticGraph::Type& type (e.type ());
+
+ // Note that I am using fq-name in function calls because g++ gets
+ // confused if the name is 'type'. (see tests/schema/anonymous)
+ //
+
+ // Check if we need to handle xsi:type and substitution groups.
+ // If this element's type is anonymous then we don't need to do
+ // anything.
+ //
+ bool poly (polymorphic &&
+ polymorphic_p (type) &&
+ !anonymous_p (type));
+
+ // To std::ostream.
+ //
+ os << "void" << endl
+ << name << " (::std::ostream& o," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << "const " << string_type << "& e," << endl
+ << flags_type << " f)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0);"
+ << endl
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << fq_name (e, "serializer") << " (s, m, f));"
+ << endl
+ << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
+ << endl
+ << "::xsd::cxx::xml::dom::ostream_format_target t (o);"
+ << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
+ << "{"
+ << "h.throw_if_failed< ::xsd::cxx::tree::serialization< " <<
+ char_type << " > > ();"
+ << "}"
+ << "}";
+
+ os << "void" << endl
+ << name << " (::std::ostream& o," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << error_handler << "& h," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << "const " << string_type << "& e," << endl
+ << flags_type << " f)"
+ << "{"
+ << "::xsd::cxx::xml::auto_initializer i (" << endl
+ << "(f & " << flags_type << "::dont_initialize) == 0);"
+ << endl
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << fq_name (e, "serializer") << " (s, m, f));"
+ << "::xsd::cxx::xml::dom::ostream_format_target t (o);"
+ << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
+ << "{"
+ << "throw ::xsd::cxx::tree::serialization< " <<
+ char_type << " > ();"
+ << "}"
+ << "}";
+
+ os << "void" << endl
+ << name << " (::std::ostream& o," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << xerces_ns << "::DOMErrorHandler& h," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << "const " << string_type << "& e," << endl
+ << flags_type << " f)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << fq_name (e, "serializer") << " (s, m, f));"
+ << "::xsd::cxx::xml::dom::ostream_format_target t (o);"
+ << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
+ << "{"
+ << "throw ::xsd::cxx::tree::serialization< " <<
+ char_type << " > ();"
+ << "}"
+ << "}";
+
+ // To XMLFormatTarget.
+ //
+ os << "void" << endl
+ << name << " (" << xerces_ns << "::XMLFormatTarget& t," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << "const " << string_type << "& e," << endl
+ << flags_type << " f)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << fq_name (e, "serializer") << " (s, m, f));"
+ << endl
+ << "::xsd::cxx::tree::error_handler< " << char_type << " > h;"
+ << endl
+ << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
+ << "{"
+ << "h.throw_if_failed< ::xsd::cxx::tree::serialization< " <<
+ char_type << " > > ();"
+ << "}"
+ << "}";
+
+ os << "void" << endl
+ << name << " (" << xerces_ns << "::XMLFormatTarget& t," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << error_handler << "& h," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << "const " << string_type << "& e," << endl
+ << flags_type << " f)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << fq_name (e, "serializer") << " (s, m, f));"
+ << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
+ << "{"
+ << "throw ::xsd::cxx::tree::serialization< " <<
+ char_type << " > ();"
+ << "}"
+ << "}";
+
+ os << "void" << endl
+ << name << " (" << xerces_ns << "::XMLFormatTarget& t," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << xerces_ns << "::DOMErrorHandler& h," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << "const " << string_type << "& e," << endl
+ << flags_type << " f)"
+ << "{"
+ << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << fq_name (e, "serializer") << " (s, m, f));"
+ << "if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))"
+ << "{"
+ << "throw ::xsd::cxx::tree::serialization< " <<
+ char_type << " > ();"
+ << "}"
+ << "}";
+
+ // To an existing DOM instance.
+ //
+ os << "void" << endl
+ << name << " (" << xerces_ns << "::DOMDocument& d," << endl
+ << "const " << type_name (e) << "& s," << endl
+ << flags_type << ")"
+ << "{"
+ << xerces_ns << "::DOMElement& e (*d.getDocumentElement ());"
+ << "const " << qname_type << " n (" << endl
+ << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
+ << endl;
+
+ if (poly)
+ {
+ os << "if (typeid (" << type_name (e) << ") == typeid (s))"
+ << "{";
+ }
+
+ os << "if (n.name () == " << strlit (e.name ()) << " &&" << endl
+ << "n.namespace_ () == " << strlit (ns) << ")"
+ << "{";
+
+ switch (schema_type (type))
+ {
+ case st_other:
+ {
+ os << "e << s;";
+ break;
+ }
+ case st_double:
+ {
+ os << "e << " << as_double_type << "(s);";
+ break;
+ }
+ case st_decimal:
+ {
+ os << "e << " << as_decimal_type << "(s);";
+ break;
+ }
+ }
+
+ os << "}"
+ << "else"
+ << "{"
+ << "throw ::xsd::cxx::tree::unexpected_element < " <<
+ char_type << " > (" << endl
+ << "n.name ()," << endl
+ << "n.namespace_ ()," << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (ns) << ");"
+ << "}";
+
+ if (poly)
+ {
+ os << "}"
+ << "else"
+ << "{"
+ << "::xsd::cxx::tree::type_serializer_map_instance< " <<
+ poly_plate << ", " << char_type << " > ().serialize (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_().name ()) << "," << endl
+ << "e, n, s);"
+ << "}";
+ }
+
+ os << "}";
+
+
+ // To a new DOM instance.
+ //
+ os << dom_auto_ptr << "< " << xerces_ns << "::DOMDocument >" << endl
+ << name << " (const " << type_name (e) << "& s," << endl
+ << "const " << namespace_infomap << "& m," << endl
+ << flags_type << " f)"
+ << "{";
+
+ if (poly)
+ {
+ os << dom_auto_ptr << "< " << xerces_ns << "::DOMDocument > d;"
+ << endl
+ << "if (typeid (" << type_name (e) << ") == typeid (s))"
+ << "{"
+ << "d = ::xsd::cxx::xml::dom::serialize< " <<
+ char_type << " > (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (ns) << "," << endl
+ << "m, f);"
+ << "}"
+ << "else"
+ << "{"
+ << "d = ::xsd::cxx::tree::type_serializer_map_instance< " <<
+ poly_plate << ", " << char_type << " > ().serialize (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_().name ()) << "," << endl
+ << "m, s, f);"
+ << "}";
+ }
+ else
+ {
+ os << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > d (" << endl
+ << "::xsd::cxx::xml::dom::serialize< " <<
+ char_type << " > (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (ns) << "," << endl
+ << "m, f));"
+ << endl;
+ }
+
+ os << fq_name (e, "serializer") << " (*d, s, f);"
+ << "return d;"
+ << "}";
+
+ }
+
+ private:
+ String
+ type_name (Type& e)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (e.type ());
+
+ return o.str ();
+ }
+ };
+ }
+
+ void
+ generate_serialization_source (Context& ctx, size_t first, size_t last)
+ {
+ bool elemen_type (ctx.options.generate_element_type ());
+
+ if (!elemen_type)
+ ctx.os << "#include <ostream>" << endl
+ << "#include <xsd/cxx/tree/error-handler.hxx>" << endl;
+
+ ctx.os << "#include <xsd/cxx/xml/dom/serialization-source.hxx>" << endl
+ << endl;
+
+ if (ctx.polymorphic)
+ {
+ ctx.os << "#include <xsd/cxx/tree/type-serializer-map.hxx>" << endl
+ << endl;
+
+ bool import_maps (ctx.options.import_maps ());
+ bool export_maps (ctx.options.export_maps ());
+
+ if (import_maps || export_maps)
+ {
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{"
+ << "namespace tree"
+ << "{"
+ << "#ifdef _MSC_VER" << endl;
+
+ if (export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "type_serializer_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "type_serializer_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
+ << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "type_serializer_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
+ << "template struct XSD_MAP_VISIBILITY " <<
+ "type_serializer_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#endif" << endl
+ << "}" // tree
+ << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+ }
+
+ ctx.os << "namespace _xsd"
+ << "{"
+ << "static" << endl
+ << "const ::xsd::cxx::tree::type_serializer_plate< " <<
+ ctx.poly_plate << ", " << ctx.char_type << " >" << endl
+ << "type_serializer_plate_init;"
+ << "}";
+ }
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx, first, last);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+ GlobalElement element (ctx);
+ ElementType element_type (ctx);
+ ElementFunction element_function (ctx);
+
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+ names >> element;
+
+ if (elemen_type)
+ names >> element_type;
+ else
+ names >> element_function;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/serialization-source.hxx b/xsd/xsd/cxx/tree/serialization-source.hxx
new file mode 100644
index 0000000..75e57f3
--- /dev/null
+++ b/xsd/xsd/cxx/tree/serialization-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/serialization-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_SERIALIZATION_SOURCE_HXX
+#define XSD_CXX_TREE_SERIALIZATION_SOURCE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_serialization_source (Context&, size_t first, size_t last);
+ }
+}
+
+#endif // XSD_CXX_TREE_SERIALIZATION_SOURCE_HXX
diff --git a/xsd/xsd/cxx/tree/stream-extraction-source.cxx b/xsd/xsd/cxx/tree/stream-extraction-source.cxx
new file mode 100644
index 0000000..5a5ed66
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-extraction-source.cxx
@@ -0,0 +1,864 @@
+// file : xsd/cxx/tree/stream-extraction-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/stream-extraction-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String base (L"::xsd::cxx::tree::list< " +
+ item_type_name (item_type) + L", " + char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base += L" >";
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ());
+ i != st.end (); ++i)
+ {
+ os << name << "::" << endl
+ << name << " (" << istream_type << "< " <<
+ i->c_str () << " >& s," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << any_simple_type << " (s, f, c)," << endl
+ << " " << base << " (s, f, this)"
+ << "{"
+ << "}";
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (l) &&
+ (!anonymous_p (l) || anonymous_substitutes_p (l)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (l));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_extraction_init_" <<
+ n++ << " (" << endl
+ << strlit (l.name ()) << "," << endl
+ << strlit (xml_ns_name (l)) << ");"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ String const& base (xs_string_type);
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ os << name << "::" << endl
+ << name << " (" << istream_type << "< " <<
+ i->c_str () << " >& s," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (s, f, c)"
+ << "{"
+ << "}";
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (u) &&
+ (!anonymous_p (u) || anonymous_substitutes_p (u)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (u));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_extraction_init_" <<
+ n++ << " (" << endl
+ << strlit (u.name ()) << "," << endl
+ << strlit (xml_ns_name (u)) << ");"
+ << endl;
+ }
+ }
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_base_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ bool enum_based (false);
+ if (string_based)
+ {
+ SemanticGraph::Enumeration* base_enum (0);
+ IsEnumBasedType t (base_enum);
+ t.dispatch (e);
+
+ enum_based = (base_enum != 0);
+ }
+
+ String value;
+ if (string_based)
+ value = evalue (e);
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ os << name << "::" << endl
+ << name << " (" << istream_type << "< " <<
+ i->c_str () << " >& s," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": ";
+
+ inherits (e, inherits_base_);
+
+ if (string_based && !enum_based)
+ {
+ // Use copy c-tor to pass the flags and container.
+ //
+ os << " (" << endl;
+ inherits (e, inherits_base_);
+ os << " (_xsd_" << name << "_literals_[s.read_uint ()]), f, c)";
+ }
+ else
+ os << " (s, f, c)";
+
+ os << "{";
+
+ if (string_based)
+ os << "_xsd_" << name << "_convert ();";
+
+ os << "}";
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (e) &&
+ (!anonymous_p (e) || anonymous_substitutes_p (e)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (e));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_extraction_init_" <<
+ n++ << " (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (xml_ns_name (e)) << ");"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_base_;
+ BaseTypeName base_;
+ };
+
+ struct CtorMember: Traversal::Member, Context
+ {
+ CtorMember (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ if (skip (m))
+ return;
+
+ os << "," << endl
+ << " " << emember (m) << " (this)";
+ }
+ };
+
+ struct CtorAny: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ CtorAny (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+ };
+
+ struct Element: Traversal::Element, Context
+ {
+ Element (Context& c, String const& stream_)
+ : Context (c), stream (stream_)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ String const& member (emember (e));
+
+ SemanticGraph::Type& t (e.type ());
+ String type (etype (e));
+ String tr (etraits (e)); // traits type name
+
+ bool fund (false);
+ {
+ IsFundamentalType traverser (fund);
+ traverser.dispatch (t);
+ }
+
+ // Figure out if we need to generate polymorphic code. If this
+ // elemen's type is anonymous then we don't need to do anything.
+ // Note that if the type is anonymous then it can't be derived
+ // from which makes it impossible to substitute or dynamically-
+ // type with xsi:type.
+ //
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ // Check if this element is abstract.
+ //
+ bool abst (false);
+ if (poly)
+ {
+ SemanticGraph::Complex* tc;
+ abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
+ tc->abstract_p ();
+ }
+
+ char const* r (
+ (poly || !fund) && std >= cxx_version::cxx11
+ ? "::std::move (r)"
+ : "r");
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ String container (econtainer (e));
+
+ os << "{"
+ << "::std::size_t n;"
+ << "::xsd::cxx::tree::istream_common::as_size< " <<
+ "::std::size_t > as (n);"
+ << "s >> as;"
+ << "if (n > 0)"
+ << "{"
+ << container << "& c (this->" << member << ");"
+ << "c.reserve (n);"
+ << "while (n--)"
+ << "{";
+
+ if (poly)
+ {
+ os << auto_ptr << "< " << type << " > r;";
+
+ if (!abst)
+ os << "bool d;"
+ << "s >> d;"
+ << endl
+ << "if (!d)" << endl
+ << "r.reset (new " << type << " (s, f, this));"
+ << "else"
+ << "{";
+
+ os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
+ << "::xsd::cxx::tree::stream_extraction_map_instance< " <<
+ poly_plate << ", " << stream << ", " << char_type <<
+ " > ().extract (" << endl
+ << "s, f, this));"
+ << "r.reset (dynamic_cast< " << type << "* > (tmp.get ()));"
+ << "if (r.get ())" << endl
+ << "tmp.release ();"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
+ " > ();";
+
+ if (!abst)
+ os << "}";
+ }
+ else if (fund)
+ {
+ os << type << " r;"
+ << "s >> r;";
+ }
+ else
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << tr << "::create (s, f, this));";
+ }
+
+ os << "c.push_back (" << r << ");"
+ << "}" // while
+ << "}" // if
+ << "}";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "{"
+ << "bool p;"
+ << "s >> p;"
+ << "if (p)"
+ << "{";
+
+ if (poly)
+ {
+ os << auto_ptr << "< " << type << " > r;";
+
+ if (!abst)
+ os << "bool d;"
+ << "s >> d;"
+ << endl
+ << "if (!d)" << endl
+ << "r.reset (new " << type << " (s, f, this));"
+ << "else"
+ << "{";
+
+ os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
+ << "::xsd::cxx::tree::stream_extraction_map_instance< " <<
+ poly_plate << ", " << stream << ", " << char_type <<
+ " > ().extract (" << endl
+ << "s, f, this));"
+ << "r.reset (dynamic_cast< " << type << "* > (tmp.get ()));"
+ << "if (r.get ())" << endl
+ << "tmp.release ();"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
+ " > ();";
+
+ if (!abst)
+ os << "}";
+ }
+ else if (fund)
+ {
+ os << type << " r;"
+ << "s >> r;";
+ }
+ else
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << tr << "::create (s, f, this));";
+ }
+
+ os << "this->" << member << ".set (" << r << ");"
+ << "}" // if (p)
+ << "}";
+ }
+ else
+ {
+ // one
+ //
+ os << "{";
+
+ if (poly)
+ {
+ os << auto_ptr << "< " << type << " > r;";
+
+ if (!abst)
+ os << "bool d;"
+ << "s >> d;"
+ << endl
+ << "if (!d)" << endl
+ << "r.reset (new " << type << " (s, f, this));"
+ << "else"
+ << "{";
+
+ os << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
+ << "::xsd::cxx::tree::stream_extraction_map_instance< " <<
+ poly_plate << ", " << stream << ", " << char_type <<
+ " > ().extract (" << endl
+ << "s, f, this));"
+ << "r.reset (dynamic_cast< " << type << "* > (tmp.get ()));"
+ << "if (r.get ())" << endl
+ << "tmp.release ();"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
+ " > ();";
+
+ if (!abst)
+ os << "}";
+ }
+ else if (fund)
+ {
+ os << type << " r;"
+ << "s >> r;";
+ }
+ else
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << tr << "::create (s, f, this));";
+ }
+
+ os << "this->" << member << ".set (" << r << ");"
+ << "}";
+ }
+ }
+
+ private:
+ String stream;
+ };
+
+ struct Attribute: Traversal::Attribute, Context
+ {
+ Attribute (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& member (emember (a));
+ String type (etype (a));
+ String tr (etraits (a)); // traits type name
+
+ bool fund (false);
+ {
+ IsFundamentalType traverser (fund);
+ traverser.dispatch (a.type ());
+ }
+
+ if (a.optional_p () && !a.default_p ())
+ {
+ os << "{"
+ << "bool p;"
+ << "s >> p;"
+ << "if (p)"
+ << "{";
+
+ if (fund)
+ {
+ os << type << " r;"
+ << "s >> r;"
+ << "this->" << member << ".set (r);";
+ }
+ else
+ {
+ os << "this->" << member << ".set (" << tr <<
+ "::create (s, f, this));";
+ }
+
+ os << "}" // if (p)
+ << "}";
+ }
+ else
+ {
+ os << "{";
+
+ if (fund)
+ {
+ os << type << " r;"
+ << "s >> r;"
+ << "this->" << member << ".set (r);";
+ }
+ else
+ {
+ os << "this->" << member << ".set (" << tr <<
+ "::create (s, f, this));";
+ }
+
+ os << "}";
+ }
+ }
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c), base_ (c), ctor_any_ (c), ctor_member_ (c)
+ {
+ inherits_ >> base_;
+ names_ctor_member_ >> ctor_member_;
+
+ if (options.generate_wildcard ())
+ names_ctor_member_ >> ctor_any_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
+ bool has_members (has<Traversal::Member> (c));
+
+ bool facets (false);
+ if (c.inherits_p ())
+ {
+ // See if we have any facets that we need to handle.
+ //
+ using SemanticGraph::Restricts;
+ using SemanticGraph::Fundamental::Decimal;
+
+ if (Restricts* r = dynamic_cast<Restricts*> (&c.inherits ()))
+ {
+ if (!r->facet_empty () &&
+ (r->facet_find ("fractionDigits") != r->facet_end () ||
+ r->facet_find ("totalDigits") != r->facet_end ()) &&
+ ultimate_base (c).is_a<Decimal> ())
+ facets = true;
+ }
+ }
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ os << name << "::" << endl
+ << name << " (" << istream_type << "< " <<
+ i->c_str () << " >& s," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": ";
+
+ if (c.inherits_p ())
+ inherits (c, inherits_);
+ else
+ os << any_type;
+
+ os << " (s, f, c)";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ names (c, names_ctor_member_);
+
+ os << "{";
+
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);"
+ << endl;
+
+ if (has_members)
+ os << "this->" << unclash (name, "parse") << " (s, f);";
+
+ os << "}";
+
+ // Parse
+ //
+ if (ordered || has_members)
+ {
+ os << "void " << name << "::" << endl
+ << unclash (name, "parse") << " (" <<
+ istream_type << "< " << i->c_str () << " >& s," << endl
+ << flags_type << " f)"
+ << "{"
+ << "XSD_UNUSED (f);"; // Can be unused.
+
+ // Read the order sequence.
+ //
+ if (ordered)
+ {
+ String const& t (ctx.get<String> ("order-type"));
+ String const& m (ctx.get<String> ("order-member"));
+
+ os << "{"
+ << "::std::size_t n;"
+ << "::xsd::cxx::tree::istream_common::as_size< " <<
+ "::std::size_t > na (n);"
+ << "s >> na;"
+ << "if (n > 0)"
+ << "{"
+ << "this->" << m << ".reserve (n);"
+ << "while (n--)"
+ << "{"
+ << "::std::size_t id, in;"
+ << "::xsd::cxx::tree::istream_common::as_size< " <<
+ "::std::size_t > ida (id), ina (in);"
+ << "s >> ida;"
+ << "s >> ina;"
+ << "this->" << m << ".push_back (" << t << " (id, in));"
+ << "}" // while
+ << "}" // if
+ << "}";
+ }
+
+ {
+ Element element (*this, *i);
+ Attribute attribute (*this);
+ Traversal::Names names_;
+
+ names_ >> element;
+ names_ >> attribute;
+
+ names (c, names_);
+ }
+
+ os << "}";
+ }
+
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (c) &&
+ !c.abstract_p () &&
+ (!anonymous_p (c) || anonymous_substitutes_p (c)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (c));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_extraction_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_extraction_init_" <<
+ n++ << " (" << endl
+ << strlit (c.name ()) << "," << endl
+ << strlit (xml_ns_name (c)) << ");"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+ BaseTypeName base_;
+
+ CtorAny ctor_any_;
+ CtorMember ctor_member_;
+
+ Traversal::Names names_ctor_member_;
+ };
+ }
+
+ void
+ generate_stream_extraction_source (Context& ctx)
+ {
+ if (ctx.polymorphic)
+ {
+ NarrowStrings const& st (ctx.options.generate_extraction ());
+
+ ctx.os << "#include <xsd/cxx/tree/stream-extraction-map.hxx>" << endl
+ << endl;
+
+ bool import_maps (ctx.options.import_maps ());
+ bool export_maps (ctx.options.export_maps ());
+
+ if (import_maps || export_maps)
+ {
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{"
+ << "namespace tree"
+ << "{";
+
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream (*i);
+
+ ctx.os << "#ifdef _MSC_VER" << endl;
+
+ if (export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "stream_extraction_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;";
+
+ if (import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "stream_extraction_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
+ << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "stream_extraction_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;"
+ << "#elif defined(XSD_MAP_VISIBILITY)" << endl
+ << "template struct XSD_MAP_VISIBILITY " <<
+ "stream_extraction_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;"
+ << "#endif" << endl;
+ }
+
+ ctx.os << "}" // tree
+ << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+
+ }
+
+ ctx.os << "namespace _xsd"
+ << "{";
+
+ size_t n (0);
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream (*i);
+
+ ctx.os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_extraction_plate< " <<
+ ctx.poly_plate << ", " << stream << ", " << ctx.char_type <<
+ " >" << endl
+ << "stream_extraction_plate_init_" << n++ << ";";
+ }
+
+ ctx.os << "}";
+ }
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/stream-extraction-source.hxx b/xsd/xsd/cxx/tree/stream-extraction-source.hxx
new file mode 100644
index 0000000..8b58491
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-extraction-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/stream-extraction-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_EXTRACTION_SOURCE_HXX
+#define XSD_CXX_TREE_EXTRACTION_SOURCE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_stream_extraction_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_EXTRACTION_SOURCE_HXX
diff --git a/xsd/xsd/cxx/tree/stream-header.cxx b/xsd/xsd/cxx/tree/stream-header.cxx
new file mode 100644
index 0000000..c8243c9
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-header.cxx
@@ -0,0 +1,181 @@
+// file : xsd/cxx/tree/stream-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/stream-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ os << inst_exp
+ << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "&, const " <<
+ name << "&);"
+ << endl;
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ os << inst_exp
+ << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "&, const " <<
+ name << "&);"
+ << endl;
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ bool enum_based (false);
+ if (string_based)
+ {
+ SemanticGraph::Enumeration* be (0);
+ IsEnumBasedType t (be);
+ t.dispatch (e);
+
+ enum_based = (be != 0);
+ }
+
+ // If we are based on an enum then the value type is just an
+ // alias and we don't need to generate this operator again.
+ //
+ if (string_based && !enum_based)
+ {
+ os << inst_exp
+ << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "&, " <<
+ name << "::" << evalue (e) << ");"
+ << endl;
+ }
+
+ os << inst_exp
+ << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "&, const " <<
+ name << "&);"
+ << endl;
+ }
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ os << inst_exp
+ << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "&, const " <<
+ name << "&);"
+ << endl;
+ }
+ };
+ }
+
+ void
+ generate_stream_header (Context& ctx)
+ {
+ String c (ctx.char_type);
+
+ ctx.os << "#include <iosfwd>" << endl
+ << endl;
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/stream-header.hxx b/xsd/xsd/cxx/tree/stream-header.hxx
new file mode 100644
index 0000000..58481c2
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-header.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/stream-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_STREAM_HEADER_HXX
+#define XSD_CXX_TREE_STREAM_HEADER_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_stream_header (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_STREAM_HEADER_HXX
diff --git a/xsd/xsd/cxx/tree/stream-insertion-header.cxx b/xsd/xsd/cxx/tree/stream-insertion-header.cxx
new file mode 100644
index 0000000..9eb4bc4
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-insertion-header.cxx
@@ -0,0 +1,178 @@
+// file : xsd/cxx/tree/stream-insertion-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/stream-insertion-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type (ostream_type + L"< " + String (*i) + L" >");
+
+ os << inst_exp
+ << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type (ostream_type + L"< " + String (*i) + L" >");
+
+ os << inst_exp
+ << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type (ostream_type + L"< " + String (*i) + L" >");
+
+ os << inst_exp
+ << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ }
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type (ostream_type + L"< " + String (*i) + L" >");
+
+ os << inst_exp
+ << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "&," << endl
+ << "const " << name << "&);"
+ << endl;
+ }
+ }
+ };
+ }
+
+ void
+ generate_stream_insertion_header (Context& ctx)
+ {
+ String c (ctx.char_type);
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/stream-insertion-header.hxx b/xsd/xsd/cxx/tree/stream-insertion-header.hxx
new file mode 100644
index 0000000..597bea0
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-insertion-header.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/stream-insertion-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_STREAM_INSERTION_HEADER_HXX
+#define XSD_CXX_TREE_STREAM_INSERTION_HEADER_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_stream_insertion_header (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_STREAM_INSERTION_HEADER_HXX
diff --git a/xsd/xsd/cxx/tree/stream-insertion-source.cxx b/xsd/xsd/cxx/tree/stream-insertion-source.cxx
new file mode 100644
index 0000000..08391ef
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-insertion-source.cxx
@@ -0,0 +1,623 @@
+// file : xsd/cxx/tree/stream-insertion-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/stream-insertion-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String base (L"::xsd::cxx::tree::list< " +
+ item_type_name (item_type) + L", " + char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base += L" >";
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
+
+ os << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "& s," << endl
+ << "const " << name << "& x)"
+ << "{"
+ << "return s << static_cast< const " << base << "& > (x);"
+ << "}";
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (l) &&
+ (!anonymous_p (l) || anonymous_substitutes_p (l)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (l));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_insertion_init_" <<
+ n++ << " (" << endl
+ << strlit (l.name ()) << "," << endl
+ << strlit (xml_ns_name (l)) << ");"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ String const& base (xs_string_type);
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
+
+ os << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "& s," << endl
+ << "const " << name << "& x)"
+ << "{"
+ << "return s << static_cast< const " << base << "& > (x);"
+ << "}";
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (u) &&
+ (!anonymous_p (u) || anonymous_substitutes_p (u)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (u));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_insertion_init_" <<
+ n++ << " (" << endl
+ << strlit (u.name ()) << "," << endl
+ << strlit (xml_ns_name (u)) << ");"
+ << endl;
+ }
+ }
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_base_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ bool enum_based (false);
+ if (string_based)
+ {
+ SemanticGraph::Enumeration* base_enum (0);
+ IsEnumBasedType t (base_enum);
+ t.dispatch (e);
+
+ enum_based = (base_enum != 0);
+ }
+
+ String value;
+ if (string_based)
+ value = evalue (e);
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
+
+ os << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "& s," << endl
+ << "const " << name << "& x)"
+ << "{";
+
+ if (!string_based || enum_based)
+ {
+ os << "return s << static_cast< const ";
+ inherits (e, inherits_base_);
+ os << "& > (x);";
+ }
+ else
+ {
+ os << name << "::" << value << " v (x);"
+ << "return s << static_cast< unsigned int > (v);";
+ }
+
+ os << "}";
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (e) &&
+ (!anonymous_p (e) || anonymous_substitutes_p (e)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (e));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_insertion_init_" <<
+ n++ << " (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (xml_ns_name (e)) << ");"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_base_;
+ BaseTypeName base_;
+ };
+
+ struct Element: Traversal::Element, Context
+ {
+ Element (Context& c, String const& scope_, String const& stream_)
+ : Context (c), scope (scope_), stream (stream_)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e)) return;
+
+ String const& aname (eaname (e));
+ SemanticGraph::Type& t (e.type ());
+ String type (scope + L"::" + etype (e));
+
+ // Figure out if we need to generate polymorphic code. If this
+ // elemen's type is anonymous then we don't need to do anything.
+ // Note that if the type is anonymous then it can't be derived
+ // from which makes it impossible to substitute or dynamically-
+ // type with xsi:type.
+ //
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ // Check if this element is abstract.
+ //
+ bool abst (false);
+ if (poly)
+ {
+ SemanticGraph::Complex* tc;
+ abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
+ tc->abstract_p ();
+ }
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ os << "{"
+ << "const " << scope << "::" << econtainer (e) << "& c (" <<
+ "x." << aname << " ());"
+ << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
+ "::std::size_t > (c.size ());";
+
+ os << "for (" << scope << "::" << econst_iterator (e) << endl
+ << "i (c.begin ()), e (c.end ());" << endl
+ << "i != e; ++i)"
+ << "{";
+
+ if (poly)
+ {
+ if (!abst)
+ os << "bool d (typeid (" << type << ") != typeid (*i));"
+ << "s << d;"
+ << "if (!d)" << endl
+ << "s << *i;"
+ << "else" << endl;
+
+ os << "::xsd::cxx::tree::stream_insertion_map_instance< " <<
+ poly_plate << ", " << stream << ", " << char_type <<
+ " > ().insert (s, *i);";
+ }
+ else
+ os << "s << *i;";
+
+ os << "}" // for
+ << "}";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "{"
+ << "bool p (x." << aname << " ());"
+ << "s << p;"
+ << "if (p)";
+
+ if (poly)
+ {
+ os << "{"
+ << "const " << type << "& i (*x." << aname << " ());";
+
+ if (!abst)
+ os << "bool d (typeid (" << type << ") != typeid (i));"
+ << "s << d;"
+ << "if (!d)" << endl
+ << "s << i;"
+ << "else" << endl;
+
+ os << "::xsd::cxx::tree::stream_insertion_map_instance< " <<
+ poly_plate << ", " << stream << ", " << char_type <<
+ " > ().insert (s, i);"
+ << "}";
+ }
+ else
+ os << endl
+ << "s << *x." << aname << " ();";
+
+ os << "}";
+ }
+ else
+ {
+ // one
+ //
+ if (poly)
+ {
+ os << "{"
+ << "const " << type << "& i (x." << aname << " ());";
+
+ if (!abst)
+ os << "bool d (typeid (" << type << ") != typeid (i));"
+ << "s << d;"
+ << "if (!d)" << endl
+ << "s << i;"
+ << "else" << endl;
+
+ os << "::xsd::cxx::tree::stream_insertion_map_instance< " <<
+ poly_plate << ", " << stream << ", " << char_type <<
+ " > ().insert (s, i);"
+ << "}";
+ }
+ else
+ os << "s << x." << aname << " ();";
+ }
+ }
+
+ private:
+ String scope;
+ String stream;
+ };
+
+ struct Attribute: Traversal::Attribute, Context
+ {
+ Attribute (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& aname (eaname (a));
+
+ if (a.optional_p () && !a.default_p ())
+ {
+ os << "{"
+ << "bool p (x." << aname << " ());"
+ << "s << p;"
+ << "if (p)" << endl
+ << "s << *x." << aname << " ();"
+ << "}";
+ }
+ else
+ {
+ os << "s << x." << aname << " ();";
+ }
+ }
+ };
+
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
+ bool has_body (ordered ||
+ has<Traversal::Member> (c) ||
+ c.inherits_p ());
+
+ size_t n (0);
+ NarrowStrings const& st (options.generate_insertion ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >");
+
+ os << stream_type << "&" << endl
+ << "operator<< (" << stream_type << "& s," << endl
+ << "const " << name << "&" << (has_body ? " x" : "") << ")"
+ << "{";
+
+ if (c.inherits_p ())
+ {
+ os << "s << static_cast< const ";
+
+ inherits (c, inherits_);
+
+ os << "& > (x);";
+ }
+
+ // Write the order sequence.
+ //
+ if (ordered)
+ {
+ String const& ci (ctx.get<String> ("order-const-iterator"));
+ String const& an (ctx.get<String> ("order-aname"));
+
+ os << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
+ "::std::size_t > (" << endl
+ << "x." << an << " ().size ());"
+ << endl
+ << "for (" << name << "::" << ci << endl
+ << "b (x." << an << " ().begin ()), n (x." << an <<
+ " ().end ());" << endl
+ << "b != n; ++b)"
+ << "{"
+ << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
+ "::std::size_t > (b->id);"
+ << "s << ::xsd::cxx::tree::ostream_common::as_size< " <<
+ "::std::size_t > (b->index);"
+ << "}";
+ }
+
+ {
+ Traversal::Names names_member;
+ Element element (*this, name, *i);
+ Attribute attribute (*this);
+
+ names_member >> element;
+ names_member >> attribute;
+
+ names (c, names_member);
+ }
+
+ os << "return s;"
+ << "}";
+
+
+ // Register with type map.
+ //
+ if (polymorphic &&
+ polymorphic_p (c) &&
+ !c.abstract_p () &&
+ (!anonymous_p (c) || anonymous_substitutes_p (c)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (c));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_insertion_initializer< " <<
+ poly_plate << ", " << i->c_str () << ", " << char_type <<
+ ", " << name << " >" << endl
+ << "_xsd_" << name << "_stream_insertion_init_" <<
+ n++ << " (" << endl
+ << strlit (c.name ()) << "," << endl
+ << strlit (xml_ns_name (c)) << ");"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+ BaseTypeName base_;
+ };
+ }
+
+ void
+ generate_stream_insertion_source (Context& ctx)
+ {
+ if (ctx.polymorphic)
+ {
+ NarrowStrings const& st (ctx.options.generate_insertion ());
+
+ ctx.os << "#include <xsd/cxx/tree/stream-insertion-map.hxx>" << endl
+ << endl;
+
+ bool import_maps (ctx.options.import_maps ());
+ bool export_maps (ctx.options.export_maps ());
+
+ if (import_maps || export_maps)
+ {
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{"
+ << "namespace tree"
+ << "{";
+
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream (*i);
+
+ ctx.os << "#ifdef _MSC_VER" << endl;
+
+ if (export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "stream_insertion_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;";
+
+ if (import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "stream_insertion_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
+ << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "stream_insertion_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;"
+ << "#elif defined(XSD_MAP_VISIBILITY)" << endl
+ << "template struct XSD_MAP_VISIBILITY " <<
+ "stream_insertion_plate< " << ctx.poly_plate << ", " <<
+ stream << ", " << ctx.char_type << " >;"
+ << "#endif" << endl;
+ }
+
+ ctx.os << "}" // tree
+ << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+ }
+
+ ctx.os << "namespace _xsd"
+ << "{";
+
+ size_t n (0);
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ String stream (*i);
+
+ ctx.os << "static" << endl
+ << "const ::xsd::cxx::tree::stream_insertion_plate< " <<
+ ctx.poly_plate << ", " << stream << ", " << ctx.char_type <<
+ " >" << endl
+ << "stream_insertion_plate_init_" << n++ << ";";
+ }
+
+ ctx.os << "}";
+ }
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/stream-insertion-source.hxx b/xsd/xsd/cxx/tree/stream-insertion-source.hxx
new file mode 100644
index 0000000..ace8bf6
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-insertion-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/stream-insertion-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_INSERTION_SOURCE_HXX
+#define XSD_CXX_TREE_INSERTION_SOURCE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_stream_insertion_source (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_INSERTION_SOURCE_HXX
diff --git a/xsd/xsd/cxx/tree/stream-source.cxx b/xsd/xsd/cxx/tree/stream-source.cxx
new file mode 100644
index 0000000..eeb3ca3
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-source.cxx
@@ -0,0 +1,496 @@
+// file : xsd/cxx/tree/stream-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/stream-source.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String base (L"::xsd::cxx::tree::list< " +
+ item_type_name (item_type) + L", " + char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base += L" >";
+
+ os << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "& o, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "return o << static_cast< const " << base << "& > (i);"
+ << "}";
+
+ // Register with ostream map.
+ //
+ if (polymorphic &&
+ polymorphic_p (l) &&
+ (!anonymous_p (l) || anonymous_substitutes_p (l)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (l));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_std_ostream_init;"
+ << endl;
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ os << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "& o, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "return o << static_cast< const " << xs_string_type << "& > (i);"
+ << "}";
+
+ // Register with ostream map.
+ //
+ if (polymorphic &&
+ polymorphic_p (u) &&
+ (!anonymous_p (u) || anonymous_substitutes_p (u)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (u));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_std_ostream_init;"
+ << endl;
+ }
+ }
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_base_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ bool enum_based (false);
+ if (string_based)
+ {
+ SemanticGraph::Enumeration* be (0);
+ IsEnumBasedType t (be);
+ t.dispatch (e);
+
+ enum_based = (be != 0);
+ }
+
+ // If we are based on an enum then the value type is just an
+ // alias and we don't need to generate this operator again.
+ //
+ if (string_based && !enum_based)
+ {
+ os << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "& o, " <<
+ name << "::" << evalue (e) << " i)"
+ << "{"
+ << "return o << " << name << "::_xsd_" << name <<
+ "_literals_[i];"
+ << "}";
+ }
+
+ os << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "& o, " <<
+ "const " << name << "& i)"
+ << "{"
+ << "return o << static_cast< const ";
+
+ inherits (e, inherits_base_);
+
+ os << "& > (i);"
+ << "}";
+
+ // Register with ostream map.
+ //
+ if (polymorphic &&
+ polymorphic_p (e) &&
+ (!anonymous_p (e) || anonymous_substitutes_p (e)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (e));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_std_ostream_init;"
+ << endl;
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_base_;
+ BaseTypeName base_;
+ };
+
+ struct Element: Traversal::Element, Context
+ {
+ Element (Context& c, String const& scope_)
+ : Context (c), scope (scope_)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ String const& aname (eaname (e));
+
+ // Check if we need to handle xsi:type and substitution groups.
+ // If this element's type is anonymous then we don't need to do
+ // anything. Note that if the type is anonymous then it can't be
+ // derived from which makes it impossible to substitute or
+ // dynamically-type with xsi:type.
+ //
+ SemanticGraph::Type& t (e.type ());
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ if (poly)
+ {
+ os << "{"
+ << "::xsd::cxx::tree::std_ostream_map< " << char_type
+ << " >& om (" << endl
+ << "::xsd::cxx::tree::std_ostream_map_instance< " <<
+ poly_plate << ", " << char_type << " > ());"
+ << endl;
+ }
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ os << "for (" << scope << "::" << econst_iterator (e) << endl
+ << "b (i." << aname << " ().begin ()), " <<
+ "e (i." << aname << " ().end ());" << endl
+ << "b != e; ++b)"
+ << "{"
+ << "o << ::std::endl << " << strlit (e.name () + L": ");
+
+ if (!poly)
+ os << " << *b;";
+ else
+ os << ";"
+ << "om.insert (o, *b);";
+
+ os << "}";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+
+ os << "if (i." << aname << " ())"
+ << "{"
+ << "o << ::std::endl << " << strlit (e.name () + L": ");
+
+ if (!poly)
+ os << " << *i." << aname << " ();";
+ else
+ os << ";"
+ << "om.insert (o, *i." << aname << " ());";
+
+ os << "}";
+ }
+ else
+ {
+ // one
+ //
+ os << "o << ::std::endl << " << strlit (e.name () + L": ");
+
+ if (!poly)
+ os << " << i." << aname << " ();";
+ else
+ os << ";"
+ << "om.insert (o, i." << aname << " ());";
+ }
+
+ if (poly)
+ os << "}";
+ }
+
+ private:
+ String scope;
+ };
+
+ struct Attribute: Traversal::Attribute, Context
+ {
+ Attribute (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& aname (eaname (a));
+
+ if (a.optional_p () && !a.default_p ())
+ {
+ os << "if (i." << aname << " ())"
+ << "{"
+ << "o << ::std::endl << " << strlit (a.name () + L": ") <<
+ " << *i." << aname << " ();"
+ << "}";
+ }
+ else
+ {
+ os << "o << ::std::endl << " << strlit (a.name () + L": ") <<
+ " << i." << aname << " ();";
+ }
+ }
+ };
+
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c), base_ (c)
+ {
+ inherits_ >> base_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ //
+ //
+ bool has_body (has<Traversal::Member> (c) || c.inherits_p ());
+
+ os << std_ostream_type << "&" << endl
+ << "operator<< (" << std_ostream_type << "& o, " <<
+ "const " << name << "&" << (has_body ? " i" : "") << ")"
+ << "{";
+
+ if (c.inherits_p ())
+ {
+ os << "o << static_cast< const ";
+
+ inherits (c, inherits_);
+
+ os << "& > (i);"
+ << endl;
+ }
+
+ {
+ Traversal::Names names_member;
+ Element element (*this, name);
+ Attribute attribute (*this);
+
+ names_member >> element;
+ names_member >> attribute;
+
+ names (c, names_member);
+ }
+
+ os << "return o;"
+ << "}";
+
+ // Register with ostream map.
+ //
+ if (polymorphic &&
+ polymorphic_p (c) &&
+ !c.abstract_p () &&
+ (!anonymous_p (c) || anonymous_substitutes_p (c)))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (c));
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_std_ostream_init;"
+ << endl;
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+ BaseTypeName base_;
+ };
+ }
+
+ void
+ generate_stream_source (Context& ctx, size_t first, size_t last)
+ {
+ String c (ctx.char_type);
+
+ ctx.os << "#include <ostream>" << endl
+ << endl;
+
+ if (ctx.polymorphic)
+ {
+ ctx.os << "#include <xsd/cxx/tree/std-ostream-map.hxx>" << endl
+ << endl;
+
+ bool import_maps (ctx.options.import_maps ());
+ bool export_maps (ctx.options.export_maps ());
+
+ if (import_maps || export_maps)
+ {
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{"
+ << "namespace tree"
+ << "{"
+ << "#ifdef _MSC_VER" << endl;
+
+ if (export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "std_ostream_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "std_ostream_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
+ << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "std_ostream_plate< " << ctx.poly_plate << ", " << ctx.char_type <<
+ " >;";
+
+ ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
+ << "template struct XSD_MAP_VISIBILITY " <<
+ "std_ostream_plate< " << ctx.poly_plate << ", " << ctx.char_type <<
+ " >;";
+
+ ctx.os << "#endif" << endl
+ << "}" // tree
+ << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+ }
+
+ ctx.os << "namespace _xsd"
+ << "{"
+ << "static" << endl
+ << "const ::xsd::cxx::tree::std_ostream_plate< " <<
+ ctx.poly_plate << ", " << ctx.char_type << " >" << endl
+ << "std_ostream_plate_init;"
+ << "}";
+ }
+
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ Namespace ns (ctx, first, last);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/stream-source.hxx b/xsd/xsd/cxx/tree/stream-source.hxx
new file mode 100644
index 0000000..b2b4d5d
--- /dev/null
+++ b/xsd/xsd/cxx/tree/stream-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/stream-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_STREAM_SOURCE_HXX
+#define XSD_CXX_TREE_STREAM_SOURCE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_stream_source (Context&, size_t first, size_t last);
+ }
+}
+
+#endif // XSD_CXX_TREE_STREAM_SOURCE_HXX
diff --git a/xsd/xsd/cxx/tree/tree-forward.cxx b/xsd/xsd/cxx/tree/tree-forward.cxx
new file mode 100644
index 0000000..b715abe
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-forward.cxx
@@ -0,0 +1,325 @@
+// file : xsd/cxx/tree/tree-forward.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsd/cxx/tree/tree-forward.hxx>
+#include <xsd/cxx/tree/fundamental-header.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String const& name (ename (l));
+
+ if (String custom = custom_type (l))
+ {
+ String new_name;
+ renamed_type (l, new_name);
+
+ if (new_name)
+ os << "class " << new_name << ";";
+
+ if (custom == name)
+ os << "class " << name << ";";
+ else
+ os << "typedef " << custom << " " << name << ";";
+ }
+ else
+ os << "class " << name << ";";
+ }
+ };
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String const& name (ename (u));
+
+ if (String custom = custom_type (u))
+ {
+ String new_name;
+ renamed_type (u, new_name);
+
+ if (new_name)
+ os << "class " << new_name << ";";
+
+ if (custom == name)
+ os << "class " << name << ";";
+ else
+ os << "typedef " << custom << " " << name << ";";
+ }
+ else
+ os << "class " << name << ";";
+ }
+ };
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String const& name (ename (e));
+
+ if (String custom = custom_type (e))
+ {
+ String new_name;
+ renamed_type (e, new_name);
+
+ if (new_name)
+ os << "class " << new_name << ";";
+
+ if (custom == name)
+ os << "class " << name << ";";
+ else
+ os << "typedef " << custom << " " << name << ";";
+ }
+ else
+ os << "class " << name << ";";
+ }
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String const& name (ename (c));
+
+ if (String custom = custom_type (c))
+ {
+ String new_name;
+ renamed_type (c, new_name);
+
+ if (new_name)
+ os << "class " << new_name << ";";
+
+ if (custom == name)
+ os << "class " << name << ";";
+ else
+ os << "typedef " << custom << " " << name << ";";
+ }
+ else
+ os << "class " << name << ";";
+ }
+ };
+ }
+
+ void
+ generate_forward (Context& ctx)
+ {
+ NarrowString xml_schema (ctx.options.extern_xml_schema ());
+
+ // Inlcude or Emit fundamental types.
+ //
+ if (xml_schema)
+ {
+ String name (ctx.hxx_expr->replace (xml_schema));
+
+ ctx.os << "#include " << ctx.process_include_path (name) << endl
+ << endl;
+ }
+ else
+ {
+ if (ctx.char_type == L"char" && ctx.char_encoding != L"custom")
+ {
+ ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding <<
+ ".hxx>" << endl
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/exceptions.hxx>" << endl
+ << "#include <xsd/cxx/tree/elements.hxx>" << endl
+ << "#include <xsd/cxx/tree/types.hxx>" << endl
+ << endl;
+
+ if (!ctx.options.suppress_parsing () ||
+ ctx.options.generate_serialization ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl
+ << endl;
+ }
+
+ if (!ctx.options.suppress_parsing () ||
+ ctx.options.generate_serialization ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl
+ << endl;
+ }
+
+ bool element_map (ctx.options.generate_element_map ());
+
+ if (element_map)
+ ctx.os << "#include <xsd/cxx/tree/element-map.hxx>" << endl
+ << endl;
+
+ // I need to include all the "optional" headers here (instead of
+ // later in the individual generators for each feature because
+ // those headers provide implementation for the fundamental types.
+ //
+ if (!ctx.options.suppress_parsing ())
+ {
+ ctx.os << "#include <xsd/cxx/tree/parsing.hxx>" << endl;
+
+ Traversal::Schema schema, xsd;
+ Traversal::Implies implies;
+ Traversal::Names names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundIncludes type (ctx, "parsing");
+
+ schema >> implies >> xsd >> names >> ns >> ns_names >> type;
+
+ schema.dispatch (ctx.schema_root);
+
+ if (element_map)
+ ctx.os << "#include <xsd/cxx/tree/parsing/element-map.txx>" <<
+ endl;
+
+ ctx.os << endl;
+ }
+
+ if (ctx.options.generate_serialization ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/dom/serialization-header.hxx>" << endl
+ << "#include <xsd/cxx/tree/serialization.hxx>" << endl;
+
+ Traversal::Schema schema, xsd;
+ Traversal::Implies implies;
+ Traversal::Names names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundIncludes type (ctx, "serialization");
+
+ schema >> implies >> xsd >> names >> ns >> ns_names >> type;
+
+ schema.dispatch (ctx.schema_root);
+
+ if (element_map)
+ ctx.os << "#include <xsd/cxx/tree/serialization/element-map.txx>" <<
+ endl;
+
+ ctx.os << endl;
+ }
+
+ if (ctx.options.generate_ostream ())
+ {
+ ctx.os << "#include <xsd/cxx/tree/std-ostream-operators.hxx>" << endl
+ << endl;
+ }
+
+ NarrowStrings const& ist (ctx.options.generate_insertion ());
+ if (!ist.empty ())
+ {
+ for (NarrowStrings::const_iterator i (ist.begin ()); i != ist.end ();
+ ++i)
+ {
+ if (*i == "ACE_OutputCDR")
+ ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-insertion.hxx>"
+ << endl;
+ else if (*i == "XDR")
+ ctx.os << "#include <xsd/cxx/tree/xdr-stream-insertion.hxx>"
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/stream-insertion.hxx>" << endl
+ << endl;
+ }
+
+ NarrowStrings const& est (ctx.options.generate_extraction ());
+ if (!est.empty ())
+ {
+ for (NarrowStrings::const_iterator i (est.begin ()); i != est.end ();
+ ++i)
+ {
+ if (*i == "ACE_InputCDR")
+ ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-extraction.hxx>"
+ << endl;
+ else if (*i == "XDR")
+ ctx.os << "#include <xsd/cxx/tree/xdr-stream-extraction.hxx>"
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/stream-extraction.hxx>" << endl
+ << endl;
+ }
+
+
+ Traversal::Schema schema, xsd;
+ Traversal::Implies implies;
+ Traversal::Names names;
+ FundamentalNamespace ns (ctx);
+
+ schema >> implies >> xsd >> names >> ns;
+
+ schema.dispatch (ctx.schema_root);
+ }
+
+ // First emit header includes.
+ //
+ if (ctx.options.generate_forward ())
+ {
+ Traversal::Schema schema;
+ Includes includes (ctx, Includes::forward);
+
+ schema >> includes;
+
+ schema.dispatch (ctx.schema_root);
+ }
+
+ ctx.os << "// Forward declarations." << endl
+ << "//" << endl;
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names names_ns, names;
+ Namespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ schema.dispatch (ctx.schema_root);
+
+ ctx.os << endl;
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/tree-forward.hxx b/xsd/xsd/cxx/tree/tree-forward.hxx
new file mode 100644
index 0000000..0610999
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-forward.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/tree-forward.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_TREE_FORWARD_HXX
+#define XSD_CXX_TREE_TREE_FORWARD_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_forward (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_TREE_FORWARD_HXX
diff --git a/xsd/xsd/cxx/tree/tree-header.cxx b/xsd/xsd/cxx/tree/tree-header.cxx
new file mode 100644
index 0000000..1987953
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-header.cxx
@@ -0,0 +1,4299 @@
+// file : xsd/cxx/tree/tree-header.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/tree/tree-header.hxx>
+#include <xsd/cxx/tree/default-value.hxx>
+#include <xsd/cxx/tree/fundamental-header.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ // List mapping.
+ //
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief List class corresponding to the %" <<
+ comment (l.name ()) << endl
+ << " * schema type." << endl
+ << " *" << endl
+ << " * This class has an interface of a standard C++ " <<
+ "sequence (e.g.," << endl
+ << " * std::vector)." << endl;
+
+ if (l.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (l.annotation ());
+ }
+
+ os << " */" << endl;
+ }
+
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String item_name (item_type_name (item_type));
+ String base_type (L"::xsd::cxx::tree::list< " + item_name + L", " +
+ char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base_type += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base_type += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base_type += L" >";
+
+ os << "class " << type_exp << name <<
+ ": public " << any_simple_type << "," << endl
+ << " public " << base_type
+ << "{"
+ << "public:" << endl;
+
+ // c-tor ()
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Default constructor." << endl
+ << " *" << endl
+ << " * Creates an empty list." << endl
+ << " */" << endl;
+ }
+ os << name << " ();"
+ << endl;
+
+ // c-tor (size_type, const X& x)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create a list with copies of the specified " <<
+ "element." << endl
+ << " *" << endl
+ << " * @param n A number of elements to copy." << endl
+ << " * @param x An element to copy." << endl
+ << " *" << endl
+ << " * This constructor creates a list with @a n copies " <<
+ "of @a x." << endl
+ << " */" << endl;
+ }
+
+ String size_type (name != L"size_type"
+ ? String (L"size_type")
+ : base_type + L"::size_type");
+
+ os << name << " (" << size_type << " n, const " << item_name <<
+ "& x);"
+ << endl;
+
+ // c-tor (const I& begin, const I& end)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create a list from an iterator range." << endl
+ << " *" << endl
+ << " * @param begin An iterator pointing to the first " <<
+ "element." << endl
+ << " * @param end An iterator pointing to the one past " <<
+ "the last element." << endl
+ << " *" << endl
+ << " * This constructor creates a list consisting of " <<
+ "copies of the" << endl
+ << " * elements in the range [begin,end)." << endl
+ << " */" << endl;
+ }
+
+ String iter_type (unclash (name, "I"));
+
+ os << "template < typename " << iter_type << " >" << endl
+ << name << " (const " << iter_type << "& begin, const " <<
+ iter_type << "& end)" << endl
+ << ": " << base_type << " (begin, end, this)"
+ << "{"
+ << "}";
+
+ // c-tor (istream&)
+ //
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a data " <<
+ "representation" << endl
+ << " * stream." << endl
+ << " *" << endl
+ << " * @param s A stream to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << istream_type << "< " << i->c_str () <<
+ " >& s," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM element." << endl
+ << " *" << endl
+ << " * @param e A DOM element to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (xercesc::DOMAttr)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM attribute." << endl
+ << " *" << endl
+ << " * @param a A DOM attribute to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (std::basic_string const&, xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string fragment." << endl
+ << " *" << endl
+ << " * @param s A string fragment to extract the data from." << endl
+ << " * @param e A pointer to DOM element containing the " <<
+ "string fragment." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+ // copy c-tor ()
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy constructor." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " *" << endl
+ << " * For polymorphic object models use the @c _clone " <<
+ "function instead." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << name << "& x," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // clone
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy the instance polymorphically." << endl
+ << " *" << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " * @return A pointer to the dynamically allocated copy." << endl
+ << " *" << endl
+ << " * This function ensures that the dynamic type of the " <<
+ "instance is" << endl
+ << " * used for copying and should be used for polymorphic " <<
+ "object" << endl
+ << " * models instead of the copy constructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << name << "*" << endl
+ << "_clone (" << flags_type << " f = 0," << endl
+ << container << "* c = 0) const;"
+ << endl;
+
+ // d-tor
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Destructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << endl
+ << "~" << name << " ();";
+
+ os << "};";
+
+ // Comparison operators.
+ //
+ if (options.generate_comparison ())
+ {
+ os << inst_exp
+ << "bool" << endl
+ << "operator== (const " << name << "&, const " << name << "&);"
+ << endl;
+
+ os << inst_exp
+ << "bool" << endl
+ << "operator!= (const " << name << "&, const " << name << "&);"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ // Union mapping.
+ //
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Union class corresponding to the %" <<
+ comment (u.name ()) << endl
+ << " * schema type." << endl
+ << " *" << endl
+ << " * The mapping represents unions as strings." << endl;
+
+ if (u.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (u.annotation ());
+ }
+
+ os << " */" << endl;
+ }
+
+ os << "class " << type_exp << name <<
+ ": public " << xs_string_type
+ << "{"
+ << "public:" << endl
+ << endl;
+
+ if (options.generate_default_ctor ())
+ {
+ // c-tor ()
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Default constructor." << endl
+ << " *" << endl
+ << " * Note that this constructor may leave the " <<
+ "instance in an" << endl
+ << " * invalid state." << endl
+ << " */" << endl;
+ }
+
+ os << name << " ();"
+ << endl;
+ }
+
+ // c-tor (const char*)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a C string." << endl
+ << " *" << endl
+ << " * @param v A string value." << endl
+ << " */" << endl;
+ }
+ os << name << " (const " << char_type << "* v);"
+ << endl;
+
+ // c-tor (string const&)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string." << endl
+ << " *" << endl
+ << " * @param v A string value." << endl
+ << " */" << endl;
+ }
+ os << name << " (const " << string_type << "& v);"
+ << endl;
+
+ // c-tor (istream&)
+ //
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a data " <<
+ "representation" << endl
+ << " * stream." << endl
+ << " *" << endl
+ << " * @param s A stream to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << istream_type << "< " << i->c_str () <<
+ " >& s," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM element." << endl
+ << " *" << endl
+ << " * @param e A DOM element to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (xercesc::DOMAttr)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM attribute." << endl
+ << " *" << endl
+ << " * @param a A DOM attribute to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (std::basic_string const&, xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string fragment." << endl
+ << " *" << endl
+ << " * @param s A string fragment to extract the data from." << endl
+ << " * @param e A pointer to DOM element containing the " <<
+ "string fragment." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+ // copy c-tor ()
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy constructor." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " *" << endl
+ << " * For polymorphic object models use the @c _clone " <<
+ "function instead." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << name << "& x," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // clone
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy the instance polymorphically." << endl
+ << " *" << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " * @return A pointer to the dynamically allocated copy." << endl
+ << " *" << endl
+ << " * This function ensures that the dynamic type of the " <<
+ "instance is" << endl
+ << " * used for copying and should be used for polymorphic " <<
+ "object" << endl
+ << " * models instead of the copy constructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << name << "*" << endl
+ << "_clone (" << flags_type << " f = 0," << endl
+ << container << "* c = 0) const;"
+ << endl;
+
+ os << "};";
+ }
+ };
+
+ // Enum mapping.
+ //
+ struct Enumerator: Traversal::Enumerator, Context
+ {
+ Enumerator (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (doxygen && e.annotated_p ())
+ {
+ os << "/**" << endl;
+ write_annotation (e.annotation ());
+ os << " */" << endl;
+ }
+
+ os << ename (e);
+ }
+ };
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c),
+ base_ (c),
+ member_ (c),
+ enumerator_ (c)
+ {
+ inherits_base_ >> base_;
+ inherits_member_ >> member_;
+
+ names_ >> enumerator_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ bool enum_based (false);
+ SemanticGraph::Enumeration* base_enum (0);
+
+ if (string_based)
+ {
+ IsEnumBasedType t (base_enum);
+ t.dispatch (e);
+
+ if (base_enum != 0)
+ enum_based = true;
+ }
+
+ String value;
+ if (string_based)
+ value = evalue (e);
+
+ // Get to the ultimate base and see if is a fundamental type.
+ //
+ bool fund_based (false);
+ SemanticGraph::Type& ult_base (ultimate_base (e));
+ {
+ IsFundamentalType t (fund_based);
+ t.dispatch (ult_base);
+ }
+
+ // Count enumerators.
+ //
+ size_t enum_count (0);
+
+ for (Type::NamesIterator i (e.names_begin ()), end (e.names_end ());
+ i != end; ++i)
+ ++enum_count;
+
+ //
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Enumeration class corresponding to the %" <<
+ comment (e.name ()) << endl
+ << " * schema type." << endl;
+
+ if (e.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (e.annotation ());
+ }
+
+ os << " */" << endl;
+ }
+
+ os << "class " << type_exp << name << ": public ";
+
+ // Enumeration always has a base.
+ //
+ inherits (e, inherits_base_);
+
+ os << "{"
+ << "public:" << endl;
+
+ if (string_based)
+ {
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief Underlying enum type." << endl
+ << " */" << endl;
+ }
+
+ if (enum_based)
+ {
+ os << "typedef ";
+
+ inherits (e, inherits_base_);
+
+ os << "::" << evalue (*base_enum) << " " << value << ";"
+ << endl;
+ }
+ else
+ {
+ os << "enum " << value
+ << "{";
+
+ names<Enumeration> (e, names_, 0, 0, 0, &Enumeration::comma);
+
+ os << "};";
+ }
+ }
+
+ // default c-tor
+ //
+ bool list_based (
+ ult_base.is_a<SemanticGraph::List> () ||
+ ult_base.is_a<SemanticGraph::Fundamental::NameTokens> () ||
+ ult_base.is_a<SemanticGraph::Fundamental::IdRefs> () ||
+ ult_base.is_a<SemanticGraph::Fundamental::Entities> ());
+
+ if (options.generate_default_ctor () || list_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Default constructor." << endl
+ << " *" << endl
+ << " * Note that this constructor may leave the " <<
+ "instance in an" << endl
+ << " * invalid state." << endl
+ << " */" << endl;
+ }
+
+ os << name << " ();"
+ << endl;
+ }
+
+ // c-tor (value)
+ //
+ if (string_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the " <<
+ "underlying enum value." << endl
+ << " *" << endl
+ << " * @param v A enum value." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << value << " v);"
+ << endl;
+ }
+
+ // c-tor (const char*)
+ //
+ if (string_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a C string." << endl
+ << " *" << endl
+ << " * @param v A string value." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << char_type << "* v);"
+ << endl;
+ }
+
+ // c-tor (const std::string&)
+ //
+ if (string_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string." << endl
+ << " *" << endl
+ << " * @param v A string value." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << string_type << "& v);"
+ << endl;
+ }
+
+ // c-tor (fundamental)
+ //
+ if (fund_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a fundamental " <<
+ "type value." << endl
+ << " *" << endl
+ << " * @param v A fundamental type value." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+
+ member_.dispatch (ult_base);
+
+ os << " v);"
+ << endl;
+ }
+
+ // c-tor (base)
+ //
+ // If the ultimate is also our immediate base and it is a
+ // fundamental type then this c-tor clashes with c-tor
+ // (fundamental) above.
+ //
+ if (!fund_based || &ult_base != &e.inherits ().base ())
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the " <<
+ "base value." << endl
+ << " *" << endl
+ << " * @param v A base value." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const ";
+
+ inherits (e, inherits_member_);
+
+ os << "& v);"
+ << endl;
+ }
+
+
+ // c-tor (istream&)
+ //
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a data " <<
+ "representation" << endl
+ << " * stream." << endl
+ << " *" << endl
+ << " * @param s A stream to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << istream_type << "< " << i->c_str () <<
+ " >& s," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM element." << endl
+ << " *" << endl
+ << " * @param e A DOM element to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (xercesc::DOMAttr)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM attribute." << endl
+ << " *" << endl
+ << " * @param a A DOM attribute to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (std::basic_string const&, xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string fragment." << endl
+ << " *" << endl
+ << " * @param s A string fragment to extract the data from." << endl
+ << " * @param e A pointer to DOM element containing the " <<
+ "string fragment." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+ // copy c-tor
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy constructor." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " *" << endl
+ << " * For polymorphic object models use the @c _clone " <<
+ "function instead." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << name << "& x," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // clone
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy the instance polymorphically." << endl
+ << " *" << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " * @return A pointer to the dynamically allocated copy." << endl
+ << " *" << endl
+ << " * This function ensures that the dynamic type of the " <<
+ "instance is" << endl
+ << " * used for copying and should be used for polymorphic " <<
+ "object" << endl
+ << " * models instead of the copy constructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << name << "*" << endl
+ << "_clone (" << flags_type << " f = 0," << endl
+ << container << "* c = 0) const;"
+ << endl;
+
+ // operator= (value)
+ //
+ if (string_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Assign the underlying enum value." << endl
+ << " *" << endl
+ << " * @param v A enum value." << endl
+ << " * @return A refernce to the instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << "&" << endl
+ << "operator= (" << value << " v);"
+ << endl;
+ }
+
+ // operator value ()
+ //
+ // Name lookup differences in various compilers make generation
+ // of this operator outside of the class a really hard task. So
+ // we are going to make it "always inline".
+ //
+ if (string_based)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Implicit conversion operator to the " <<
+ "underlying" << endl
+ << " * enum value." << endl
+ << " *" << endl
+ << " * @return A enum value." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual" << endl
+ << "operator " << value << " () const"
+ << "{"
+ << "return _xsd_" << name << "_convert ();"
+ << "}";
+ }
+
+ //
+ //
+ if (string_based)
+ {
+ if (doxygen)
+ os << "//@cond" << endl
+ << endl;
+
+ os << "protected:" << endl
+ << value << endl
+ << "_xsd_" << name << "_convert () const;"
+ << endl;
+
+ os << "public:" << endl;
+
+ if (enum_based)
+ {
+ // We are going to reuse our base's literals.
+ //
+ os << "static const " << char_type << "* const* " <<
+ "_xsd_" << name << "_literals_;";
+ }
+ else
+ {
+ os << "static const " << char_type << "* const " <<
+ "_xsd_" << name << "_literals_[" << enum_count << "];";
+ }
+
+ os << "static const " << value <<
+ " _xsd_" << name << "_indexes_[" << enum_count << "];";
+
+ if (doxygen)
+ os << endl
+ << "//@endcond" << endl
+ << endl;
+ }
+
+ os << "};";
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ Traversal::Inherits inherits_base_;
+ BaseTypeName base_;
+
+ Traversal::Inherits inherits_member_;
+ MemberTypeName member_;
+
+ Traversal::Names names_;
+ Enumerator enumerator_;
+ };
+
+
+ //
+ //
+ struct MemberFunction: Traversal::Member, Context
+ {
+ MemberFunction (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& aname (eaname (m));
+ String const& mname (emname (m));
+ String kind (m.is_a<SemanticGraph::Element> ()
+ ? "element" : "attribute");
+
+ bool fund (false);
+ {
+ IsFundamentalType t (fund);
+ t.dispatch (m.type ());
+ }
+
+ bool def_attr (m.default_p () &&
+ m.is_a<SemanticGraph::Attribute> ());
+
+ if (max (m) != 1)
+ {
+ // sequence
+ //
+ String container (econtainer (m));
+
+ // container const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the element" << endl
+ << " * sequence." << endl
+ << " *" << endl
+ << " * @return A constant reference to the sequence " <<
+ "container." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << container << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // container&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "element sequence." << endl
+ << " *" << endl
+ << " * @return A reference to the sequence container." << endl
+ << " */" << endl;
+ }
+
+ os << container << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (container const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy elements from a given sequence." << endl
+ << " *" << endl
+ << " * @param s A sequence to copy elements from." << endl
+ << " *" << endl
+ << " * For each element in @a s this function " <<
+ "makes a copy and adds it " << endl
+ << " * to the sequence. Note that this operation " <<
+ "completely changes the " << endl
+ << " * sequence and all old elements will be lost." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << container << "& s);"
+ << endl;
+ }
+ else if (min (m) == 0 && !def_attr)
+ {
+ // optional
+ //
+ String const& type (etype (m));
+ String container (econtainer (m));
+
+ // container const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the " << kind << endl
+ << " * container." << endl
+ << " *" << endl
+ << " * @return A constant reference to the optional " <<
+ "container." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << container << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // container&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ kind << " container." << endl
+ << " *" << endl
+ << " * @return A reference to the optional container." << endl
+ << " */" << endl;
+ }
+
+ os << container << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (type const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the " << kind << " value." << endl
+ << " *" << endl
+ << " * @param x A new value to set." << endl
+ << " *" << endl
+ << " * This function makes a copy of its argument " <<
+ "and sets it as" << endl
+ << " * the new value of the " << kind << "." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << type << "& x);"
+ << endl;
+
+ // void
+ // name (container const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the " << kind << " value." << endl
+ << " *" << endl
+ << " * @param x An optional container with the new value " <<
+ "to set." << endl
+ << " *" << endl
+ << " * If the value is present in @a x then this function " <<
+ "makes a copy " << endl
+ << " * of this value and sets it as the new value of the " <<
+ kind << "." << endl
+ << " * Otherwise the " << kind << " container is set " <<
+ "the 'not present' state." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << container << "& x);"
+ << endl;
+
+ // void
+ // name (auto_ptr<type>);
+ //
+ if (!fund)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the " << kind << " value without " <<
+ "copying." << endl
+ << " *" << endl
+ << " * @param p A new value to use." << endl
+ << " *" << endl
+ << " * This function will try to use the passed value " <<
+ "directly instead" << endl
+ << " * of making a copy." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (" << auto_ptr << "< " << type << " > p);"
+ << endl;
+ }
+ }
+ else
+ {
+ // one
+ //
+ String const& type (etype (m));
+
+ // type const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the " << kind << "." << endl
+ << " *" << endl
+ << " * @return A constant reference to the " << kind <<
+ "." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << type << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // Do not generate modifiers for fixed attributes.
+ //
+ if (!(def_attr && m.fixed_p ()))
+ {
+ // type&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ kind << "." << endl
+ << " *" << endl
+ << " * @return A reference to the " << kind << "." << endl
+ << " */" << endl;
+ }
+
+ os << type << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (type const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the " << kind << " value." << endl
+ << " *" << endl
+ << " * @param x A new value to set." << endl
+ << " *" << endl
+ << " * This function makes a copy of its argument " <<
+ "and sets it as" << endl
+ << " * the new value of the " << kind << "." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << type << "& x);"
+ << endl;
+
+ // void
+ // name (auto_ptr<type>);
+ //
+ if (!fund)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the " << kind << " value without " <<
+ "copying." << endl
+ << " *" << endl
+ << " * @param p A new value to use." << endl
+ << " *" << endl
+ << " * This function will try to use the passed value " <<
+ "directly" << endl
+ << " * instead of making a copy." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (" << auto_ptr << "< " << type << " > p);"
+ << endl;
+
+ }
+
+ // auto_ptr<type>
+ // detach_name ();
+ //
+ if (detach && !fund)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Detach the " << kind << " value from " <<
+ "the object model." << endl
+ << " *" << endl
+ << " * @return A pointer to the " << kind << " value." << endl
+ << " *" << endl
+ << " * Note that this function leaves the required " <<
+ kind << " in " << endl
+ << " * the original object model uninitialized." << endl
+ << " */" << endl;
+ }
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << edname (m) << " ();"
+ << endl;
+ }
+ }
+ }
+
+ // default_value
+ //
+ if (m.default_p ())
+ {
+ bool simple (true);
+
+ if (m.is_a<SemanticGraph::Element> ())
+ {
+ IsSimpleType test (simple);
+ test.dispatch (m.type ());
+ }
+
+ if (simple)
+ {
+ bool lit (false);
+ {
+ IsLiteralValue test (lit);
+ test.dispatch (m.type ());
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return the default value for the " <<
+ kind << "." << endl
+ << " *" << endl;
+
+ if (lit)
+ os << " * @return The " << kind << "'s default value." << endl;
+ else
+ os << " * @return A read-only (constant) reference to the "
+ << kind << "'s" << endl
+ << " * default value." << endl;
+
+ os << " */" << endl;
+ }
+
+ if (lit)
+ os << "static " << etype (m) << endl;
+ else
+ os << "static const " << etype (m) << "&" << endl;
+
+ os << edefault_value (m) << " ();"
+ << endl;
+ }
+ }
+ }
+ };
+
+ struct AnyFunction: Traversal::Any, Context
+ {
+ AnyFunction (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& aname (eaname (a));
+ String const& mname (emname (a));
+
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
+
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ String container (econtainer (a));
+
+ // container const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the wildcard" << endl
+ << " * element sequence." << endl
+ << " *" << endl
+ << " * @return A constant reference to the sequence " <<
+ "container." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << container << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // container&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "wildcard element" << endl
+ << " * sequence." << endl
+ << " *" << endl
+ << " * @return A reference to the sequence container." << endl
+ << " */" << endl;
+ }
+
+ os << container << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (container const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy elements from a given sequence." << endl
+ << " *" << endl
+ << " * @param s A sequence to copy elements from." << endl
+ << " *" << endl
+ << " * For each element in @a s this function " <<
+ "makes a copy and adds" << endl
+ << " * it to the wildcard element sequence. Note that " <<
+ "this operation" << endl
+ << " * completely changes the sequence and all old " <<
+ "elements will be" << endl
+ << " * lost." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << container << "& s);"
+ << endl;
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ String container (econtainer (a));
+
+ // container const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the wildcard" << endl
+ << " * element container." << endl
+ << " *" << endl
+ << " * @return A constant reference to the optional " <<
+ "container." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << container << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // container&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "wildcard element" << endl
+ << " * container." << endl
+ << " *" << endl
+ << " * @return A reference to the optional container." << endl
+ << " */" << endl;
+ }
+
+ os << container << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (type const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the wildcard content." << endl
+ << " *" << endl
+ << " * @param e A new element to set." << endl
+ << " *" << endl
+ << " * This function makes a copy of its argument " <<
+ "and sets it as" << endl
+ << " * the new wildcard content." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << xerces_ns << "::DOMElement& e);"
+ << endl;
+
+ // void
+ // name (type*);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the wildcard content without copying." << endl
+ << " *" << endl
+ << " * @param p A new element to use." << endl
+ << " *" << endl
+ << " * This function will use the passed element " <<
+ "directly instead" << endl
+ << " * of making a copy. For this to work the element " <<
+ "should belong" << endl
+ << " * to the DOM document associated with this instance." << endl
+ << " *" << endl
+ << " * @see " << edom_document (c) << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (" << xerces_ns << "::DOMElement* p);"
+ << endl;
+
+ // void
+ // name (container const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the wildcard content." << endl
+ << " *" << endl
+ << " * @param x An optional container with the new " <<
+ "element to set." << endl
+ << " *" << endl
+ << " * If the element is present in @a x then this function " <<
+ "makes a " << endl
+ << " * copy of this element and sets it as the new wildcard " <<
+ "content." << endl
+ << " * Otherwise the element container is set the 'not " <<
+ "present' state." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << container << "& x);"
+ << endl;
+ }
+ else
+ {
+ // one
+ //
+
+ // type const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the wildcard" << endl
+ << " * element." << endl
+ << " *" << endl
+ << " * @return A constant reference to the DOM element." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << xerces_ns << "::DOMElement&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // type&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "wildcard element." << endl
+ << " *" << endl
+ << " * @return A reference to the DOM element." << endl
+ << " */" << endl;
+ }
+
+ os << xerces_ns << "::DOMElement&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (type const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the wildcard content." << endl
+ << " *" << endl
+ << " * @param e A new element to set." << endl
+ << " *" << endl
+ << " * This function makes a copy of its argument " <<
+ "and sets it as" << endl
+ << " * the new wildcard content." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << xerces_ns << "::DOMElement& e);"
+ << endl;
+
+ // void
+ // name (const*);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the wildcard content without copying." << endl
+ << " *" << endl
+ << " * @param p A new element to use." << endl
+ << " *" << endl
+ << " * This function will use the passed element " <<
+ "directly instead" << endl
+ << " * of making a copy. For this to work the element " <<
+ "should belong" << endl
+ << " * to the DOM document associated with this instance." << endl
+ << " *" << endl
+ << " * @see " << edom_document (c) << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (" << xerces_ns << "::DOMElement* p);"
+ << endl;
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& aname (eaname (a));
+ String const& mname (emname (a));
+
+ String container (econtainer (a));
+
+ // container const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the" << endl
+ << " * attribute set." << endl
+ << " *" << endl
+ << " * @return A constant reference to the set " <<
+ "container." << endl
+ << " */" << endl;
+ }
+
+ os << "const " << container << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // container&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "attribute set." << endl
+ << " *" << endl
+ << " * @return A reference to the set container." << endl
+ << " */" << endl;
+ }
+
+ os << container << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (container const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy attributes from a given set." << endl
+ << " *" << endl
+ << " * @param s A set to copy elements from." << endl
+ << " *" << endl
+ << " * For each attribute in @a s this function " <<
+ "makes a copy and adds" << endl
+ << " * it to the set. Note that this operation " <<
+ "completely changes the " << endl
+ << " * set and all old attributes will be lost." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << container << "& s);"
+ << endl;
+ }
+ };
+
+ //
+ //
+ struct Member: Traversal::Member, Context
+ {
+ Member (Context& c)
+ : Context (c),
+ type_name_ (c),
+ member_function_ (c)
+ {
+ belongs_ >> type_name_;
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (m.scope ()));
+
+ String const& type (etype (m));
+ bool el (m.is_a<SemanticGraph::Element> ());
+
+ bool def_attr (m.default_p () && !el);
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name " << comment (m.name ()) << endl
+ << " *" << endl
+ << " * @brief Accessor and modifier functions for the %" <<
+ comment (m.name ()) << endl
+ << " * ";
+
+ if (max (m) != 1)
+ {
+ os << "sequence element." << endl;
+ }
+ else if (min (m) == 0)
+ {
+ if (def_attr)
+ os << "optional attribute with a default value." << endl;
+ else
+ os << "optional " << (el ? "element." : "attribute.") << endl;
+ }
+ else
+ {
+ os << "required " << (el ? "element." : "attribute.") << endl;
+ }
+
+ if (m.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (m.annotation ());
+ }
+
+ os << " */" << endl
+ << "//@{" << endl;
+ }
+ else
+ {
+ os << "// " << comment (m.name ()) << endl
+ << "//" << endl;
+ }
+
+ // Typedefs.
+ //
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief " << (el ? "Element" : "Attribute") <<
+ " type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ";
+
+ belongs (m, belongs_);
+
+ os << " " << type << ";";
+
+ if (max (m) != 1)
+ {
+ String const& container (econtainer (m));
+ bool isense (options.generate_intellisense ());
+
+ // sequence
+ //
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief Element sequence container type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ::xsd::cxx::tree::sequence< " << type << " > " <<
+ container << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief Element iterator type." << endl
+ << " */" << endl;
+ }
+
+ // IntelliSense does not like aliases and fully-qualified
+ // names here.
+ //
+ if (!isense)
+ os << "typedef " << container << "::iterator " <<
+ eiterator (m) << ";";
+ else
+ os << "typedef xsd::cxx::tree::sequence< " << type <<
+ " >::iterator " << eiterator (m) << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief Element constant iterator type." << endl
+ << " */" << endl;
+ }
+
+ if (!isense)
+ os << "typedef " << container << "::const_iterator " <<
+ econst_iterator (m) << ";";
+ else
+ os << "typedef xsd::cxx::tree::sequence< " << type <<
+ " >::const_iterator " << econst_iterator (m) << ";";
+
+ }
+ else if (min (m) == 0 && !def_attr)
+ {
+ // optional
+ //
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief " << (el ? "Element" : "Attribute") <<
+ " optional container type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ::xsd::cxx::tree::optional< " << type << " > " <<
+ econtainer (m) << ";";
+ }
+ else
+ {
+ // one
+ //
+ }
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief " << (el ? "Element" : "Attribute") <<
+ " traits type." << endl
+ << " */" << endl;
+ }
+ os << "typedef ::xsd::cxx::tree::traits< " << type << ", " <<
+ char_type;
+
+ SemanticGraph::Type& t (m.type ());
+
+ if (t.is_a<SemanticGraph::Fundamental::Double> ())
+ os << ", ::xsd::cxx::tree::schema_type::double_";
+ else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
+ os << ", ::xsd::cxx::tree::schema_type::decimal";
+
+ os << " > " << etraits (m) << ";"
+ << endl;
+
+
+ // Element id.
+ //
+ if (el && ordered_p (c))
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Element id used for capturing content " <<
+ "order." << endl
+ << " */" << endl;
+
+ SemanticGraph::Context& ctx (m.context ());
+
+ os << "static const ::std::size_t " <<
+ ctx.get<String> ("ordered-id-name") << " = " <<
+ ctx.get<size_t> ("ordered-id") << "UL;" << endl;
+ }
+
+ member_function_.traverse (m);
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+ }
+
+ private:
+ MemberTypeName type_name_;
+ Traversal::Belongs belongs_;
+
+ MemberFunction member_function_;
+ };
+
+
+ struct Any: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ Any (Context& c)
+ : Context (c), any_function_ (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name " << ename (a) << endl
+ << " *" << endl
+ << " * @brief Accessor and modifier functions for the " <<
+ "any wildcard." << endl;
+
+ if (a.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (a.annotation ());
+ }
+
+ os << " */" << endl
+ << "//@{" << endl;
+ }
+ else
+ {
+ os << "// " << ename (a) << endl
+ << "//" << endl;
+ }
+
+ // Typedefs.
+ //
+ if (max (a) != 1)
+ {
+ String const& container (econtainer (a));
+
+ // sequence
+ //
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM element sequence container type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ::xsd::cxx::tree::element_sequence " <<
+ container << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM element iterator type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef " << container << "::iterator " <<
+ eiterator (a) << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM element constant iterator type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef " << container << "::const_iterator " <<
+ econst_iterator (a) << ";"
+ << endl;
+
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM element optional container type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ::xsd::cxx::tree::element_optional " <<
+ econtainer (a) << ";"
+ << endl;
+ }
+ else
+ {
+ // one
+ //
+ if (doxygen)
+ os << endl;
+ }
+
+ // Wildcard id.
+ //
+ if (ordered_p (c))
+ {
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Wildcard id used for capturing content " <<
+ "order." << endl
+ << " */" << endl;
+
+ SemanticGraph::Context& ctx (a.context ());
+
+ os << "static const ::std::size_t " <<
+ ctx.get<String> ("ordered-id-name") << " = " <<
+ ctx.get<size_t> ("ordered-id") << "UL;" << endl;
+ }
+
+ any_function_.traverse (a);
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& container (econtainer (a));
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name " << ename (a) << endl
+ << " *" << endl
+ << " * @brief Accessor and modifier functions for the " <<
+ "anyAttribute" << endl
+ << " * wildcard." << endl;
+
+ if (a.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (a.annotation ());
+ }
+
+ os << " */" << endl
+ << "//@{" << endl;
+ }
+ else
+ {
+ os << "// " << ename (a) << endl
+ << "//" << endl;
+ }
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM attribute set container type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ::xsd::cxx::tree::attribute_set< " << char_type <<
+ " > " << container << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM attribute iterator type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef " << container << "::iterator " <<
+ eiterator (a) << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief DOM attribute constant iterator type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef " << container << "::const_iterator " <<
+ econst_iterator (a) << ";"
+ << endl;
+
+ any_function_.traverse (a);
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+ }
+
+ private:
+ AnyFunction any_function_;
+ };
+
+ struct DataMember: Traversal::Member, Context
+ {
+ DataMember (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m)) return;
+
+ String const& member (emember (m));
+
+ bool def_attr (m.default_p () &&
+ m.is_a<SemanticGraph::Attribute> ());
+
+ if (max (m) != 1)
+ {
+ // sequence
+ //
+ os << econtainer (m) << " " << member << ";";
+ }
+ else if (min (m) == 0 && !def_attr)
+ {
+ // optional
+ //
+ os << econtainer (m) << " " << member << ";";
+ }
+ else
+ {
+ // one
+ //
+ os << "::xsd::cxx::tree::one< " << etype (m) << " > " <<
+ member << ";";
+ }
+
+ // default_value
+ //
+ if (m.default_p ())
+ {
+ bool simple (true);
+
+ if (m.is_a<SemanticGraph::Element> ())
+ {
+ IsSimpleType test (simple);
+ test.dispatch (m.type ());
+ }
+
+ if (simple)
+ {
+ bool lit (false);
+ {
+ IsLiteralValue test (lit);
+ test.dispatch (m.type ());
+ }
+
+ if (!lit)
+ {
+ os << "static const " << etype (m) << " " <<
+ edefault_value_member (m) << ";";
+ }
+ }
+ }
+ }
+ };
+
+ struct DataAny: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ DataAny (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ os << econtainer (a) << " " << member << ";";
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ os << econtainer (a) << " " << member << ";";
+ }
+ else
+ {
+ // one
+ //
+ os << "::xsd::cxx::tree::element_one " << member << ";";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ os << econtainer (a) << " " << emember (a) << ";";
+ }
+ };
+
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ base_name_ (c),
+ member_name_ (c),
+ any_ (c),
+ member_ (c),
+ data_any_ (c),
+ data_member_ (c)
+ {
+ inherits_base_ >> base_name_;
+ inherits_member_ >> member_name_;
+
+ names_ >> member_;
+ if (options.generate_wildcard ())
+ names_ >> any_;
+
+ names_data_ >> data_member_;
+ if (options.generate_wildcard ())
+ names_data_ >> data_any_;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ bool renamed (renamed_type (c, name));
+ if (renamed && !name)
+ return;
+
+ SemanticGraph::Context& ctx (c.context ());
+
+ bool has_members (has<Traversal::Member> (c));
+
+ bool hae (has<Traversal::Any> (c));
+ bool haa (has<Traversal::AnyAttribute> (c));
+
+ bool gen_wildcard (options.generate_wildcard ());
+
+ bool mixed (mixed_p (c) && !ctx.count ("mixed-in-base"));
+ bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
+
+ bool simple (true);
+ {
+ IsSimpleType t (simple);
+ t.dispatch (c);
+ }
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (c);
+ }
+
+ SemanticGraph::Enumeration* enum_base (0);
+ {
+ IsEnumBasedType t (enum_base);
+ t.dispatch (c);
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Class corresponding to the %" <<
+ comment (c.name ()) << " schema type." << endl;
+
+ if (c.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (c.annotation ());
+ }
+
+ os << " *" << endl
+ << " * @nosubgrouping" << endl
+ << " */" << endl;
+ }
+
+ os << "class " << type_exp << name << ": public ";
+
+ if (c.inherits_p ())
+ inherits (c, inherits_base_);
+ else
+ os << any_type;
+
+ os << "{"
+ << "public:" << endl;
+
+ // Members.
+ //
+ names (c, names_);
+
+ // Mixed content.
+ //
+ if (mixed)
+ {
+ String const& type (ctx.get<String> ("mixed-type"));
+ String const& cont (ctx.get<String> ("mixed-container"));
+ String const& iter (ctx.get<String> ("mixed-iterator"));
+ String const& citer (ctx.get<String> ("mixed-const-iterator"));
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @name " << comment ("text_content") << endl
+ << " *" << endl
+ << " * @brief Accessor and modifier functions for text " <<
+ "content." << endl
+ << " */" << endl
+ << "//@{" << endl;
+ else
+ os << "// text_content" << endl
+ << "//" << endl;
+
+ // Typedefs.
+ //
+ bool isense (options.generate_intellisense ());
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Text content type." << endl
+ << " */" << endl;
+
+ os << "typedef " << xs_string_type << " " << type << ";";
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Text content sequence container type." << endl
+ << " */" << endl;
+
+ os << "typedef ::xsd::cxx::tree::sequence< " << type <<
+ " > " << cont << ";";
+
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Text content iterator type." << endl
+ << " */" << endl;
+
+ // IntelliSense does not like aliases and fully-qualified
+ // names here.
+ //
+ if (!isense)
+ os << "typedef " << cont << "::iterator " << iter<< ";";
+ else
+ os << "typedef ::xsd::cxx::tree::sequence< " << type <<
+ " >::iterator " << iter << ";";
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Text content constant iterator type." << endl
+ << " */" << endl;
+
+ if (!isense)
+ os << "typedef " << cont << "::const_iterator " << citer<< ";";
+ else
+ os << "typedef ::xsd::cxx::tree::sequence< " << type <<
+ " >::const_iterator " << citer << ";";
+
+ os << endl;
+
+ // Content id.
+ //
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Text content id used for capturing content " <<
+ "order." << endl
+ << " */" << endl;
+
+ os << "static const ::std::size_t " <<
+ ctx.get<String> ("mixed-ordered-id-name") << " = " <<
+ ctx.get<size_t> ("mixed-ordered-id") << "UL;" << endl;
+
+ // Accessors and modifiers.
+ //
+ String const& aname (ctx.get<String> ("mixed-aname"));
+ String const& mname (ctx.get<String> ("mixed-mname"));
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the text" << endl
+ << " * content sequence." << endl
+ << " *" << endl
+ << " * @return A constant reference to the sequence " <<
+ "container." << endl
+ << " */" << endl;
+
+ os << "const " << cont << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "text content" << endl
+ << " * sequence." << endl
+ << " *" << endl
+ << " * @return A reference to the sequence container." << endl
+ << " */" << endl;
+
+ os << cont << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Copy elements from a given sequence." << endl
+ << " *" << endl
+ << " * @param s A sequence to copy entries from." << endl
+ << " *" << endl
+ << " * For each element in @a s this function " <<
+ "add it to the sequence." << endl
+ << " * Note that this operation " <<
+ "completely changes the sequence and" << endl
+ << " * all old elements will be lost." << endl
+ << " */" << endl;
+
+ os << "void" << endl
+ << mname << " (const " << cont << "& s);"
+ << endl;
+
+ if (doxygen)
+ os << "//@}" << endl
+ << endl;
+ }
+
+ // dom_document accessors.
+ //
+ if (edom_document_member_p (c))
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the DOM" << endl
+ << " * document associated with this instance." << endl
+ << " *" << endl
+ << " * @return A constant reference to the DOM document." << endl
+ << " *" << endl
+ << " * The DOM document returned by this function is " <<
+ "used to store" << endl
+ << " * the raw XML content corresponding to wildcards." << endl
+ << " */" << endl;
+ }
+ else
+ os << "// DOMDocument for wildcard content." << endl
+ << "//" << endl;
+
+ os << "const " << xerces_ns << "::DOMDocument&" << endl
+ << edom_document (c) << " () const;"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the DOM " <<
+ "document" << endl
+ << " * associated with this instance." << endl
+ << " *" << endl
+ << " * @return A reference to the DOM document." << endl
+ << " *" << endl
+ << " * The DOM document returned by this function is " <<
+ "used to store" << endl
+ << " * the raw XML content corresponding to wildcards." << endl
+ << " */" << endl;
+ }
+ os << xerces_ns << "::DOMDocument&" << endl
+ << edom_document (c) << " ();"
+ << endl;
+ }
+
+ // Order container.
+ //
+ if (ordered)
+ {
+ String const& type (ctx.get<String> ("order-type"));
+ String const& cont (ctx.get<String> ("order-container"));
+ String const& iter (ctx.get<String> ("order-iterator"));
+ String const& citer (ctx.get<String> ("order-const-iterator"));
+
+ String const ct (options.order_container_specified ()
+ ? options.order_container ()
+ : "::std::vector");
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @name " << comment ("content_order") << endl
+ << " *" << endl
+ << " * @brief Accessor and modifier functions for content " <<
+ "order." << endl
+ << " */" << endl
+ << "//@{" << endl;
+ else
+ os << "// content_order" << endl
+ << "//" << endl;
+
+ // Typedefs.
+ //
+ bool isense (options.generate_intellisense ());
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Content order entry type." << endl
+ << " */" << endl;
+
+ os << "typedef " << ns_name (xs_ns ()) << "::" <<
+ xs_ns ().context ().get<String> ("content-order") << " " <<
+ type << ";";
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Content order sequence container type." << endl
+ << " */" << endl;
+
+ os << "typedef " << ct << "< " << type << " > " << cont << ";";
+
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Content order iterator type." << endl
+ << " */" << endl;
+
+ // IntelliSense does not like aliases and fully-qualified
+ // names here.
+ //
+ if (!isense)
+ os << "typedef " << cont << "::iterator " << iter<< ";";
+ else
+ os << "typedef " << ct << "< " << type << " >::iterator " <<
+ iter << ";";
+
+ if (doxygen)
+ os << endl
+ << "/**" << endl
+ << " * @brief Content order constant iterator type." << endl
+ << " */" << endl;
+
+ if (!isense)
+ os << "typedef " << cont << "::const_iterator " << citer<< ";";
+ else
+ os << "typedef " << ct << "< " << type <<
+ " >::const_iterator " << citer << ";";
+
+ os << endl;
+
+ // Accessors and modifiers.
+ //
+ String const& aname (ctx.get<String> ("order-aname"));
+ String const& mname (ctx.get<String> ("order-mname"));
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the content" << endl
+ << " * order sequence." << endl
+ << " *" << endl
+ << " * @return A constant reference to the sequence " <<
+ "container." << endl
+ << " */" << endl;
+
+ os << "const " << cont << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "content order" << endl
+ << " * sequence." << endl
+ << " *" << endl
+ << " * @return A reference to the sequence container." << endl
+ << " */" << endl;
+
+ os << cont << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ if (doxygen)
+ os << "/**" << endl
+ << " * @brief Copy elements from a given sequence." << endl
+ << " *" << endl
+ << " * @param s A sequence to copy entries from." << endl
+ << " *" << endl
+ << " * For each element in @a s this function " <<
+ "add it to the sequence." << endl
+ << " * Note that this operation " <<
+ "completely changes the sequence and" << endl
+ << " * all old elements will be lost." << endl
+ << " */" << endl;
+
+ os << "void" << endl
+ << mname << " (const " << cont << "& s);"
+ << endl;
+
+ if (doxygen)
+ os << "//@}" << endl
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name Constructors" << endl
+ << " */" << endl
+ << "//@{" << endl
+ << endl;
+ }
+ else
+ {
+ os << "// Constructors." << endl
+ << "//" << endl;
+ }
+
+ bool generate_no_base_ctor (false);
+ {
+ GenerateWithoutBaseCtor t (generate_no_base_ctor);
+ t.traverse (c);
+ }
+
+ bool has_complex_non_op_args (false);
+ bool has_poly_non_op_args (false);
+ bool complex_poly_args_clash (true);
+ {
+ HasComplexPolyNonOptArgs t (*this, true,
+ has_complex_non_op_args,
+ has_poly_non_op_args,
+ complex_poly_args_clash);
+ t.traverse (c);
+ }
+
+ // default c-tor
+ //
+ if (options.generate_default_ctor ())
+ {
+ // c-tor (ultimate-base, all-non-optional-members) will become
+ // default c-tor if our inheritance hierarchy has no required
+ // members and no simple base. We can also collide with
+ // c-tor (all-non-optional-members) if we have no required
+ // members.
+ //
+ bool generate (false);
+ {
+ GenerateDefaultCtor t (*this, generate, generate_no_base_ctor);
+ t.traverse (c);
+ }
+
+ if (generate)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Default constructor." << endl
+ << " *" << endl
+ << " * Note that this constructor leaves required " <<
+ "elements and" << endl
+ << " * attributes uninitialized." << endl
+ << " */" << endl;
+ }
+
+ os << name << " ();"
+ << endl;
+ }
+ }
+
+ // c-tor (base, all-non-optional-members)
+ //
+ if (options.generate_from_base_ctor ())
+ {
+ // c-tor (base, all-non-optional-members) will be equivalent to
+ // c-tor (ultimate-base, all-non-optional-members) unless our
+ // immediate base's hierarchy has some non-optional members.
+ // We also need to generate this c-tor when one of the types
+ // in our inheritance hierarchy was customized since the
+ // customized version may not necessarily be convertible to
+ // the base without loss of information.
+ //
+ bool generate (false);
+ {
+ GenerateFromBaseCtor t (*this, generate);
+ t.traverse (c);
+ }
+
+ if (generate)
+ {
+ bool has_complex_non_op_args (false);
+ bool has_poly_non_op_args (false);
+ bool complex_poly_args_clash (true);
+ {
+ HasComplexPolyNonOptArgs t (*this, false,
+ has_complex_non_op_args,
+ has_poly_non_op_args,
+ complex_poly_args_clash);
+ t.traverse (c);
+ }
+
+ //
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the immediate "
+ "base and" << endl
+ << " * initializers for required elements and "
+ << "attributes." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const ";
+ inherits (c, inherits_member_);
+ os << "&";
+ {
+ FromBaseCtorArg args (*this, CtorArgType::type, false);
+ Traversal::Names args_names (args);
+ names (c, args_names);
+ }
+ os << ");"
+ << endl;
+
+ // If we have any complex arguments in the previous c-tor
+ // then also generate the auto_ptr version.
+ //
+ if (has_complex_non_op_args)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the immediate "
+ "base and" << endl
+ << " * initializers for required elements and "
+ << "attributes" << endl
+ << " * (" << auto_ptr << " version)." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "values directly" << endl
+ << " * instead of making copies." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const ";
+ inherits (c, inherits_member_);
+ os << "&";
+ {
+ FromBaseCtorArg args (
+ *this, CtorArgType::complex_auto_ptr, false);
+ Traversal::Names args_names (args);
+ names (c, args_names);
+ }
+ os << ");"
+ << endl;
+ }
+
+ // If we are generating polymorphic code then we also need to
+ // provide auto_ptr version for every polymorphic type.
+ //
+ if (polymorphic &&
+ has_poly_non_op_args && !complex_poly_args_clash)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the immediate "
+ "base and" << endl
+ << " * initializers for required elements and "
+ << "attributes" << endl
+ << " * (" << auto_ptr << " version)." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "values directly" << endl
+ << " * instead of making copies." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const ";
+ inherits (c, inherits_member_);
+ os << "&";
+ {
+ FromBaseCtorArg args (
+ *this, CtorArgType::poly_auto_ptr, false);
+ Traversal::Names args_names (args);
+ names (c, args_names);
+ }
+ os << ");"
+ << endl;
+ }
+ }
+ }
+
+ // c-tor (all-non-optional-members)
+ //
+ if (generate_no_base_ctor)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from initializers " <<
+ "for required " << endl
+ << " * elements and attributes." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+ {
+ CtorArgsWithoutBase ctor_args (
+ *this, CtorArgType::type, false, true);
+ ctor_args.dispatch (c);
+ }
+ os << ");"
+ << endl;
+
+
+ // If we have any complex arguments in the previous c-tor
+ // then also generate the auto_ptr version. One case where
+ // this c-tor will be generated is restriction of anyType.
+ //
+ if (has_complex_non_op_args)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from initializers " <<
+ "for required " << endl
+ << " * elements and attributes (" << auto_ptr <<
+ " version)." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "values directly" << endl
+ << " * instead of making copies." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+ {
+ CtorArgsWithoutBase ctor_args (
+ *this, CtorArgType::complex_auto_ptr, false, true);
+ ctor_args.dispatch (c);
+ }
+ os << ");"
+ << endl;
+ }
+
+ // If we are generating polymorphic code then we also need to
+ // provide auto_ptr version for every polymorphic type.
+ //
+ if (polymorphic &&
+ has_poly_non_op_args && !complex_poly_args_clash)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from initializers " <<
+ "for required " << endl
+ << " * elements and attributes (" << auto_ptr <<
+ " version)." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "values directly" << endl
+ << " * instead of making copies." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+ {
+ CtorArgsWithoutBase ctor_args (
+ *this, CtorArgType::poly_auto_ptr, false, true);
+ ctor_args.dispatch (c);
+ }
+ os << ");"
+ << endl;
+ }
+ }
+
+ if (string_based)
+ {
+ // We might not have the value type if this enum is customized.
+ //
+ if (enum_base != 0 && enum_base->context ().count ("value"))
+ {
+ // c-tor (enum-value, all-non-optional-members)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the " <<
+ "underlying enum value" << endl
+ << " * and initializers for required elements and " <<
+ "attributes." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << fq_name (*enum_base) << "::" <<
+ evalue (*enum_base);
+
+ {
+ CtorArgsWithoutBase ctor_args (
+ *this, CtorArgType::type, false, false);
+ ctor_args.dispatch (c);
+ }
+
+ os << ");"
+ << endl;
+ }
+
+ // c-tor (const char*, all-non-optional-members)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a C string and " <<
+ "initializers" << endl
+ << " * for required elements and attributes." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << char_type << "*";
+
+ {
+ CtorArgsWithoutBase ctor_args (
+ *this, CtorArgType::type, false, false);
+ ctor_args.dispatch (c);
+ }
+
+ os << ");"
+ << endl;
+
+ // c-tor (const std::string&, all-non-optional-members)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string and" <<
+ "initializers" << endl
+ << " * for required elements and attributes." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << string_type << "&";
+
+ {
+ CtorArgsWithoutBase ctor_args (
+ *this, CtorArgType::type, false, false);
+ ctor_args.dispatch (c);
+ }
+
+ os << ");"
+ << endl;
+ }
+
+ // c-tor (ultimate-base, all-non-optional-members)
+ //
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the ultimate "
+ "base and" << endl
+ << " * initializers for required elements and " <<
+ "attributes." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+
+ {
+ CtorArgs ctor_args (*this, CtorArgType::type);
+ ctor_args.dispatch (c);
+ }
+
+ os << ");"
+ << endl;
+
+ // If we have any complex arguments in the previous c-tor
+ // then also generate the auto_ptr version.
+ //
+ if (has_complex_non_op_args)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the ultimate "
+ "base and" << endl
+ << " * initializers for required elements and " <<
+ "attributes" << endl
+ << " * (" << auto_ptr << " version)." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "values directly" << endl
+ << " * instead of making copies." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+
+ {
+ CtorArgs ctor_args (*this, CtorArgType::complex_auto_ptr);
+ ctor_args.dispatch (c);
+ }
+
+ os << ");"
+ << endl;
+ }
+
+ // If we are generating polymorphic code then we also need to
+ // provide auto_ptr version for every polymorphic type.
+ //
+ if (polymorphic && has_poly_non_op_args && !complex_poly_args_clash)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from the ultimate "
+ "base and" << endl
+ << " * initializers for required elements and " <<
+ "attributes" << endl
+ << " * (" << auto_ptr << " version)." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "values directly" << endl
+ << " * instead of making copies." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (";
+
+ {
+ CtorArgs ctor_args (*this, CtorArgType::poly_auto_ptr);
+ ctor_args.dispatch (c);
+ }
+
+ os << ");"
+ << endl;
+ }
+
+ // c-tor (istream&)
+ //
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a data " <<
+ "representation" << endl
+ << " * stream." << endl
+ << " *" << endl
+ << " * @param s A stream to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << istream_type << "< " << i->c_str () <<
+ " >& s," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM element." << endl
+ << " *" << endl
+ << " * @param e A DOM element to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+
+ if (simple)
+ {
+ // c-tor (xercesc::DOMAttr)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM attribute." << endl
+ << " *" << endl
+ << " * @param a A DOM attribute to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // c-tor (std::basic_string const&, xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a string fragment." << endl
+ << " *" << endl
+ << " * @param s A string fragment to extract the data from." << endl
+ << " * @param e A pointer to DOM element containing the " <<
+ "string fragment." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " * @param c A pointer to the object that will " <<
+ "contain the new" << endl
+ << " * instance." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+ }
+ }
+
+ // copy c-tor
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy constructor." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " *" << endl
+ << " * For polymorphic object models use the @c _clone " <<
+ "function instead." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << name << "& x," << endl
+ << flags_type << " f = 0," << endl
+ << container << "* c = 0);"
+ << endl;
+
+ // clone
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy the instance polymorphically." << endl
+ << " *" << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @param c A pointer to the object that will contain " <<
+ "the copy." << endl
+ << " * @return A pointer to the dynamically allocated copy." << endl
+ << " *" << endl
+ << " * This function ensures that the dynamic type of the " <<
+ "instance is" << endl
+ << " * used for copying and should be used for polymorphic " <<
+ "object" << endl
+ << " * models instead of the copy constructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << name << "*" << endl
+ << "_clone (" << flags_type << " f = 0," << endl
+ << container << "* c = 0) const";
+
+ // Make the _clone() function pure virtual if the type is
+ // abstract or we are generating a polymorphic base for a
+ // custom implementation (in which case the base must be
+ // inherited from and _clone() overridden).
+ //
+ if (c.abstract_p () ||
+ (renamed && polymorphic && polymorphic_p (c)))
+ os << " = 0";
+
+ os << ";"
+ << endl;
+
+ // operator=
+ //
+ bool priv (false);
+
+ if (!simple)
+ {
+ if (options.suppress_assignment ())
+ {
+ priv = true;
+ os << "private:" << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Disabled copy assignment operator." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @return A reference to itself." << endl
+ << " */" << endl;
+ }
+
+ os << name << "&" << endl
+ << "operator= (const " << name << "& x);"
+ << endl;
+ }
+ else if (has_members || (gen_wildcard && (hae || haa)))
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy assignment operator." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @return A reference to itself." << endl
+ << " *" << endl
+ << " * For polymorphic object models use the @c _clone " <<
+ "function instead." << endl
+ << " */" << endl;
+ }
+
+ os << name << "&" << endl
+ << "operator= (const " << name << "& x);"
+ << endl;
+ }
+ }
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+
+ if (priv)
+ os << "public:" << endl;
+
+ // d-tor
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Destructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << endl
+ << "~" << name << " ();"
+ << endl;
+
+ // Data members and implementation functions.
+ //
+ if (has_members || hae || (haa && gen_wildcard) || ordered || mixed)
+ {
+ os << "// Implementation." << endl
+ << "//" << endl;
+
+ if (doxygen)
+ os << endl
+ << "//@cond" << endl
+ << endl;
+
+ if (!options.suppress_parsing () &&
+ (has_members || hae || (haa && gen_wildcard) || mixed))
+ {
+ // parse ()
+ //
+ os << "protected:" << endl
+ << "void" << endl
+ << unclash (name, "parse") << " (" <<
+ parser_type << "&," << endl
+ << flags_type << ");"
+ << endl;
+ }
+
+ os << "protected:"
+ << endl;
+
+ // parse (istream)
+ //
+ if (has_members)
+ {
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
+ {
+ os << "void" << endl
+ << unclash (name, "parse") << " (" <<
+ istream_type << "< " << i->c_str () << " >&," << endl
+ << flags_type << ");"
+ << endl;
+ }
+ }
+
+ // DOM document.
+ //
+ if (edom_document_member_p (c))
+ {
+ os << dom_auto_ptr << "< " << xerces_ns <<
+ "::DOMDocument > " << edom_document_member (c) << ";"
+ << endl;
+ }
+
+ // Mixed text content.
+ //
+ if (mixed)
+ {
+ os << ctx.get<String> ("mixed-container") << " " <<
+ ctx.get<String> ("mixed-member") << ";"
+ << endl;
+ }
+
+ // Order container.
+ //
+ if (ordered)
+ {
+ os << ctx.get<String> ("order-container") << " " <<
+ ctx.get<String> ("order-member") << ";"
+ << endl;
+ }
+
+ //
+ //
+ names (c, names_data_);
+
+ if (doxygen)
+ os << endl
+ << "//@endcond" << endl;
+ }
+
+ os << "};";
+
+ // Comparison operators.
+ //
+ if (options.generate_comparison () &&
+ (has_members || !c.inherits_p () ||
+ ((hae || haa) && gen_wildcard)))
+ {
+ os << inst_exp
+ << "bool" << endl
+ << "operator== (const " << name << "&, const " << name << "&);"
+ << endl;
+
+ os << inst_exp
+ << "bool" << endl
+ << "operator!= (const " << name << "&, const " << name << "&);"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_base_;
+ BaseTypeName base_name_;
+
+ Traversal::Inherits inherits_member_;
+ MemberTypeName member_name_;
+
+ Traversal::Names names_;
+ Any any_;
+ Member member_;
+
+ Traversal::Names names_data_;
+ DataAny data_any_;
+ DataMember data_member_;
+ };
+
+
+ struct GlobalElement: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ GlobalElement (Context& c)
+ : GlobalElementBase (c), Context (c), type_name_ (c)
+ {
+ belongs_ >> type_name_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!doc_root_p (e))
+ return;
+
+ SemanticGraph::Type& t (e.type ());
+
+ bool fund (false);
+ {
+ IsFundamentalType test (fund);
+ test.dispatch (t);
+ }
+
+ bool simple (true);
+ if (!fund)
+ {
+ IsSimpleType test (simple);
+ test.dispatch (t);
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Class corresponding to the %" <<
+ comment (e.name ()) << " root element." << endl;
+
+ if (e.annotated_p ())
+ {
+ os << " *" << endl;
+ write_annotation (e.annotation ());
+ }
+
+ os << " *" << endl
+ << " * @nosubgrouping" << endl
+ << " */" << endl;
+ }
+
+ String const& name (ename (e));
+
+ os << "class " << type_exp << name << ": public " << element_type
+ << "{"
+ << "public:" << endl
+ << endl;
+
+ String const& type (etype (e));
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name Element value" << endl
+ << " *" << endl
+ << " * @brief Accessor and modifier functions for the " <<
+ "element value." << endl
+ << " */" << endl
+ << "//@{" << endl
+ << endl;
+ }
+ else
+ {
+ os << "// Element value." << endl
+ << "//" << endl;
+ }
+
+ // Typedefs.
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Element value type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ";
+
+ belongs (e, belongs_);
+
+ os << " " << type << ";";
+
+ if (doxygen)
+ {
+ os << endl
+ << "/**" << endl
+ << " * @brief Element value traits type." << endl
+ << " */" << endl;
+ }
+
+ os << "typedef ::xsd::cxx::tree::traits< " << type << ", " <<
+ char_type;
+
+ if (t.is_a<SemanticGraph::Fundamental::Double> ())
+ os << ", ::xsd::cxx::tree::schema_type::double_";
+ else if (t.is_a<SemanticGraph::Fundamental::Decimal> ())
+ os << ", ::xsd::cxx::tree::schema_type::decimal";
+
+ os << " > " << etraits (e) << ";"
+ << endl;
+
+ // Accessors/modifiers.
+ //
+ String const& aname (eaname (e));
+ String const& mname (emname (e));
+
+ // type const&
+ // name () const;
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) reference " <<
+ "to the element" << endl
+ << " * value." << endl
+ << " *" << endl
+ << " * @return A constant reference to the element value." <<
+ endl
+ << " */" << endl;
+ }
+
+ os << "const " << type << "&" << endl
+ << aname << " () const;"
+ << endl;
+
+ // type&
+ // name ();
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-write reference to the " <<
+ "element value." << endl
+ << " *" << endl
+ << " * @return A reference to the element value." << endl
+ << " */" << endl;
+ }
+
+ os << type << "&" << endl
+ << aname << " ();"
+ << endl;
+
+ // void
+ // name (type const&);
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the element value." << endl
+ << " *" << endl
+ << " * @param x A new value to set." << endl
+ << " *" << endl
+ << " * This function makes a copy of its argument " <<
+ "and sets it as" << endl
+ << " * the new value of the element." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (const " << type << "& x);"
+ << endl;
+
+ // void
+ // name (auto_ptr<type>);
+ //
+ if (!fund)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Set the element value without " <<
+ "copying." << endl
+ << " *" << endl
+ << " * @param p A new value to use." << endl
+ << " *" << endl
+ << " * This function will try to use the passed value " <<
+ "directly" << endl
+ << " * instead of making a copy." << endl
+ << " */" << endl;
+ }
+
+ os << "void" << endl
+ << mname << " (" << auto_ptr << "< " << type << " > p);"
+ << endl;
+ }
+
+ // auto_ptr<type>
+ // detach_name ();
+ //
+ if (detach && !fund)
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Detach the element value from " <<
+ "the object." << endl
+ << " *" << endl
+ << " * @return A pointer to the element value." << endl
+ << " *" << endl
+ << " * Note that this function leaves the element " <<
+ "object uninitialized." << endl
+ << " */" << endl;
+ }
+
+ os << auto_ptr << "< " << type << " >" << endl
+ << edname (e) << " ();"
+ << endl;
+ }
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a read-only (constant) pointer " <<
+ "to the element" << endl
+ << " * value." << endl
+ << " *" << endl
+ << " * @return A constant pointer to the element value " <<
+ "or 0 if this" << endl
+ << " * element is of a fundamental type." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual const " << any_type << "*" << endl
+ << "_value () const;"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return a pointer to the element value." << endl
+ << " *" << endl
+ << " * @return A pointer to the element value or 0 if this " <<
+ "element is" << endl
+ << " * of a fundamental type." << endl
+ << " */" << endl;
+ }
+ os << "virtual " << any_type << "*" << endl
+ << "_value ();"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+
+ // Constructor.
+ //
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name Constructors" << endl
+ << " */" << endl
+ << "//@{" << endl
+ << endl;
+ }
+ else
+ {
+ os << "// Constructors." << endl
+ << "//" << endl;
+ }
+
+ // default c-tor
+ //
+ if (options.generate_default_ctor ())
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Default constructor." << endl
+ << " *" << endl
+ << " * Note that this constructor leaves the element " <<
+ "value" << endl
+ << " * uninitialized." << endl
+ << " */" << endl;
+ }
+
+ os << name << " ();"
+ << endl;
+ }
+
+ // c-tor (value)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from an initializer " <<
+ "for the element" << endl
+ << " * value." << endl
+ << " *" << endl
+ << " * @param x Element value." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << type << "& x);"
+ << endl;
+
+
+ // If the element value is a complex type (has elements,
+ // attributes, or wildcards) then also generate the auto_ptr
+ // version. If we are generating polymorphic code then we
+ // also need to provide auto_ptr version for simple types.
+ //
+ if (!simple || (polymorphic && polymorphic_p (t)))
+ {
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from an initializer " <<
+ "for" << endl
+ << " * the element value (" << auto_ptr <<
+ " version)." << endl
+ << " *" << endl
+ << " * @param p Element value to use." << endl
+ << " *" << endl
+ << " * This constructor will try to use the passed " <<
+ "value directly" << endl
+ << " * instead of making a copy." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (" << auto_ptr << "< " << type << " > p);"
+ << endl;
+ }
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Create an instance from a DOM element." << endl
+ << " *" << endl
+ << " * @param e A DOM element to extract the data from." << endl
+ << " * @param f Flags to create the new instance with." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << xerces_ns << "::DOMElement& e, " <<
+ flags_type << " f = 0);"
+ << endl;
+ }
+
+ // copy c-tor
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy constructor." << endl
+ << " *" << endl
+ << " * @param x An instance to make a copy of." << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " *" << endl
+ << " * For polymorphic object models use the @c _clone " <<
+ "function instead." << endl
+ << " */" << endl;
+ }
+
+ os << name << " (const " << name << "& x, " <<
+ flags_type << " f = 0);"
+ << endl;
+
+ // _clone
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Copy the instance polymorphically." << endl
+ << " *" << endl
+ << " * @param f Flags to create the copy with." << endl
+ << " * @return A pointer to the dynamically allocated copy." << endl
+ << " *" << endl
+ << " * This function ensures that the dynamic type of the " <<
+ "instance is" << endl
+ << " * used for copying and should be used for polymorphic " <<
+ "object" << endl
+ << " * models instead of the copy constructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << name << "*" << endl
+ << "_clone (" << flags_type << " f = 0) const;"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+
+ // Element name and namespace accessors.
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @name Element name and namespace" << endl
+ << " *" << endl
+ << " * @brief Accessor functions for the element name " <<
+ "and namespace." << endl
+ << " */" << endl
+ << "//@{" << endl
+ << endl;
+ }
+ else
+ {
+ os << "// Element name and namespace." << endl
+ << "//" << endl;
+ }
+
+ SemanticGraph::Context& ec (e.context ());
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return the element name (static function)." << endl
+ << " *" << endl
+ << " * @return A read-only string reference containing " <<
+ "the element" << endl
+ << " * name." << endl
+ << " */" << endl;
+ }
+ os << "static const " << string_type << "&" << endl
+ << ec.get<String> ("element-name") << " ();"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return the element namespace (static " <<
+ "function)." << endl
+ << " *" << endl
+ << " * @return A read-only string reference containing " <<
+ "the element" << endl
+ << " * namespace." << endl
+ << " */" << endl;
+ }
+ os << "static const " << string_type << "&" << endl
+ << ec.get<String> ("element-ns") << " ();"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return the element name." << endl
+ << " *" << endl
+ << " * @return A read-only string reference containing " <<
+ "the element" << endl
+ << " * name." << endl
+ << " */" << endl;
+ }
+ os << "virtual const " << string_type << "&" << endl
+ << "_name () const;"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Return the element namespace." << endl
+ << " *" << endl
+ << " * @return A read-only string reference containing " <<
+ "the element" << endl
+ << " * namespace." << endl
+ << " */" << endl;
+ }
+ os << "virtual const " << string_type << "&" << endl
+ << "_namespace () const;"
+ << endl;
+
+ if (doxygen)
+ {
+ os << "//@}" << endl
+ << endl;
+ }
+
+ // d-tor
+ //
+ if (doxygen)
+ {
+ os << "/**" << endl
+ << " * @brief Destructor." << endl
+ << " */" << endl;
+ }
+
+ os << "virtual " << endl
+ << "~" << name << " ();"
+ << endl;
+
+ // Data member.
+ //
+
+ if (doxygen)
+ os << "//@cond" << endl
+ << endl;
+
+ os << "protected:" << endl
+ << "::xsd::cxx::tree::one< " << type << " > " <<
+ emember (e) << ";"
+ << "static const " << string_type << " " <<
+ ec.get<String> ("element-name-member") << ";"
+ << "static const " << string_type << " " <<
+ ec.get<String> ("element-ns-member") << ";";
+
+ if (doxygen)
+ os << endl
+ << "//@endcond" << endl;
+
+ os << "};";
+ }
+
+ private:
+ Traversal::Belongs belongs_;
+ MemberTypeName type_name_;
+ };
+ }
+
+ void
+ generate_tree_header (Context& ctx)
+ {
+ if (ctx.generate_xml_schema)
+ {
+ if (ctx.char_type == L"char" && ctx.char_encoding != L"custom")
+ {
+ ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding <<
+ ".hxx>" << endl
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/exceptions.hxx>" << endl
+ << "#include <xsd/cxx/tree/elements.hxx>" << endl
+ << "#include <xsd/cxx/tree/types.hxx>" << endl
+ << endl;
+
+ if (!ctx.options.suppress_parsing () ||
+ ctx.options.generate_serialization ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl
+ << endl;
+ }
+
+ if (!ctx.options.suppress_parsing () ||
+ ctx.options.generate_serialization ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl
+ << endl;
+ }
+
+ bool element_map (ctx.options.generate_element_map ());
+
+ if (element_map)
+ ctx.os << "#include <xsd/cxx/tree/element-map.hxx>" << endl
+ << endl;
+
+ // I need to include all the "optional" headers here (instead of
+ // later in the individual generators for each feature because
+ // those headers provide implementation for the fundamental types.
+ //
+ if (!ctx.options.suppress_parsing ())
+ {
+ ctx.os << "#include <xsd/cxx/tree/parsing.hxx>" << endl;
+
+ Traversal::Schema schema;
+ Traversal::Names names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundIncludes type (ctx, "parsing");
+
+ schema >> names >> ns >> ns_names >> type;
+
+ schema.dispatch (ctx.schema_root);
+
+ if (element_map)
+ ctx.os << "#include <xsd/cxx/tree/parsing/element-map.txx>" <<
+ endl;
+
+ ctx.os << endl;
+ }
+
+ if (ctx.options.generate_serialization ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/dom/serialization-header.hxx>" << endl
+ << "#include <xsd/cxx/tree/serialization.hxx>" << endl;
+
+ Traversal::Schema schema;
+ Traversal::Names names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+ FundIncludes type (ctx, "serialization");
+
+ schema >> names >> ns >> ns_names >> type;
+
+ schema.dispatch (ctx.schema_root);
+
+ if (element_map)
+ ctx.os << "#include <xsd/cxx/tree/serialization/element-map.txx>" <<
+ endl;
+
+ ctx.os << endl;
+ }
+
+ if (ctx.options.generate_ostream ())
+ {
+ ctx.os << "#include <xsd/cxx/tree/std-ostream-operators.hxx>" << endl
+ << endl;
+ }
+
+ NarrowStrings const& ist (ctx.options.generate_insertion ());
+ if (!ist.empty ())
+ {
+ for (NarrowStrings::const_iterator i (ist.begin ()); i != ist.end ();
+ ++i)
+ {
+ if (*i == "ACE_OutputCDR")
+ ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-insertion.hxx>"
+ << endl;
+ else if (*i == "XDR")
+ ctx.os << "#include <xsd/cxx/tree/xdr-stream-insertion.hxx>"
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/stream-insertion.hxx>" << endl
+ << endl;
+ }
+
+ NarrowStrings const& est (ctx.options.generate_extraction ());
+ if (!est.empty ())
+ {
+ for (NarrowStrings::const_iterator i (est.begin ()); i != est.end ();
+ ++i)
+ {
+ if (*i == "ACE_InputCDR")
+ ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-extraction.hxx>"
+ << endl;
+ else if (*i == "XDR")
+ ctx.os << "#include <xsd/cxx/tree/xdr-stream-extraction.hxx>"
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/stream-extraction.hxx>" << endl
+ << endl;
+ }
+
+ // Emit fundamental types.
+ //
+ {
+ Traversal::Schema schema;
+ Traversal::Names names;
+ FundamentalNamespace ns (ctx);
+
+ schema >> names >> ns;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+ else
+ {
+ bool inline_ (ctx.options.generate_inline ());
+
+ ctx.os << "#include <memory> // " << ctx.auto_ptr << endl
+ << "#include <limits> // std::numeric_limits" << endl
+ << "#include <algorithm> // std::binary_search" << endl;
+
+ if (ctx.std >= cxx_version::cxx11)
+ ctx.os << "#include <utility> // std::move" << endl;
+
+ if (!ctx.options.ordered_type ().empty () ||
+ ctx.options.ordered_type_all ())
+ {
+ ctx.os << "#include <cstddef> // std::size_t" << endl;
+
+ if (!ctx.options.order_container_specified ())
+ ctx.os << "#include <vector>" << endl;
+ }
+
+ ctx.os << endl;
+
+ if (ctx.char_type == L"char" && ctx.char_encoding != L"custom")
+ {
+ ctx.os << "#include <xsd/cxx/xml/char-" << ctx.char_encoding <<
+ ".hxx>" << endl
+ << endl;
+ }
+
+ ctx.os << "#include <xsd/cxx/tree/exceptions.hxx>" << endl
+ << "#include <xsd/cxx/tree/elements.hxx>" << endl
+ << "#include <xsd/cxx/tree/containers.hxx>" << endl
+ << "#include <xsd/cxx/tree/list.hxx>" << endl
+ << endl;
+
+ if (!ctx.options.suppress_parsing ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/dom/parsing-header.hxx>" << endl
+ << endl;
+ }
+
+ if (ctx.options.generate_wildcard ())
+ {
+ if (ctx.options.suppress_parsing () ||
+ !ctx.options.generate_serialization ())
+ ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl;
+
+ ctx.os << "#include <xsd/cxx/tree/containers-wildcard.hxx>" << endl
+ << endl;
+ }
+
+ if (!ctx.options.generate_extraction ().empty ())
+ ctx.os << "#include <xsd/cxx/tree/istream-fwd.hxx>" << endl
+ << endl;
+
+ // Emit header includes.
+ //
+ {
+ if (inline_)
+ {
+ ctx.os << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
+ << "#define XSD_DONT_INCLUDE_INLINE" << endl
+ << endl;
+ }
+
+ Traversal::Schema schema;
+ Includes includes (ctx, Includes::header);
+
+ schema >> includes;
+
+ schema.dispatch (ctx.schema_root);
+
+ if (inline_)
+ {
+ ctx.os << "#undef XSD_DONT_INCLUDE_INLINE" << endl
+ << "#else" << endl
+ << endl;
+
+ schema.dispatch (ctx.schema_root);
+
+ ctx.os << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
+ << endl;
+ }
+ }
+
+
+ {
+ Traversal::Schema schema;
+
+ Sources sources;
+ Traversal::Names names_ns, names;
+
+ DocumentedNamespace ns (ctx);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+ GlobalElement element (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ if (ctx.options.generate_element_type ())
+ names >> element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+
+ // Emit inline includes.
+ //
+ if (inline_)
+ {
+ ctx.os << "#ifndef XSD_DONT_INCLUDE_INLINE" << endl
+ << endl;
+
+ Traversal::Schema schema;
+ Includes ixx_includes (ctx, Includes::inline_);
+ schema >> ixx_includes;
+
+ schema.dispatch (ctx.schema_root);
+
+ ctx.os << "#endif // XSD_DONT_INCLUDE_INLINE" << endl
+ << endl;
+ }
+ }
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/tree-header.hxx b/xsd/xsd/cxx/tree/tree-header.hxx
new file mode 100644
index 0000000..d0e9ea6
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-header.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/tree-header.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_TREE_HEADER_HXX
+#define XSD_CXX_TREE_TREE_HEADER_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_tree_header (Context&);
+ }
+}
+
+#endif // XSD_CXX_TREE_TREE_HEADER_HXX
diff --git a/xsd/xsd/cxx/tree/tree-inline.cxx b/xsd/xsd/cxx/tree/tree-inline.cxx
new file mode 100644
index 0000000..318ef66
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-inline.cxx
@@ -0,0 +1,1161 @@
+// file : xsd/cxx/tree/tree-inline.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/tree/tree-inline.hxx>
+#include <xsd/cxx/tree/default-value.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String item_name (item_type_name (item_type));
+ String base_type (L"::xsd::cxx::tree::list< " + item_name +
+ L", " + char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base_type += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base_type += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base_type += L" >";
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ // c-tor ()
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " ()" << endl
+ << ": " << base_type << " (this)"
+ << "{"
+ << "}";
+
+ // c-tor (size_type, const X& x)
+ //
+ String size_type (name != L"size_type"
+ ? String (L"size_type")
+ : base_type + L"::size_type");
+
+ os << inl
+ << name << "::" << endl
+ << name << " (" << size_type << " n, const " << item_name <<
+ "& x)" << endl
+ << ": " << base_type << " (n, x, this)"
+ << "{"
+ << "}";
+
+ // copy c-tor ()
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << name << "& o," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << any_simple_type << " (o, f, c)," << endl
+ << " " << base_type << " (o, f, this)"
+ << "{"
+ << "}";
+
+ // Comparison operators.
+ //
+ if (options.generate_comparison ())
+ {
+ os << inl
+ << "bool" << endl
+ << "operator== (const " << name << "& x, " <<
+ "const " << name << "& y)"
+ << "{"
+ << "const " << base_type << "& bx (x);"
+ << "return bx == y;"
+ << "}";
+
+ os << inl
+ << "bool" << endl
+ << "operator!= (const " << name << "& x, " <<
+ "const " << name << "& y)"
+ << "{"
+ << "return !(x == y);"
+ << "}";
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ String const& base (xs_string_type);
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ if (options.generate_default_ctor ())
+ {
+ // c-tor ()
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " ()" << endl
+ << ": " << base << " ()"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (const char*)
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << char_type << "* s)" << endl
+ << ": " << base << " (s)"
+ << "{"
+ << "}";
+
+ // c-tor (string const&)
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << string_type << "& s)" << endl
+ << ": " << base << " (s)"
+ << "{"
+ << "}";
+
+ // copy c-tor ()
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << name << "& o," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (o, f, c)"
+ << "{"
+ << "}";
+ }
+ };
+
+ // Enumeration
+ //
+
+ // Generate a sequence of explicit c-tor calls until we reach
+ // one of the fundamental string types that can be constructed
+ // from char literals.
+ //
+ struct CtorCallSequence: Traversal::Complex,
+ Traversal::Fundamental::Type,
+ Context
+ {
+ CtorCallSequence (Context& c, String const& arg)
+ : Context (c), arg_ (arg), base_type_name_ (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ // This type should be ultimately string based.
+ //
+ assert (c.inherits_p ());
+
+ os << ename (c) << " (" << endl;
+
+ dispatch (c.inherits ().base ());
+
+ os << ")";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Type& t)
+ {
+ base_type_name_.dispatch (t);
+
+ os << " (" << arg_ << ")";
+ }
+
+ private:
+ String arg_;
+ BaseTypeName base_type_name_;
+ };
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c), member_ (c)
+ {
+ inherits_member_ >> member_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ bool enum_based (false);
+ if (string_based)
+ {
+ SemanticGraph::Enumeration* be (0);
+ IsEnumBasedType t (be);
+ t.dispatch (e);
+
+ enum_based = (be != 0);
+ }
+
+ String value;
+ if (string_based)
+ value = evalue (e);
+
+ // Get to the ultimate base and see if is a fundamental type.
+ //
+ bool fund_based (false);
+ SemanticGraph::Type& ult_base (ultimate_base (e));
+ {
+ IsFundamentalType t (fund_based);
+ t.dispatch (ult_base);
+ }
+
+ //
+ //
+ String base; // base type name
+ {
+ std::wostringstream o;
+
+ BaseTypeName base_type (*this, o);
+ Traversal::Inherits inherits_type (base_type);
+
+ inherits (e, inherits_type);
+ base = o.str ();
+ }
+
+ os << "// " << name << endl
+ << "// " << endl
+ << endl;
+
+ // default c-tor
+ //
+ bool list_based (
+ ult_base.is_a<SemanticGraph::List> () ||
+ ult_base.is_a<SemanticGraph::Fundamental::NameTokens> () ||
+ ult_base.is_a<SemanticGraph::Fundamental::IdRefs> () ||
+ ult_base.is_a<SemanticGraph::Fundamental::Entities> ());
+
+ if (options.generate_default_ctor () || list_based)
+ {
+ os << inl
+ << name << "::" << endl
+ << name << " ()" << endl
+ << ": " << base << " ()"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (value)
+ //
+ if (string_based)
+ {
+ os << inl
+ << name << "::" << endl
+ << name << " (" << value << " v)" << endl
+ << ": ";
+
+ // If we are enum-based then we can just use the corresponding
+ // base c-tor directly. Otherwise we will use the from-string
+ // c-tor.
+ //
+ if (enum_based)
+ os << base << " (v)";
+ else
+ {
+ CtorCallSequence t (*this, L"_xsd_" + name + L"_literals_[v]");
+ t.dispatch (e.inherits ().base ());
+ }
+
+ os << "{"
+ << "}";
+ }
+
+ // c-tor (const char*)
+ //
+ if (string_based)
+ {
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << char_type << "* v)" << endl
+ << ": " << base << " (v)"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (const std::string&)
+ //
+ if (string_based)
+ {
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << string_type << "& v)" << endl
+ << ": " << base << " (v)"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (fundamental)
+ //
+ if (fund_based)
+ {
+ os << inl
+ << name << "::" << endl
+ << name << " (";
+
+ member_.dispatch (ult_base);
+
+ os << " v)"
+ << ": " << base << " (v)"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (base)
+ //
+ // If the ultimate is also our immediate base and it is a
+ // fundamental type then this c-tor clashes with c-tor
+ // (fundamental) above.
+ //
+ if (!fund_based || &ult_base != &e.inherits ().base ())
+ {
+ os << inl
+ << name << "::" << endl
+ << name << " (const ";
+
+ inherits (e, inherits_member_);
+
+ os << "& v)" << endl
+ << ": " << base << " (v)"
+ << "{"
+ << "}";
+ }
+
+ // copy c-tor
+ //
+ os << inl
+ << name << "::" << endl
+ << name << " (const " << name << "& v," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (v, f, c)"
+ << "{"
+ << "}";
+
+ // operato= (value)
+ //
+ if (string_based)
+ {
+ os << inl
+ << name << "& " << name << "::" << endl
+ << "operator= (" << value << " v)"
+ << "{"
+ << "static_cast< " << base << "& > (*this) = ";
+
+ // If we are enum-based then we can just use the corresponding
+ // base assignment directly. Otherwise we will use the from-
+ // base assignment and a from-string base c-tor.
+ //
+ if (enum_based)
+ os << "v";
+ else
+ {
+ os << endl;
+
+ CtorCallSequence t (*this, L"_xsd_" + name + L"_literals_[v]");
+ t.dispatch (e.inherits ().base ());
+ }
+
+ os << ";"
+ << endl
+ << "return *this;"
+ << "}";
+ }
+
+ os << endl;
+ }
+
+ private:
+ Traversal::Inherits inherits_member_;
+ MemberTypeName member_;
+ };
+
+ struct Member: Traversal::Member, Context
+ {
+ Member (Context& c, String const& scope)
+ : Context (c), scope_ (scope), lit_value_ (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& aname (eaname (m));
+ String const& mname (emname (m));
+ String const& member (emember (m));
+
+ bool fund (false);
+ {
+ IsFundamentalType t (fund);
+ t.dispatch (m.type ());
+ }
+
+ bool def_attr (m.default_p () &&
+ m.is_a<SemanticGraph::Attribute> ());
+
+ if (max (m) != 1)
+ {
+ // sequence
+ //
+ String container (econtainer (m));
+ String q_container (scope_ + L"::" + container);
+
+ // container const&
+ // name () const;
+ //
+ os << inl
+ << "const " << q_container << "& " << scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // container&
+ // name ();
+ //
+ os << inl
+ << q_container << "& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // void
+ // name (container const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << container << "& s)"
+ << "{"
+ << "this->" << member << " = s;"
+ << "}";
+ }
+ else if (min (m) == 0 && !def_attr)
+ {
+ // optional
+ //
+ String type (etype (m));
+ String container (econtainer (m));
+ String q_container (scope_ + L"::" + container);
+
+ // container const&
+ // name () const;
+ //
+ os << inl
+ << "const " << q_container << "& " << scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // container&
+ // name ();
+ //
+ os << inl
+ << q_container << "& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // void
+ // name (type const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << type << "& x)"
+ << "{"
+ << "this->" << member << ".set (x);"
+ << "}";
+
+ // void
+ // name (container const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << container << "& x)"
+ << "{"
+ << "this->" << member << " = x;"
+ << "}";
+
+ // void
+ // name (auto_ptr<type>);
+ //
+ if (!fund)
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (" << auto_ptr << "< " << type << " > x)"
+ << "{"
+ << "this->" << member << ".set (" <<
+ (std >= cxx_version::cxx11 ? "std::move (x)" : "x") << ");"
+ << "}";
+ }
+ else
+ {
+ // one
+ //
+ String type (etype (m));
+ String q_type (scope_ + L"::" + type);
+
+ // type const&
+ // name () const;
+ //
+ os << inl
+ << "const " << q_type << "& " << scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ".get ();"
+ << "}";
+
+ // Do not generate modifiers for fixed attributes.
+ //
+ if (!(def_attr && m.fixed_p ()))
+ {
+ // type&
+ // name ();
+ //
+ os << inl
+ << q_type << "& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ".get ();"
+ << "}";
+
+ // void
+ // name (type const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << type << "& x)"
+ << "{"
+ << "this->" << member << ".set (x);"
+ << "}";
+
+ // void
+ // name (auto_ptr<type>);
+ //
+ if (!fund)
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (" << auto_ptr << "< " << type << " > x)"
+ << "{"
+ << "this->" << member << ".set (" <<
+ (std >= cxx_version::cxx11 ? "std::move (x)" : "x") << ");"
+ << "}";
+
+ // auto_ptr<type>
+ // detach_name ();
+ //
+ if (detach && !fund)
+ os << inl
+ << auto_ptr << "< " << q_type << " > " <<
+ scope_ << "::" << endl
+ << edname (m) << " ()"
+ << "{"
+ << "return this->" << member << ".detach ();"
+ << "}";
+ }
+ }
+
+
+ // default_value
+ //
+ if (m.default_p ())
+ {
+ bool simple (true);
+
+ if (m.is_a<SemanticGraph::Element> ())
+ {
+ IsSimpleType test (simple);
+ test.dispatch (m.type ());
+ }
+
+ if (simple)
+ {
+ String lit (lit_value_.dispatch (m.type (), m.value ()));
+
+ os << inl;
+
+ if (lit)
+ os << scope_ << "::" << etype (m) << " ";
+ else
+ os << "const " << scope_ << "::" << etype (m) << "& ";
+
+ os << scope_ << "::" << endl
+ << edefault_value (m) << " ()"
+ << "{";
+
+ if (lit)
+ os << "return " << etype (m) << " (" << lit << ");";
+ else
+ os << "return " << edefault_value_member (m) << ";";
+
+ os << "}";
+ }
+ }
+ }
+
+ private:
+ String scope_;
+ LiteralValue lit_value_;
+ };
+
+ struct Any: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ Any (Context& c, String const& scope)
+ : Context (c), scope_ (scope)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& aname (eaname (a));
+ String const& mname (emname (a));
+
+ String const& member (emember (a));
+
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ String container (econtainer (a));
+ String q_container (scope_ + L"::" + container);
+
+ // container const&
+ // name () const;
+ //
+ os << inl
+ << "const " << q_container << "& " << scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // container&
+ // name ();
+ //
+ os << inl
+ << q_container << "& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // void
+ // name (container const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << container << "& s)"
+ << "{"
+ << "this->" << member << " = s;"
+ << "}";
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ String container (econtainer (a));
+ String q_container (scope_ + L"::" + container);
+
+ // container const&
+ // name () const;
+ //
+ os << inl
+ << "const " << q_container << "& " << scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // container&
+ // name ();
+ //
+ os << inl
+ << q_container << "& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // void
+ // name (type const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << xerces_ns << "::DOMElement& e)"
+ << "{"
+ << "this->" << member << ".set (e);"
+ << "}";
+
+ // void
+ // name (type*);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (" << xerces_ns << "::DOMElement* e)"
+ << "{"
+ << "this->" << member << ".set (e);"
+ << "}";
+
+ // void
+ // name (container const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << container << "& x)"
+ << "{"
+ << "this->" << member << " = x;"
+ << "}";
+ }
+ else
+ {
+ // one
+ //
+
+ // type const&
+ // name () const;
+ //
+ os << inl
+ << "const " << xerces_ns << "::DOMElement& " <<
+ scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ".get ();"
+ << "}";
+
+ // type&
+ // name ();
+ //
+ os << inl
+ << xerces_ns << "::DOMElement& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ".get ();"
+ << "}";
+
+ // void
+ // name (type const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << xerces_ns << "::DOMElement& e)"
+ << "{"
+ << "this->" << member << ".set (e);"
+ << "}";
+
+ // void
+ // name (type*);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (" << xerces_ns << "::DOMElement* e)"
+ << "{"
+ << "this->" << member << ".set (e);"
+ << "}";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& aname (eaname (a));
+ String const& mname (emname (a));
+
+ String const& member (emember (a));
+ String container (econtainer (a));
+ String q_container (scope_ + L"::" + container);
+
+ // container const&
+ // name () const;
+ //
+ os << inl
+ << "const " << q_container << "& " << scope_ << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // container&
+ // name ();
+ //
+ os << inl
+ << q_container << "& " << scope_ << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ";"
+ << "}";
+
+ // void
+ // name (container const&);
+ //
+ os << inl
+ << "void " << scope_ << "::" << endl
+ << mname << " (const " << container << "& s)"
+ << "{"
+ << "this->" << member << " = s;"
+ << "}";
+ }
+
+ private:
+ String scope_;
+ };
+
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (c, name) && !name)
+ return;
+
+ os << "// " << name << endl
+ << "// " << endl
+ << endl;
+
+ // Generate accessors and modifiers.
+ //
+ Any any (*this, name);
+ Member member (*this, name);
+ Traversal::Names names;
+
+ if (options.generate_wildcard ())
+ names >> any;
+
+ names >> member;
+
+ Complex::names (c, names);
+
+ // Mixed text content.
+ //
+ if (mixed_p (c) && !c.context ().count ("mixed-in-base"))
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String const& cont (ctx.get<String> ("mixed-container"));
+ String const& memb (ctx.get<String> ("mixed-member"));
+
+ String const& aname (ctx.get<String> ("mixed-aname"));
+ String const& mname (ctx.get<String> ("mixed-mname"));
+
+ os << inl
+ << "const " << name << "::" << cont << "& " <<
+ name << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << memb << ";"
+ << "}";
+
+ os << inl
+ << name << "::" << cont << "& " << name << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << memb << ";"
+ << "}";
+
+ os << inl
+ << "void " << name << "::" << endl
+ << mname << " (const " << cont << "& s)"
+ << "{"
+ << "this->" << memb << " = s;"
+ << "}";
+ }
+
+ // dom_document accessors.
+ //
+ if (edom_document_member_p (c))
+ {
+ os << inl
+ << "const " << xerces_ns << "::DOMDocument& " <<
+ name << "::" << endl
+ << edom_document (c) << " () const"
+ << "{"
+ << "return *this->" << edom_document_member (c) << ";"
+ << "}";
+
+ os << inl
+ << xerces_ns << "::DOMDocument& " << name << "::" << endl
+ << edom_document (c) << " ()"
+ << "{"
+ << "return *this->" << edom_document_member (c) << ";"
+ << "}";
+ }
+
+ // Order container.
+ //
+ if (ordered_p (c) && !c.context ().count ("order-in-base"))
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String const& cont (ctx.get<String> ("order-container"));
+ String const& memb (ctx.get<String> ("order-member"));
+
+ String const& aname (ctx.get<String> ("order-aname"));
+ String const& mname (ctx.get<String> ("order-mname"));
+
+ os << inl
+ << "const " << name << "::" << cont << "& " <<
+ name << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << memb << ";"
+ << "}";
+
+ os << inl
+ << name << "::" << cont << "& " << name << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << memb << ";"
+ << "}";
+
+ os << inl
+ << "void " << name << "::" << endl
+ << mname << " (const " << cont << "& s)"
+ << "{"
+ << "this->" << memb << " = s;"
+ << "}";
+ }
+
+ os << endl;
+ }
+ };
+
+
+ struct GlobalElement: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ GlobalElement (Context& c)
+ : GlobalElementBase (c), Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (!doc_root_p (e))
+ return;
+
+ bool fund (false);
+ {
+ IsFundamentalType test (fund);
+ test.dispatch (e.type ());
+ }
+
+ String const& name (ename (e));
+
+ os << "// " << name << endl
+ << "// " << endl
+ << endl;
+
+ // Accessors/modifiers.
+ //
+ String const& type (etype (e));
+ String const& aname (eaname (e));
+ String const& mname (emname (e));
+ String const& member (emember (e));
+
+ // type const&
+ // name () const;
+ //
+ os << inl
+ << "const " << name << "::" << type << "& " << name << "::" << endl
+ << aname << " () const"
+ << "{"
+ << "return this->" << member << ".get ();"
+ << "}";
+
+ // type&
+ // name ();
+ //
+ os << inl
+ << name << "::" << type << "& " << name << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return this->" << member << ".get ();"
+ << "}";
+
+ // void
+ // name (type const&);
+ //
+ os << inl
+ << "void " << name << "::" << endl
+ << mname << " (const " << type << "& x)"
+ << "{"
+ << "this->" << member << ".set (x);"
+ << "}";
+
+ // void
+ // name (auto_ptr<type>);
+ //
+ if (!fund)
+ {
+ os << inl
+ << "void " << name << "::" << endl
+ << mname << " (" << auto_ptr << "< " << type << " > x)"
+ << "{"
+ << "this->" << member << ".set (" <<
+ (std >= cxx_version::cxx11 ? "std::move (x)" : "x") << ");"
+ << "}";
+ }
+
+ // auto_ptr<type>
+ // detach_name ();
+ //
+ if (detach && !fund)
+ os << inl
+ << auto_ptr << "< " << name << "::" << type << " > " <<
+ name << "::" << endl
+ << edname (e) << " ()"
+ << "{"
+ << "return this->" << member << ".detach ();"
+ << "}";
+ }
+ };
+ }
+
+ void
+ generate_tree_inline (Context& ctx, size_t first, size_t last)
+ {
+ // Generate includes.
+ //
+ if (ctx.options.generate_inline ())
+ {
+ Traversal::Schema schema;
+ Includes includes (ctx, Includes::inline_);
+
+ schema >> includes;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ else
+ {
+ // Emit "weak" header includes that are used in the file-per-type
+ // compilation model.
+ //
+ Traversal::Schema schema;
+ Includes includes (ctx, Includes::source);
+
+ schema >> includes;
+
+ schema.dispatch (ctx.schema_root);
+ }
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names names_ns, names;
+ Namespace ns (ctx, first, last);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+ GlobalElement element (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+
+ if (ctx.options.generate_element_type ())
+ names >> element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/tree-inline.hxx b/xsd/xsd/cxx/tree/tree-inline.hxx
new file mode 100644
index 0000000..dad4c24
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-inline.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/tree-inline.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_TREE_INLINE_HXX
+#define XSD_CXX_TREE_TREE_INLINE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_tree_inline (Context&, size_t first, size_t last);
+ }
+}
+
+#endif // XSD_CXX_TREE_TREE_INLINE_HXX
diff --git a/xsd/xsd/cxx/tree/tree-source.cxx b/xsd/xsd/cxx/tree/tree-source.cxx
new file mode 100644
index 0000000..00e895b
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-source.cxx
@@ -0,0 +1,3900 @@
+// file : xsd/cxx/tree/tree-source.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <map>
+#include <list>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/tree/tree-source.hxx>
+#include <xsd/cxx/tree/default-value.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ struct List: Traversal::List, Context
+ {
+ List (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& l)
+ {
+ String name (ename (l));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (l, name) && !name)
+ return;
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ if (!options.suppress_parsing ())
+ {
+ SemanticGraph::Type& item_type (l.argumented ().type ());
+ String base (L"::xsd::cxx::tree::list< " +
+ item_type_name (item_type) + L", " + char_type);
+
+ if (item_type.is_a<SemanticGraph::Fundamental::Double> ())
+ base += L", ::xsd::cxx::tree::schema_type::double_";
+ else if (item_type.is_a<SemanticGraph::Fundamental::Decimal> ())
+ base += L", ::xsd::cxx::tree::schema_type::decimal";
+
+ base += L" >";
+
+ // c-tor (xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << any_simple_type << " (e, f, c)," << endl
+ << " " << base << " (e, f, this)"
+ << "{"
+ << "}";
+
+ // c-tor (xercesc::DOMAttr)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << any_simple_type << " (a, f, c)," << endl
+ << " " << base << " (a, f, this)"
+ << "{"
+ << "}";
+
+ // c-tor (string const&, xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << any_simple_type << " (s, e, f, c)," << endl
+ << " " << base << " (s, e, f, this)"
+ << "{"
+ << "}";
+ }
+
+ // _clone
+ //
+ os << name << "* " << name << "::" << endl
+ << "_clone (" << flags_type << " f," << endl
+ << container << "* c) const"
+ << "{"
+ << "return new class " << name << " (*this, f, c);"
+ << "}";
+
+ // d-tor
+ //
+ os << name << "::" << endl
+ << "~" << name << " ()"
+ << "{"
+ << "}";
+
+ // Register with type factory map.
+ //
+ if (polymorphic && polymorphic_p (l))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (l));
+
+ // If this type is anonymous but substitutes, then it will
+ // be registered as part of the substitution registration.
+ //
+ if (!anonymous_p (l) && !options.suppress_parsing ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_factory_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_factory_init (" << endl
+ << strlit (l.name ()) << "," << endl
+ << strlit (xml_ns_name (l)) << ");"
+ << endl;
+ }
+
+ if ((!anonymous_p (l) || anonymous_substitutes_p (l)) &&
+ options.generate_comparison ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::comparison_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_comparison_init;"
+ << endl;
+ }
+ }
+ }
+
+ private:
+ String
+ item_type_name (SemanticGraph::Type& t)
+ {
+ std::wostringstream o;
+
+ MemberTypeName type (*this, o);
+ type.dispatch (t);
+
+ return o.str ();
+ }
+ };
+
+
+ struct Union: Traversal::Union, Context
+ {
+ Union (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& u)
+ {
+ String name (ename (u));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (u, name) && !name)
+ return;
+
+ String const& base (xs_string_type);
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (e, f, c)"
+ << "{"
+ << "}";
+
+ // c-tor (xercesc::DOMAttr)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (a, f, c)"
+ << "{"
+ << "}";
+
+ // c-tor (string const&, xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (s, e, f, c)"
+ << "{"
+ << "}";
+ }
+
+ // _clone
+ //
+ os << name << "* " << name << "::" << endl
+ << "_clone (" << flags_type << " f," << endl
+ << container << "* c) const"
+ << "{"
+ << "return new class " << name << " (*this, f, c);"
+ << "}";
+
+ // Register with type factory map.
+ //
+ if (polymorphic && polymorphic_p (u))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (u));
+
+ // If this type is anonymous but substitutes, then it will
+ // be registered as part of the substitution registration.
+ //
+ if (!anonymous_p (u) && !options.suppress_parsing ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_factory_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_factory_init (" << endl
+ << strlit (u.name ()) << "," << endl
+ << strlit (xml_ns_name (u)) << ");"
+ << endl;
+ }
+
+ if ((!anonymous_p (u) || anonymous_substitutes_p (u)) &&
+ options.generate_comparison ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::comparison_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_comparison_init;"
+ << endl;
+ }
+ }
+ }
+ };
+
+
+ // Enumeration mapping.
+ //
+
+ struct EnumeratorLiteral: Traversal::Enumerator, Context
+ {
+ EnumeratorLiteral (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ os << strlit (e.name ());
+ }
+ };
+
+
+ //
+ //
+ struct LiteralInfo
+ {
+ LiteralInfo (String const& value, String const& name)
+ : value_ (value), name_ (name)
+ {
+ }
+
+ String value_;
+ String name_;
+ };
+
+ bool
+ operator< (LiteralInfo const& x, LiteralInfo const& y)
+ {
+ return x.value_ < y.value_;
+ }
+
+ typedef list<LiteralInfo> LiteralInfoList;
+
+
+ // Populate LiteralInfoList
+ //
+ struct EnumeratorLiteralInfo: Traversal::Enumerator, Context
+
+ {
+ EnumeratorLiteralInfo (Context& c, LiteralInfoList& list)
+ : Context (c), list_ (list)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ list_.push_back (LiteralInfo (e.name (), ename (e)));
+ }
+
+ private:
+ LiteralInfoList& list_;
+ };
+
+
+ struct Enumeration: Traversal::Enumeration, Context
+ {
+ Enumeration (Context& c)
+ : Context (c), enumerator_literal_ (c)
+ {
+ names_enumerator_literal_ >> enumerator_literal_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ String name (ename (e));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ if (renamed_type (e, name) && !name)
+ return;
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (e);
+ }
+
+ SemanticGraph::Enumeration* be (0);
+ bool enum_based (false);
+ if (string_based)
+ {
+ IsEnumBasedType t (be);
+ t.dispatch (e);
+
+ enum_based = (be != 0);
+ }
+
+ String value;
+ if (string_based)
+ value = evalue (e);
+
+ size_t enum_count (0);
+
+ for (Type::NamesIterator i (e.names_begin ()), end (e.names_end ());
+ i != end; ++i)
+ ++enum_count;
+
+ String base; // base type name
+ {
+ std::wostringstream o;
+
+ BaseTypeName base_type (*this, o);
+ Traversal::Inherits inherits_type (base_type);
+
+ inherits (e, inherits_type);
+ base = o.str ();
+ }
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (e, f, c)"
+ << "{";
+
+ if (string_based)
+ os << "_xsd_" << name << "_convert ();";
+
+ os << "}";
+
+
+ // c-tor (xercesc::DOMAttr)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (a, f, c)"
+ << "{";
+
+ if (string_based)
+ {
+ os << "_xsd_" << name << "_convert ();";
+ }
+
+ os << "}";
+
+
+ // c-tor (string const&, xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (s, e, f, c)"
+ << "{";
+
+ if (string_based)
+ {
+ os << "_xsd_" << name << "_convert ();";
+ }
+
+ os << "}";
+ }
+
+ // _clone
+ //
+ os << name << "* " << name << "::" << endl
+ << "_clone (" << flags_type << " f," << endl
+ << container << "* c) const"
+ << "{"
+ << "return new class " << name << " (*this, f, c);"
+ << "}";
+
+ // convert
+ //
+ // @@ TODO: expected list
+ //
+ if (string_based)
+ {
+ String i_name (L"_xsd_" + name + L"_indexes_");
+
+ os << name << "::" << value << " " <<
+ name << "::" << endl
+ << "_xsd_" << name << "_convert () const"
+ << "{"
+ << "::xsd::cxx::tree::enum_comparator< " << char_type <<
+ " > c (_xsd_" << name << "_literals_);"
+ << "const " << value << "* i (::std::lower_bound (" << endl
+ << i_name << "," << endl
+ << i_name << " + " << enum_count << "," << endl
+ << "*this," << endl
+ << "c));"
+ << endl
+ << "if (i == " << i_name << " + " << enum_count << " || " <<
+ "_xsd_" << name << "_literals_[*i] != *this)"
+ << "{"
+ << "throw ::xsd::cxx::tree::unexpected_enumerator < " <<
+ char_type << " > (*this);"
+ << "}"
+ << "return *i;"
+ << "}";
+ }
+
+ // literals and indexes
+ //
+ if (string_based)
+ {
+ if (enum_based)
+ {
+ os << "const " << char_type << "* const* " << name << "::" << endl
+ << "_xsd_" << name << "_literals_ = " <<
+ fq_name (*be) << "::_xsd_" << ename (*be) << "_literals_;"
+ << endl;
+ }
+ else
+ {
+ os << "const " << char_type << "* const " << name << "::" << endl
+ << "_xsd_" << name << "_literals_[" << enum_count << "] ="
+ << "{";
+
+ names<Enumeration> (
+ e, names_enumerator_literal_, 0, 0, 0, &Enumeration::comma);
+
+ os << "};";
+ }
+
+
+ LiteralInfoList l;
+ {
+ EnumeratorLiteralInfo enumerator (*this, l);
+ Traversal::Names names_enumerator (enumerator);
+ names (e, names_enumerator);
+ }
+
+ l.sort ();
+
+ os << "const " << name << "::" << value << " " <<
+ name << "::" << endl
+ << "_xsd_" << name << "_indexes_[" << enum_count << "] ="
+ << "{";
+
+ String fq_name (ns_scope + L"::" + name);
+
+ for (LiteralInfoList::iterator
+ b (l.begin ()), i (b), end (l.end ()); i != end; ++i)
+ {
+ if (i != b)
+ os << "," << endl;
+
+ os << fq_name << "::" << i->name_;
+ }
+
+ os << "};";
+ }
+
+ // Register with type factory map.
+ //
+ if (polymorphic && polymorphic_p (e))
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (e));
+
+ // If this type is anonymous but substitutes, then it will
+ // be registered as part of the substitution registration.
+ //
+ if (!anonymous_p (e) && !options.suppress_parsing ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_factory_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_factory_init (" << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (xml_ns_name (e)) << ");"
+ << endl;
+ }
+
+ if ((!anonymous_p (e) || anonymous_substitutes_p (e)) &&
+ options.generate_comparison ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::comparison_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_comparison_init;"
+ << endl;
+ }
+ }
+ }
+
+ virtual void
+ comma (Type&)
+ {
+ os << "," << endl;
+ }
+
+ private:
+ Traversal::Names names_enumerator_literal_;
+ EnumeratorLiteral enumerator_literal_;
+
+ };
+
+ //
+ //
+ struct Member: Traversal::Member, Context
+ {
+ Member (Context& c, String const& scope)
+ : Context (c), scope_ (scope), init_value_ (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ // default_value
+ //
+ if (m.default_p ())
+ {
+ SemanticGraph::Type& t (m.type ());
+ bool simple (true);
+
+ if (m.is_a<SemanticGraph::Element> ())
+ {
+ IsSimpleType test (simple);
+ test.dispatch (t);
+ }
+
+ if (simple)
+ {
+ bool lit (false);
+ {
+ IsLiteralValue test (lit);
+ test.dispatch (t);
+ }
+
+ if (!lit)
+ {
+ InitKind::Kind kind (InitKind::simple);
+ {
+ InitKind test (kind);
+ test.dispatch (t);
+ }
+
+ String const& member (edefault_value_member (m));
+
+ String init_name;
+
+ switch (kind)
+ {
+ case InitKind::data:
+ {
+ init_name = escape (L"_xsd_" + scope_ + member + L"data");
+ init_value_.data (init_name);
+ init_value_.dispatch (t, m.value ());
+ break;
+ }
+ case InitKind::function:
+ {
+ init_name = escape (L"_xsd_" + scope_ + member + L"init");
+
+ os << "static " << scope_ << "::" << etype (m) << endl
+ << init_name << " ()"
+ << "{"
+ << scope_ << "::" << etype (m) << " r;"
+ << endl;
+
+ init_value_.dispatch (t, m.value ());
+
+ os << "return r;"
+ << "};";
+ break;
+ }
+ case InitKind::simple:
+ break;
+ }
+
+ os << "const " << scope_ << "::" << etype (m) << " " <<
+ scope_ << "::" << member << " (" << endl;
+
+ switch (kind)
+ {
+ case InitKind::data:
+ {
+ // Second dispatch.
+ //
+ init_value_.dispatch (t, m.value ());
+ break;
+ }
+ case InitKind::function:
+ {
+ os << init_name << " ()";
+ break;
+ }
+ case InitKind::simple:
+ {
+ init_value_.dispatch (t, m.value ());
+ break;
+ }
+ }
+
+ os << ");"
+ << endl;
+ }
+ }
+ }
+ }
+
+ private:
+ String scope_;
+ InitValue init_value_;
+ };
+
+
+ struct Element: Traversal::Element, Context
+ {
+ Element (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (e.scope ()));
+
+ String const& member (emember (e));
+
+ String tr (etraits (e)); // traits type name
+ String type (etype (e));
+
+ SemanticGraph::Type& t (e.type ());
+
+ bool fund (false);
+ {
+ IsFundamentalType traverser (fund);
+ traverser.dispatch (t);
+ }
+
+ // Check if we need to handle xsi:type and substitution groups.
+ // If this element's type is anonymous then we don't need to do
+ // anything. Note that if the type is anonymous then it can't be
+ // derived from which makes it impossible to substitute or
+ // dynamically-type with xsi:type.
+ //
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ os << "// " << comment (e.name ()) << endl
+ << "//" << endl;
+
+ if (poly)
+ {
+ os << "{"
+ << auto_ptr << "< ::xsd::cxx::tree::type > tmp (" << endl
+ << "::xsd::cxx::tree::type_factory_map_instance< " <<
+ poly_plate << ", " << char_type << " > ().create (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (e.qualified_p ()
+ ? strlit (e.namespace_ ().name ())
+ : L + String ("\"\"")) << "," << endl;
+
+ SemanticGraph::Complex* tc;
+ if ((tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
+ tc->abstract_p ())
+ os << "0,";
+ else
+ os << "&::xsd::cxx::tree::factory_impl< " << type << " >,";
+
+ os << endl
+ << (e.global_p () ? "true" : "false") << ", " <<
+ (e.qualified_p () ? "true" : "false") << ", " <<
+ "i, n, f, this));"
+ << endl
+ << "if (tmp.get () != 0)"
+ << "{";
+ }
+ else
+ {
+ if (e.qualified_p () && e.namespace_ ().name ())
+ {
+ os << "if (n.name () == " << strlit (e.name ()) << " && " <<
+ "n.namespace_ () == " << strlit (e.namespace_ ().name ()) << ")"
+ << "{";
+ }
+ else
+ {
+ os << "if (n.name () == " << strlit (e.name ()) << " && " <<
+ "n.namespace_ ().empty ())"
+ << "{";
+ }
+
+ if (!fund)
+ {
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << tr << "::create (i, f";
+
+ if (t.is_a<SemanticGraph::AnyType> () &&
+ options.generate_any_type ())
+ os << " | " << flags_type << "::extract_content";
+
+ os << ", this));"
+ << endl;
+ }
+ }
+
+
+ // Checks. Disabled at the moment since they make it impossible to
+ // parse valid instances where the same element is used in both
+ // base and derived types. See the cxx/tree/name-clash/inheritance
+ // test for details.
+ //
+ //
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "if (!this->" << member << ")"
+ << "{";
+ }
+ else
+ {
+ // one
+ //
+ os << "if (!" << member << ".present ())"
+ << "{";
+ }
+
+
+ if (poly || !fund)
+ {
+ if (poly)
+ {
+ // Cast to static type.
+ //
+ os << auto_ptr << "< " << type << " > r (" << endl
+ << "dynamic_cast< " << type << "* > (tmp.get ()));"
+ << endl
+ << "if (r.get ())" << endl
+ << "tmp.release ();"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::not_derived< " << char_type <<
+ " > ();"
+ << endl;
+ }
+
+ char const* r (std >= cxx_version::cxx11 ? "::std::move (r)" : "r");
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ os << "this->" << member << ".push_back (" << r << ");";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "this->" << member << ".set (" << r << ");";
+ }
+ else
+ {
+ // one
+ //
+ os << "this->" << member << ".set (" << r << ");";
+ }
+ }
+ else
+ {
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ os << "this->" << member << ".push_back (" << tr <<
+ "::create (i, f, this));";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "this->" << member << ".set (" << tr <<
+ "::create (i, f, this));";
+ }
+ else
+ {
+ // one
+ //
+ os << "this->" << member << ".set (" << tr <<
+ "::create (i, f, this));";
+ }
+ }
+
+ // Capture order.
+ //
+ if (ordered_p (c))
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String const& t (ctx.get<String> ("order-type"));
+ String const& m (ctx.get<String> ("order-member"));
+
+ os << "this->" << m << ".push_back (" << endl
+ << t << " (" <<
+ e.context ().get<String> ("ordered-id-name");
+
+ // sequence
+ //
+ if (max (e) != 1)
+ os << ", " << "this->" << member << ".size () - 1";
+
+ os << "));";
+ }
+
+ os << "continue;";
+
+ // End of check block.
+ //
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "}";
+ }
+ else
+ {
+ // one
+ //
+ os << "}";
+ }
+
+ os << "}"; // if block
+
+ if (poly)
+ os << "}";
+ }
+ };
+
+ struct ElementTest: Traversal::Element, Context
+ {
+ ElementTest (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ if (skip (e))
+ return;
+
+ if (max (e) == 1 && min (e) == 1)
+ {
+ // one
+ //
+ os << "if (!" << emember (e) << ".present ())"
+ << "{"
+ << "throw ::xsd::cxx::tree::expected_element< " <<
+ char_type << " > (" << endl
+ << strlit (e.name ()) << "," << endl
+ << (e.qualified_p ()
+ ? strlit (e.namespace_ ().name ())
+ : L + String ("\"\"")) << ");"
+ << "}";
+ }
+ }
+ };
+
+ struct Any: Traversal::Any, Context
+ {
+ Any (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& member (emember (a));
+
+ SemanticGraph::Complex& c (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ()));
+
+ String const& ns (a.definition_namespace ().name ());
+ String const& dom_doc (edom_document (c));
+
+ os << "// " << ename (a) << endl
+ << "//" << endl
+ << "if (";
+
+ for (SemanticGraph::Any::NamespaceIterator i (a.namespace_begin ()),
+ e (a.namespace_end ()); i != e;)
+ {
+ if (*i == L"##any")
+ {
+ os << "true";
+ }
+ else if (*i == L"##other")
+ {
+ if (ns)
+ {
+ // Note that here I assume that ##other does not include
+ // unqualified names in a schema with target namespace.
+ // This is not what the spec says but that seems to be
+ // the consensus.
+ //
+ os << "(!n.namespace_ ().empty () && " <<
+ "n.namespace_ () != " << strlit (ns) << ")";
+ }
+ else
+ os << "!n.namespace_ ().empty ()";
+ }
+ else if (*i == L"##local")
+ {
+ os << "n.namespace_ ().empty ()";
+ }
+ else if (*i == L"##targetNamespace")
+ {
+ os << "n.namespace_ () == " << strlit (ns);
+ }
+ else
+ {
+ os << "n.namespace_ () == " << strlit (*i);
+ }
+
+ if (++i != e)
+ os << " ||" << endl;
+ }
+
+ os << ")"
+ << "{";
+
+
+ // Checks.
+ //
+ //
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ os << "if (!this->" << member << ")"
+ << "{";
+ }
+ else
+ {
+ // one
+ //
+ os << "if (!" << member << ".present ())"
+ << "{";
+ }
+
+ os << xerces_ns << "::DOMElement* r (" << endl
+ << "static_cast< " << xerces_ns << "::DOMElement* > (" << endl
+ << "this->" << dom_doc << " ().importNode (" << endl
+ << "const_cast< " << xerces_ns << "::DOMElement* > (&i), true)));";
+
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ os << "this->" << member << ".push_back (r);";
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ os << "this->" << member << ".set (r);";
+ }
+ else
+ {
+ // one
+ //
+ os << "this->" << member << ".set (r);";
+ }
+
+ // Capture order.
+ //
+ if (ordered_p (c))
+ {
+ SemanticGraph::Context& ctx (c.context ());
+
+ String const& t (ctx.get<String> ("order-type"));
+ String const& m (ctx.get<String> ("order-member"));
+
+ os << "this->" << m << ".push_back (" << endl
+ << t << " (" <<
+ a.context ().get<String> ("ordered-id-name") << ", ";
+
+ if (max (a) != 1)
+ // sequence
+ //
+ os << "this->" << member << ".size () - 1";
+ else
+ // optional & one
+ //
+ os << "0";
+
+ os << "));";
+ }
+
+ os << "continue;";
+
+ // End of check block.
+ //
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ os << "}";
+ }
+ else
+ {
+ // one
+ //
+ os << "}";
+ }
+
+ os << "}"; // if block
+ }
+ };
+
+ struct AnyTest: Traversal::Any, Context
+ {
+ AnyTest (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ if (max (a) == 1 && min (a) == 1)
+ {
+ // one
+ //
+ os << "if (!" << emember (a) << ".present ())"
+ << "{"
+ << "throw ::xsd::cxx::tree::expected_element< " <<
+ char_type << " > (" << endl
+ << L << "\"*\"," << endl
+ << strlit (*a.namespace_begin ()) << ");"
+ << "}";
+ }
+ }
+ };
+
+ struct Attribute: Traversal::Attribute, Context
+ {
+ Attribute (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& member (emember (a));
+
+ String const& tr (etraits (a)); // traits type name
+
+ if (a.qualified_p () && a.namespace_ ().name ())
+ {
+ os << "if (n.name () == " << strlit (a.name ()) << " && " <<
+ "n.namespace_ () == " << strlit (a.namespace_ ().name ()) << ")"
+ << "{";
+ }
+ else
+ {
+ os << "if (n.name () == " << strlit (a.name ()) << " && " <<
+ "n.namespace_ ().empty ())"
+ << "{";
+ }
+
+ os << "this->" << member << ".set (" << tr <<
+ "::create (i, f, this));";
+
+ os << "continue;"
+ << "}";
+
+ }
+ };
+
+ struct AnyAttribute: Traversal::AnyAttribute, Context
+ {
+ AnyAttribute (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& member (emember (a));
+
+ String const& ns (a.definition_namespace ().name ());
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "// " << ename (a) << endl
+ << "//" << endl
+ << "if (";
+
+ // Note that we need to filter out namespaces for xmlns and
+ // xsi.
+ //
+ for (SemanticGraph::Any::NamespaceIterator i (a.namespace_begin ()),
+ e (a.namespace_end ()); i != e;)
+ {
+ if (*i == L"##any")
+ {
+ os << "(n.namespace_ () != " <<
+ "::xsd::cxx::xml::bits::xmlns_namespace< " << char_type <<
+ " > () &&" << endl
+ << "n.namespace_ () != " <<
+ "::xsd::cxx::xml::bits::xsi_namespace< " << char_type <<
+ " > ())";
+ }
+ else if (*i == L"##other")
+ {
+ if (ns)
+ {
+ // Note that here I assume that ##other does not include
+ // unqualified names in a schema with target namespace.
+ // This is not what the spec says but that seems to be
+ // the consensus.
+ //
+ os << "(!n.namespace_ ().empty () &&" << endl
+ << "n.namespace_ () != " << strlit (ns) << " &&" <<endl
+ << "n.namespace_ () != " <<
+ "::xsd::cxx::xml::bits::xmlns_namespace< " << char_type <<
+ " > () &&" << endl
+ << "n.namespace_ () != " <<
+ "::xsd::cxx::xml::bits::xsi_namespace< " << char_type <<
+ " > ())";
+ }
+ else
+ os << "(!n.namespace_ ().empty () &&" << endl
+ << "n.namespace_ () != " <<
+ "::xsd::cxx::xml::bits::xmlns_namespace< " << char_type <<
+ " > () &&" << endl
+ << "n.namespace_ () != " <<
+ "::xsd::cxx::xml::bits::xsi_namespace< " << char_type <<
+ " > ())";
+ }
+ else if (*i == L"##local")
+ {
+ os << "n.namespace_ ().empty ()";
+ }
+ else if (*i == L"##targetNamespace")
+ {
+ os << "n.namespace_ () == " << strlit (ns);
+ }
+ else
+ {
+ os << "n.namespace_ () == " << strlit (*i);
+ }
+
+ if (++i != e)
+ os << " ||" << endl;
+ }
+
+ os << ")"
+ << "{"
+ << xerces_ns << "::DOMAttr* r (" << endl
+ << "static_cast< " << xerces_ns << "::DOMAttr* > (" << endl
+ << "this->" << dom_doc << " ().importNode (" << endl
+ << "const_cast< " << xerces_ns << "::DOMAttr* > (&i), true)));"
+ << "this->" << member << " .insert (r);"
+ << "continue;"
+ << "}";
+ }
+ };
+
+
+ struct AttributeTest: Traversal::Attribute, Context
+ {
+ AttributeTest (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& a)
+ {
+ String const& member (emember (a));
+
+ if (!a.optional_p () || a.default_p ())
+ {
+ os << "if (!" << member << ".present ())"
+ << "{";
+
+ if (a.default_p ())
+ {
+ os << "this->" << member << ".set (" <<
+ edefault_value (a) << " ());";
+ }
+ else
+ os << "throw ::xsd::cxx::tree::expected_attribute< " <<
+ char_type << " > (" << endl
+ << strlit (a.name ()) << "," << endl
+ << (a.qualified_p ()
+ ? strlit (a.namespace_ ().name ())
+ : L + String ("\"\"")) << ");";
+
+ os << "}";
+ }
+ }
+ };
+
+
+ //
+ //
+ struct CtorBase: Traversal::Complex,
+ Traversal::Enumeration,
+ Traversal::Type,
+ Context
+ {
+ // If base_arg is empty then no base argument is generated.
+ //
+ CtorBase (Context& c, CtorArgType at, String const& base_arg)
+ : Context (c), args_ (c, at, base_arg)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type&)
+ {
+ if (args_.base_arg_)
+ os << args_.base_arg_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Enumeration&)
+ {
+ if (args_.base_arg_)
+ os << args_.base_arg_;
+ }
+
+ void
+ traverse (SemanticGraph::Complex& c)
+ {
+ args_.traverse (c);
+ }
+
+ private:
+ // No need to traverse AnyAttribute since it is always mapped
+ // to a sequence.
+ //
+ struct Args: Traversal::Complex,
+ Traversal::Enumeration,
+ Traversal::Type,
+ Traversal::Any,
+ Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ Args (Context& c, CtorArgType at, String const& base_arg)
+ : Context (c),
+ arg_type_ (at), base_arg_ (base_arg), first_ (true)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type&)
+ {
+ if (base_arg_)
+ os << comma () << base_arg_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Enumeration&)
+ {
+ if (base_arg_)
+ os << comma () << base_arg_;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ if (!options.generate_wildcard ())
+ return;
+
+ if (min (a) == 1 && max (a) == 1)
+ {
+ // one
+ //
+ os << comma () << ename (a);
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (!skip (e) && min (e) == 1 && max (e) == 1)
+ {
+ // one
+ //
+ bool move (false);
+
+ if (std >= cxx_version::cxx11)
+ {
+ switch (arg_type_)
+ {
+ case CtorArgType::complex_auto_ptr:
+ {
+ bool simple (true);
+ IsSimpleType t (simple);
+ t.dispatch (e.type ());
+ move = !simple;
+ break;
+ }
+ case CtorArgType::poly_auto_ptr:
+ {
+ move = polymorphic && polymorphic_p (e.type ());
+ break;
+ }
+ case CtorArgType::type:
+ break;
+ }
+ }
+
+ os << comma () << (move ? "std::move (" : "") << ename (e) <<
+ (move ? ")" : "");
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ // Note that we are not including attributes with default
+ // or required fixed values here.
+ //
+ if (min (a) == 1 && !a.fixed_p ())
+ {
+ // one
+ //
+ os << comma () << ename (a);
+ }
+ }
+
+ using Complex::traverse;
+
+ private:
+ String
+ comma ()
+ {
+ bool tmp (first_);
+ first_ = false;
+ return tmp ? "" : ",\n";
+ }
+
+ public:
+ CtorArgType arg_type_;
+ String base_arg_;
+
+ private:
+ bool first_;
+
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+ };
+
+ Args args_;
+ };
+
+
+ struct CtorMember: Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ CtorMember (Context& c, CtorArgType at)
+ : Context (c), arg_type_ (at)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ String const& member (emember (e));
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ os << "," << endl
+ << " " << member << " (this)";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ os << "," << endl
+ << " " << member << " (this)";
+ }
+ else
+ {
+ // one
+ //
+ bool move (false);
+
+ if (std >= cxx_version::cxx11)
+ {
+ switch (arg_type_)
+ {
+ case CtorArgType::complex_auto_ptr:
+ {
+ bool simple (true);
+ IsSimpleType t (simple);
+ t.dispatch (e.type ());
+ move = !simple;
+ break;
+ }
+ case CtorArgType::poly_auto_ptr:
+ {
+ move = polymorphic && polymorphic_p (e.type ());
+ break;
+ }
+ case CtorArgType::type:
+ break;
+ }
+ }
+
+ os << "," << endl
+ << " " << member << " (" << (move ? "std::move (" : "") <<
+ ename (e) << (move ? ")" : "") << ", this)";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ String const& member (emember (a));
+
+ bool def (a.default_p ());
+
+ if (min (a) == 0 && !def)
+ {
+ // optional
+ //
+ os << "," << endl
+ << " " << member << " (this)";
+ }
+ else
+ {
+ // one
+ //
+
+ if (def)
+ {
+ // This is an attribute with default or fixed value. We are
+ // going to initialize it to its default value.
+ //
+ os << "," << endl
+ << " " << member << " (" <<
+ edefault_value (a) << " (), this)";
+ }
+ else
+ {
+ os << "," << endl
+ << " " << member << " (" << ename (a) << ", this)";
+ }
+ }
+ }
+
+ private:
+ CtorArgType arg_type_;
+ };
+
+ struct CtorAny: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ CtorAny (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ if (max (a) != 1)
+ {
+ // sequence
+ //
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+ else if (min (a) == 0)
+ {
+ // optional
+ //
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+ else
+ {
+ // one
+ //
+ os << "," << endl
+ << " " << member << " (" << ename (a) << ", this->" <<
+ dom_doc << " ())";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << emember (a) << " (this->" << dom_doc << " ())";
+ }
+ };
+
+
+ struct CopyMember: Traversal::Member, Context
+ {
+ CopyMember (Context& c, String const& arg_name_)
+ : Context (c), arg_name (arg_name_)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& member (emember (m));
+
+ os << "," << endl
+ << " " << member << " (" <<
+ arg_name << "." << member << ", f, this)";
+ }
+
+ private:
+ String arg_name;
+ };
+
+ struct CopyAny: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ CopyAny (Context& c, String const& arg_name_)
+ : Context (c), arg_name (arg_name_)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (" <<
+ arg_name << "." << member << ", this->" << dom_doc << " ())";
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (" <<
+ arg_name << "." << member << ", this->" << dom_doc << " ())";
+ }
+
+ private:
+ String arg_name;
+ };
+
+ struct AssignMember: Traversal::Member, Context
+ {
+ AssignMember (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& member (emember (m));
+ os << "this->" << member << " = x." << member << ";";
+ }
+ };
+
+ struct AssignAny: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ AssignAny (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+ os << "this->" << member << " = x." << member << ";";
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& member (emember (a));
+ os << "this->" << member << " = x." << member << ";";
+ }
+ };
+
+
+ // Element parsing c-tor initializers.
+ //
+ struct ElementCtorMember: Traversal::Member, Context
+ {
+ ElementCtorMember (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& m)
+ {
+ if (skip (m))
+ return;
+
+ String const& member (emember (m));
+
+ os << "," << endl
+ << " " << member << " (this)";
+ }
+ };
+
+ struct ElementCtorAny: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ ElementCtorAny (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+ };
+
+
+ // Default c-tor member initializer.
+ //
+ struct DefaultCtorMemberInit: Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ DefaultCtorMemberInit (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ String const& member (emember (e));
+
+ os << "," << endl
+ << " " << member << " (this)";
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ String const& member (emember (a));
+
+ if (a.default_p ())
+ {
+ // This is an attribute with default or fixed value. We are
+ // going to initialize it to its default value.
+ //
+ os << "," << endl
+ << " " << member << " (" <<
+ edefault_value (a) << " (), this)";
+ }
+ else
+ os << "," << endl
+ << " " << member << " (this)";
+ }
+ };
+
+ struct DefaultCtorAnyInit: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ DefaultCtorAnyInit (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& member (emember (a));
+ String const& dom_doc (
+ edom_document (
+ dynamic_cast<SemanticGraph::Complex&> (a.scope ())));
+
+ os << "," << endl
+ << " " << member << " (this->" << dom_doc << " ())";
+ }
+ };
+
+ // Test whether the base has comparison operators.
+ //
+ struct HasComparisonOperator: Traversal::Fundamental::Type,
+ Traversal::List,
+ Traversal::Union,
+ Traversal::Complex,
+ Traversal::Enumeration,
+ Traversal::Member,
+ Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ // generate should initially be false.
+ //
+ HasComparisonOperator (Context& c, bool& generate)
+ : Context (c), generate_ (generate)
+ {
+ *this >> inherits_ >> *this;
+ *this >> names_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Fundamental::Type&)
+ {
+ // All built-in types are comparable.
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::List&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Union&)
+ {
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Enumeration& e)
+ {
+ Traversal::Enumeration::inherits (e);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ Complex::names (c);
+
+ if (!generate_)
+ Complex::inherits (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ if (!skip (m))
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any&)
+ {
+ if (options.generate_wildcard ())
+ generate_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute&)
+ {
+ if (options.generate_wildcard ())
+ generate_ = true;
+ }
+
+ private:
+ bool& generate_;
+
+ Traversal::Inherits inherits_;
+ Traversal::Names names_;
+ };
+
+ //
+ //
+ struct MemberComparison: Traversal::Element,
+ Traversal::Attribute,
+ Context
+ {
+ MemberComparison (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ String const& aname (eaname (e));
+
+ // Check if we need to handle xsi:type and substitution groups.
+ // If this element's type is anonymous then we don't need to do
+ // anything. Note that if the type is anonymous then it can't be
+ // derived from which makes it impossible to substitute or
+ // dynamically-type with xsi:type.
+ //
+ SemanticGraph::Type& t (e.type ());
+ bool poly (polymorphic && polymorphic_p (t) && !anonymous_p (t));
+
+ if (!poly)
+ {
+ os << "if (!(x." << aname << " () == y." << aname << " ()))" << endl
+ << "return false;"
+ << endl;
+ }
+ else
+ {
+ os << "{"
+ << "::xsd::cxx::tree::comparison_map< " << char_type
+ << " >& cm (" << endl
+ << "::xsd::cxx::tree::comparison_map_instance< " <<
+ poly_plate << ", " << char_type << " > ());"
+ << endl;
+
+ if (max (e) != 1)
+ {
+ // sequence
+ //
+ String const& scope (ename (e.scope ()));
+
+ os << scope << "::" << econtainer (e) <<
+ " a (x." << aname << " ()), b (y." << aname << " ());"
+ << endl;
+
+ os << "if (a.size () != b.size ())" << endl
+ << "return false;"
+ << endl;
+
+ os << "for (" << scope << "::" << econst_iterator (e) << endl
+ << "ai (a.begin ()), bi (b.begin ()), " <<
+ "ae (a.end ()), be (b.end ());" << endl
+ << "ai != ae; ++ai, ++bi)"
+ << "{"
+ << "if (!cm.compare (*ai, *bi))" << endl
+ << "return false;"
+ << "}";
+ }
+ else if (min (e) == 0)
+ {
+ // optional
+ //
+ String const& scope (ename (e.scope ()));
+
+ os << scope << "::" << econtainer (e) <<
+ " a (x." << aname << " ()), b (y." << aname << " ());"
+ << endl;
+
+ os << "if (!a || !b)"
+ << "{"
+ << "if (a.present () != b.present ())" << endl
+ << "return false;"
+ << "}"
+ << "else"
+ << "{"
+ << "if (!cm.compare (*a, *b))" << endl
+ << "return false;"
+ << "}";
+ }
+ else
+ {
+ // one
+ //
+ os << "if (!cm.compare (x." << aname << " (), y." <<
+ aname << " ()))" << endl
+ << "return false;";
+ }
+
+ os << "}";
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ String const& aname (eaname (a));
+
+ os << "if (!(x." << aname << " () == y." << aname << " ()))" << endl
+ << "return false;"
+ << endl;
+ }
+ };
+
+ struct AnyComparison: Traversal::Any,
+ Traversal::AnyAttribute,
+ Context
+ {
+ AnyComparison (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ String const& aname (eaname (a));
+
+ if (max (a) == 1 && min (a) == 1)
+ os << "if (!x." << aname << " ().isEqualNode (&y." <<
+ aname << " ()))";
+ else
+ os << "if (!(x." << aname << " () == y." << aname << " ()))";
+
+ os << endl
+ << "return false;"
+ << endl;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute& a)
+ {
+ String const& aname (eaname (a));
+
+ os << "if (!(x." << aname << " () == y." << aname << " ()))" << endl
+ << "return false;"
+ << endl;
+ }
+ };
+
+ // Check whether a type has a parse() function (i.e., has any
+ // members, recursively).
+ //
+ struct HasParseFunction: Traversal::Complex,
+ Traversal::Element,
+ Traversal::Any,
+ Traversal::Attribute,
+ Traversal::AnyAttribute,
+ Context
+ {
+ HasParseFunction (Context& c, bool& has_el, bool& has_at)
+ : Context (c), has_el_ (has_el), has_at_ (has_at)
+ {
+ *this >> names_ >> *this;
+ *this >> inherits_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ if (mixed_p (c) && !c.context ().count ("mixed-in-base"))
+ has_el_ = true;
+
+ names (c);
+
+ if (!(has_el_ && has_at_))
+ inherits (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element&)
+ {
+ has_el_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any&)
+ {
+ has_el_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute&)
+ {
+ has_at_ = true;
+ }
+
+ virtual void
+ traverse (SemanticGraph::AnyAttribute&)
+ {
+ if (options.generate_wildcard ())
+ has_at_ = true;
+ }
+
+ private:
+ bool& has_el_;
+ bool& has_at_;
+
+ Traversal::Names names_;
+ Traversal::Inherits inherits_;
+ };
+
+ //
+ //
+ struct FacetArray: Traversal::Complex, Context
+ {
+ FacetArray (Context& c)
+ : Context (c)
+ {
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ Facets f;
+ FacetCollector col (f);
+ col.traverse (c);
+
+ for (Facets::const_iterator i (f.begin ()); i != f.end (); ++i)
+ {
+ if (i->first == L"fractionDigits")
+ os << "{::xsd::cxx::tree::facet::fraction_digits, " <<
+ i->second << "UL}," << endl;
+ else if (i->first == L"totalDigits")
+ os << "{::xsd::cxx::tree::facet::total_digits, " <<
+ i->second << "UL}," << endl;
+ }
+ }
+
+ private:
+ typedef map<String, String> Facets;
+
+ struct FacetCollector: Traversal::Complex
+ {
+ FacetCollector (Facets& facets)
+ : facets_ (facets)
+ {
+ *this >> inherits_ >> *this;
+ }
+
+ virtual void
+ traverse (Type& c)
+ {
+ if (c.inherits_p ())
+ {
+ // First collect our base so that we can override its
+ // facets.
+ //
+ inherits (c);
+
+ using SemanticGraph::Restricts;
+
+ if (Restricts* r = dynamic_cast<Restricts*> (&c.inherits ()))
+ {
+ if (!r->facet_empty ())
+ {
+ Restricts::FacetIterator i (r->facet_find ("totalDigits"));
+
+ if (i != r->facet_end ())
+ facets_[i->first] = i->second;
+
+ i = r->facet_find ("fractionDigits");
+
+ if (i != r->facet_end ())
+ facets_[i->first] = i->second;
+ }
+ }
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_;
+ Facets& facets_;
+ };
+ };
+
+ //
+ //
+ struct Complex: Traversal::Complex, Context
+ {
+ Complex (Context& c)
+ : Context (c),
+ member_name_ (c),
+ any_ (c),
+ element_ (c),
+ any_test_ (c),
+ element_test_ (c),
+ attribute_ (c),
+ attribute_test_ (c),
+ any_attribute_ (c),
+ default_ctor_any_init_ (c),
+ default_ctor_member_init_ (c),
+ ctor_any_ (c),
+ ctor_member_ (c, CtorArgType::type),
+ element_ctor_any_ (c),
+ element_ctor_member_ (c),
+ assign_any_ (c),
+ assign_member_ (c),
+ comparison_any_ (c),
+ comparison_member_ (c),
+ facet_array_ (c)
+ {
+ bool gen_wildcard (options.generate_wildcard ());
+
+ inherits_member_ >> member_name_;
+
+ names_element_ >> element_;
+ if (gen_wildcard)
+ names_element_ >> any_;
+
+ names_element_test_ >> element_test_;
+ if (gen_wildcard)
+ names_element_test_ >> any_test_;
+
+ names_attribute_ >> attribute_;
+ names_attribute_test_ >> attribute_test_;
+ names_any_attribute_ >> any_attribute_;
+
+ default_ctor_init_names_ >> default_ctor_member_init_;
+ if (gen_wildcard)
+ default_ctor_init_names_ >> default_ctor_any_init_;
+
+ ctor_names_ >> ctor_member_;
+ if (gen_wildcard)
+ ctor_names_ >> ctor_any_;
+
+ element_ctor_names_ >> element_ctor_member_;
+ if (gen_wildcard)
+ element_ctor_names_ >> element_ctor_any_;
+
+ assign_names_ >> assign_member_;
+ if (gen_wildcard)
+ assign_names_ >> assign_any_;
+
+ comparison_names_ >> comparison_member_;
+ if (gen_wildcard)
+ comparison_names_ >> comparison_any_;
+ }
+
+
+ virtual void
+ traverse (Type& c)
+ {
+ bool gen_wildcard (options.generate_wildcard ());
+
+ String name (ename (c));
+
+ // If renamed name is empty then we do not need to generate
+ // anything for this type.
+ //
+ bool renamed (renamed_type (c, name));
+ if (renamed && !name)
+ return;
+
+ SemanticGraph::Context& ctx (c.context ());
+
+ bool mixed (mixed_p (c) && !ctx.count ("mixed-in-base"));
+ bool ordered (ordered_p (c) && !ctx.count ("order-in-base"));
+
+ bool string_based (false);
+ {
+ IsStringBasedType t (string_based);
+ t.dispatch (c);
+ }
+
+ SemanticGraph::Enumeration* enum_base (0);
+ {
+ IsEnumBasedType t (enum_base);
+ t.dispatch (c);
+ }
+
+ bool facets (false);
+ String base; // base type name
+ if (c.inherits_p ())
+ {
+ // Get base name.
+ //
+ std::wostringstream o;
+
+ BaseTypeName base_type (*this, o);
+ Traversal::Inherits inherits_type (base_type);
+
+ // Cannot use inherits_none here because need the
+ // result in a string.
+ //
+ inherits (c, inherits_type);
+
+ base = o.str ();
+
+ // See if we have any facets that we need to handle.
+ //
+ using SemanticGraph::Restricts;
+ using SemanticGraph::Fundamental::Decimal;
+
+ if (Restricts* r = dynamic_cast<Restricts*> (&c.inherits ()))
+ {
+ if (!r->facet_empty () &&
+ (r->facet_find ("fractionDigits") != r->facet_end () ||
+ r->facet_find ("totalDigits") != r->facet_end ()) &&
+ ultimate_base (c).is_a<Decimal> ())
+ facets = true;
+ }
+ }
+ else
+ base = any_type;
+
+ os << "// " << name << endl
+ << "//" << endl
+ << endl;
+
+ //
+ //
+ {
+ Member member (*this, name);
+ Traversal::Names names_member (member);
+ names (c, names_member);
+ }
+
+ // facets
+ //
+ if (facets)
+ {
+ os << "static const ::xsd::cxx::tree::facet _xsd_" << name <<
+ "_facet_table[] = "
+ << "{";
+
+ facet_array_.traverse (c);
+
+ os << "{::xsd::cxx::tree::facet::none, 0UL}"
+ << "};";
+ }
+
+ // c-tors
+ //
+ bool generate_no_base_ctor (false);
+ {
+ GenerateWithoutBaseCtor t (generate_no_base_ctor);
+ t.traverse (c);
+ }
+
+ bool has_complex_non_op_args (false);
+ bool has_poly_non_op_args (false);
+ bool complex_poly_args_clash (true);
+ {
+ HasComplexPolyNonOptArgs t (*this, true,
+ has_complex_non_op_args,
+ has_poly_non_op_args,
+ complex_poly_args_clash);
+ t.traverse (c);
+ }
+
+ // default c-tor
+ //
+ if (options.generate_default_ctor ())
+ {
+ bool generate (false);
+ {
+ GenerateDefaultCtor t (*this, generate, generate_no_base_ctor);
+ t.traverse (c);
+ }
+
+ if (generate)
+ {
+ os << name << "::" << endl
+ << name << " ()" << endl
+ << ": " << base << " ()";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ names (c, default_ctor_init_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+ }
+
+ // c-tor (base, all-non-optional-members)
+ //
+ if (options.generate_from_base_ctor ())
+ {
+ bool generate (false);
+ {
+ GenerateFromBaseCtor t (*this, generate);
+ t.traverse (c);
+ }
+
+ if (generate)
+ {
+ bool has_complex_non_op_args (false);
+ bool has_poly_non_op_args (false);
+ bool complex_poly_args_clash (true);
+ {
+ HasComplexPolyNonOptArgs t (*this, false,
+ has_complex_non_op_args,
+ has_poly_non_op_args,
+ complex_poly_args_clash);
+ t.traverse (c);
+ }
+
+ String base_arg (
+ L"_xsd_" + ename (c.inherits ().base ()) + L"_base");
+
+ os << name << "::" << endl
+ << name << " (const ";
+ inherits (c, inherits_member_);
+ os << "& " << base_arg;
+ {
+ FromBaseCtorArg args (*this, CtorArgType::type, true);
+ Traversal::Names args_names (args);
+ names (c, args_names);
+ }
+ os << ")" << endl
+ << ": " << base << " (" << base_arg << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ names (c, ctor_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+
+ // If we have any complex arguments in the previous c-tor
+ // then also generate the auto_ptr version.
+ //
+ if (has_complex_non_op_args)
+ {
+ CtorArgType const at (CtorArgType::complex_auto_ptr);
+
+ os << name << "::" << endl
+ << name << " (const ";
+ inherits (c, inherits_member_);
+ os << "& " << base_arg;
+ {
+ FromBaseCtorArg args (*this, at, true);
+ Traversal::Names args_names (args);
+ names (c, args_names);
+ }
+ os << ")" << endl
+ << ": " << base << " (" << base_arg << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ {
+ CtorMember t (*this, at);
+ Traversal::Names n (t);
+
+ if (gen_wildcard)
+ n >> ctor_any_;
+
+ names (c, n);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+ // If we are generating polymorphic code then we also need to
+ // provide auto_ptr version for every polymorphic type.
+ //
+ if (polymorphic &&
+ has_poly_non_op_args && !complex_poly_args_clash)
+ {
+ CtorArgType const at (CtorArgType::poly_auto_ptr);
+
+ os << name << "::" << endl
+ << name << " (const ";
+ inherits (c, inherits_member_);
+ os << "& " << base_arg;
+ {
+ FromBaseCtorArg args (*this, at, true);
+ Traversal::Names args_names (args);
+ names (c, args_names);
+ }
+ os << ")" << endl
+ << ": " << base << " (" << base_arg << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ {
+ CtorMember t (*this, at);
+ Traversal::Names n (t);
+
+ if (gen_wildcard)
+ n >> ctor_any_;
+
+ names (c, n);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+ }
+ }
+
+ // c-tor (all-non-optional-members)
+ //
+ if (generate_no_base_ctor)
+ {
+ CtorArgType const at (CtorArgType::type);
+
+ os << name << "::" << endl
+ << name << " (";
+ {
+ CtorArgsWithoutBase ctor_args (*this, at, true, true);
+ ctor_args.dispatch (c);
+ }
+ os << ")" << endl
+ << ": " << base << " (";
+ {
+ CtorBase base (*this, at, "");
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ names (c, ctor_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+
+ // If we have any complex arguments in the previous c-tor
+ // then also generate the auto_ptr version. One case where
+ // this c-tor will be generated is restriction of anyType.
+ //
+ if (has_complex_non_op_args)
+ {
+ CtorArgType const at (CtorArgType::complex_auto_ptr);
+
+ os << name << "::" << endl
+ << name << " (";
+ {
+ CtorArgsWithoutBase ctor_args (*this, at, true, true);
+ ctor_args.dispatch (c);
+ }
+ os << ")" << endl
+ << ": " << base << " (";
+ {
+ CtorBase base (*this, at, "");
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ {
+ CtorMember t (*this, at);
+ Traversal::Names n (t);
+
+ if (gen_wildcard)
+ n >> ctor_any_;
+
+ names (c, n);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+ // If we are generating polymorphic code then we also need to
+ // provide auto_ptr version for every polymorphic type.
+ //
+ if (polymorphic &&
+ has_poly_non_op_args && !complex_poly_args_clash)
+ {
+ CtorArgType const at (CtorArgType::poly_auto_ptr);
+
+ os << name << "::" << endl
+ << name << " (";
+ {
+ CtorArgsWithoutBase ctor_args (*this, at, true, true);
+ ctor_args.dispatch (c);
+ }
+ os << ")" << endl
+ << ": " << base << " (";
+ {
+ CtorBase base (*this, at, "");
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ {
+ CtorMember t (*this, at);
+ Traversal::Names n (t);
+
+ if (gen_wildcard)
+ n >> ctor_any_;
+
+ names (c, n);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+ }
+
+ if (string_based)
+ {
+ // We might not have the value type if this enum is customized.
+ //
+ if (enum_base != 0 && enum_base->context ().count ("value"))
+ {
+ // c-tor (enum-value, all-non-optional-members)
+ //
+ CtorArgType const at (CtorArgType::type);
+ String base_arg (L"_xsd_" + ename (*enum_base) + L"_base");
+
+ os << name << "::" << endl
+ << name << " (" << fq_name (*enum_base) << "::" <<
+ evalue (*enum_base) << " " << base_arg;
+
+ {
+ CtorArgsWithoutBase ctor_args (*this, at, true, false);
+ ctor_args.dispatch (c);
+ }
+
+ os << ")" << endl
+ << ": " << base << " (";
+
+ {
+ CtorBase base (*this, at, base_arg);
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ // Cannot be mixed.
+
+ names (c, ctor_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+ CtorArgType const at (CtorArgType::type);
+ String base_arg (L"_xsd_" + ename (ultimate_base (c)) + L"_base");
+
+ // c-tor (const char*, all-non-optional-members)
+ //
+ os << name << "::" << endl
+ << name << " (const " << char_type << "* " << base_arg;
+
+ {
+ CtorArgsWithoutBase ctor_args (*this, at, true, false);
+ ctor_args.dispatch (c);
+ }
+
+ os << ")" << endl
+ << ": " << base << " (";
+
+ {
+ CtorBase base (*this, at, base_arg);
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ // Cannot be mixed.
+
+ names (c, ctor_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+
+
+ // c-tor (const std::string&, all-non-optional-members)
+ //
+ os << name << "::" << endl
+ << name << " (const " << string_type << "& " << base_arg;
+
+ {
+ CtorArgsWithoutBase ctor_args (*this, at, true, false);
+ ctor_args.dispatch (c);
+ }
+
+ os << ")" << endl
+ << ": " << base << " (";
+
+ {
+ CtorBase base (*this, at, base_arg);
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ // Cannot be mixed.
+
+ names (c, ctor_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+ // c-tor (ultimate-base, all-non-optional-members)
+ //
+ {
+ CtorArgType const at (CtorArgType::type);
+
+ os << name << "::" << endl
+ << name << " (";
+
+ String base_arg;
+
+ {
+ CtorArgs ctor_args (*this, at, base_arg);
+ ctor_args.dispatch (c);
+ }
+
+ os << ")" << endl
+ << ": " << base << " (";
+
+ {
+ CtorBase base (*this, at, base_arg);
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ names (c, ctor_names_);
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+ // If we have any complex arguments in the previous c-tor
+ // then also generate the auto_ptr version.
+ //
+ if (has_complex_non_op_args)
+ {
+ CtorArgType const at (CtorArgType::complex_auto_ptr);
+ String base_arg;
+
+ os << name << "::" << endl
+ << name << " (";
+
+ {
+ CtorArgs ctor_args (*this, at, base_arg);
+ ctor_args.dispatch (c);
+ }
+
+ os << ")" << endl
+ << ": " << base << " (";
+
+ {
+ CtorBase base (*this, at, base_arg);
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ {
+ CtorMember t (*this, at);
+ Traversal::Names n (t);
+
+ if (gen_wildcard)
+ n >> ctor_any_;
+
+ names (c, n);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+ // If we are generating polymorphic code then we also need to
+ // provide auto_ptr version for every polymorphic type.
+ //
+ if (polymorphic &&
+ has_poly_non_op_args && !complex_poly_args_clash)
+ {
+ CtorArgType const at (CtorArgType::poly_auto_ptr);
+ String base_arg;
+
+ os << name << "::" << endl
+ << name << " (";
+
+ {
+ CtorArgs ctor_args (*this, at, base_arg);
+ ctor_args.dispatch (c);
+ }
+
+ os << ")" << endl
+ << ": " << base << " (";
+
+ {
+ CtorBase base (*this, at, base_arg);
+ Traversal::Inherits inherits_base (base);
+
+ inherits (c, inherits_base);
+ }
+
+ os << ")";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ {
+ CtorMember t (*this, at);
+ Traversal::Names n (t);
+
+ if (gen_wildcard)
+ n >> ctor_any_;
+
+ names (c, n);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+ }
+
+
+ // copy c-tor
+ //
+
+ os << name << "::" << endl
+ << name << " (const " << name << "& x," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (x, f, c)";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ String const& m (ctx.get<String> ("mixed-member"));
+ os << "," << endl
+ << " " << m << " (x." << m << ", f, this)";
+ }
+
+ if (ordered)
+ {
+ String const& m (ctx.get<String> ("order-member"));
+ os << "," << endl
+ << " " << m << " (x." << m << ")";
+ }
+
+ {
+ CopyAny copy_any (*this, "x");
+ CopyMember copy_member (*this, "x");
+ Traversal::Names names;
+
+ names >> copy_member;
+
+ if (gen_wildcard)
+ names >> copy_any;
+
+ Complex::names (c, names);
+ }
+
+ os << "{";
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+ os << "}";
+
+ //
+ //
+ bool he (has<Traversal::Element> (c));
+ bool hae (has<Traversal::Any> (c));
+
+ bool ha (has<Traversal::Attribute> (c));
+ bool haa (has<Traversal::AnyAttribute> (c));
+
+ //
+ //
+ if (!options.suppress_parsing ())
+ {
+ // c-tor (xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMElement& e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (e, f";
+
+ if (he || ha || hae || (haa && gen_wildcard) || mixed)
+ os << " | " << flags_type << "::base";
+
+ os << ", c)";
+
+ if (edom_document_member_p (c))
+ {
+ os << "," << endl
+ << " " << edom_document_member (c) << " (" <<
+ "::xsd::cxx::xml::dom::create_document< " << char_type <<
+ " > ())";
+ }
+
+ if (mixed)
+ {
+ os << "," << endl
+ << " " << ctx.get<String> ("mixed-member") << " (this)";
+ }
+
+ names (c, element_ctor_names_);
+
+ os << "{";
+
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);"
+ << endl;
+
+ bool base_has_el (false), base_has_at (false);
+
+ // We are only interested in this information if we are
+ // generating our own parse().
+ //
+ if (he || ha || hae || (haa && gen_wildcard) || mixed)
+ {
+ if (c.inherits_p ())
+ {
+ HasParseFunction test (*this, base_has_el, base_has_at);
+ test.dispatch (c.inherits ().base ());
+ }
+ }
+
+ //@@ Throw if p is not exhausted at the end.
+ //
+ if (he || ha || hae || (haa && gen_wildcard) || mixed)
+ os << "if ((f & " << flags_type << "::base) == 0)"
+ << "{"
+ << parser_type << " p (e, " <<
+ (he || hae || base_has_el || mixed_p (c) ? "true, " : "false, ") <<
+ (mixed_p (c) ? "true, " : "false, ") <<
+ (ha || (haa && gen_wildcard) || base_has_at ? "true" : "false")
+ << ");"
+ << "this->" << unclash (name, "parse") << " (p, f);"
+ << "}";
+
+ os << "}";
+
+ bool simple (true);
+ {
+ IsSimpleType t (simple);
+ t.dispatch (c);
+ }
+
+ if (simple)
+ {
+ // c-tor (xercesc::DOMAttr)
+ //
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMAttr& a," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (a, f, c)"
+ << "{";
+
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+
+ os << "}";
+
+ // c-tor (string const&, xercesc::DOMElement)
+ //
+ os << name << "::" << endl
+ << name << " (const " << string_type << "& s," << endl
+ << "const " << xerces_ns << "::DOMElement* e," << endl
+ << flags_type << " f," << endl
+ << container << "* c)" << endl
+ << ": " << base << " (s, e, f, c)"
+ << "{";
+
+ if (facets)
+ os << "this->_facet_table (_xsd_" << name << "_facet_table);";
+
+ os << "}";
+ }
+
+ if (he || ha || hae || (haa && gen_wildcard) || mixed)
+ {
+ os << "void " << name << "::" << endl
+ << unclash (name, "parse") << " (" <<
+ parser_type << "& p," << endl
+ << flags_type <<
+ (he || ha || base_has_el || base_has_at ? " f" : "") << ")"
+ << "{";
+
+ // Allow the base to parse its part.
+ //
+ if (base_has_el || base_has_at)
+ os << "this->" << base << "::parse (p, f);"
+ << endl;
+
+ if (he || hae || mixed_p (c))
+ {
+ bool m (mixed_p (c));
+
+ os << "for (; p.more_content (); p.next_content (" <<
+ (m ? "true" : "false") << "))"
+ << "{";
+
+ if (m)
+ {
+ String const& ma (ctx.get<String> ("mixed-aname"));
+ String const& mi (ctx.get<String> ("mixed-ordered-id-name"));
+ String const& oa (ctx.get<String> ("order-aname"));
+ String const& ot (ctx.get<String> ("order-type"));
+
+ os << "if (p.cur_is_text ())"
+ << "{"
+ << "const " << xerces_ns << "::DOMText& t (" <<
+ "p.cur_text ());"
+ << "this->" << ma << " ().push_back (" << endl
+ << "::xsd::cxx::xml::transcode< " << char_type << " > (" <<
+ "t.getData (), t.getLength ()));"
+ << "this->" << oa << " ().push_back (" << endl
+ << ot << " (" << mi << "," << endl
+ << "this->" << ma << " ().size () - 1));"
+ << "continue;"
+ << "}";
+ }
+
+ if (he || hae)
+ {
+ os << "const " << xerces_ns << "::DOMElement& i (" <<
+ "p.cur_element ());"
+ << "const " << qname_type << " n (" << endl
+ << "::xsd::cxx::xml::dom::name< " << char_type << " > (i));"
+ << endl;
+
+ names (c, names_element_);
+ }
+
+ os << "break;"
+ << "}";
+
+ // Make sure all non-optional elements are set.
+ //
+ names (c, names_element_test_);
+ }
+
+ if (ha || (haa && gen_wildcard))
+ {
+ if (base_has_at)
+ os << "p.reset_attributes ();"
+ << endl;
+
+ os << "while (p.more_attributes ())"
+ << "{"
+ << "const " << xerces_ns << "::DOMAttr& i (" <<
+ "p.next_attribute ());"
+ << "const " << qname_type << " n (" << endl
+ << "::xsd::cxx::xml::dom::name< " << char_type << " > (i));"
+ << endl;
+
+ names (c, names_attribute_);
+
+ // Generate anyAttribute code after all the attributes.
+ //
+ if (gen_wildcard)
+ names (c, names_any_attribute_);
+
+
+ // os << "{" // else block
+ // @@
+ // This doesn't play well with inheritance because we
+ // don't expect base's attributes. Also there are other
+ // "special" attributes such as xmlns, etc.
+ //
+ // << "throw ::xsd::cxx::tree::unexpected_attribute ... "
+ // << "}";
+
+ os << "}"; // while loop
+
+ // Make sure all non-optional attributes are set.
+ //
+ names (c, names_attribute_test_);
+ }
+
+ os << "}";
+ }
+ }
+
+ // _clone
+ //
+ if (!(c.abstract_p () ||
+ (renamed && polymorphic && polymorphic_p (c))))
+ os << name << "* " << name << "::" << endl
+ << "_clone (" << flags_type << " f," << endl
+ << container << "* c) const"
+ << "{"
+ << "return new class " << name << " (*this, f, c);"
+ << "}";
+
+ // operator=
+ //
+ if (!options.suppress_assignment () &&
+ (he || ha || (gen_wildcard && (hae || haa))))
+ {
+ os << name << "& " << name << "::" << endl
+ << "operator= (const " << name << "& x)"
+ << "{"
+ << "if (this != &x)"
+ << "{"
+ << "static_cast< " << base << "& > (*this) = x;";
+
+ // Note that here we don't assign the DOMDocument that is
+ // used to hold wildcard fragments. Each document has its
+ // own copy.
+
+ // Mixed text content.
+ //
+ if (mixed)
+ {
+ String const& m (ctx.get<String> ("mixed-member"));
+ os << "this->" << m << " = x." << m << ";";
+ }
+
+ // Order container.
+ //
+ if (ordered)
+ {
+ String const& m (ctx.get<String> ("order-member"));
+ os << "this->" << m << " = x." << m << ";";
+ }
+
+ names (c, assign_names_);
+
+ os << "}"
+ << "return *this;"
+ << "}";
+ }
+
+ // d-tor
+ //
+ os << name << "::" << endl
+ << "~" << name << " ()"
+ << "{"
+ << "}";
+
+ // Register with type factory map.
+ //
+ if (polymorphic && polymorphic_p (c) && !c.abstract_p ())
+ {
+ // Note that we are using the original type name.
+ //
+ String const& name (ename (c));
+
+ // If this type is anonymous but substitutes, then it will
+ // be registered as part of the substitution registration.
+ //
+ if (!anonymous_p (c) && !options.suppress_parsing ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::type_factory_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_type_factory_init (" << endl
+ << strlit (c.name ()) << "," << endl
+ << strlit (xml_ns_name (c)) << ");"
+ << endl;
+ }
+
+ if ((!anonymous_p (c) || anonymous_substitutes_p (c)) &&
+ options.generate_comparison ())
+ {
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::comparison_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
+ << "_xsd_" << name << "_comparison_init;"
+ << endl;
+ }
+ }
+
+ // Comparison operators.
+ //
+ if (options.generate_comparison () &&
+ (he || ha || mixed || ordered || !c.inherits_p () ||
+ ((hae || haa) && gen_wildcard)))
+ {
+ bool base_comp (false);
+
+ if (c.inherits_p ())
+ {
+ HasComparisonOperator test (*this, base_comp);
+ test.dispatch (c.inherits ().base ());
+ }
+
+ bool has_body (he || ha || ordered || mixed || base_comp ||
+ ((hae || haa) && gen_wildcard));
+
+ os << "bool" << endl
+ << "operator== (const " << name << "&" <<
+ (has_body ? " x" : "") << ", " <<
+ "const " << name << "&" << (has_body ? " y" : "") << ")"
+ << "{";
+
+ if (base_comp)
+ os << "if (!(static_cast< const " << base << "& > (x) ==" << endl
+ << "static_cast< const " << base << "& > (y)))" << endl
+ << "return false;"
+ << endl;
+
+ {
+ Complex::names (c, comparison_names_);
+ }
+
+ if (mixed)
+ {
+ String const& an (ctx.get<String> ("mixed-aname"));
+ os << "if (!(x." << an << " () == y." << an << " ()))" << endl
+ << "return false;"
+ << endl;
+ }
+
+ if (ordered)
+ {
+ String const& an (ctx.get<String> ("order-aname"));
+ os << "if (!(x." << an << " () == y." << an << " ()))" << endl
+ << "return false;"
+ << endl;
+ }
+
+ os << "return true;"
+ << "}";
+
+ os << "bool" << endl
+ << "operator!= (const " << name << "& x, " <<
+ "const " << name << "& y)"
+ << "{"
+ << "return !(x == y);"
+ << "}";
+ }
+ }
+
+ private:
+ Traversal::Inherits inherits_member_;
+ MemberTypeName member_name_;
+
+ Traversal::Names names_element_;
+ Traversal::Names names_element_test_;
+
+ Traversal::Names names_attribute_;
+ Traversal::Names names_any_attribute_;
+ Traversal::Names names_attribute_test_;
+
+ Any any_;
+ Element element_;
+
+ AnyTest any_test_;
+ ElementTest element_test_;
+
+ Attribute attribute_;
+ AttributeTest attribute_test_;
+
+ AnyAttribute any_attribute_;
+
+ DefaultCtorAnyInit default_ctor_any_init_;
+ DefaultCtorMemberInit default_ctor_member_init_;
+ Traversal::Names default_ctor_init_names_;
+
+ CtorAny ctor_any_;
+ CtorMember ctor_member_;
+ Traversal::Names ctor_names_;
+
+ ElementCtorAny element_ctor_any_;
+ ElementCtorMember element_ctor_member_;
+ Traversal::Names element_ctor_names_;
+
+ AssignAny assign_any_;
+ AssignMember assign_member_;
+ Traversal::Names assign_names_;
+
+ AnyComparison comparison_any_;
+ MemberComparison comparison_member_;
+ Traversal::Names comparison_names_;
+
+ FacetArray facet_array_;
+ };
+
+
+ // Generate element types and substitution group map entries.
+ //
+ struct GlobalElement: Traversal::Element,
+ GlobalElementBase,
+ Context
+ {
+ GlobalElement (Context& c)
+ : GlobalElementBase (c),
+ Context (c),
+ element_type_ (c.options.generate_element_type ()),
+ element_map_ (c.options.generate_element_map ()),
+ type_name_ (c)
+ {
+ belongs_ >> type_name_;
+ }
+
+ virtual void
+ traverse (Type& e)
+ {
+ SemanticGraph::Type& t (e.type ());
+
+ // Check if this element is abstract.
+ //
+ bool abst;
+ {
+ SemanticGraph::Complex* tc;
+ abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 &&
+ tc->abstract_p ();
+ }
+
+ if (!abst && element_type_ && doc_root_p (e))
+ {
+ bool fund (false);
+ {
+ IsFundamentalType test (fund);
+ test.dispatch (t);
+ }
+
+ bool simple (true);
+ if (!fund)
+ {
+ IsSimpleType test (simple);
+ test.dispatch (t);
+ }
+
+ String const& name (ename (e));
+ String const& type (etype (e));
+ String const& member (emember (e));
+
+ os << "// " << name << endl
+ << "// " << endl
+ << endl;
+
+ // Virtual accessors.
+ //
+ os << "const " << any_type << "* " << name << "::" << endl
+ << "_value () const"
+ << "{";
+
+ if (fund)
+ os << "return 0;";
+ else
+ os << "return &this->" << member << ".get ();";
+
+ os << "}";
+
+ os << any_type << "* " << name << "::" << endl
+ << "_value ()"
+ << "{";
+
+ if (fund)
+ os << "return 0;";
+ else
+ os << "return &this->" << member << ".get ();";
+
+ os << "}";
+
+ // default c-tor
+ //
+ if (options.generate_default_ctor ())
+ {
+ os << name << "::" << endl
+ << name << " ()" << endl
+ << ": " << member << " (0)"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (value)
+ //
+ os << name << "::" << endl
+ << name << " (const " << type << "& x)" << endl
+ << ": " << member << " (x, 0)"
+ << "{"
+ << "}";
+
+
+ // c-tor (auto_ptr<value>)
+ //
+ if (!simple || (polymorphic && polymorphic_p (t)))
+ {
+ os << name << "::" << endl
+ << name << " (" << auto_ptr << "< " << type << " > p)" << endl
+ << ": " << member << " (" <<
+ (std >= cxx_version::cxx11 ? "::std::move (p)" : "p") << ", 0)"
+ << "{"
+ << "}";
+ }
+
+ // c-tor (xercesc::DOMElement)
+ //
+ SemanticGraph::Context& ec (e.context ());
+ String const& name_member (ec.get<String> ("element-name-member"));
+ String const& ns_member (ec.get<String> ("element-ns-member"));
+
+ bool parsing (!options.suppress_parsing ());
+ if (parsing)
+ {
+ String const& tr (etraits (e));
+
+ os << name << "::" << endl
+ << name << " (const " << xerces_ns << "::DOMElement& e, " <<
+ flags_type << " f)" << endl
+ << ": " << member << " (0)"
+ << "{"
+ << "const " << qname_type << " n (" << endl
+ << "::xsd::cxx::xml::dom::name< " << char_type << " > (e));"
+ << endl
+ << "if (n.name () == " << name_member << " && " <<
+ "n.namespace_ () == " << ns_member << ")" << endl
+ << "this->" << member << ".set (" << tr <<
+ "::create (e, f, 0));"
+ << "else" << endl
+ << "throw ::xsd::cxx::tree::unexpected_element < " <<
+ char_type << " > (" << endl
+ << "n.name (), n.namespace_ ()," << endl
+ << name_member << ", " << ns_member << ");"
+ << "}";
+ }
+
+ // copy c-tor
+ //
+ os << name << "::" << endl
+ << name << " (const " << name << "& x, " <<
+ flags_type << " f)" << endl
+ << ": " << element_type << " ()," << endl
+ << " " << member << " (x." << member << ", f, 0)"
+ << "{"
+ << "}";
+
+ // _clone
+ //
+ os << name << "* " << name << "::" << endl
+ << "_clone (" << flags_type << " f) const"
+ << "{"
+ << "return new class " << name << " (*this, f);"
+ << "}";
+
+ // Element name and namespace accessors.
+ //
+ String const& aname (ec.get<String> ("element-name"));
+ String const& ans (ec.get<String> ("element-ns"));
+
+ os << "const " << string_type << "& " << name << "::" << endl
+ << aname << " ()"
+ << "{"
+ << "return " << name_member << ";"
+ << "}";
+
+ os << "const " << string_type << "& " << name << "::" << endl
+ << ans << " ()"
+ << "{"
+ << "return " << ns_member << ";"
+ << "}";
+
+ os << "const " << string_type << "& " << name << "::" << endl
+ << "_name () const"
+ << "{"
+ << "return " << name_member << ";"
+ << "}";
+
+ os << "const " << string_type << "& " << name << "::" << endl
+ << "_namespace () const"
+ << "{"
+ << "return " << ns_member << ";"
+ << "}";
+
+ os << "const " << string_type << " " << name << "::" << endl
+ << name_member << " (" << strlit (e.name ()) << ");"
+ << endl
+ << "const " << string_type << " " << name << "::" << endl
+ << ns_member << " (" << strlit (e.namespace_ ().name ()) << ");"
+ << endl;
+
+ // d-tor
+ //
+ os << name << "::" << endl
+ << "~" << name << " ()"
+ << "{"
+ << "}";
+
+ // Element map registration.
+ //
+ if (element_map_ && parsing)
+ {
+ os << "static " << endl
+ << "const ::xsd::cxx::tree::parser_init< " << name << ", " <<
+ char_type << ", " << any_type << " >" << endl
+ << "_xsd_" << name << "_parser_init (" <<
+ name << "::" << aname << " (), " <<
+ name << "::" << ans << " ());"
+ << endl;
+ }
+ }
+
+ if (!abst && polymorphic && e.substitutes_p () &&
+ !options.suppress_parsing ())
+ {
+ String const& name (ename (e));
+ Type& r (e.substitutes ().root ());
+
+ os << "static" << endl
+ << "const ::xsd::cxx::tree::element_factory_initializer< " <<
+ poly_plate << ", " << char_type << ", ";
+
+ belongs (e, belongs_);
+
+ os << " >" << endl
+ << "_xsd_" << name << "_element_factory_init (" << endl
+ << strlit (r.name ()) << "," << endl
+ << strlit (r.namespace_ ().name ()) << "," << endl
+ << strlit (e.name ()) << "," << endl
+ << strlit (e.namespace_ ().name ()) << ");"
+ << endl
+ << endl;
+ }
+ }
+
+ private:
+ bool element_type_;
+ bool element_map_;
+ Traversal::Belongs belongs_;
+ MemberTypeName type_name_;
+ };
+ }
+
+ void
+ generate_tree_source (Context& ctx, size_t first, size_t last)
+ {
+ if (ctx.options.generate_wildcard ())
+ {
+ ctx.os << "#include <xsd/cxx/xml/dom/wildcard-source.hxx>" << endl
+ << endl;
+ }
+
+ if (!ctx.options.suppress_parsing ())
+ ctx.os << "#include <xsd/cxx/xml/dom/parsing-source.hxx>" << endl
+ << endl;
+
+ if (ctx.polymorphic)
+ {
+ bool parsing (!ctx.options.suppress_parsing ());
+ bool comparison (ctx.options.generate_comparison ());
+
+ if (parsing)
+ ctx.os << "#include <xsd/cxx/tree/type-factory-map.hxx>" << endl
+ << endl;
+
+ if (comparison)
+ ctx.os << "#include <xsd/cxx/tree/comparison-map.hxx>" << endl
+ << endl;
+
+ if (parsing || comparison)
+ {
+ bool import_maps (ctx.options.import_maps ());
+ bool export_maps (ctx.options.export_maps ());
+
+ if (import_maps || export_maps)
+ {
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
+ << "{"
+ << "namespace cxx"
+ << "{"
+ << "namespace tree"
+ << "{"
+ << "#ifdef _MSC_VER" << endl;
+
+ if (parsing && export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "type_factory_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (parsing && import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "type_factory_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (comparison && export_maps)
+ ctx.os << "template struct __declspec (dllexport) " <<
+ "comparison_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (comparison && import_maps)
+ ctx.os << "template struct __declspec (dllimport) " <<
+ "comparison_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl;
+
+ if (parsing)
+ ctx.os << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "type_factory_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (comparison)
+ ctx.os << "template struct __attribute__ ((visibility(\"default\"))) " <<
+ "comparison_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl;
+
+ if (parsing)
+ ctx.os << "template struct XSD_MAP_VISIBILITY " <<
+ "type_factory_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ if (comparison)
+ ctx.os << "template struct XSD_MAP_VISIBILITY " <<
+ "comparison_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
+
+ ctx.os << "#endif" << endl
+ << "}" // tree
+ << "}" // cxx
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+ }
+
+ ctx.os << "namespace _xsd"
+ << "{";
+
+ if (parsing)
+ ctx.os << "static" << endl
+ << "const ::xsd::cxx::tree::type_factory_plate< " <<
+ ctx.poly_plate << ", " << ctx.char_type << " >" << endl
+ << "type_factory_plate_init;"
+ << endl;
+
+ if (comparison)
+ ctx.os << "static" << endl
+ << "const ::xsd::cxx::tree::comparison_plate< " <<
+ ctx.poly_plate << ", " << ctx.char_type << " >" << endl
+ << "comparison_plate_init;"
+ << endl;
+
+ ctx.os << "}";
+ }
+ }
+
+ Traversal::Schema schema;
+ Sources sources;
+ Traversal::Names names_ns, names;
+ Namespace ns (ctx, first, last);
+
+ List list (ctx);
+ Union union_ (ctx);
+ Complex complex (ctx);
+ Enumeration enumeration (ctx);
+ GlobalElement element (ctx);
+
+ schema >> sources >> schema;
+ schema >> names_ns >> ns >> names;
+
+ names >> list;
+ names >> union_;
+ names >> complex;
+ names >> enumeration;
+ names >> element;
+
+ schema.dispatch (ctx.schema_root);
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/tree-source.hxx b/xsd/xsd/cxx/tree/tree-source.hxx
new file mode 100644
index 0000000..66dcff7
--- /dev/null
+++ b/xsd/xsd/cxx/tree/tree-source.hxx
@@ -0,0 +1,18 @@
+// file : xsd/cxx/tree/tree-source.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_TREE_SOURCE_HXX
+#define XSD_CXX_TREE_TREE_SOURCE_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ void
+ generate_tree_source (Context&, size_t first, size_t last);
+ }
+}
+
+#endif // XSD_CXX_TREE_TREE_SOURCE_HXX
diff --git a/xsd/xsd/cxx/tree/validator.cxx b/xsd/xsd/cxx/tree/validator.cxx
new file mode 100644
index 0000000..dc6572c
--- /dev/null
+++ b/xsd/xsd/cxx/tree/validator.cxx
@@ -0,0 +1,671 @@
+// file : xsd/cxx/tree/validator.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+#include <iostream>
+
+#include <xsd/cxx/tree/validator.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/cxx/tree/elements.hxx>
+
+using namespace std;
+
+namespace CXX
+{
+ namespace Tree
+ {
+ namespace
+ {
+ class ValidationContext: public Context
+ {
+ public:
+ ValidationContext (SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
+ Tree::options const& ops,
+ const WarningSet& disabled_warnings,
+ Counts const& counts,
+ bool generate_xml_schema,
+ bool& valid_)
+ : Context (std::wcerr,
+ root,
+ path,
+ ops,
+ counts,
+ generate_xml_schema,
+ 0,
+ 0,
+ 0,
+ 0),
+ disabled_warnings_ (disabled_warnings),
+ disabled_warnings_all_ (false),
+ valid (valid_),
+ subst_group_warning_issued (subst_group_warning_issued_),
+ subst_group_warning_issued_ (false)
+ {
+ if (disabled_warnings_.find ("all") != disabled_warnings_.end ())
+ disabled_warnings_all_ = true;
+ }
+
+ public:
+ bool
+ is_disabled (char const* w)
+ {
+ return disabled_warnings_all_ ||
+ disabled_warnings_.find (w) != disabled_warnings_.end ();
+ }
+
+ public:
+ String
+ xpath (SemanticGraph::Nameable& n)
+ {
+ if (n.is_a<SemanticGraph::Namespace> ())
+ return L"<namespace-level>"; // There is a bug if you see this.
+
+ if (n.named_p ())
+ {
+ SemanticGraph::Scope& scope (n.scope ());
+
+ if (scope.is_a<SemanticGraph::Namespace> ())
+ return n.name ();
+
+ return xpath (scope) + L"/" + n.name ();
+ }
+ else
+ {
+ return L"(anonymous type for " +
+ n.context ().get<String> ("instance-name") + L")";
+ }
+ }
+
+ protected:
+ ValidationContext (ValidationContext& c)
+ : Context (c),
+ disabled_warnings_ (c.disabled_warnings_),
+ disabled_warnings_all_ (c.disabled_warnings_all_),
+ valid (c.valid),
+ subst_group_warning_issued (c.subst_group_warning_issued)
+ {
+ }
+
+ protected:
+ const WarningSet& disabled_warnings_;
+ bool disabled_warnings_all_;
+
+ bool& valid;
+
+ bool& subst_group_warning_issued;
+ bool subst_group_warning_issued_;
+ };
+
+
+ //
+ //
+ struct Any: Traversal::Any, ValidationContext
+ {
+ Any (ValidationContext& c)
+ : ValidationContext (c)
+ {
+ }
+
+ struct Element: Traversal::Element, ValidationContext
+ {
+ Element (ValidationContext& c, SemanticGraph::Any& any)
+ : ValidationContext (c),
+ any_ (any),
+ ns_ (any.definition_namespace ().name ())
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e))
+ return;
+
+ using SemanticGraph::Any;
+
+ bool q (e.qualified_p ());
+ String ns (q ? e.namespace_ ().name () : "");
+
+ for (Any::NamespaceIterator i (any_.namespace_begin ());
+ i != any_.namespace_end (); ++i)
+ {
+ bool failed (false);
+
+ if (*i == L"##any")
+ {
+ failed = true;
+ }
+ else if (*i == L"##other")
+ {
+ if (ns_)
+ {
+ // Note that here I assume that ##other does not
+ // include names without target namespace. This
+ // is not what the spec says but that seems to be
+ // the consensus.
+ //
+ failed = q && ns != ns_;
+ }
+ else
+ {
+ // No target namespace.
+ //
+ failed = q && ns != L"";
+ }
+ }
+ else if (*i == L"##local")
+ {
+ failed = !q || ns == L"";
+ }
+ else if (*i == L"##targetNamespace")
+ {
+ failed = (q && ns_ == ns) || (!q && ns_ == L"");
+ }
+ else
+ {
+ failed = q && *i == ns;
+ }
+
+ if (failed)
+ {
+ Any& a (any_);
+
+ os << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": warning T001: namespace '" << *i << "' allows for "
+ << "element '" << e.name () << "'" << endl;
+
+ os << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": warning T001: generated code may not associate element '"
+ << e.name () << "' correctly if it appears in place of "
+ << "this wildcard" << endl;
+
+ os << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: element '" << e.name () << "' is defined "
+ << "here" << endl;
+ }
+ }
+ }
+
+ private:
+ SemanticGraph::Any& any_;
+ String ns_;
+ };
+
+ struct Complex: Traversal::Complex
+ {
+ Complex ()
+ : up_ (true), down_ (true)
+ {
+ }
+
+ virtual void
+ post (Type& c)
+ {
+ // Go down the inheritance hierarchy.
+ //
+ if (down_)
+ {
+ bool up = up_;
+ up_ = false;
+
+ if (c.inherits_p ())
+ dispatch (c.inherits ().base ());
+
+ up_ = up;
+ }
+
+ // Go up the inheritance hierarchy.
+ //
+ if (up_)
+ {
+ bool down = down_;
+ down_ = false;
+
+ for (Type::BegetsIterator i (c.begets_begin ());
+ i != c.begets_end (); ++i)
+ {
+ dispatch (i->derived ());
+ }
+
+ down_ = down;
+ }
+ }
+
+ private:
+ bool up_, down_;
+ };
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ using SemanticGraph::Compositor;
+
+ // Find our complex type.
+ //
+ Compositor* c (&a.contained_particle ().compositor ());
+
+ while(!c->contained_compositor_p ())
+ c = &c->contained_particle ().compositor ();
+
+ SemanticGraph::Complex& type (
+ dynamic_cast<SemanticGraph::Complex&> (
+ c->contained_compositor ().container ()));
+
+ Complex complex;
+ Traversal::Names names;
+ Element element (*this, a);
+
+ complex >> names >> element;
+
+ complex.dispatch (type);
+ }
+ };
+
+
+ //
+ //
+ struct Traverser: Traversal::Schema,
+ Traversal::Complex,
+ Traversal::Type,
+ Traversal::Element,
+ ValidationContext
+ {
+ Traverser (ValidationContext& c)
+ : ValidationContext (c), any_ (c)
+ {
+ *this >> sources_ >> *this;
+ *this >> schema_names_ >> ns_ >> names_;
+
+ names_ >> *this >> names_;
+
+ // Any
+ //
+ if (!is_disabled ("T001"))
+ {
+ *this >> contains_compositor_ >> compositor_ >> contains_particle_;
+ contains_particle_ >> compositor_;
+ contains_particle_ >> any_;
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ using SemanticGraph::Schema;
+
+ traverse (static_cast<SemanticGraph::Type&> (c));
+
+ if (c.inherits_p ())
+ {
+ SemanticGraph::Type& t (c.inherits ().base ());
+
+ if (t.named_p () &&
+ types_.find (
+ t.scope ().name () + L"#" + t.name ()) == types_.end ())
+ {
+ // Don't worry about types that are in included/imported
+ // schemas.
+ //
+ Schema& s (dynamic_cast<Schema&> (t.scope ().scope ()));
+
+ if (&s == &schema_root || sources_p (schema_root, s))
+ {
+ valid = false;
+
+ os << c.file () << ":" << c.line () << ":" << c.column ()
+ << ": error: type '" << xpath (c) << "' inherits from "
+ << "yet undefined type '" << xpath (t) << "'" << endl;
+
+ os << t.file () << ":" << t.line () << ":" << t.column ()
+ << ": info: '" << xpath (t) << "' is defined here"
+ << endl;
+
+ os << c.file () << ":" << c.line () << ":" << c.column ()
+ << ": info: inheritance from a yet-undefined type is "
+ << "not supported" << endl;
+
+ os << c.file () << ":" << c.line () << ":" << c.column ()
+ << ": info: re-arrange your schema and try again"
+ << endl;
+ }
+ }
+ }
+
+ Complex::traverse (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ // This is also used to traverse Complex.
+ //
+ if (t.named_p ())
+ {
+ types_.insert (t.scope ().name () + L"#" + t.name ());
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (is_disabled ("T002"))
+ return;
+
+ // Note that there is no test for generate_p since we want
+ // to catch cases when things are not being generated but
+ // most likely should have been.
+ //
+ if (e.substitutes_p () && !polymorphic &&
+ !subst_group_warning_issued)
+ {
+ subst_group_warning_issued = true;
+
+ os << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": warning T002: substitution groups are used but "
+ << "--generate-polymorphic was not specified" << endl;
+
+ os << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": info: generated code may not be able to handle "
+ << "some conforming instances" << endl;
+ }
+ }
+
+ // Return true if root sources s.
+ //
+ bool
+ sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
+ {
+ using SemanticGraph::Schema;
+ using SemanticGraph::Sources;
+
+ for (Schema::UsesIterator i (root.uses_begin ());
+ i != root.uses_end (); ++i)
+ {
+ if (i->is_a<Sources> ())
+ {
+ if (&i->schema () == &s || sources_p (i->schema (), s))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private:
+ set<String> types_;
+
+ Sources sources_;
+
+ Traversal::Names schema_names_;
+ Traversal::Namespace ns_;
+
+ Traversal::Names names_;
+
+ // Any.
+ //
+ Any any_;
+ Traversal::Compositor compositor_;
+ Traversal::ContainsParticle contains_particle_;
+ Traversal::ContainsCompositor contains_compositor_;
+ };
+
+
+ struct AnonymousType: Traversal::Schema,
+ Traversal::Complex,
+ Traversal::Element,
+ Traversal::Attribute,
+ ValidationContext
+ {
+ AnonymousType (ValidationContext& c)
+ : ValidationContext (c),
+ anonymous_error_issued_ (false)
+ {
+ *this >> sources_ >> *this;
+ *this >> schema_names_ >> ns_ >> names_ >> *this;
+ *this >> names_;
+ }
+
+ bool
+ traverse_common (SemanticGraph::Member& m)
+ {
+ SemanticGraph::Type& t (m.type ());
+
+ if (!t.named_p ()
+ && !t.is_a<SemanticGraph::Fundamental::IdRef> ()
+ && !t.is_a<SemanticGraph::Fundamental::IdRefs> ())
+ {
+ if (!anonymous_error_issued_)
+ {
+ valid = false;
+ anonymous_error_issued_ = true;
+
+ wcerr << t.file ()
+ << ": error: anonymous types detected"
+ << endl;
+
+ wcerr << t.file ()
+ << ": info: "
+ << "anonymous types are not supported in this mapping"
+ << endl;
+
+ wcerr << t.file ()
+ << ": info: consider explicitly naming these types or "
+ << "remove the --preserve-anonymous option to "
+ << "automatically name them"
+ << endl;
+
+ if (!options.show_anonymous ())
+ wcerr << t.file ()
+ << ": info: use --show-anonymous option to see these "
+ << "types" << endl;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ if (skip (e)) return;
+
+ if (traverse_common (e))
+ {
+ if (options.show_anonymous ())
+ {
+ wcerr << e.file () << ":" << e.line () << ":" << e.column ()
+ << ": error: element '" << xpath (e) << "' "
+ << "is of anonymous type" << endl;
+ }
+ }
+ else
+ Traversal::Element::traverse (e);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ if (traverse_common (a))
+ {
+ if (options.show_anonymous ())
+ {
+ wcerr << a.file () << ":" << a.line () << ":" << a.column ()
+ << ": error: attribute '" << xpath (a) << "' "
+ << "is of anonymous type" << endl;
+ }
+ }
+ else
+ Traversal::Attribute::traverse (a);
+ }
+
+ private:
+ bool anonymous_error_issued_;
+
+ set<String> types_;
+
+ Sources sources_;
+
+ Traversal::Names schema_names_;
+ Traversal::Namespace ns_;
+
+ Traversal::Names names_;
+ };
+ }
+
+ bool Validator::
+ validate (options const& ops,
+ SemanticGraph::Schema& schema,
+ SemanticGraph::Path const& path,
+ const WarningSet& disabled_warnings,
+ Counts const& counts)
+ {
+ bool valid (true);
+ ValidationContext ctx (
+ schema, path, ops, disabled_warnings, counts, false, valid);
+
+ //
+ //
+ bool import_maps (ops.import_maps ());
+ bool export_maps (ops.export_maps ());
+
+ if (import_maps && export_maps)
+ {
+ wcerr << "error: --import-maps and --export-maps are "
+ << "mutually exclusive" << endl;
+
+ return false;
+ }
+
+ if (import_maps && !ctx.polymorphic)
+ {
+ wcerr << "error: --import-maps can only be specified together with "
+ << "--generate-polymorphic" << endl;
+
+ return false;
+ }
+
+ if (export_maps && !ctx.polymorphic)
+ {
+ wcerr << "error: --export-maps can only be specified together " <<
+ "with --generate-polymorphic" << endl;
+
+ return false;
+ }
+
+ //
+ //
+ if (ops.char_type () != "char" &&
+ ops.char_type () != "wchar_t" &&
+ !ctx.is_disabled ("T003"))
+ {
+ wcerr << "warning T003: unknown base character type '" <<
+ ops.char_type ().c_str () << "'" << endl;
+ }
+
+ //
+ //
+ NarrowString tn (ops.type_naming ());
+
+ if (tn != "knr" && tn != "ucc" && tn != "java")
+ {
+ wcerr << "error: unknown type naming style specified: '" <<
+ tn.c_str () << "'" << endl;
+
+ return false;
+ }
+
+ NarrowString fn (ops.function_naming ());
+
+ if (fn != "knr" && fn != "lcc" && fn != "java")
+ {
+ wcerr << "error: unknown function naming style specified: '" <<
+ fn.c_str () << "'" << endl;
+
+ return false;
+ }
+
+ //
+ //
+ bool element_type (ops.generate_element_type ());
+ bool par (!ops.suppress_parsing ());
+ bool ser (ops.generate_serialization ());
+
+ if (ops.generate_element_map ())
+ {
+ if (!element_type)
+ {
+ wcerr << "error: --generate-element-map can only be specified " <<
+ "together with --generate-element-type" << endl;
+
+ return false;
+ }
+
+ if (!(par || ser))
+ {
+ wcerr << "error: --generate-element-map is specified but " <<
+ "neither parsing nor serialization code is generated" << endl;
+
+ return false;
+ }
+ }
+
+ // Issue a warning if there are more than one global element
+ // and we are generating parsing/serialization functions or
+ // element types for all of them by default.
+ //
+
+ if (counts.global_elements > 1 &&
+ (element_type || par || ser) &&
+ !ops.root_element_first () &&
+ !ops.root_element_last () &&
+ !ops.root_element_all () &&
+ !ops.root_element_none () &&
+ ops.root_element ().empty () &&
+ !ctx.is_disabled ("T004"))
+ {
+ wcerr << schema.file () << ": warning T004: generating ";
+
+ if (element_type)
+ wcerr << "element types";
+ else
+ {
+ wcerr << (par ? "parsing " : "") <<
+ (ser ? (par ? "and serialization " : "serialization ") : "") <<
+ "functions";
+ }
+ wcerr << " for " << counts.global_elements << " global elements" <<
+ endl;
+
+ wcerr << schema.file () << ": info: use --root-element-* options "
+ << "to specify document root(s)" << endl;
+ }
+
+
+ // Test for anonymout types.
+ //
+ {
+ AnonymousType traverser (ctx);
+ traverser.dispatch (schema);
+ }
+
+ // Test the rest.
+ //
+ if (valid)
+ {
+ Traverser traverser (ctx);
+ traverser.dispatch (schema);
+ }
+
+ return valid;
+
+ // T005 is used in polymorphism-processor.cxx.
+ //
+ }
+ }
+}
diff --git a/xsd/xsd/cxx/tree/validator.hxx b/xsd/xsd/cxx/tree/validator.hxx
new file mode 100644
index 0000000..23f3f04
--- /dev/null
+++ b/xsd/xsd/cxx/tree/validator.hxx
@@ -0,0 +1,29 @@
+// file : xsd/cxx/tree/validator.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_CXX_TREE_VALIDATOR_HXX
+#define XSD_CXX_TREE_VALIDATOR_HXX
+
+#include <xsd/cxx/tree/elements.hxx>
+#include <xsd/cxx/tree/options.hxx>
+
+#include <xsd/xsd.hxx>
+
+namespace CXX
+{
+ namespace Tree
+ {
+ class Validator
+ {
+ public:
+ bool
+ validate (options const&,
+ SemanticGraph::Schema&,
+ SemanticGraph::Path const& tu,
+ const WarningSet& disabled_warnings,
+ Counts const& counts);
+ };
+ }
+}
+
+#endif // XSD_CXX_TREE_VALIDATOR_HXX
diff --git a/xsd/xsd/elements.hxx b/xsd/xsd/elements.hxx
new file mode 100644
index 0000000..d3dd659
--- /dev/null
+++ b/xsd/xsd/elements.hxx
@@ -0,0 +1,125 @@
+// file : xsd/elements.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_ELEMENTS_HXX
+#define XSD_ELEMENTS_HXX
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/types.hxx>
+
+namespace SemanticGraph = XSDFrontend::SemanticGraph;
+namespace Traversal = XSDFrontend::Traversal;
+
+// Anonymous feedback via belongs edge.
+//
+struct AnonymousBase : Traversal::Element, Traversal::Attribute
+{
+ AnonymousBase (Traversal::NodeDispatcher& d1)
+ : complex_ (&d1, 0)
+ {
+ edge_traverser (belongs_);
+ belongs_.node_traverser (complex_);
+ }
+
+ AnonymousBase (Traversal::NodeDispatcher& d1, Traversal::NodeDispatcher& d2)
+ : complex_ (&d1, &d2)
+ {
+ edge_traverser (belongs_);
+ belongs_.node_traverser (complex_);
+ }
+
+ // Hooks.
+ //
+public:
+ virtual void
+ member_pre (SemanticGraph::Member&)
+ {
+ }
+
+ virtual void
+ member_post (SemanticGraph::Member&)
+ {
+ }
+
+ /*
+ virtual void
+ type_pre (SemanticGraph::Type& t)
+ {
+ }
+
+ virtual void
+ type_post (SemanticGraph::Type& t)
+ {
+ }
+ */
+
+public:
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ SemanticGraph::Type& t (e.type ());
+
+ if (!t.named_p () && !t.context ().count ("seen"))
+ {
+ t.context ().set ("seen", true);
+
+ member_pre (e);
+
+ Element::belongs (e, belongs_);
+
+ member_post (e);
+
+ t.context ().remove ("seen");
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Attribute& a)
+ {
+ SemanticGraph::Type& t (a.type ());
+
+ if (!t.named_p () && !t.context ().count ("seen"))
+ {
+ t.context ().set ("seen", true);
+
+ member_pre (a);
+
+ Attribute::belongs (a, belongs_);
+
+ member_post (a);
+
+ t.context ().remove ("seen");
+ }
+ }
+
+private:
+ struct Complex : Traversal::Complex
+ {
+ Complex (Traversal::NodeDispatcher* d1, Traversal::NodeDispatcher* d2)
+ : d1_ (d1), d2_ (d2)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ if (d1_)
+ d1_->dispatch (c);
+
+ if (d2_)
+ d2_->dispatch (c);
+ }
+
+ private:
+ Traversal::NodeDispatcher* d1_;
+ Traversal::NodeDispatcher* d2_;
+
+ } complex_;
+
+ Traversal::Belongs belongs_;
+};
+
+#endif // XSD_ELEMENTS_HXX
diff --git a/xsd/xsd/options-parser.hxx b/xsd/xsd/options-parser.hxx
new file mode 100644
index 0000000..afcdf80
--- /dev/null
+++ b/xsd/xsd/options-parser.hxx
@@ -0,0 +1,29 @@
+// file : xsd/options-parser.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_OPTIONS_PARSER_HXX
+#define XSD_OPTIONS_PARSER_HXX
+
+#include <xsd/types.hxx>
+#include <xsd/options.hxx>
+
+namespace cli
+{
+ template <>
+ struct parser<NarrowString>
+ {
+ static void
+ parse (NarrowString& x, bool& xs, scanner& s)
+ {
+ xs = true;
+ const char* o (s.next ());
+
+ if (s.more ())
+ x = s.next ();
+ else
+ throw missing_value (o);
+ }
+ };
+}
+
+#endif // XSD_OPTIONS_PARSER_HXX
diff --git a/xsd/xsd/options.cli b/xsd/xsd/options.cli
new file mode 100644
index 0000000..6c327a4
--- /dev/null
+++ b/xsd/xsd/options.cli
@@ -0,0 +1,315 @@
+// file : xsd/options.cli
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include <cstddef>; // std::size_t
+include <cstdint>; // std::uint64_t
+
+include <xsd/types.hxx>; // NarrowString, NarrowStrings
+
+class help_options
+{
+ std::uint64_t --build2-metadata; // Leave undocumented/hidden.
+
+ // These are all documented elsewhere.
+ //
+ bool --help;
+ bool --version;
+ bool --proprietary-license;
+};
+
+class options = 0
+{
+ NarrowStrings --disable-warning
+ {
+ "<warn>",
+ "Disable printing warning with id <warn>. If \cb{all} is specified for
+ the warning id then all warnings are disabled."
+ };
+
+ // The following option is "fake" in that it is actually handled by
+ // argv_file_scanner. We have it here to get the documentation.
+ //
+ std::string --options-file
+ {
+ "<file>",
+ "Read additional options from <file>. Each option should appearing on a
+ separate line optionally followed by space and an option value. Empty
+ lines and lines starting with \cb{#} are ignored. Option values can
+ be enclosed in double (\cb{\"}) or single (\cb{'}) quotes to preserve
+ leading and trailing whitespaces as well as to specify empty values.
+ If the value itself contains trailing or leading quotes, enclose it
+ with an extra pair of quotes, for example \cb{'\"x\"'}. Non-leading
+ and non-trailing quotes are interpreted as being part of the option
+ value.
+
+ The semantics of providing options in a file is equivalent to providing
+ the same set of options in the same order on the command line at the
+ point where the \cb{--options-file} option is specified except that
+ the shell escaping and quoting is not required. You can repeat this
+ option to specify more than one options file."
+ };
+
+ // SLOC/license options.
+ //
+ bool --show-sloc
+ {
+ "Show the number of generated physical source lines of code (SLOC)."
+ };
+
+ std::size_t --sloc-limit
+ {
+ "<num>",
+ "Check that the number of generated physical source lines of code (SLOC)
+ does not exceed <num>."
+ };
+
+ bool --proprietary-license
+ {
+ "Indicate that the generated code is licensed under a proprietary
+ license instead of the GPL."
+ };
+
+ NarrowString --custom-literals
+ {
+ "<file>",
+ "Load custom XML string to C++ literal mappings from <file>. This
+ mechanism can be useful if you are using a custom character encoding
+ and some of the strings in your schemas, for example element/attribute
+ names or enumeration values, contain non-ASCII characters. In this
+ case you will need to provide a custom mapping to C++ literals for
+ such strings. The format of this file is specified in the
+ \cb{custom-literals.xsd} XML Schema file that can be found in the
+ documentation directory."
+ };
+
+ // Anonymous type morphing.
+ //
+ bool --preserve-anonymous
+ {
+ "Preserve anonymous types. By default anonymous types are automatically
+ named with names derived from the enclosing elements/attributes. Because
+ mappings implemented by this compiler require all types to be named,
+ this option is only useful if you want to make sure your schemas don't
+ have anonymous types."
+ };
+
+ bool --show-anonymous
+ {
+ "Show elements and attributes that are of anonymous types. This option
+ only makes sense together with the \cb{--preserve-anonymous} option."
+ };
+
+ NarrowStrings --anonymous-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to derive names for
+ anonymous types from the enclosing attributes/elements. <regex> is a
+ Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}.
+ Any character can be used as a delimiter instead of '\cb{/}'. Escaping of
+ the delimiter character in \ci{pattern} or \ci{replacement} is not
+ supported.
+
+ All the regular expressions are pushed into a stack with the last
+ specified expression considered first. The first match that succeeds is
+ used. Regular expressions are applied to a string in the form
+
+ \c{\i{filename} \i{namespace} \i{xpath}}
+
+ For instance:
+
+ \cb{hello.xsd http://example.com/hello element}
+
+ \cb{hello.xsd http://example.com/hello type/element}
+
+ As an example, the following expression makes all the derived names
+ start with capital letters. This could be useful when your naming
+ convention requires type names to start with capital letters:
+
+ \cb{%.* .* (.+/)*(.+)%\\u$2%}
+
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ bool --anonymous-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with the
+ \cb{--anonymous-regex} option. Use this option to find out why your
+ regular expressions don't do what you expected them to do."
+ };
+
+ bool --morph-anonymous; // Deprecated and therefore undocumented.
+
+ // Location options.
+ //
+ NarrowStrings --location-map
+ {
+ "<ol>=<nl>",
+ "Map the original schema location <ol> that is specified in the XML
+ Schema include or import elements to new schema location <nl>. Repeat
+ this option to map more than one schema location. For example, the
+ following option maps the \cb{http://example.com/foo.xsd} URL to the
+ \cb{foo.xsd} local file.
+
+ \cb{--location-map http://example.com/foo.xsd=foo.xsd}"
+ };
+
+ NarrowStrings --location-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to map schema
+ locations that are specified in the XML Schema include or import
+ elements. <regex> is a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can
+ be used as a delimiter instead of '\cb{/}'. Escaping of the delimiter
+ character in \ci{pattern} or \ci{replacement} is not supported. All
+ the regular expressions are pushed into a stack with the last specified
+ expression considered first. The first match that succeeds is used.
+
+ For example, the following expression maps URL locations in the form
+ \cb{http://example.com/foo/bar.xsd} to local files in the form
+ \cb{bar.xsd}:
+
+ \cb{%http://.+/(.+)%$1%}
+
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ bool --location-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with the
+ \cb{--location-regex} option. Use this option to find out why your
+ regular expressions don't do what you expected them to do."
+ };
+
+ // File-per-type option.
+ //
+ bool --file-per-type
+ {
+ "Generate a separate set of C++ files for each type defined in XML
+ Schema. Note that in this mode you only need to compile the root
+ schema(s) and the code will be generated for all included and
+ imported schemas. This compilation mode is primarily useful when
+ some of your schemas cannot be compiled separately or have cyclic
+ dependencies which involve type inheritance. Other options related
+ to this mode are: \cb{--type-file-regex}, \cb{--schema-file-regex},
+ \cb{--fat-type-file}, and \cb{--file-list}."
+ };
+
+ NarrowStrings --type-file-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate type
+ names to file names when the \cb{--file-per-type} option is specified.
+ <regex> is a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can be
+ used as a delimiter instead of '\cb{/}'. Escaping of the delimiter
+ character in \ci{pattern} or \ci{replacement} is not supported. All
+ the regular expressions are pushed into a stack with the last specified
+ expression considered first. The first match that succeeds is used.
+ Regular expressions are applied to a string in the form
+
+ \c{\i{namespace} \i{type-name}}
+
+ For example, the following expression maps type \cb{foo} that is
+ defined in the \cb{http://example.com/bar} namespace to file name
+ \cb{bar-foo}:
+
+ \cb{%http://example.com/(.+) (.+)%$1-$2%}
+
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ bool --type-file-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with the
+ \cb{--type-file-regex} option. Use this option to find out why your
+ regular expressions don't do what you expected them to do."
+ };
+
+ NarrowStrings --schema-file-regex
+ {
+ "<regex>",
+ "Add <regex> to the list of regular expressions used to translate schema
+ file names when the \cb{--file-per-type} option is specified. <regex> is
+ a Perl-like regular expression in the form
+ \c{\b{/}\i{pattern}\b{/}\i{replacement}\b{/}}. Any character can be used
+ as a delimiter instead of '\cb{/}'. Escaping of the delimiter character in
+ \ci{pattern} or \ci{replacement} is not supported. All the regular
+ expressions are pushed into a stack with the last specified expression
+ considered first. The first match that succeeds is used. Regular
+ Expressions are applied to the absolute filesystem path of a schema file
+ and the result, including the directory part, if any, is used to derive
+ the \cb{#include} directive paths as well as the generated C++ file
+ paths. This option, along with \cb{--type-file-regex} are primarily
+ useful to place the generated files into subdirectories or to resolve
+ file name conflicts.
+
+ For example, the following expression maps schema files in the
+ \cb{foo/1.0.0/} subdirectory to the files in the \cb{foo/} subdirectory.
+ As a result, the \cb{#include} directive paths for such schemas will be
+ in the \cb{foo/schema.hxx} form and the generated C++ files will be
+ placed into the \cb{foo/} subdirectory:
+
+ \cb{%.*/foo/1.0.0/(.+)%foo/$1%}
+
+ See also the REGEX AND SHELL QUOTING section below."
+ };
+
+ bool --schema-file-regex-trace
+ {
+ "Trace the process of applying regular expressions specified with the
+ \cb{--schema-file-regex} option. Use this option to find out why your
+ regular expressions don't do what you expected them to do."
+ };
+
+ bool --fat-type-file
+ {
+ "Generate code corresponding to global elements into type files instead
+ of schema files when the \cb{--type-file-regex} option is specified.
+ This option is primarily useful when trying to minimize the amount of
+ object code that is linked to an executable by packaging compiled
+ generated code into a static (archive) library."
+ };
+
+ // File list options.
+ //
+ NarrowString --file-list
+ {
+ "<file>",
+ "Write a list of generated C++ files to <file>. This option is primarily
+ useful in the file-per-type compilation mode (\cb{--file-per-type}) to
+ create a list of generated C++ files, for example, as a makefile
+ fragment."
+ };
+
+ NarrowString --file-list-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the file list. As a convenience, all
+ occurrences of the \cb{\\n} character sequence in <text> are replaced
+ with new lines. This option can, for example, be used to assign the
+ generated file list to a makefile variable."
+ };
+
+ NarrowString --file-list-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the file list. As a convenience, all
+ occurrences of the \cb{\\n} character sequence in <text> are replaced
+ with new lines."
+ };
+
+ NarrowString --file-list-delim = "\n"
+ {
+ "<text>",
+ "Delimit file names written to the file list with <text> instead of new
+ lines. As a convenience, all occurrences of the \cb{\\n} character
+ sequence in <text> are replaced with new lines."
+ };
+
+ // Undocumented.
+ //
+ bool --disable-multi-import;
+ bool --disable-full-check;
+};
diff --git a/xsd/xsd/processing/cardinality/processor.cxx b/xsd/xsd/processing/cardinality/processor.cxx
new file mode 100644
index 0000000..c8c5dc5
--- /dev/null
+++ b/xsd/xsd/processing/cardinality/processor.cxx
@@ -0,0 +1,407 @@
+// file : xsd/processing/cardinality/processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <map>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+#include <xsd/elements.hxx>
+
+#include <xsd/processing/cardinality/processor.hxx>
+
+using namespace std;
+
+namespace Processing
+{
+ namespace SemanticGraph = XSDFrontend::SemanticGraph;
+ namespace Traversal = XSDFrontend::Traversal;
+
+ namespace Cardinality
+ {
+ namespace
+ {
+ //
+ //
+ struct ElementInfo
+ {
+ ElementInfo ()
+ : min (0), max (0), e_ (0)
+ {
+ }
+
+ ElementInfo (SemanticGraph::Element& e)
+ : min (1), max (1), e_ (&e)
+ {
+ }
+
+ ElementInfo (SemanticGraph::Element& e, size_t min_, size_t max_)
+ : min (min_), max (max_), e_ (&e)
+ {
+ }
+
+ SemanticGraph::Element&
+ element ()
+ {
+ assert (e_ != 0);
+ return *e_;
+ }
+
+ public:
+ size_t min, max;
+
+ private:
+ SemanticGraph::Element* e_;
+ };
+
+ typedef map<String, ElementInfo> ElementInfoMap;
+
+ //
+ //
+ struct AnyInfo
+ {
+ AnyInfo ()
+ : min (0), max (0), a_ (0)
+ {
+ }
+
+ AnyInfo (SemanticGraph::Any& a)
+ : min (1), max (1), a_ (&a)
+ {
+ }
+
+ AnyInfo (SemanticGraph::Any& a, size_t min_, size_t max_)
+ : min (min_), max (max_), a_ (&a)
+ {
+ }
+
+ SemanticGraph::Any&
+ any ()
+ {
+ assert (a_ != 0);
+ return *a_;
+ }
+
+ public:
+ size_t min, max;
+
+ private:
+ SemanticGraph::Any* a_;
+ };
+
+ typedef map<String, AnyInfo> AnyInfoMap;
+
+ //
+ //
+ struct Particle: Traversal::All,
+ Traversal::Choice,
+ Traversal::Sequence,
+ Traversal::Element,
+ Traversal::Any
+ {
+ virtual void
+ traverse (SemanticGraph::All& a)
+ {
+ traverse_sequence (a);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Choice& c)
+ {
+ using SemanticGraph::Compositor;
+
+ // Go over all particles we contain and add them to the map.
+ //
+ for (Compositor::ContainsIterator ci (c.contains_begin ());
+ ci != c.contains_end (); ++ci)
+ {
+ Particle t;
+ t.dispatch (ci->particle ());
+
+ // Handle elements.
+ //
+ if (ci == c.contains_begin ())
+ el_map = t.el_map; // First arm.
+ else
+ {
+ // For elements that are in the map but not in this
+ // arm of choice, we need to set min to 0 while for
+ // those that are we need to choose minimum between
+ // the two for min and maximum for max.
+ //
+ for (ElementInfoMap::iterator i (el_map.begin ());
+ i != el_map.end (); ++i)
+ {
+ String const& name (i->first);
+ ElementInfo& ei (i->second);
+
+ ElementInfoMap::iterator j (t.el_map.find (name));
+
+ if (j == t.el_map.end ())
+ ei.min = 0;
+ else
+ {
+ ei.min = j->second.min < ei.min ? j->second.min : ei.min;
+
+ // Unbounded is encoded as 0.
+ //
+ if (j->second.max == 0 || ei.max == 0)
+ ei.max = 0;
+ else
+ ei.max = j->second.max > ei.max ? j->second.max : ei.max;
+ }
+ }
+
+ // Now elements that are in this arm of choice but are
+ // not in the map, we need to add to the map and set their
+ // min to 0.
+ //
+ for (ElementInfoMap::iterator i (t.el_map.begin ());
+ i != t.el_map.end (); ++i)
+ {
+ String const& name (i->first);
+ ElementInfo& ei (i->second);
+
+ ElementInfoMap::iterator j (el_map.find (name));
+
+ if (j == el_map.end ())
+ el_map[name] = ElementInfo (ei.element (), 0, ei.max);
+ }
+ }
+
+ // Handle wildcards. Since each wildcard is treated as unique,
+ // we need to copy them from each arm of choice and set min to
+ // 0.
+ //
+ for (AnyInfoMap::iterator i (t.any_map.begin ());
+ i != t.any_map.end (); ++i)
+ {
+ String const& name (i->first);
+ AnyInfo& ai (i->second);
+
+ assert (any_map.find (name) == any_map.end ());
+
+ any_map[name] = AnyInfo (ai.any (), 0, ai.max);
+ }
+ }
+
+ // Choice's min and max.
+ //
+ size_t cmin (c.min ()), cmax (c.max ());
+
+ // Iterate over elements and wildcards in the maps and multiply
+ // their cardinality by cmin and cmax.
+ //
+ for (ElementInfoMap::iterator i (el_map.begin ());
+ i != el_map.end (); ++i)
+ {
+ i->second.min *= cmin;
+ i->second.max *= cmax;
+ }
+
+ for (AnyInfoMap::iterator i (any_map.begin ());
+ i != any_map.end (); ++i)
+ {
+ i->second.min *= cmin; // Not really necessary since min == 0.
+ i->second.max *= cmax;
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Sequence& s)
+ {
+ traverse_sequence (s);
+ }
+
+ void
+ traverse_sequence (SemanticGraph::Compositor& c)
+ {
+ using SemanticGraph::Compositor;
+
+ // Sequence's min and max.
+ //
+ size_t smin (c.min ()), smax (c.max ());
+
+ // Go over all particles we contain and add them to the map.
+ //
+ for (Compositor::ContainsIterator ci (c.contains_begin ());
+ ci != c.contains_end (); ++ci)
+ {
+ Particle t;
+ t.dispatch (ci->particle ());
+
+ // Handle elements.
+ //
+ for (ElementInfoMap::iterator i (t.el_map.begin ());
+ i != t.el_map.end (); ++i)
+ {
+ String const& name (i->first);
+ ElementInfo& ei (i->second);
+ size_t min (ei.min * smin);
+ size_t max (ei.max * smax);
+ ElementInfoMap::iterator j (el_map.find (name));
+
+ if (j != el_map.end ())
+ {
+ // Add i's cardinality to j
+ //
+ j->second.min += min;
+ j->second.max = (j->second.max == 0 || max == 0) ?
+ 0 : (j->second.max + max);
+ }
+ else
+ el_map[name] = ElementInfo (ei.element (), min, max);
+ }
+
+ // Handle wildcards.
+ //
+ for (AnyInfoMap::iterator i (t.any_map.begin ());
+ i != t.any_map.end (); ++i)
+ {
+ String const& name (i->first);
+ AnyInfo& ai (i->second);
+ size_t min (ai.min * smin);
+ size_t max (ai.max * smax);
+
+ assert (any_map.find (name) == any_map.end ());
+
+ any_map[name] = AnyInfo (ai.any (), min, max);
+ }
+ }
+ }
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ SemanticGraph::ContainsParticle& cp (e.contained_particle ());
+
+ String name (e.qualified_p ()
+ ? e.namespace_ ().name () + L" " + e.name ()
+ : e.name ());
+
+ el_map[name] = ElementInfo (e, cp.min (), cp.max ());
+ }
+
+ virtual void
+ traverse (SemanticGraph::Any& a)
+ {
+ SemanticGraph::ContainsParticle& cp (a.contained_particle ());
+
+ any_map[a.name ()] = AnyInfo (a, cp.min (), cp.max ());
+ }
+
+ public:
+ AnyInfoMap any_map;
+ ElementInfoMap el_map;
+ };
+
+
+ //
+ //
+ struct Complex: Traversal::Complex
+ {
+ virtual void
+ traverse (Type& c)
+ {
+ if (c.contains_compositor_p ())
+ {
+ Particle t;
+ t.dispatch (c.contains_compositor ().compositor ());
+
+ for (ElementInfoMap::iterator i (t.el_map.begin ());
+ i != t.el_map.end (); ++i)
+ {
+ ElementInfo& ei (i->second);
+ SemanticGraph::Context& ctx (ei.element ().context ());
+
+ ctx.set ("min", ei.min);
+ ctx.set ("max", ei.max);
+ }
+
+ for (AnyInfoMap::iterator i (t.any_map.begin ());
+ i != t.any_map.end (); ++i)
+ {
+ AnyInfo& ai (i->second);
+ SemanticGraph::Context& ctx (ai.any ().context ());
+
+ ctx.set ("min", ai.min);
+ ctx.set ("max", ai.max);
+ }
+ }
+
+ // Traverse attributes and anonymous types (via elements).
+ //
+ Complex::names (c);
+ }
+ };
+
+
+ //
+ //
+ struct Attribute: Traversal::Attribute
+ {
+ virtual void
+ traverse (Type& a)
+ {
+ SemanticGraph::Context& ctx (a.context ());
+
+ ctx.set ("min", size_t (a.optional_p () ? 0 : 1));
+ ctx.set ("max", size_t (1));
+ }
+ };
+
+ // Go into implied/included/imported schemas while making sure
+ // we don't process the same stuff more than once.
+ //
+ struct Uses: Traversal::Uses
+ {
+ virtual void
+ traverse (Type& u)
+ {
+ SemanticGraph::Schema& s (u.schema ());
+
+ if (!s.context ().count ("processing-cardinality-seen"))
+ {
+ s.context ().set ("processing-cardinality-seen", true);
+ Traversal::Uses::traverse (u);
+ }
+ }
+ };
+ }
+
+ void Processor::
+ process (SemanticGraph::Schema& tu, SemanticGraph::Path const&)
+ {
+ Traversal::Schema schema;
+ Uses uses;
+
+ schema >> uses >> schema;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+
+ schema >> schema_names >> ns >> ns_names;
+
+ Complex complex_type;
+ AnonymousBase anonymous (complex_type);
+
+ ns_names >> complex_type;
+ ns_names >> anonymous;
+
+ Attribute attribute;
+ Traversal::Names names;
+
+ complex_type >> names;
+
+ names >> attribute;
+ names >> anonymous;
+
+ // Some twisted schemas do recusive inclusions.
+ //
+ tu.context ().set ("processing-cardinality-seen", true);
+
+ schema.dispatch (tu);
+ }
+ }
+}
diff --git a/xsd/xsd/processing/cardinality/processor.hxx b/xsd/xsd/processing/cardinality/processor.hxx
new file mode 100644
index 0000000..93a85fb
--- /dev/null
+++ b/xsd/xsd/processing/cardinality/processor.hxx
@@ -0,0 +1,28 @@
+// file : xsd/processing/cardinality/processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_PROCESSING_CARDINALITY_PROCESSOR_HXX
+#define XSD_PROCESSING_CARDINALITY_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
+#include <libxsd-frontend/semantic-graph/schema.hxx>
+
+#include <xsd/types.hxx>
+
+namespace Processing
+{
+ namespace Cardinality
+ {
+ class Processor
+ {
+ public:
+ struct Failed {};
+
+ void
+ process (XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file);
+ };
+ }
+}
+
+#endif // XSD_PROCESSING_CARDINALITY_PROCESSOR_HXX
diff --git a/xsd/xsd/processing/inheritance/processor.cxx b/xsd/xsd/processing/inheritance/processor.cxx
new file mode 100644
index 0000000..6c0e40e
--- /dev/null
+++ b/xsd/xsd/processing/inheritance/processor.cxx
@@ -0,0 +1,492 @@
+// file : xsd/processing/inheritance/processor.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <set>
+#include <iostream>
+
+#include <xsd/processing/inheritance/processor.hxx>
+
+#include <xsd/elements.hxx>
+
+#include <libxsd-frontend/semantic-graph.hxx>
+#include <libxsd-frontend/traversal.hxx>
+
+using namespace std;
+
+namespace Processing
+{
+ namespace SemanticGraph = XSDFrontend::SemanticGraph;
+ namespace Traversal = XSDFrontend::Traversal;
+
+ namespace Inheritance
+ {
+ namespace
+ {
+ struct Dep
+ {
+ Dep (SemanticGraph::Type& t,
+ SemanticGraph::Member* m = 0,
+ String const& xpath = L"")
+ : type (t), member (m), member_xpath (xpath)
+ {
+ }
+
+ SemanticGraph::Type& type;
+ SemanticGraph::Member* member; // Member if type is anonymous.
+ String member_xpath;
+ };
+
+ inline bool
+ operator< (Dep const& a, Dep const& b)
+ {
+ return &a.type < &b.type;
+ }
+
+ typedef set<Dep> DepSet;
+ typedef set<SemanticGraph::Type*> TypeSet;
+
+ String
+ xpath (SemanticGraph::Nameable& n)
+ {
+ if (dynamic_cast<SemanticGraph::Namespace*> (&n) != 0)
+ return L"<namespace-level>"; // There is a bug if you see this.
+
+ if (n.named_p ())
+ {
+ SemanticGraph::Scope& scope (n.scope ());
+
+ if (dynamic_cast<SemanticGraph::Namespace*> (&scope) != 0)
+ return n.name ();
+
+ return xpath (scope) + L"/" + n.name ();
+ }
+ else
+ {
+ return L"(anonymous type for " +
+ n.context ().get<String> ("instance-name") + L")";
+ }
+ }
+
+
+ // Calculate the list of dependencies for this complex
+ // type.
+ //
+ struct ComplexType: Traversal::Complex,
+ Traversal::Member
+ {
+ ComplexType (DepSet& dep_set)
+ : dep_set_ (dep_set), last_ (0)
+ {
+ *this >> names_ >> *this;
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ using SemanticGraph::Complex;
+
+ if (c.inherits_p ())
+ dep_set_.insert (Dep (c.inherits ().base (), last_, last_xpath_));
+
+ types_seen_.insert (&c);
+
+ // Go after anonymous types.
+ //
+ names (c);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Member& m)
+ {
+ SemanticGraph::Type& t (m.type ());
+
+ if (!t.named_p () && types_seen_.find (&t) == types_seen_.end ())
+ {
+ SemanticGraph::Context& ctx (t.context ());
+
+ last_xpath_ = xpath (m);
+
+ String prev_xpath;
+
+ if (ctx.count ("instance-name"))
+ prev_xpath = ctx.get<String> ("instance-name");
+
+ ctx.set ("instance-name", last_xpath_);
+
+ last_ = &m;
+ dispatch (t);
+
+ if (prev_xpath)
+ ctx.set ("instance-name", prev_xpath);
+ else
+ ctx.remove ("instance-name");
+ }
+ }
+
+ private:
+ DepSet& dep_set_;
+ TypeSet types_seen_;
+
+ SemanticGraph::Member* last_;
+ String last_xpath_;
+
+ Traversal::Names names_;
+ };
+
+
+ //
+ //
+ template <typename N, typename A>
+ struct NodeArgs
+ {
+ NodeArgs (N& node, A arg)
+ : node_ (node), arg_ (arg)
+ {
+ }
+
+ operator N& () const
+ {
+ return node_;
+ }
+
+ template <typename E>
+ void
+ add_edge_left (E& e)
+ {
+ node_.add_edge_left (e, arg_);
+ }
+
+ template <typename E>
+ void
+ add_edge_right (E& e)
+ {
+ node_.add_edge_right (e, arg_);
+ }
+
+ private:
+ N& node_;
+ A arg_;
+ };
+
+
+ //
+ //
+ struct Global: Traversal::Type,
+ Traversal::Complex,
+ Traversal::Element
+ {
+ Global (SemanticGraph::Schema& root,
+ SemanticGraph::Schema& schema,
+ bool& failed)
+ : root_ (root), schema_ (schema), failed_ (failed)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Type& t)
+ {
+ if (t.named_p ())
+ types_seen_.insert (&t);
+ }
+
+ virtual void
+ traverse (SemanticGraph::Complex& c)
+ {
+ check_dep (c, c);
+ types_seen_.insert (&c);
+ };
+
+ virtual void
+ traverse (SemanticGraph::Element& e)
+ {
+ SemanticGraph::Type& t (e.type ());
+
+ if (!t.named_p ())
+ {
+ t.context ().set ("instance-name", xpath (e));
+ check_dep (e, t);
+ t.context ().remove ("instance-name");
+ }
+ };
+
+ private:
+ void
+ check_dep (SemanticGraph::Nameable& global,
+ SemanticGraph::Type& type)
+ {
+ using SemanticGraph::Type;
+ using SemanticGraph::Scope;
+ using SemanticGraph::Names;
+ using SemanticGraph::Schema;
+
+ DepSet prereqs;
+
+ // Calculate our prerequisistes.
+ //
+ {
+ ComplexType complex (prereqs);
+ complex.dispatch (type);
+ }
+
+ for (DepSet::const_iterator i (prereqs.begin ());
+ i != prereqs.end (); ++i)
+ {
+ Dep const& dep (*i);
+ Type& t (dep.type);
+
+ // Ignore IDREF templates.
+ //
+ if (!t.named_p () &&
+ (t.is_a<SemanticGraph::Fundamental::IdRef> () ||
+ t.is_a<SemanticGraph::Fundamental::IdRefs> ()))
+ continue;
+
+ // We won't be able to generate compilable code in case of a
+ // dependency on ourselves (e.g., a member element with
+ // anonymous type that inherits from us).
+ //
+ if (&t == &type)
+ {
+ assert (dep.member != 0);
+
+ SemanticGraph::Member& m (*dep.member);
+
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << " error: nested anonymous type for '"
+ << dep.member_xpath << "' cyclicly inherits from '"
+ << t.name () << "'" << endl;
+
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << " error: unable to generate valid code for such "
+ << "cyclic inheritance" << endl;
+
+ wcerr << m.file () << ":" << m.line () << ":" << m.column ()
+ << " info: '" << m.name () << "' element is declared here"
+ << endl;
+
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << ": info: consider explicitly naming this type "
+ << "or remove the --preserve-anonymous option"
+ << endl;
+
+ failed_ = true;
+ continue;
+ }
+
+ if (types_seen_.find (&t) == types_seen_.end ())
+ {
+ Scope& scope (t.scope ());
+ Schema& schema (dynamic_cast<Schema&> (scope.scope ()));
+
+ // Don't worry about types that are in included/imported
+ // schemas.
+ //
+ if (&schema != &schema_ && !sources_p (schema_, schema))
+ continue;
+
+ if (t.context ().count ("seen"))
+ {
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << " error: nested anonymous type in '" << t.name ()
+ << "' or '" << type.name () << "' inherits from one of "
+ << "these types and makes them mutually dependant"
+ << endl;
+
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << " error: unable to generate valid code for such "
+ << "cyclic dependency" << endl;
+
+ wcerr << type.file () << ":" << type.line () << ":"
+ << type.column () << " info: '" << type.name ()
+ << "' type is defined here"
+ << endl;
+
+ wcerr << t.file () << ":" << t.line () << ":" << t.column ()
+ << ": info: consider explicitly naming the anonymous "
+ << "type or remove the --preserve-anonymous option"
+ << endl;
+
+ failed_ = true;
+ continue;
+ }
+
+ //wcerr << "type '" << t.name () << "' needs to be moved " <<
+ // "before " << (global.is_a<Type> () ? "type" : "element") <<
+ // " '" << global.name () << "'" << endl;
+
+
+ // Delete current Names edge.
+ //
+ String name (t.name ());
+ {
+ Names& n (t.named ());
+ root_.delete_edge (scope, t, n);
+ }
+
+ // Insert a new Names edge before global.
+ //
+ {
+ // t.scope () and global.scope () can be different in
+ // case of the chameleon inclusion.
+ //
+ Scope& scope (global.scope ());
+
+ // Convert to the insert-after call.
+ //
+ Scope::NamesIterator i (scope.find (global.named ()));
+
+ if (i == scope.names_begin ())
+ i = scope.names_end ();
+ else
+ --i;
+
+ NodeArgs<Scope, Scope::NamesIterator> na (scope, i);
+ root_.new_edge<Names> (na, t, name);
+ }
+
+ // Recursively process the moved type.
+ //
+ global.context ().set ("seen", true);
+ dispatch (t);
+ global.context ().remove ("seen");
+ }
+ }
+ }
+
+ private:
+ // Return true if root sources s.
+ //
+ bool
+ sources_p (SemanticGraph::Schema& root, SemanticGraph::Schema& s)
+ {
+ using SemanticGraph::Schema;
+ using SemanticGraph::Sources;
+
+ for (Schema::UsesIterator i (root.uses_begin ());
+ i != root.uses_end (); ++i)
+ {
+ if (i->is_a<Sources> ())
+ {
+ if (&i->schema () == &s || sources_p (i->schema (), s))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private:
+ SemanticGraph::Schema& root_;
+ SemanticGraph::Schema& schema_;
+ TypeSet types_seen_;
+ bool& failed_;
+ };
+
+
+ // Sources traverser that goes into each schema only once.
+ //
+ struct Sources: Traversal::Sources
+ {
+ virtual void
+ traverse (SemanticGraph::Sources& s)
+ {
+ if (schemas_.insert (&s.schema ()).second)
+ Traversal::Sources::traverse (s);
+ }
+
+ private:
+ set<SemanticGraph::Schema*> schemas_;
+ };
+
+ // Go into included/imported schemas while making sure we don't
+ // process the same stuff more than once.
+ //
+ struct Uses: Traversal::Includes, Traversal::Imports
+ {
+ Uses (SemanticGraph::Schema& root, bool& failed)
+ : root_ (root), failed_ (failed)
+ {
+ }
+
+ virtual void
+ traverse (SemanticGraph::Includes& i)
+ {
+ traverse (i.schema ());
+ }
+
+ virtual void
+ traverse (SemanticGraph::Imports& i)
+ {
+ traverse (i.schema ());
+ }
+
+ private:
+ void
+ traverse (SemanticGraph::Schema& s)
+ {
+ if (!s.context ().count ("processing-inheritance-seen"))
+ {
+ Traversal::Schema schema;
+ Sources sources;
+
+ schema >> sources >> schema;
+ schema >> *this;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+
+ schema >> schema_names >> ns >> ns_names;
+
+ Global global (root_, s, failed_);
+
+ ns_names >> global;
+
+ s.context ().set ("processing-inheritance-seen", true);
+ schema.dispatch (s);
+ }
+ }
+
+ private:
+ SemanticGraph::Schema& root_;
+ bool& failed_;
+ };
+ }
+
+ void Processor::
+ process (SemanticGraph::Schema& tu, SemanticGraph::Path const&)
+ {
+ bool failed (false);
+
+ // We need to process include/imported schemas since other
+ // parts of the process, for example, name processors can
+ // rely on the order of types in the schema.
+ //
+ Traversal::Schema schema;
+ Sources sources;
+ Uses uses (tu, failed);
+
+ schema >> sources >> schema;
+ schema >> uses;
+
+ Traversal::Names schema_names;
+ Traversal::Namespace ns;
+ Traversal::Names ns_names;
+
+ schema >> schema_names >> ns >> ns_names;
+
+ Global global (tu, tu, failed);
+
+ ns_names >> global;
+
+ // Some twisted schemas do recusive self-inclusion.
+ //
+ tu.context ().set ("processing-inheritance-seen", true);
+
+ schema.dispatch (tu);
+
+ if (failed)
+ throw Failed ();
+ }
+ }
+}
diff --git a/xsd/xsd/processing/inheritance/processor.hxx b/xsd/xsd/processing/inheritance/processor.hxx
new file mode 100644
index 0000000..2a70e02
--- /dev/null
+++ b/xsd/xsd/processing/inheritance/processor.hxx
@@ -0,0 +1,28 @@
+// file : xsd/processing/inheritance/processor.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_PROCESSING_INHERITANCE_PROCESSOR_HXX
+#define XSD_PROCESSING_INHERITANCE_PROCESSOR_HXX
+
+#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
+#include <libxsd-frontend/semantic-graph/schema.hxx>
+
+#include <xsd/types.hxx>
+
+namespace Processing
+{
+ namespace Inheritance
+ {
+ class Processor
+ {
+ public:
+ struct Failed {};
+
+ void
+ process (XSDFrontend::SemanticGraph::Schema&,
+ XSDFrontend::SemanticGraph::Path const& file);
+ };
+ }
+}
+
+#endif // XSD_PROCESSING_INHERITANCE_PROCESSOR_HXX
diff --git a/xsd/xsd/type-map/lexer.cxx b/xsd/xsd/type-map/lexer.cxx
new file mode 100644
index 0000000..ae318d1
--- /dev/null
+++ b/xsd/xsd/type-map/lexer.cxx
@@ -0,0 +1,131 @@
+// file : xsd/type-map/lexer.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <iostream>
+
+#include <xsd/type-map/lexer.hxx>
+
+using std::wcerr;
+using std::endl;
+
+namespace TypeMap
+{
+ Lexer::Lexer (std::istream& is, String const& path)
+ : locale_ ("C"), is_ (is), path_ (path), line_ (1), comment_ (false)
+ {
+ is_.exceptions (std::ios_base::badbit);
+ }
+
+ Lexer::Token Lexer::
+ next ()
+ {
+ if (held_lexeme_)
+ {
+ Token t (Token::punct, held_lexeme_, line_);
+ held_lexeme_.clear ();
+ return t;
+ }
+
+ typedef std::char_traits<char> Traits;
+ typedef Traits::char_type CharType;
+ typedef Traits::int_type IntType;
+
+ IntType i;
+ CharType c ('\0');
+ NarrowString lexeme;
+
+ // Skip all whitespaces including comments.
+ //
+ while (!is_.eof ())
+ {
+ i = is_.get ();
+
+ if (i == Traits::eof ())
+ break;
+
+ c = Traits::to_char_type (i);
+
+ if (comment_)
+ {
+ if (c == '\n')
+ comment_ = false;
+ }
+ else
+ {
+ if (!(std::isspace (c, locale_) || c == '#'))
+ break;
+
+ if (c == '#')
+ comment_ = true;
+ }
+
+ if (c == '\n')
+ ++line_;
+ }
+
+ if (is_.eof ())
+ return Token (Token::eos, L"<end-of-stream>", line_);
+
+ bool quote (c == '"');
+
+ if (!quote)
+ lexeme += c;
+
+ if (c != ';' && c != '{' && c != '}')
+ {
+ // Accumulate non-whitespace character sequence.
+ //
+
+ while (!is_.eof ())
+ {
+ i = is_.get ();
+
+ if (i == Traits::eof ())
+ break;
+
+ c = Traits::to_char_type (i);
+
+ if (!quote && c == '#')
+ {
+ comment_ = true;
+ break;
+ }
+
+ if (std::isspace (c, locale_))
+ {
+ if (c == '\n')
+ ++line_;
+
+ if (!quote)
+ break;
+ }
+
+ if (!quote && (c == ';' || c == '{' || c == '}'))
+ {
+ held_lexeme_ += c;
+ break;
+ }
+
+ if (quote && c == '"')
+ break;
+
+ lexeme += c;
+ }
+
+ if (quote && c != '"')
+ {
+ wcerr << path_ << ":" << line_ << ": error: closing '\"' expected"
+ << endl;
+
+ throw Failed ();
+ }
+ }
+
+ if (!quote && (lexeme == ";" || lexeme == "{" || lexeme == "}"))
+ {
+ return Token (Token::punct, lexeme, line_);
+ }
+ else
+ return Token (Token::token, lexeme, line_);
+ }
+}
diff --git a/xsd/xsd/type-map/lexer.hxx b/xsd/xsd/type-map/lexer.hxx
new file mode 100644
index 0000000..a0e1e44
--- /dev/null
+++ b/xsd/xsd/type-map/lexer.hxx
@@ -0,0 +1,74 @@
+// file : xsd/type-map/lexer.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_TYPE_MAP_LEXER_HXX
+#define XSD_TYPE_MAP_LEXER_HXX
+
+#include <locale>
+#include <iosfwd>
+
+#include <xsd/types.hxx>
+
+namespace TypeMap
+{
+ class Lexer
+ {
+ public:
+ class Token
+ {
+ public:
+ enum Type
+ {
+ token,
+ punct,
+ eos
+ };
+
+ Token (Type type, String const& lexeme, size_t line)
+ : type_ (type), lexeme_ (lexeme), line_ (line)
+ {
+ }
+
+ Type
+ type () const
+ {
+ return type_;
+ }
+
+ String const&
+ lexeme () const
+ {
+ return lexeme_;
+ }
+
+ size_t
+ line () const
+ {
+ return line_;
+ }
+
+ private:
+ Type type_;
+ String lexeme_;
+ size_t line_;
+ };
+
+ Lexer (std::istream&, String const& path);
+
+ struct Failed {};
+
+ Token
+ next ();
+
+ private:
+ std::locale locale_;
+ std::istream& is_;
+ String path_;
+ size_t line_;
+ String held_lexeme_;
+ bool comment_;
+ };
+
+}
+
+#endif // XSD_TYPE_MAP_LEXER_HXX
diff --git a/xsd/xsd/type-map/parser.cxx b/xsd/xsd/type-map/parser.cxx
new file mode 100644
index 0000000..f11fac3
--- /dev/null
+++ b/xsd/xsd/type-map/parser.cxx
@@ -0,0 +1,279 @@
+// file : xsd/type-map/parser.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <iostream>
+
+#include <libcutl/re.hxx>
+
+#include <xsd/type-map/parser.hxx>
+
+using std::endl;
+
+namespace TypeMap
+{
+ typedef Lexer::Token Token;
+ typedef cutl::re::wformat Format;
+
+ Parser::Parser (Lexer& lex, String const& path)
+ : lex_ (lex), path_ (path), e (std::wcerr)
+ {
+ }
+
+ bool Parser::
+ parse (Namespaces& ns)
+ {
+ try
+ {
+ Namespace* global = 0;
+
+ for (Token t (lex_.next ()); t.type () != Token::eos; t = lex_.next ())
+ {
+ String l (t.lexeme ());
+
+ if (l == L"namespace")
+ {
+ global = 0;
+
+ if (!namespace_ (ns))
+ return false;
+ }
+ else if (l == L"include")
+ {
+ if (global == 0)
+ {
+ ns.push_back (Namespace (Pattern ()));
+ global = &(*ns.rbegin ());
+ }
+
+ if (!include (*global))
+ return false;
+ }
+ else if (l == L"type" || t.type () == Token::token)
+ {
+ // Type mapping can have 'type' specifier omitted.
+ //
+ if (l == L"type")
+ t = lex_.next ();
+
+ if (global == 0)
+ {
+ ns.push_back (Namespace (Pattern ()));
+ global = &(*ns.rbegin ());
+ }
+
+ if (!type (t, *global))
+ return false;
+ }
+ else
+ {
+ e << path_ << ":" << t.line () << ": unexpected '" << l << "'"
+ << endl;
+
+ return false;
+ }
+ }
+ }
+ catch (Lexer::Failed const&)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ bool Parser::
+ namespace_ (Namespaces& ns)
+ {
+ // First get XML namespace.
+ //
+ Token t (lex_.next ());
+
+ Pattern xsd_name;
+
+ try
+ {
+ xsd_name = t.lexeme ();
+ }
+ catch (Format const& ex)
+ {
+ e << path_ << ":" << t.line () << ": invalid namespace pattern: "
+ << ex.description ().c_str () << endl;
+ return false;
+ }
+
+ if (t.type () != Token::token)
+ {
+ e << path_ << ":" << t.line () << ": expected XML namespace "
+ << "instead of '" << xsd_name << "'" << endl;
+ return false;
+ }
+
+
+ // See if we've got optional C++ mapping.
+ //
+ t = lex_.next ();
+
+ bool has_cxx_name (false);
+ String cxx_name;
+
+ if (t.type () != Token::token)
+ {
+ if (t.lexeme () != L"{")
+ {
+ e << path_ << ":" << t.line () << ": expected C++ namespace or '{' "
+ << "instead of '" << t.lexeme () << "'" << endl;
+ return false;
+ }
+ }
+ else
+ {
+ has_cxx_name = true;
+ cxx_name = t.lexeme ();
+ }
+
+ // Swallow '{' if needed.
+ //
+ if (has_cxx_name)
+ {
+ t = lex_.next ();
+
+ if (t.type () != Token::punct || t.lexeme () != L"{")
+ {
+ e << path_ << ":" << t.line () << ": expected '{' instead of '"
+ << t.lexeme () << "'" << endl;
+ return false;
+ }
+ }
+
+ Namespace n (xsd_name, has_cxx_name, cxx_name);
+
+ // Parse namespace body.
+ //
+ for (t = lex_.next ();; t = lex_.next ())
+ {
+ String l (t.lexeme ());
+
+ if (l == L"include")
+ {
+ if (!include (n))
+ return false;
+ }
+ else if (l == L"type" || t.type () == Token::token)
+ {
+ // Type mapping can have 'type' specifier omitted.
+ //
+ if (l == L"type")
+ t = lex_.next ();
+
+ if (!type (t, n))
+ return false;
+ }
+ else if (t.type () == Token::punct && l == L"}")
+ {
+ break;
+ }
+ else
+ {
+ e << path_ << ":" << t.line () << ": unexpected '" << l << "'"
+ << endl;
+ return false;
+ }
+ }
+
+ if (cxx_name || n.types_begin () != n.types_end () ||
+ n.includes_begin () != n.includes_end ())
+ {
+ ns.push_back (n);
+ }
+
+ return true;
+ }
+
+ bool Parser::
+ include (Namespace& n)
+ {
+ Token t (lex_.next ());
+
+ String path (t.lexeme ());
+
+ if (t.type () != Token::token)
+ {
+ e << path_ << ":" << t.line () << ": expected include path "
+ << "instead of '" << path << "'" << endl;
+ return false;
+ }
+
+ if (path && path[0] == L'<')
+ n.includes_push_back (path);
+ else
+ n.includes_push_back (L'"' + path + L'"');
+
+ t = lex_.next ();
+
+ if (t.type () != Token::punct || t.lexeme () != L";")
+ {
+ e << path_ << ":" << t.line () << ": expected ';' after '"
+ << path << "'" << endl;
+ return false;
+ }
+
+ return true;
+ }
+
+ bool Parser::
+ type (Token t, Namespace& n)
+ {
+ Pattern xsd_name;
+
+ try
+ {
+ xsd_name = t.lexeme ();
+ }
+ catch (Format const& ex)
+ {
+ e << path_ << ":" << t.line () << ": invalid namespace pattern: "
+ << ex.description ().c_str () << endl;
+ return false;
+ }
+
+ if (t.type () != Token::token)
+ {
+ e << path_ << ":" << t.line () << ": expected XML Schema type name "
+ << "instead of '" << xsd_name << "'" << endl;
+ return false;
+ }
+
+ t = lex_.next ();
+ String cxx_ret_name (t.lexeme ());
+
+ if (t.type () != Token::token)
+ {
+ e << path_ << ":" << t.line () << ": expected C++ type name "
+ << "instead of '" << cxx_ret_name << "'" << endl;
+ return false;
+ }
+
+ t = lex_.next ();
+
+ String cxx_arg_name;
+
+ // See if we've got optional argument type.
+ //
+ if (t.type () == Token::token)
+ {
+ cxx_arg_name = t.lexeme ();
+ t = lex_.next ();
+ }
+
+ if (t.type () != Token::punct || t.lexeme () != L";")
+ {
+ e << path_ << ":" << t.line () << ": expected ';' after '"
+ << cxx_arg_name << "'" << endl;
+ return false;
+ }
+
+ n.types_push_back (xsd_name, cxx_ret_name, cxx_arg_name);
+
+ return true;
+ }
+}
diff --git a/xsd/xsd/type-map/parser.hxx b/xsd/xsd/type-map/parser.hxx
new file mode 100644
index 0000000..ec9ea49
--- /dev/null
+++ b/xsd/xsd/type-map/parser.hxx
@@ -0,0 +1,41 @@
+// file : xsd/type-map/parser.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_TYPE_MAP_PARSER_HXX
+#define XSD_TYPE_MAP_PARSER_HXX
+
+#include <xsd/types.hxx>
+
+#include <xsd/type-map/type-map.hxx>
+#include <xsd/type-map/lexer.hxx>
+
+namespace TypeMap
+{
+ class Parser
+ {
+ public:
+ Parser (Lexer&, String const& path);
+
+ // Merge parsed namespaces.
+ //
+ bool
+ parse (Namespaces&);
+
+ private:
+ bool
+ namespace_ (Namespaces&);
+
+ bool
+ include (Namespace&);
+
+ bool
+ type (Lexer::Token, Namespace&);
+
+ private:
+ Lexer& lex_;
+ String path_;
+ std::wostream& e;
+ };
+}
+
+#endif // XSD_TYPE_MAP_PARSER_HXX
diff --git a/xsd/xsd/type-map/type-map.hxx b/xsd/xsd/type-map/type-map.hxx
new file mode 100644
index 0000000..dd2ec2c
--- /dev/null
+++ b/xsd/xsd/type-map/type-map.hxx
@@ -0,0 +1,178 @@
+// file : xsd/type-map/type-map.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_XSD_TYPE_MAP_TYPE_MAP_HXX
+#define XSD_XSD_TYPE_MAP_TYPE_MAP_HXX
+
+#include <vector>
+
+#include <libcutl/re.hxx>
+
+#include <xsd/types.hxx>
+
+namespace TypeMap
+{
+ typedef cutl::re::wregex Pattern;
+
+ class Type
+ {
+ public:
+ Type (String const& xsd_name,
+ String const& cxx_ret_name,
+ String const& cxx_arg_name)
+ : xsd_name_ (xsd_name),
+ cxx_ret_name_ (cxx_ret_name),
+ cxx_arg_name_ (cxx_arg_name)
+ {
+ }
+
+ Type (Pattern const& xsd_name,
+ String const& cxx_ret_name,
+ String const& cxx_arg_name)
+ : xsd_name_ (xsd_name),
+ cxx_ret_name_ (cxx_ret_name),
+ cxx_arg_name_ (cxx_arg_name)
+ {
+ }
+
+ Pattern const&
+ xsd_name () const
+ {
+ return xsd_name_;
+ }
+
+ String const&
+ cxx_ret_name () const
+ {
+ return cxx_ret_name_;
+ }
+
+ String const&
+ cxx_arg_name () const
+ {
+ return cxx_arg_name_;
+ }
+
+ private:
+ Pattern xsd_name_;
+ String cxx_ret_name_;
+ String cxx_arg_name_;
+ };
+
+ class Namespace
+ {
+ public:
+ Namespace (String const& xsd_name)
+ : xsd_name_ (xsd_name), has_cxx_name_ (false)
+ {
+ }
+
+ Namespace (Pattern const& xsd_name)
+ : xsd_name_ (xsd_name), has_cxx_name_ (false)
+ {
+ }
+
+ Namespace (Pattern const& xsd_name, String const& cxx_name)
+ : xsd_name_ (xsd_name), has_cxx_name_ (true), cxx_name_ (cxx_name)
+ {
+ }
+
+ Namespace (Pattern const& xsd_name,
+ bool has_cxx_name,
+ String const& cxx_name)
+ : xsd_name_ (xsd_name),
+ has_cxx_name_ (has_cxx_name),
+ cxx_name_ (cxx_name)
+ {
+ }
+
+ //
+ //
+ typedef std::vector<String> Includes;
+ typedef Includes::const_iterator IncludesIterator;
+
+ IncludesIterator
+ includes_begin () const
+ {
+ return includes_.begin ();
+ }
+
+ IncludesIterator
+ includes_end () const
+ {
+ return includes_.end ();
+ }
+
+ void
+ includes_push_back (String const& i)
+ {
+ includes_.push_back (i);
+ }
+
+ //
+ //
+ typedef std::vector<Type> Types;
+ typedef Types::const_iterator TypesIterator;
+
+ TypesIterator
+ types_begin () const
+ {
+ return types_.begin ();
+ }
+
+ TypesIterator
+ types_end () const
+ {
+ return types_.end ();
+ }
+
+ void
+ types_push_back (String const& xsd_type,
+ String const& cxx_ret_type,
+ String const& cxx_arg_type = L"")
+ {
+ types_.push_back (Type (xsd_type, cxx_ret_type, cxx_arg_type));
+ }
+
+ void
+ types_push_back (Pattern const& xsd_type,
+ String const& cxx_ret_type,
+ String const& cxx_arg_type = L"")
+ {
+ types_.push_back (Type (xsd_type, cxx_ret_type, cxx_arg_type));
+ }
+
+ //
+ //
+ Pattern const&
+ xsd_name () const
+ {
+ return xsd_name_;
+ }
+
+ //
+ //
+ bool
+ has_cxx_name () const
+ {
+ return has_cxx_name_;
+ }
+
+ String const&
+ cxx_name () const
+ {
+ return cxx_name_;
+ }
+
+ private:
+ Includes includes_;
+ Types types_;
+ Pattern xsd_name_;
+ bool has_cxx_name_;
+ String cxx_name_;
+ };
+
+ typedef std::vector<Namespace> Namespaces;
+}
+
+#endif // XSD_XSD_TYPE_MAP_TYPE_MAP_HXX
diff --git a/xsd/xsd/types.hxx b/xsd/xsd/types.hxx
new file mode 100644
index 0000000..b3306dd
--- /dev/null
+++ b/xsd/xsd/types.hxx
@@ -0,0 +1,19 @@
+// file : xsd/types.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_TYPES_HXX
+#define XSD_TYPES_HXX
+
+#include <vector>
+#include <cstddef> // std::size_t
+
+#include <libxsd-frontend/types.hxx>
+
+using std::size_t;
+
+using XSDFrontend::String;
+using XSDFrontend::NarrowString;
+
+typedef std::vector<NarrowString> NarrowStrings;
+
+#endif // XSD_TYPES_HXX
diff --git a/xsd/xsd/version.hxx.in b/xsd/xsd/version.hxx.in
new file mode 100644
index 0000000..9bfd8a8
--- /dev/null
+++ b/xsd/xsd/version.hxx.in
@@ -0,0 +1,55 @@
+// file : xsd/version.hxx.in
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_VERSION // Note: using the version macro itself.
+
+// The numeric version format is AAAAABBBBBCCCCCDDDE where:
+//
+// AAAAA - major version number
+// BBBBB - minor version number
+// CCCCC - bugfix version number
+// DDD - alpha / beta (DDD + 500) version number
+// E - final (0) / snapshot (1)
+//
+// When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example:
+//
+// Version AAAAABBBBBCCCCCDDDE
+//
+// 0.1.0 0000000001000000000
+// 0.1.2 0000000001000020000
+// 1.2.3 0000100002000030000
+// 2.2.0-a.1 0000200001999990010
+// 3.0.0-b.2 0000299999999995020
+// 2.2.0-a.1.z 0000200001999990011
+//
+#define XSD_VERSION $xsd.version.project_number$ULL
+#define XSD_VERSION_STR "$xsd.version.project$"
+#define XSD_VERSION_ID "$xsd.version.project_id$"
+#define XSD_VERSION_FULL "$xsd.version$"
+
+#define XSD_VERSION_MAJOR $xsd.version.major$
+#define XSD_VERSION_MINOR $xsd.version.minor$
+#define XSD_VERSION_PATCH $xsd.version.patch$
+
+#define XSD_PRE_RELEASE $xsd.version.pre_release$
+
+#define XSD_SNAPSHOT $xsd.version.snapshot_sn$ULL
+#define XSD_SNAPSHOT_ID "$xsd.version.snapshot_id$"
+
+#include <xercesc/util/XercesVersion.hpp>
+
+// Check that we have a compatible Xerces version (3.0.0 or later).
+//
+#if _XERCES_VERSION < 30000
+# error Xerces-C++ 2-series is not supported
+#endif
+
+#include <libcutl/version.hxx>
+
+$libcutl.check(LIBCUTL_VERSION, LIBCUTL_SNAPSHOT)$
+
+#include <libxsd-frontend/version.hxx>
+
+$libxsd_frontend.check(LIBXSD_FRONTEND_VERSION, LIBXSD_FRONTEND_SNAPSHOT)$
+
+#endif // XSD_VERSION
diff --git a/xsd/xsd/xsd.cxx b/xsd/xsd/xsd.cxx
new file mode 100644
index 0000000..90f9a86
--- /dev/null
+++ b/xsd/xsd/xsd.cxx
@@ -0,0 +1,1144 @@
+// file : xsd/xsd.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <map>
+#include <vector>
+#include <memory> // std::unique_ptr
+#include <cstddef> // std::size_t
+#include <iostream>
+#include <fstream>
+
+#include <xercesc/util/PlatformUtils.hpp>
+
+#include <libcutl/re.hxx>
+
+#include <libxsd-frontend/parser.hxx>
+#include <libxsd-frontend/transformations/anonymous.hxx>
+#include <libxsd-frontend/transformations/enum-synthesis.cxx>
+#include <libxsd-frontend/transformations/restriction.hxx>
+#include <libxsd-frontend/transformations/schema-per-type.hxx>
+#include <libxsd-frontend/transformations/simplifier.hxx>
+
+#include <xsd/version.hxx>
+
+#include <xsd/cxx/tree/options.hxx>
+#include <xsd/cxx/parser/options.hxx>
+
+#include <xsd/cxx/tree/generator.hxx>
+#include <xsd/cxx/parser/generator.hxx>
+
+#include <xsd/processing/cardinality/processor.hxx>
+#include <xsd/processing/inheritance/processor.hxx>
+
+#include <xsd/xsd.hxx>
+#include <xsd/types.hxx>
+#include <xsd/options.hxx>
+
+namespace SemanticGraph = XSDFrontend::SemanticGraph;
+namespace Transformations = XSDFrontend::Transformations;
+
+using namespace std;
+
+//
+//
+struct LocationTranslator: XSDFrontend::LocationTranslator
+{
+ struct Failed {};
+
+ LocationTranslator (NarrowStrings const& map,
+ NarrowStrings const& regex,
+ bool trace);
+
+ virtual NarrowString
+ translate (NarrowString const&);
+
+private:
+ typedef map<NarrowString, NarrowString> Map;
+
+ typedef cutl::re::regexsub Regex;
+ typedef cutl::re::format RegexFormat;
+ typedef vector<Regex> RegexVector;
+
+ typedef map<NarrowString, NarrowString> Cache;
+
+ Map map_;
+ RegexVector regex_;
+ Cache cache_;
+ bool trace_;
+};
+
+//
+//
+struct AnonymousNameTranslator: Transformations::AnonymousNameTranslator
+{
+ struct Failed {};
+
+ AnonymousNameTranslator (NarrowStrings const& regex, bool trace);
+
+ virtual String
+ translate (String const& file,
+ String const& ns,
+ String const& name,
+ String const& xpath);
+
+private:
+ typedef cutl::re::wregexsub Regex;
+ typedef cutl::re::wformat RegexFormat;
+ typedef vector<Regex> RegexVector;
+
+ RegexVector regex_;
+ bool trace_;
+
+};
+
+//
+//
+struct SchemaPerTypeTranslator: Transformations::SchemaPerTypeTranslator
+{
+ struct Failed {};
+
+ SchemaPerTypeTranslator (NarrowStrings const& type_regex,
+ bool type_trace,
+ NarrowStrings const& schema_regex,
+ bool schema_trace);
+
+ virtual String
+ translate_type (String const& ns, String const& name);
+
+ virtual NarrowString
+ translate_schema (NarrowString const& file);
+
+private:
+ typedef cutl::re::wregexsub TypeRegex;
+ typedef cutl::re::wformat TypeRegexFormat;
+ typedef vector<TypeRegex> TypeRegexVector;
+
+ TypeRegexVector type_regex_;
+ bool type_trace_;
+
+ typedef cutl::re::regexsub SchemaRegex;
+ typedef cutl::re::format SchemaRegexFormat;
+ typedef vector<SchemaRegex> SchemaRegexVector;
+
+ SchemaRegexVector schema_regex_;
+ bool schema_trace_;
+};
+
+//
+//
+struct XercesInitializer
+{
+ XercesInitializer ()
+ {
+ xercesc::XMLPlatformUtils::Initialize ();
+ }
+
+ ~XercesInitializer ()
+ {
+ xercesc::XMLPlatformUtils::Terminate ();
+ }
+};
+
+// Expand the \n escape sequence.
+//
+void
+expand_nl (NarrowString& s);
+
+int
+main (int argc, char* argv[])
+{
+ wostream& e (wcerr);
+
+ try
+ {
+ cli::argv_file_scanner args (argc, argv, "--options-file");
+ help_options help_ops (args, cli::unknown_mode::stop);
+
+ // Handle --build2-metadata (see also buildfile).
+ //
+ if (help_ops.build2_metadata_specified ())
+ {
+ wostream& o (wcout);
+
+ // Note that the export.metadata variable should be the first non-
+ // blank/comment line.
+ //
+ o << "# build2 buildfile xsd" << endl
+ << "export.metadata = 1 xsd" << endl
+ << "xsd.name = [string] xsd" << endl
+ << "xsd.version = [string] '" << XSD_VERSION_FULL << '\'' << endl
+ << "xsd.checksum = [string] '" << XSD_VERSION_FULL << '\'' << endl;
+
+ return 0;
+ }
+
+ NarrowString cmd;
+ if (args.more ())
+ cmd = args.next ();
+
+ if (help_ops.version () || cmd == "version")
+ {
+ wostream& o (wcout);
+
+ o << "CodeSynthesis XSD XML Schema to C++ compiler " <<
+ XSD_VERSION_STR << endl
+ << "Copyright (c) " << XSD_COPYRIGHT << "." << endl;
+
+ if (!help_ops.proprietary_license () && cmd == "version")
+ {
+ // Parse the options after the command to detect trailing
+ // --proprietary-license.
+ //
+ help_ops = help_options (args, cli::unknown_mode::stop);
+ }
+
+ if (help_ops.proprietary_license ())
+ {
+ o << "The compiler was invoked in the Proprietary License mode. You "
+ << "should have\nreceived a proprietary license from Code Synthesis "
+ << "Tools CC that entitles\nyou to use it in this mode." << endl;
+ }
+ else
+ {
+ o << "This is free software; see the source for copying conditions. "
+ << "There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS "
+ << "FOR A PARTICULAR PURPOSE." << endl;
+ }
+
+ return 0;
+ }
+
+ if (help_ops.help () || cmd == "help")
+ {
+ wostream& o (wcout);
+
+ if (cmd == "help" && args.more ())
+ {
+ NarrowString arg (args.next ());
+
+ if (arg == "cxx-tree")
+ {
+ o << "Usage: " << argv[0] << " cxx-tree [options] file [file ...]"
+ << endl
+ << "Options:" << endl;
+
+ CXX::Tree::Generator::usage ();
+ }
+ else if (arg == "cxx-parser")
+ {
+ o << "Usage: " << argv[0] << " cxx-parser [options] file [file ...]"
+ << endl
+ << "Options:" << endl;
+
+ CXX::Parser::Generator::usage ();
+ }
+ else
+ {
+ o << "error: unknown command '" << arg.c_str () << "'" << endl
+ << "info: try '" << argv[0] << " help' for the list of commands"
+ << endl;
+
+ return 1;
+ }
+
+ // Add frontend options at the end.
+ //
+ options::print_usage (o);
+ }
+ else
+ {
+ o << "Usage: " << argv[0] << " <cmd> ..." << endl
+ << "Commands:" << endl;
+
+ o << " help Print usage information and exit. Use\n"
+ << " 'help <cmd>' for command-specific options."
+ << endl;
+
+ o << " version Print version and exit."
+ << endl;
+
+ o << " cxx-tree Generate the C++/Tree mapping."
+ << endl;
+
+ o << " cxx-parser Generate the C++/Parser mapping."
+ << endl;
+ }
+
+ return 0;
+ }
+
+ if (cmd.empty ())
+ {
+ e << "error: no command specified" << endl
+ << "info: try '" << argv[0] << " help' for usage information" << endl;
+
+ return 1;
+ }
+
+ if (cmd != "cxx-tree" && cmd != "cxx-parser")
+ {
+ e << "error: unknown command '" << cmd.c_str () << "'" << endl
+ << "info: try '" << argv[0] << " help' for the list of commands"
+ << endl;
+
+ return 1;
+ }
+
+ // We need to parse command line options before we can get to
+ // the arguments.
+ //
+ unique_ptr<CXX::Tree::options> tree_ops (
+ cmd == "cxx-tree" ? new CXX::Tree::options (args) : 0);
+
+ unique_ptr<CXX::Parser::options> parser_ops (
+ cmd == "cxx-parser" ? new CXX::Parser::options (args) : 0);
+
+ CXX::options& common_ops (
+ cmd == "cxx-tree"
+ ? static_cast<CXX::options&> (*tree_ops)
+ : static_cast<CXX::options&> (*parser_ops));
+
+ // Disabled warnings.
+ //
+ WarningSet disabled_w;
+ {
+ NarrowStrings const& w (common_ops.disable_warning ());
+
+ for (NarrowStrings::const_iterator i (w.begin ()); i != w.end (); ++i)
+ disabled_w.insert (*i);
+ }
+
+ bool disabled_w_all (disabled_w.find ("all") != disabled_w.end ());
+
+ if (common_ops.morph_anonymous () &&
+ !disabled_w_all &&
+ disabled_w.find ("D001") == disabled_w.end ())
+ {
+ e << "warning D001: the --morph-anonymous option is on by default and "
+ << "no longer required"
+ << endl;
+ }
+
+ // Collect all the files to compile in a vector.
+ //
+ NarrowStrings files;
+
+ while (args.more ())
+ files.push_back (args.next ());
+
+ if (files.empty ())
+ {
+ e << "error: no input file specified" << endl;
+ return 1;
+ }
+
+ bool fpt (common_ops.file_per_type ());
+
+ if (cmd == "cxx-tree" || cmd == "cxx-parser")
+ {
+ bool gen (common_ops.generate_xml_schema ());
+ bool use (common_ops.extern_xml_schema ());
+
+ // Things get complicated when we are compiling several schemas at
+ // once (non-file-per-type mode) and use the --generate-xml-schema/
+ // --extern-xml-schema options. The only way we can figure out which
+ // file corresponds to XML Schema is if the --extern-xml-schema option
+ // is also present. So we are going to require it for this case,
+ // especially since it generally makes sense.
+ //
+ if (!fpt)
+ {
+ if (files.size () > 1 && gen && !use)
+ {
+ e << "error: --extern-xml-schema is required when compiling more "
+ << "than one schema and --generate-xml-schema is specified"
+ << endl;
+
+ return 1;
+ }
+
+ if (files.size () == 1 && gen && use)
+ {
+ e << "error: --generate-xml-schema and --extern-xml-schema are "
+ << "mutually exclusive when compiling a single schema" << endl;
+
+ return 1;
+ }
+ }
+ else
+ {
+ // The --file-per-type and --generate-xml-schema options are
+ // incompatible. It also makes sense to use --file-per-type
+ // and --extern-xml-schema.
+ //
+ if (gen)
+ {
+ e << "error: --file-per-type and --generate-xml-schema are "
+ << "incompatible" << endl
+ << "info: use --generate-xml-schema in a separate invocation "
+ << "of the compiler" << endl;
+
+ return 1;
+ }
+
+ if (!use &&
+ !disabled_w_all && disabled_w.find ("D002") == disabled_w.end ())
+ {
+ e << "warning D002: --extern-xml-schema is recommended when "
+ << "--file-per-type is specified to reduce generated code size"
+ << endl;
+ }
+ }
+ }
+
+ //
+ //
+ FileList file_list;
+ AutoUnlinks unlinks;
+ size_t sloc (0);
+
+ LocationTranslator loc_translator (
+ common_ops.location_map (),
+ common_ops.location_regex (),
+ common_ops.location_regex_trace ());
+
+ AnonymousNameTranslator anon_translator (
+ common_ops.anonymous_regex (),
+ common_ops.anonymous_regex_trace ());
+
+ // Load custom string literals, if any.
+ //
+ CXX::StringLiteralMap string_literal_map;
+
+ if (NarrowString file = common_ops.custom_literals ())
+ {
+ XercesInitializer xerces_init;
+
+ if (!CXX::read_literal_map (file, string_literal_map))
+ {
+ // Diagnostics has already been issued.
+ //
+ return 1;
+ }
+ }
+
+ if (!fpt)
+ {
+ // File-per-schema compilation mode.
+ //
+
+ for (size_t i (0); i < files.size (); ++i)
+ {
+ // Parse schema.
+ //
+ SemanticGraph::Path tu;
+
+ try
+ {
+ tu = SemanticGraph::Path (files[i]);
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ e << "error: '" << files[i].c_str () << "' is not a valid "
+ << "filesystem path" << endl;
+
+ return 1;
+ }
+
+ XSDFrontend::Parser parser (
+ cmd != "cxx-tree",
+ !common_ops.disable_multi_import (),
+ !common_ops.disable_full_check (),
+ loc_translator,
+ disabled_w);
+
+ unique_ptr<SemanticGraph::Schema> schema;
+
+ if (cmd == "cxx-tree" || cmd == "cxx-parser")
+ {
+ // See if we are generating code for the XML Schema namespace.
+ // We could be compiling several schemas at once in which case
+ // handling of the --generate-xml-schema option gets tricky: we
+ // will need to rely on the presence of the --extern-xml-schema
+ // to tell us which (fake) schema file corresponds to XML Schema.
+ //
+ bool gen_xml_schema (common_ops.generate_xml_schema ());
+
+ if (gen_xml_schema)
+ {
+ if (NarrowString name = common_ops.extern_xml_schema ())
+ {
+ if (tu.string () != name)
+ gen_xml_schema = false;
+ }
+ }
+
+ if (gen_xml_schema)
+ schema = parser.xml_schema (tu);
+ else
+ schema = parser.parse (tu);
+ }
+ else
+ schema = parser.parse (tu);
+
+ // Morph anonymous types.
+ //
+ if (!common_ops.preserve_anonymous ())
+ {
+ try
+ {
+ Transformations::Anonymous trans (anon_translator);
+ trans.transform (*schema, tu, true);
+ }
+ catch (Transformations::Anonymous::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+ }
+
+ // Synthesize enumerations from unions.
+ //
+ if (cmd == "cxx-tree")
+ {
+ Transformations::EnumSynthesis trans;
+ trans.transform (*schema, tu);
+ }
+
+ // Simplify the schema graph.
+ //
+ if (cmd == "cxx-parser")
+ {
+ Transformations::Simplifier trans;
+ trans.transform (*schema, tu);
+ }
+
+ // Try to rearrange definitions so that there is no forward
+ // inheritance.
+ //
+ try
+ {
+ Processing::Inheritance::Processor proc;
+ proc.process (*schema, tu);
+ }
+ catch (Processing::Inheritance::Processor::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+
+ // Normalize and annotate complex content restrictions.
+ //
+ if (cmd == "cxx-parser")
+ {
+ try
+ {
+ Transformations::Restriction trans;
+ trans.transform (*schema, tu);
+ }
+ catch (Transformations::Restriction::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+ }
+
+ // Calculate cardinality.
+ //
+ {
+ Processing::Cardinality::Processor proc;
+ proc.process (*schema, tu);
+ }
+
+ // Generate mapping.
+ //
+ if (cmd == "cxx-tree")
+ {
+ try
+ {
+ sloc += CXX::Tree::Generator::generate (
+ *tree_ops,
+ *schema,
+ tu,
+ false,
+ string_literal_map,
+ disabled_w,
+ file_list,
+ unlinks);
+ }
+ catch (CXX::Tree::Generator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ //
+ return 1;
+ }
+ }
+ else if (cmd == "cxx-parser")
+ {
+ try
+ {
+ sloc += CXX::Parser::Generator::generate (
+ *parser_ops,
+ *schema,
+ tu,
+ false,
+ string_literal_map,
+ true,
+ disabled_w,
+ file_list,
+ unlinks);
+ }
+ catch (CXX::Parser::Generator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ //
+ return 1;
+ }
+ }
+ }
+ }
+ else
+ {
+ // File-per-type compilation mode.
+ //
+ SemanticGraph::Paths paths;
+
+ for (size_t i (0); i < files.size (); ++i)
+ {
+ try
+ {
+ paths.push_back (SemanticGraph::Path (files[i]));
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ e << "error: '" << files[i].c_str () << "' is not a valid "
+ << "filesystem path" << endl;
+
+ return 1;
+ }
+ }
+
+ if (cmd == "cxx-parser" &&
+ paths.size () > 1 &&
+ parser_ops->generate_test_driver ())
+ {
+ e << "info: generating test driver for the first schema only: '" <<
+ paths[0] << "'" << endl;
+ }
+
+ XSDFrontend::Parser parser (
+ cmd != "cxx-tree",
+ !common_ops.disable_multi_import (),
+ !common_ops.disable_full_check (),
+ loc_translator,
+ disabled_w);
+
+ unique_ptr<SemanticGraph::Schema> schema (parser.parse (paths));
+
+ // Morph anonymous types.
+ //
+ if (!common_ops.preserve_anonymous ())
+ {
+ try
+ {
+ Transformations::Anonymous trans (anon_translator);
+ trans.transform (*schema, SemanticGraph::Path (), false);
+ }
+ catch (Transformations::Anonymous::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+ }
+
+ // Synthesize enumerations from unions.
+ //
+ if (cmd == "cxx-tree")
+ {
+ Transformations::EnumSynthesis trans;
+ trans.transform (*schema, SemanticGraph::Path ());
+ }
+
+ // Simplify the schema graph.
+ //
+ if (cmd == "cxx-parser")
+ {
+ Transformations::Simplifier trans;
+ trans.transform (*schema, SemanticGraph::Path ());
+ }
+
+ // Normalize and annotate complex content restrictions.
+ //
+ if (cmd == "cxx-parser")
+ {
+ try
+ {
+ Transformations::Restriction trans;
+ trans.transform (*schema, SemanticGraph::Path ());
+ }
+ catch (Transformations::Restriction::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+ }
+
+ // Calculate cardinality.
+ //
+ {
+ Processing::Cardinality::Processor proc;
+ proc.process (*schema, SemanticGraph::Path ());
+ }
+
+ // Rearrange the graph so that each type is in a seperate
+ // schema file.
+ //
+ typedef vector<SemanticGraph::Schema*> Schemas;
+
+ SchemaPerTypeTranslator type_translator (
+ common_ops.type_file_regex (),
+ common_ops.type_file_regex_trace (),
+ common_ops.schema_file_regex (),
+ common_ops.schema_file_regex_trace ());
+
+ Transformations::SchemaPerType trans (
+ type_translator,
+ common_ops.fat_type_file ());
+
+ Schemas schemas (trans.transform (*schema));
+
+ // Generate code.
+ //
+ for (Schemas::iterator b (schemas.begin ()), i (b), e (schemas.end ());
+ i != e; ++i)
+ {
+ SemanticGraph::Schema& s (**i);
+ SemanticGraph::Path path (
+ s.context ().count ("renamed")
+ ? s.context ().get<SemanticGraph::Path> ("renamed")
+ : s.used_begin ()->path ());
+
+ if (cmd == "cxx-tree")
+ {
+ try
+ {
+ sloc += CXX::Tree::Generator::generate (
+ *tree_ops,
+ s,
+ path,
+ true,
+ string_literal_map,
+ disabled_w,
+ file_list,
+ unlinks);
+ }
+ catch (CXX::Tree::Generator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ //
+ return 1;
+ }
+ }
+ else if (cmd == "cxx-parser")
+ {
+ try
+ {
+ // Only generate driver for the first schema.
+ //
+ sloc += CXX::Parser::Generator::generate (
+ *parser_ops,
+ s,
+ path,
+ true,
+ string_literal_map,
+ i == b,
+ disabled_w,
+ file_list,
+ unlinks);
+ }
+ catch (CXX::Parser::Generator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ //
+ return 1;
+ }
+ }
+ }
+ }
+
+ // See if we need to produce the file list.
+ //
+ if (NarrowString fl = common_ops.file_list ())
+ {
+ typedef std::ofstream OutputFileStream;
+
+ try
+ {
+ OutputFileStream ofs;
+ SemanticGraph::Path path (fl);
+
+ ofs.open (path.string ().c_str (), ios_base::out);
+
+ if (!ofs.is_open ())
+ {
+ wcerr << path << ": error: unable to open in write mode" << endl;
+ return 1;
+ }
+
+ NarrowString d (common_ops.file_list_delim ());
+ expand_nl (d);
+
+ if (NarrowString p = common_ops.file_list_prologue ())
+ {
+ expand_nl (p);
+ ofs << p;
+ }
+
+ for (FileList::iterator i (file_list.begin ()), e (file_list.end ());
+ i != e;)
+ {
+ ofs << *i;
+
+ if (++i != e)
+ ofs << d;
+ }
+
+ if (NarrowString e = common_ops.file_list_epilogue ())
+ {
+ expand_nl (e);
+ ofs << e;
+ }
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ wcerr << "error: '" << fl.c_str () << "' is not a valid "
+ << "filesystem path" << endl;
+ return 1;
+ }
+ }
+
+ if (common_ops.show_sloc ())
+ e << "total: " << sloc << endl;
+
+ if (size_t sloc_limit = common_ops.sloc_limit ())
+ {
+ if (sloc_limit < sloc)
+ {
+ e << "error: SLOC limit of " << sloc_limit
+ << " lines has been exceeded" << endl;
+
+ return 1;
+ }
+ }
+
+ unlinks.cancel ();
+
+ return 0;
+ }
+ catch (LocationTranslator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ }
+ catch (AnonymousNameTranslator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ }
+ catch (SchemaPerTypeTranslator::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ }
+ catch (Transformations::SchemaPerType::Failed const&)
+ {
+ // Diagnostic has already been issued.
+ }
+ catch (XSDFrontend::InvalidSchema const&)
+ {
+ // Diagnostic has already been issued.
+ }
+ catch (cli::exception const& ex)
+ {
+ wcerr << ex << endl;
+ wcerr << "try '" << argv[0] << " help' for usage information" << endl;
+ }
+
+ return 1;
+}
+
+// LocationTranslator
+//
+
+LocationTranslator::
+LocationTranslator (NarrowStrings const& map,
+ NarrowStrings const& regex,
+ bool trace)
+ : trace_ (trace)
+{
+ // Map.
+ //
+ for (NarrowStrings::const_iterator i (map.begin ()); i != map.end (); ++i)
+ {
+ // Split the string in two parts at the last '='.
+ //
+ size_t pos (i->rfind ('='));
+
+ if (pos == NarrowString::npos)
+ {
+ wcerr << "error: invalid location map: '" << i->c_str () <<
+ "': delimiter ('=') not found" << endl;
+
+ throw Failed ();
+ }
+
+ map_[NarrowString (*i, 0, pos)] = NarrowString (*i, pos + 1);
+ }
+
+ // Regex.
+ //
+ for (NarrowStrings::const_iterator i (regex.begin ()); i != regex.end (); ++i)
+ {
+ try
+ {
+ regex_.push_back (Regex (*i));
+ }
+ catch (RegexFormat const& e)
+ {
+ wcerr << "error: invalid location regex: '" <<
+ e.regex ().c_str () << "': " <<
+ e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+}
+
+NarrowString LocationTranslator::
+translate (NarrowString const& l)
+{
+ // First check the cache.
+ //
+ Cache::const_iterator ci (cache_.find (l));
+
+ if (ci != cache_.end ())
+ return ci->second;
+
+ // Then check the direct map.
+ //
+ Map::const_iterator mi (map_.find (l));
+
+ if (mi != map_.end ())
+ {
+ cache_[l] = mi->second;
+ return mi->second;
+ }
+
+ // Finally try regex.
+ //
+ if (trace_)
+ wcerr << "location: '" << l.c_str () << "'" << endl;
+
+ for (RegexVector::reverse_iterator i (regex_.rbegin ());
+ i != regex_.rend (); ++i)
+ {
+ if (trace_)
+ wcerr << "try: '" << i->regex ().str ().c_str () << "' : ";
+
+ if (i->match (l))
+ {
+ NarrowString r (i->replace (l));
+
+ if (trace_)
+ wcerr << "'" << r.c_str () << "' : +" << endl;
+
+ cache_[l] = r;
+ return r;
+ }
+
+ if (trace_)
+ wcerr << '-' << endl;
+ }
+
+ // No match - return the original location.
+ //
+ cache_[l] = l;
+ return l;
+}
+
+// AnonymousNameTranslator
+//
+
+AnonymousNameTranslator::
+AnonymousNameTranslator (NarrowStrings const& regex, bool trace)
+ : trace_ (trace)
+{
+ for (NarrowStrings::const_iterator i (regex.begin ()); i != regex.end (); ++i)
+ {
+ try
+ {
+ regex_.push_back (Regex (String (*i)));
+ }
+ catch (RegexFormat const& e)
+ {
+ wcerr << "error: invalid anonymous type regex: '" <<
+ e.regex () << "': " << e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+}
+
+String AnonymousNameTranslator::
+translate (String const& file,
+ String const& ns,
+ String const& name,
+ String const& xpath)
+{
+ String s (file + L' ' + ns + L' ' + xpath);
+
+ if (trace_)
+ wcerr << "anonymous type: '" << s << "'" << endl;
+
+ for (RegexVector::reverse_iterator i (regex_.rbegin ());
+ i != regex_.rend (); ++i)
+ {
+ if (trace_)
+ wcerr << "try: '" << i->regex () << "' : ";
+
+ if (i->match (s))
+ {
+ String r (i->replace (s));
+
+ if (trace_)
+ wcerr << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (trace_)
+ wcerr << '-' << endl;
+ }
+
+ // No match - return the name.
+ //
+ return name;
+}
+
+// SchemaPerTypeTranslator
+//
+
+SchemaPerTypeTranslator::
+SchemaPerTypeTranslator (NarrowStrings const& type_regex,
+ bool type_trace,
+ NarrowStrings const& schema_regex,
+ bool schema_trace)
+ : type_trace_ (type_trace), schema_trace_ (schema_trace)
+{
+ for (NarrowStrings::const_iterator i (type_regex.begin ());
+ i != type_regex.end (); ++i)
+ {
+ try
+ {
+ type_regex_.push_back (TypeRegex (String (*i)));
+ }
+ catch (TypeRegexFormat const& e)
+ {
+ wcerr << "error: invalid type file regex: '" <<
+ e.regex () << "': " << e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+
+ for (NarrowStrings::const_iterator i (schema_regex.begin ());
+ i != schema_regex.end (); ++i)
+ {
+ try
+ {
+ schema_regex_.push_back (SchemaRegex (*i));
+ }
+ catch (SchemaRegexFormat const& e)
+ {
+ wcerr << "error: invalid type file regex: '" <<
+ e.regex ().c_str () << "': " << e.description ().c_str () << endl;
+
+ throw Failed ();
+ }
+ }
+}
+
+String SchemaPerTypeTranslator::
+translate_type (String const& ns, String const& name)
+{
+ String s (ns + L' ' + name);
+
+ if (type_trace_)
+ wcerr << "type: '" << s << "'" << endl;
+
+ for (TypeRegexVector::reverse_iterator i (type_regex_.rbegin ());
+ i != type_regex_.rend (); ++i)
+ {
+ if (type_trace_)
+ wcerr << "try: '" << i->regex () << "' : ";
+
+ if (i->match (s))
+ {
+ String r (i->replace (s));
+
+ if (type_trace_)
+ wcerr << "'" << r << "' : +" << endl;
+
+ return r;
+ }
+
+ if (type_trace_)
+ wcerr << '-' << endl;
+ }
+
+ // No match - return empty string.
+ //
+ return L"";
+}
+
+NarrowString SchemaPerTypeTranslator::
+translate_schema (NarrowString const& file)
+{
+ if (schema_trace_)
+ wcerr << "schema: '" << file.c_str () << "'" << endl;
+
+ for (SchemaRegexVector::reverse_iterator i (schema_regex_.rbegin ());
+ i != schema_regex_.rend (); ++i)
+ {
+ if (schema_trace_)
+ wcerr << "try: '" << i->regex ().str ().c_str () << "' : ";
+
+ if (i->match (file))
+ {
+ NarrowString r (i->replace (file));
+
+ if (schema_trace_)
+ wcerr << "'" << r.c_str () << "' : +" << endl;
+
+ return r;
+ }
+
+ if (schema_trace_)
+ wcerr << '-' << endl;
+ }
+
+ // No match - return empty string.
+ //
+ return "";
+}
+
+//
+//
+void
+expand_nl (NarrowString& s)
+{
+ for (size_t i (0); i < s.size ();)
+ {
+ if (s[i] == '\\' && (i + 1) < s.size () && s[i + 1] == 'n')
+ {
+ NarrowString tmp (s, 0, i);
+ tmp += '\n';
+ tmp.append (s.c_str () + i + 2);
+ s = tmp;
+ }
+ else
+ ++i;
+ }
+}
diff --git a/xsd/xsd/xsd.hxx b/xsd/xsd/xsd.hxx
new file mode 100644
index 0000000..5ce2926
--- /dev/null
+++ b/xsd/xsd/xsd.hxx
@@ -0,0 +1,24 @@
+// file : xsd/xsd.hxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSD_XSD_HXX
+#define XSD_XSD_HXX
+
+#include <set>
+#include <vector>
+#include <cstdio> // std::remove
+
+#include <libcutl/shared-ptr.hxx>
+#include <libcutl/fs/auto-remove.hxx>
+
+#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
+
+#include <xsd/types.hxx>
+
+typedef std::set<NarrowString> WarningSet;
+typedef std::vector<NarrowString> FileList;
+
+typedef cutl::fs::auto_remove AutoUnlink;
+typedef cutl::fs::auto_removes AutoUnlinks;
+
+#endif // XSD_XSD_HXX