diff options
Diffstat (limited to 'dist/examples')
30 files changed, 326 insertions, 0 deletions
diff --git a/dist/examples/cxx/hybrid/binary/cdr/makefile b/dist/examples/cxx/hybrid/binary/cdr/makefile index 96c6274..6814623 100644 --- a/dist/examples/cxx/hybrid/binary/cdr/makefile +++ b/dist/examples/cxx/hybrid/binary/cdr/makefile @@ -24,6 +24,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o library.o library-pskel.o library-pimpl.o \ library-sskel.o library-simpl.o $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/binary/cdr/nmakefile b/dist/examples/cxx/hybrid/binary/cdr/nmakefile index a87ded2..f08cd4c 100644 --- a/dist/examples/cxx/hybrid/binary/cdr/nmakefile +++ b/dist/examples/cxx/hybrid/binary/cdr/nmakefile @@ -24,6 +24,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj library.obj library-pskel.obj library-pimpl.obj \ library-sskel.obj library-simpl.obj $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/binary/custom/makefile b/dist/examples/cxx/hybrid/binary/custom/makefile index c0e57ad..39ba93c 100644 --- a/dist/examples/cxx/hybrid/binary/custom/makefile +++ b/dist/examples/cxx/hybrid/binary/custom/makefile @@ -22,6 +22,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o library.o library-pskel.o library-pimpl.o \ library-sskel.o library-simpl.o exceptions.o orawstream.o \ irawstream.o $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/binary/custom/nmakefile b/dist/examples/cxx/hybrid/binary/custom/nmakefile index b53db8e..c99b887 100644 --- a/dist/examples/cxx/hybrid/binary/custom/nmakefile +++ b/dist/examples/cxx/hybrid/binary/custom/nmakefile @@ -22,6 +22,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj library.obj library-pskel.obj library-pimpl.obj \ library-sskel.obj library-simpl.obj exceptions.obj orawstream.obj \ irawstream.obj $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/binary/xdr/makefile b/dist/examples/cxx/hybrid/binary/xdr/makefile index 95ceade..ede26ea 100644 --- a/dist/examples/cxx/hybrid/binary/xdr/makefile +++ b/dist/examples/cxx/hybrid/binary/xdr/makefile @@ -24,6 +24,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o library.o library-pskel.o library-pimpl.o \ library-sskel.o library-simpl.o $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/binary/xdr/nmakefile b/dist/examples/cxx/hybrid/binary/xdr/nmakefile index f71e178..2930de2 100644 --- a/dist/examples/cxx/hybrid/binary/xdr/nmakefile +++ b/dist/examples/cxx/hybrid/binary/xdr/nmakefile @@ -22,6 +22,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj library.obj library-pskel.obj library-pimpl.obj \ library-sskel.obj library-simpl.obj $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/compositors/makefile b/dist/examples/cxx/hybrid/compositors/makefile index fbc44f9..d030bf4 100644 --- a/dist/examples/cxx/hybrid/compositors/makefile +++ b/dist/examples/cxx/hybrid/compositors/makefile @@ -30,6 +30,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o compositors.o $(root)/libxsde/xsde/libxsde.a driver.o: driver.cxx compositors.hxx diff --git a/dist/examples/cxx/hybrid/compositors/nmakefile b/dist/examples/cxx/hybrid/compositors/nmakefile index 9bc77b7..b51cbe3 100644 --- a/dist/examples/cxx/hybrid/compositors/nmakefile +++ b/dist/examples/cxx/hybrid/compositors/nmakefile @@ -30,6 +30,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj compositors.obj $(root)\libxsde\xsde\xsde.lib driver.obj: driver.cxx compositors.hxx diff --git a/dist/examples/cxx/hybrid/custom/wildcard/makefile b/dist/examples/cxx/hybrid/custom/wildcard/makefile index e0a881d..71283bb 100644 --- a/dist/examples/cxx/hybrid/custom/wildcard/makefile +++ b/dist/examples/cxx/hybrid/custom/wildcard/makefile @@ -18,6 +18,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o email.o body.o email-pskel.o email-pimpl.o \ email-sskel.o email-simpl.o envelope-pimpl.o envelope-simpl.o \ $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/custom/wildcard/nmakefile b/dist/examples/cxx/hybrid/custom/wildcard/nmakefile index 0a88820..33f3570 100644 --- a/dist/examples/cxx/hybrid/custom/wildcard/nmakefile +++ b/dist/examples/cxx/hybrid/custom/wildcard/nmakefile @@ -18,6 +18,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj email.obj body.obj email-pskel.obj email-pimpl.obj \ email-sskel.obj email-simpl.obj envelope-pimpl.obj envelope-simpl.obj \ $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/filter/makefile b/dist/examples/cxx/hybrid/filter/makefile index f1ea235..f9137fc 100644 --- a/dist/examples/cxx/hybrid/filter/makefile +++ b/dist/examples/cxx/hybrid/filter/makefile @@ -18,6 +18,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o people.o people-pskel.o people-pimpl.o people-sskel.o \ people-simpl.o people-custom-pimpl.o people-custom-simpl.o \ $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/filter/nmakefile b/dist/examples/cxx/hybrid/filter/nmakefile index b93ac66..0343a90 100644 --- a/dist/examples/cxx/hybrid/filter/nmakefile +++ b/dist/examples/cxx/hybrid/filter/nmakefile @@ -18,6 +18,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj people.obj people-pskel.obj people-pimpl.obj \ people-sskel.obj people-simpl.obj people-custom-pimpl.obj \ people-custom-simpl.obj $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/hello/makefile b/dist/examples/cxx/hybrid/hello/makefile index f184264..3a6f645 100644 --- a/dist/examples/cxx/hybrid/hello/makefile +++ b/dist/examples/cxx/hybrid/hello/makefile @@ -22,6 +22,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o hello.o hello-pskel.o hello-pimpl.o \ $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/hello/nmakefile b/dist/examples/cxx/hybrid/hello/nmakefile index 4044cb1..2e5730f 100644 --- a/dist/examples/cxx/hybrid/hello/nmakefile +++ b/dist/examples/cxx/hybrid/hello/nmakefile @@ -22,6 +22,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj hello.obj hello-pskel.obj hello-pimpl.obj \ $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/library/makefile b/dist/examples/cxx/hybrid/library/makefile index 8610879..be92939 100644 --- a/dist/examples/cxx/hybrid/library/makefile +++ b/dist/examples/cxx/hybrid/library/makefile @@ -18,6 +18,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o library.o library-pskel.o library-pimpl.o \ library-sskel.o library-simpl.o $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/library/nmakefile b/dist/examples/cxx/hybrid/library/nmakefile index 5585416..b5a622b 100644 --- a/dist/examples/cxx/hybrid/library/nmakefile +++ b/dist/examples/cxx/hybrid/library/nmakefile @@ -18,6 +18,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj library.obj library-pskel.obj library-pimpl.obj \ library-sskel.obj library-simpl.obj $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/makefile b/dist/examples/cxx/hybrid/makefile index 11af66b..3a9ddaa 100644 --- a/dist/examples/cxx/hybrid/makefile +++ b/dist/examples/cxx/hybrid/makefile @@ -13,6 +13,10 @@ ifeq ($(XSDE_STL),y) dirs += library wildcard filter endif +ifeq ($(XSDE_POLYMORPHIC),y) +dirs += polymorphism polyroot +endif + endif endif diff --git a/dist/examples/cxx/hybrid/minimal/makefile b/dist/examples/cxx/hybrid/minimal/makefile index 87e5325..14b7008 100644 --- a/dist/examples/cxx/hybrid/minimal/makefile +++ b/dist/examples/cxx/hybrid/minimal/makefile @@ -24,6 +24,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o people.o people-pskel.o people-pimpl.o \ people-sskel.o people-simpl.o $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/minimal/nmakefile b/dist/examples/cxx/hybrid/minimal/nmakefile index 6a1c736..f3faf72 100644 --- a/dist/examples/cxx/hybrid/minimal/nmakefile +++ b/dist/examples/cxx/hybrid/minimal/nmakefile @@ -24,6 +24,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj people.obj people-pskel.obj people-pimpl.obj \ people-sskel.obj people-simpl.obj $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/multiroot/makefile b/dist/examples/cxx/hybrid/multiroot/makefile index 28423c1..d427726 100644 --- a/dist/examples/cxx/hybrid/multiroot/makefile +++ b/dist/examples/cxx/hybrid/multiroot/makefile @@ -22,6 +22,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o protocol.o protocol-pskel.o protocol-pimpl.o \ $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/multiroot/nmakefile b/dist/examples/cxx/hybrid/multiroot/nmakefile index a647e50..bd3ffe3 100644 --- a/dist/examples/cxx/hybrid/multiroot/nmakefile +++ b/dist/examples/cxx/hybrid/multiroot/nmakefile @@ -22,6 +22,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj protocol.obj protocol-pskel.obj protocol-pimpl.obj \ $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/nmakefile b/dist/examples/cxx/hybrid/nmakefile index d9d791c..70d4dfe 100644 --- a/dist/examples/cxx/hybrid/nmakefile +++ b/dist/examples/cxx/hybrid/nmakefile @@ -13,6 +13,10 @@ dirs = $(dirs) hello multiroot streaming dirs = $(dirs) library wildcard filter !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +dirs = $(dirs) polymorphism polyroot +!endif + !endif !endif diff --git a/dist/examples/cxx/hybrid/polymorphism/makefile b/dist/examples/cxx/hybrid/polymorphism/makefile new file mode 100644 index 0000000..353e692 --- /dev/null +++ b/dist/examples/cxx/hybrid/polymorphism/makefile @@ -0,0 +1,56 @@ +root := ../../../.. + +include $(root)/build/cxx/rules.make + +# Build. +# +EXTRA_CPPFLAGS := -I$(root)/libxsde + +ifeq ($(XSDE_STL),n) +EXTRA_XSDFLAGS += --no-stl +endif + +ifeq ($(XSDE_LONGLONG),n) +EXTRA_XSDFLAGS += --no-long-long +endif + +ifeq ($(XSDE_PARSER_VALIDATION),n) +EXTRA_XSDFLAGS += --suppress-validation +endif + +ifeq ($(XSDE_REUSE_STYLE),mixin) +EXTRA_XSDFLAGS += --reuse-style-mixin +endif + +driver: driver.o supermen.o supermen-pskel.o supermen-pimpl.o \ +supermen-sskel.o supermen-simpl.o $(root)/libxsde/xsde/libxsde.a + +driver.o: driver.cxx supermen.hxx supermen-pimpl.hxx supermen-simpl.hxx +supermen.o: supermen.cxx supermen.hxx +supermen-pskel.o: supermen-pskel.cxx +supermen-pimpl.o: supermen-pimpl.cxx +supermen-simpl.o: supermen-simpl.cxx +supermen-simpl.o: supermen-simpl.cxx + +.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \ +%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx + +%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \ +%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd + $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \ +--generate-parser --generate-serializer --generate-aggregate \ +--generate-polymorphic --generate-typeinfo --root-element supermen $< + +# Test. +# +.PHONY: test +test: driver supermen.xml + ./driver supermen.xml + +# Clean. +# +.PHONY: clean +clean: + rm -f supermen-pimpl.?xx supermen-pskel.?xx supermen-simpl.?xx \ +supermen-sskel.?xx supermen.?xx supermen-pimpl.o supermen-pskel.o \ +supermen-simpl.o supermen-sskel.o supermen.o driver.o driver diff --git a/dist/examples/cxx/hybrid/polymorphism/nmakefile b/dist/examples/cxx/hybrid/polymorphism/nmakefile new file mode 100644 index 0000000..479a557 --- /dev/null +++ b/dist/examples/cxx/hybrid/polymorphism/nmakefile @@ -0,0 +1,53 @@ +root = ..\..\..\.. + +!include $(root)\build\cxx\rules.nmake + +# Build. +# +EXTRA_CPPFLAGS = /I$(root)\libxsde + +!if "$(XSDE_STL)" == "n" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl +!endif + +!if "$(XSDE_LONGLONG)" == "n" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long +!endif + +!if "$(XSDE_PARSER_VALIDATION)" == "n" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation +!endif + +!if "$(XSDE_REUSE_STYLE)" == "mixin" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin +!endif + +driver.exe: driver.obj supermen.obj supermen-pskel.obj supermen-pimpl.obj \ +supermen-sskel.obj supermen-simpl.obj $(root)\libxsde\xsde\xsde.lib + +driver.obj: driver.cxx supermen.hxx supermen-pimpl.hxx supermen-simpl.hxx +supermen.obj: supermen.cxx +supermen-pskel.obj: supermen-pskel.cxx +supermen-pimpl.obj: supermen-pimpl.cxx +supermen-sskel.obj: supermen-sskel.cxx +supermen-simpl.obj: supermen-simpl.cxx + +supermen.cxx supermen.hxx \ +supermen-pskel.cxx supermen-pskel.hxx supermen-pimpl.cxx supermen-pimpl.hxx \ +supermen-sskel.cxx supermen-sskel.hxx supermen-simpl.cxx supermen-simpl.hxx \ +: supermen.xsd + $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \ +--generate-parser --generate-serializer --generate-aggregate \ +--generate-polymorphic --generate-typeinfo --root-element supermen supermen.xsd + +# Test. +# +test: driver.exe supermen.xml + .\driver.exe supermen.xml + +# Clean. +# +clean: + -del supermen-pimpl.?xx supermen-pskel.?xx supermen-simpl.?xx \ +supermen-sskel.?xx supermen.?xx supermen-pimpl.obj supermen-pskel.obj \ +supermen-simpl.obj supermen-sskel.obj supermen.obj driver.obj driver.exe diff --git a/dist/examples/cxx/hybrid/polyroot/makefile b/dist/examples/cxx/hybrid/polyroot/makefile new file mode 100644 index 0000000..d38f04c --- /dev/null +++ b/dist/examples/cxx/hybrid/polyroot/makefile @@ -0,0 +1,58 @@ +root := ../../../.. + +include $(root)/build/cxx/rules.make + +# Build. +# +EXTRA_CPPFLAGS := -I$(root)/libxsde + +ifeq ($(XSDE_STL),n) +EXTRA_XSDFLAGS += --no-stl +endif + +ifeq ($(XSDE_LONGLONG),n) +EXTRA_XSDFLAGS += --no-long-long +endif + +ifeq ($(XSDE_PARSER_VALIDATION),n) +EXTRA_XSDFLAGS += --suppress-validation +endif + +ifeq ($(XSDE_REUSE_STYLE),mixin) +EXTRA_XSDFLAGS += --reuse-style-mixin +endif + +driver: driver.o supermen.o supermen-pskel.o supermen-pimpl.o \ +supermen-sskel.o supermen-simpl.o $(root)/libxsde/xsde/libxsde.a + +driver.o: driver.cxx supermen.hxx supermen-pimpl.hxx supermen-simpl.hxx +supermen.o: supermen.cxx supermen.hxx +supermen-pskel.o: supermen-pskel.cxx +supermen-pimpl.o: supermen-pimpl.cxx +supermen-simpl.o: supermen-simpl.cxx +supermen-simpl.o: supermen-simpl.cxx + +.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \ +%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx + +%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \ +%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd + $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \ +--generate-parser --generate-serializer --generate-aggregate \ +--generate-polymorphic --generate-typeinfo --root-element person $< + +# Test. +# +.PHONY: test +test: driver person.xml batman.xml superman.xml + ./driver person.xml + ./driver batman.xml + ./driver superman.xml + +# Clean. +# +.PHONY: clean +clean: + rm -f supermen-pimpl.?xx supermen-pskel.?xx supermen-simpl.?xx \ +supermen-sskel.?xx supermen.?xx supermen-pimpl.o supermen-pskel.o \ +supermen-simpl.o supermen-sskel.o supermen.o driver.o driver diff --git a/dist/examples/cxx/hybrid/polyroot/nmakefile b/dist/examples/cxx/hybrid/polyroot/nmakefile new file mode 100644 index 0000000..8d098bb --- /dev/null +++ b/dist/examples/cxx/hybrid/polyroot/nmakefile @@ -0,0 +1,55 @@ +root = ..\..\..\.. + +!include $(root)\build\cxx\rules.nmake + +# Build. +# +EXTRA_CPPFLAGS = /I$(root)\libxsde + +!if "$(XSDE_STL)" == "n" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl +!endif + +!if "$(XSDE_LONGLONG)" == "n" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long +!endif + +!if "$(XSDE_PARSER_VALIDATION)" == "n" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation +!endif + +!if "$(XSDE_REUSE_STYLE)" == "mixin" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin +!endif + +driver.exe: driver.obj supermen.obj supermen-pskel.obj supermen-pimpl.obj \ +supermen-sskel.obj supermen-simpl.obj $(root)\libxsde\xsde\xsde.lib + +driver.obj: driver.cxx supermen.hxx supermen-pimpl.hxx supermen-simpl.hxx +supermen.obj: supermen.cxx +supermen-pskel.obj: supermen-pskel.cxx +supermen-pimpl.obj: supermen-pimpl.cxx +supermen-sskel.obj: supermen-sskel.cxx +supermen-simpl.obj: supermen-simpl.cxx + +supermen.cxx supermen.hxx \ +supermen-pskel.cxx supermen-pskel.hxx supermen-pimpl.cxx supermen-pimpl.hxx \ +supermen-sskel.cxx supermen-sskel.hxx supermen-simpl.cxx supermen-simpl.hxx \ +: supermen.xsd + $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \ +--generate-parser --generate-serializer --generate-aggregate \ +--generate-polymorphic --generate-typeinfo --root-element person supermen.xsd + +# Test. +# +test: driver.exe person.xml batman.xml superman.xml + .\driver person.xml + .\driver batman.xml + .\driver superman.xml + +# Clean. +# +clean: + -del supermen-pimpl.?xx supermen-pskel.?xx supermen-simpl.?xx \ +supermen-sskel.?xx supermen.?xx supermen-pimpl.obj supermen-pskel.obj \ +supermen-simpl.obj supermen-sskel.obj supermen.obj driver.obj driver.exe diff --git a/dist/examples/cxx/hybrid/streaming/makefile b/dist/examples/cxx/hybrid/streaming/makefile index b4bff7a..7a7a440 100644 --- a/dist/examples/cxx/hybrid/streaming/makefile +++ b/dist/examples/cxx/hybrid/streaming/makefile @@ -22,6 +22,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o position.o position-pskel.o position-pimpl.o \ position-sskel.o position-simpl.o object-pimpl.o object-simpl.o \ $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/streaming/nmakefile b/dist/examples/cxx/hybrid/streaming/nmakefile index c3ae34a..a981d82 100644 --- a/dist/examples/cxx/hybrid/streaming/nmakefile +++ b/dist/examples/cxx/hybrid/streaming/nmakefile @@ -22,6 +22,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj position.obj position-pskel.obj position-pimpl.obj \ position-sskel.obj position-simpl.obj object-pimpl.obj object-simpl.obj \ $(root)\libxsde\xsde\xsde.lib diff --git a/dist/examples/cxx/hybrid/wildcard/makefile b/dist/examples/cxx/hybrid/wildcard/makefile index 9d4dfa2..876003f 100644 --- a/dist/examples/cxx/hybrid/wildcard/makefile +++ b/dist/examples/cxx/hybrid/wildcard/makefile @@ -18,6 +18,10 @@ ifeq ($(XSDE_REUSE_STYLE),mixin) EXTRA_XSDFLAGS += --reuse-style-mixin endif +ifeq ($(XSDE_POLYMORPHIC),y) +EXTRA_XSDFLAGS += --runtime-polymorphic +endif + driver: driver.o email.o body.o email-pskel.o email-pimpl.o \ email-sskel.o email-simpl.o envelope-pimpl.o envelope-simpl.o \ $(root)/libxsde/xsde/libxsde.a diff --git a/dist/examples/cxx/hybrid/wildcard/nmakefile b/dist/examples/cxx/hybrid/wildcard/nmakefile index acdb033..83e3ba0 100644 --- a/dist/examples/cxx/hybrid/wildcard/nmakefile +++ b/dist/examples/cxx/hybrid/wildcard/nmakefile @@ -18,6 +18,10 @@ EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin !endif +!if "$(XSDE_POLYMORPHIC)" == "y" +EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic +!endif + driver.exe: driver.obj email.obj body.obj email-pskel.obj email-pimpl.obj \ email-sskel.obj email-simpl.obj envelope-pimpl.obj envelope-simpl.obj \ $(root)\libxsde\xsde\xsde.lib |