summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/tree/compression
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/examples/cxx/tree/compression')
-rw-r--r--xsd/examples/cxx/tree/compression/compressed-format-target.cxx5
-rw-r--r--xsd/examples/cxx/tree/compression/compressed-format-target.hxx5
-rw-r--r--xsd/examples/cxx/tree/compression/compressed-input-source.cxx20
-rw-r--r--xsd/examples/cxx/tree/compression/compressed-input-source.hxx11
-rw-r--r--xsd/examples/cxx/tree/compression/driver.cxx3
-rw-r--r--xsd/examples/cxx/tree/compression/library.xsd1
-rw-r--r--xsd/examples/cxx/tree/compression/makefile25
7 files changed, 19 insertions, 51 deletions
diff --git a/xsd/examples/cxx/tree/compression/compressed-format-target.cxx b/xsd/examples/cxx/tree/compression/compressed-format-target.cxx
index b4a8a85..1f183e2 100644
--- a/xsd/examples/cxx/tree/compression/compressed-format-target.cxx
+++ b/xsd/examples/cxx/tree/compression/compressed-format-target.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/compression/compressed-format-target.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#include <ostream>
@@ -81,11 +80,7 @@ compressed_format_target::
void compressed_format_target::
writeChars (const XMLByte* const buf,
-#if _XERCES_VERSION >= 30000
const XMLSize_t size,
-#else
- const unsigned int size,
-#endif
xercesc::XMLFormatter* const)
{
// Flush the buffer if the block is too large or if we don't have
diff --git a/xsd/examples/cxx/tree/compression/compressed-format-target.hxx b/xsd/examples/cxx/tree/compression/compressed-format-target.hxx
index 5d12e81..835b676 100644
--- a/xsd/examples/cxx/tree/compression/compressed-format-target.hxx
+++ b/xsd/examples/cxx/tree/compression/compressed-format-target.hxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/compression/compressed-format-target.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#ifndef COMPRESSED_FORMAT_TARGET_HXX
@@ -60,11 +59,7 @@ public:
virtual void
writeChars (const XMLByte* const buf,
-#if _XERCES_VERSION >= 30000
const XMLSize_t size,
-#else
- const unsigned int size,
-#endif
xercesc::XMLFormatter* const);
virtual void
diff --git a/xsd/examples/cxx/tree/compression/compressed-input-source.cxx b/xsd/examples/cxx/tree/compression/compressed-input-source.cxx
index 22d09ff..e25b169 100644
--- a/xsd/examples/cxx/tree/compression/compressed-input-source.cxx
+++ b/xsd/examples/cxx/tree/compression/compressed-input-source.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/compression/compressed-input-source.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#include <istream>
@@ -111,27 +110,14 @@ compressed_input_stream::
inflateEnd (&zs_);
}
-#if _XERCES_VERSION >= 30000
XMLFilePos compressed_input_stream::
curPos () const
{
return static_cast<XMLFilePos> (pos_);
}
-#else
-unsigned int compressed_input_stream::
-curPos () const
-{
- return static_cast<unsigned int> (pos_);
-}
-#endif
-#if _XERCES_VERSION >= 30000
XMLSize_t compressed_input_stream::
readBytes (XMLByte* const buf, const XMLSize_t size)
-#else
-unsigned int compressed_input_stream::
-readBytes (XMLByte* const buf, const unsigned int size)
-#endif
{
if (end_)
return 0;
@@ -169,20 +155,14 @@ readBytes (XMLByte* const buf, const unsigned int size)
size_t n (size - zs_.avail_out);
pos_ += n;
-#if _XERCES_VERSION >= 30000
return static_cast<XMLSize_t> (n);
-#else
- return static_cast<unsigned int> (n);
-#endif
}
-#if _XERCES_VERSION >= 30000
const XMLCh* compressed_input_stream::
getContentType () const
{
return 0;
}
-#endif
size_t compressed_input_stream::
read ()
diff --git a/xsd/examples/cxx/tree/compression/compressed-input-source.hxx b/xsd/examples/cxx/tree/compression/compressed-input-source.hxx
index 680d39f..8065445 100644
--- a/xsd/examples/cxx/tree/compression/compressed-input-source.hxx
+++ b/xsd/examples/cxx/tree/compression/compressed-input-source.hxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/compression/compressed-input-source.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#ifndef COMPRESSED_INPUT_SOURCE_HXX
@@ -96,7 +95,6 @@ public:
virtual
~compressed_input_stream ();
-#if _XERCES_VERSION >= 30000
virtual XMLFilePos
curPos () const;
@@ -106,15 +104,6 @@ public:
virtual const XMLCh*
getContentType () const;
-#else
-
- virtual unsigned int
- readBytes (XMLByte* const buf, const unsigned int size);
-
- virtual unsigned int
- curPos () const;
-#endif
-
private:
std::size_t
read ();
diff --git a/xsd/examples/cxx/tree/compression/driver.cxx b/xsd/examples/cxx/tree/compression/driver.cxx
index db285cf..34238b1 100644
--- a/xsd/examples/cxx/tree/compression/driver.cxx
+++ b/xsd/examples/cxx/tree/compression/driver.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/compression/driver.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#include <memory> // std::auto_ptr
@@ -20,7 +19,7 @@ main (int argc, char* argv[])
{
if (argc != 2)
{
- cerr << "usage: " << argv[0] << " library.xml" << endl;
+ cerr << "usage: " << argv[0] << " library.xml.gz" << endl;
return 1;
}
diff --git a/xsd/examples/cxx/tree/compression/library.xsd b/xsd/examples/cxx/tree/compression/library.xsd
index 0451b36..728acc7 100644
--- a/xsd/examples/cxx/tree/compression/library.xsd
+++ b/xsd/examples/cxx/tree/compression/library.xsd
@@ -3,7 +3,6 @@
<!--
file : examples/cxx/tree/compression/library.xsd
-author : Boris Kolpackov <boris@codesynthesis.com>
copyright : not copyrighted - public domain
-->
diff --git a/xsd/examples/cxx/tree/compression/makefile b/xsd/examples/cxx/tree/compression/makefile
index 30188c1..43913f7 100644
--- a/xsd/examples/cxx/tree/compression/makefile
+++ b/xsd/examples/cxx/tree/compression/makefile
@@ -1,6 +1,5 @@
# file : examples/cxx/tree/compression/makefile
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC
# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make
@@ -34,17 +33,17 @@ endif
#
$(driver): $(obj) $(xerces_c.l) $(z.l)
-$(obj) $(dep): cpp_options := -I$(src_root)/libxsd
+$(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): xsd_options += --generate-ostream --generate-serialization
$(gen): $(out_root)/xsd/xsd
-$(call include-dep,$(dep))
+$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
#
@@ -79,9 +78,15 @@ $(dist-common):
$(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,,unix2dos $(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.
@@ -109,9 +114,15 @@ endif
$(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)
+$(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)