aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-12-18 07:50:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-12-18 07:50:35 +0200
commitf3d25e138d506d57b16bd50023e762459983ff95 (patch)
tree19cee424a37982f8acf38015420fbc1020c14fe9
parentb3af9aa74169dc35cddfe0f08104d650e43d38b7 (diff)
Use std::basic_ostream<C> instead of std::ostream in ostream map
-rw-r--r--libxsd/xsd/cxx/tree/std-ostream-map.hxx8
-rw-r--r--libxsd/xsd/cxx/tree/std-ostream-map.txx64
2 files changed, 36 insertions, 36 deletions
diff --git a/libxsd/xsd/cxx/tree/std-ostream-map.hxx b/libxsd/xsd/cxx/tree/std-ostream-map.hxx
index 2bf786c..38d7858 100644
--- a/libxsd/xsd/cxx/tree/std-ostream-map.hxx
+++ b/libxsd/xsd/cxx/tree/std-ostream-map.hxx
@@ -23,7 +23,7 @@ namespace xsd
struct std_ostream_map
{
typedef std::type_info type_id;
- typedef void (*inserter) (std::ostream&, const type&);
+ typedef void (*inserter) (std::basic_ostream<C>&, const type&);
std_ostream_map ();
@@ -34,7 +34,7 @@ namespace xsd
unregister_type (const type_id&);
void
- insert (std::ostream&, const type&);
+ insert (std::basic_ostream<C>&, const type&);
public:
inserter
@@ -95,9 +95,9 @@ namespace xsd
//
//
- template<typename T>
+ template<typename C, typename T>
void
- inserter_impl (std::ostream&, const type&);
+ inserter_impl (std::basic_ostream<C>&, const type&);
template<unsigned long id, typename C, typename T>
struct std_ostream_initializer
diff --git a/libxsd/xsd/cxx/tree/std-ostream-map.txx b/libxsd/xsd/cxx/tree/std-ostream-map.txx
index ee46f16..c07c40c 100644
--- a/libxsd/xsd/cxx/tree/std-ostream-map.txx
+++ b/libxsd/xsd/cxx/tree/std-ostream-map.txx
@@ -22,13 +22,13 @@ namespace xsd
//
register_type (
typeid (type),
- &inserter_impl<type>,
+ &inserter_impl<C, type>,
false);
typedef simple_type<type> simple_type;
register_type (
typeid (simple_type),
- &inserter_impl<simple_type>,
+ &inserter_impl<C, simple_type>,
false);
@@ -37,49 +37,49 @@ namespace xsd
typedef string<C, simple_type> string;
register_type (
typeid (string),
- &inserter_impl<string>,
+ &inserter_impl<C, string>,
false);
typedef normalized_string<C, string> normalized_string;
register_type (
typeid (normalized_string),
- &inserter_impl<normalized_string>,
+ &inserter_impl<C, normalized_string>,
false);
typedef token<C, normalized_string> token;
register_type (
typeid (token),
- &inserter_impl<token>,
+ &inserter_impl<C, token>,
false);
typedef name<C, token> name;
register_type (
typeid (name),
- &inserter_impl<name>,
+ &inserter_impl<C, name>,
false);
typedef nmtoken<C, token> nmtoken;
register_type (
typeid (nmtoken),
- &inserter_impl<nmtoken>,
+ &inserter_impl<C, nmtoken>,
false);
typedef nmtokens<C, simple_type, nmtoken> nmtokens;
register_type (
typeid (nmtokens),
- &inserter_impl<nmtokens>,
+ &inserter_impl<C, nmtokens>,
false);
typedef ncname<C, name> ncname;
register_type (
typeid (ncname),
- &inserter_impl<ncname>,
+ &inserter_impl<C, ncname>,
false);
typedef language<C, token> language;
register_type (
typeid (language),
- &inserter_impl<language>,
+ &inserter_impl<C, language>,
false);
@@ -88,19 +88,19 @@ namespace xsd
typedef id<C, ncname> id;
register_type (
typeid (id),
- &inserter_impl<id>,
+ &inserter_impl<C, id>,
false);
typedef idref<type, C, ncname> idref;
register_type (
typeid (idref),
- &inserter_impl<idref>,
+ &inserter_impl<C, idref>,
false);
typedef idrefs<C, simple_type, idref> idrefs;
register_type (
typeid (idrefs),
- &inserter_impl<idrefs>,
+ &inserter_impl<C, idrefs>,
false);
@@ -109,7 +109,7 @@ namespace xsd
typedef uri<C, simple_type> uri;
register_type (
typeid (uri),
- &inserter_impl<uri>,
+ &inserter_impl<C, uri>,
false);
@@ -118,7 +118,7 @@ namespace xsd
typedef qname<C, simple_type, uri, ncname> qname;
register_type (
typeid (qname),
- &inserter_impl<qname>,
+ &inserter_impl<C, qname>,
false);
@@ -127,13 +127,13 @@ namespace xsd
typedef base64_binary<C, simple_type> base64_binary;
register_type (
typeid (base64_binary),
- &inserter_impl<base64_binary>,
+ &inserter_impl<C, base64_binary>,
false);
typedef hex_binary<C, simple_type> hex_binary;
register_type (
typeid (hex_binary),
- &inserter_impl<hex_binary>,
+ &inserter_impl<C, hex_binary>,
false);
@@ -142,55 +142,55 @@ namespace xsd
typedef gday<C, simple_type> gday;
register_type (
typeid (gday),
- &inserter_impl<gday>,
+ &inserter_impl<C, gday>,
false);
typedef gmonth<C, simple_type> gmonth;
register_type (
typeid (gmonth),
- &inserter_impl<gmonth>,
+ &inserter_impl<C, gmonth>,
false);
typedef gyear<C, simple_type> gyear;
register_type (
typeid (gyear),
- &inserter_impl<gyear>,
+ &inserter_impl<C, gyear>,
false);
typedef gmonth_day<C, simple_type> gmonth_day;
register_type (
typeid (gmonth_day),
- &inserter_impl<gmonth_day>,
+ &inserter_impl<C, gmonth_day>,
false);
typedef gyear_month<C, simple_type> gyear_month;
register_type (
typeid (gyear_month),
- &inserter_impl<gyear_month>,
+ &inserter_impl<C, gyear_month>,
false);
typedef date<C, simple_type> date;
register_type (
typeid (date),
- &inserter_impl<date>,
+ &inserter_impl<C, date>,
false);
typedef time<C, simple_type> time;
register_type (
typeid (time),
- &inserter_impl<time>,
+ &inserter_impl<C, time>,
false);
typedef date_time<C, simple_type> date_time;
register_type (
typeid (date_time),
- &inserter_impl<date_time>,
+ &inserter_impl<C, date_time>,
false);
typedef duration<C, simple_type> duration;
register_type (
typeid (duration),
- &inserter_impl<duration>,
+ &inserter_impl<C, duration>,
false);
@@ -199,13 +199,13 @@ namespace xsd
typedef entity<C, ncname> entity;
register_type (
typeid (entity),
- &inserter_impl<entity>,
+ &inserter_impl<C, entity>,
false);
typedef entities<C, simple_type, entity> entities;
register_type (
typeid (entities),
- &inserter_impl<entities>,
+ &inserter_impl<C, entities>,
false);
}
@@ -226,7 +226,7 @@ namespace xsd
template <typename C>
void std_ostream_map<C>::
- insert (std::ostream& os, const type& x)
+ insert (std::basic_ostream<C>& os, const type& x)
{
if (inserter i = find (typeid (x)))
i (os, x);
@@ -265,9 +265,9 @@ namespace xsd
//
//
- template<typename T>
+ template<typename C, typename T>
void
- inserter_impl (std::ostream& os, const type& x)
+ inserter_impl (std::basic_ostream<C>& os, const type& x)
{
os << static_cast<const T&> (x);
}
@@ -279,7 +279,7 @@ namespace xsd
std_ostream_initializer ()
{
std_ostream_map_instance<id, C> ().register_type (
- typeid (T), &inserter_impl<T>);
+ typeid (T), &inserter_impl<C, T>);
}
template<unsigned long id, typename C, typename T>