aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-17 14:05:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-25 13:39:56 +0300
commite37f54594630520a71ec139e735fa819de4b852a (patch)
tree12f89bcd2da3bca8f521347f613425b3f300e4a3
parent949a9f572341b6cd07690f0b78b1b1941d320055 (diff)
Add support for VC
-rw-r--r--libxsd-frontend/export.hxx39
-rw-r--r--libxsd-frontend/generators/dependencies.hxx4
-rw-r--r--libxsd-frontend/parser.cxx10
-rw-r--r--libxsd-frontend/parser.hxx6
-rw-r--r--libxsd-frontend/schema-dom-parser.cxx11
-rw-r--r--libxsd-frontend/schema-dom-parser.hxx5
-rw-r--r--libxsd-frontend/semantic-graph/any-attribute.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/any.hxx6
-rw-r--r--libxsd-frontend/semantic-graph/attribute-group.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/attribute.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/complex.hxx5
-rw-r--r--libxsd-frontend/semantic-graph/compositors.hxx10
-rw-r--r--libxsd-frontend/semantic-graph/element-group.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/element.hxx6
-rw-r--r--libxsd-frontend/semantic-graph/elements.hxx12
-rw-r--r--libxsd-frontend/semantic-graph/enumeration.hxx6
-rw-r--r--libxsd-frontend/semantic-graph/fundamental.hxx96
-rw-r--r--libxsd-frontend/semantic-graph/list.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/namespace.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/particle.hxx6
-rw-r--r--libxsd-frontend/semantic-graph/schema.hxx4
-rw-r--r--libxsd-frontend/semantic-graph/union.hxx4
-rw-r--r--libxsd-frontend/transformations/anonymous.hxx6
-rw-r--r--libxsd-frontend/transformations/enum-synthesis.hxx4
-rw-r--r--libxsd-frontend/transformations/restriction.hxx4
-rw-r--r--libxsd-frontend/transformations/schema-per-type.cxx10
-rw-r--r--libxsd-frontend/transformations/schema-per-type.hxx6
-rw-r--r--libxsd-frontend/transformations/simplifier.hxx4
-rw-r--r--libxsd-frontend/traversal/attribute-group.hxx5
-rw-r--r--libxsd-frontend/traversal/attribute.hxx3
-rw-r--r--libxsd-frontend/traversal/complex.hxx5
-rw-r--r--libxsd-frontend/traversal/compositors.hxx17
-rw-r--r--libxsd-frontend/traversal/element-group.hxx5
-rw-r--r--libxsd-frontend/traversal/element.hxx4
-rw-r--r--libxsd-frontend/traversal/elements.hxx6
-rw-r--r--libxsd-frontend/traversal/enumeration.hxx8
-rw-r--r--libxsd-frontend/traversal/list.hxx4
-rw-r--r--libxsd-frontend/traversal/particle.hxx4
-rw-r--r--libxsd-frontend/traversal/union.hxx4
-rw-r--r--libxsd-frontend/types.cxx6
-rw-r--r--libxsd-frontend/types.hxx5
-rw-r--r--libxsd-frontend/xml.hxx9
42 files changed, 257 insertions, 116 deletions
diff --git a/libxsd-frontend/export.hxx b/libxsd-frontend/export.hxx
new file mode 100644
index 0000000..f93075a
--- /dev/null
+++ b/libxsd-frontend/export.hxx
@@ -0,0 +1,39 @@
+#pragma once
+
+// Normally we don't export class templates (but do complete specializations),
+// inline functions, and classes with only inline member functions. Exporting
+// classes that inherit from non-exported/imported bases (e.g., std::string)
+// will end up badly. The only known workarounds are to not inherit or to not
+// export. Also, MinGW GCC doesn't like seeing non-exported functions being
+// used before their inline definition. The workaround is to reorder code. In
+// the end it's all trial and error.
+
+#if defined(LIBXSD_FRONTEND_STATIC) // Using static.
+# define LIBXSD_FRONTEND_SYMEXPORT
+#elif defined(LIBXSD_FRONTEND_STATIC_BUILD) // Building static.
+# define LIBXSD_FRONTEND_SYMEXPORT
+#elif defined(LIBXSD_FRONTEND_SHARED) // Using shared.
+# ifdef _WIN32
+# define LIBXSD_FRONTEND_SYMEXPORT __declspec(dllimport)
+# else
+# define LIBXSD_FRONTEND_SYMEXPORT
+# endif
+#elif defined(LIBXSD_FRONTEND_SHARED_BUILD) // Building shared.
+# ifdef _WIN32
+# define LIBXSD_FRONTEND_SYMEXPORT __declspec(dllexport)
+# else
+# define LIBXSD_FRONTEND_SYMEXPORT
+# endif
+#else
+// If none of the above macros are defined, then we assume we are being used
+// by some third-party build system that cannot/doesn't signal the library
+// type. Note that this fallback works for both static and shared libraries
+// provided the library only exports functions (in other words, no global
+// exported data) and for the shared case the result will be sub-optimal
+// compared to having dllimport. If, however, your library does export data,
+// then you will probably want to replace the fallback with the (commented
+// out) error since it won't work for the shared case.
+//
+# define LIBXSD_FRONTEND_SYMEXPORT // Using static or shared.
+//# error define LIBXSD_FRONTEND_STATIC or LIBXSD_FRONTEND_SHARED preprocessor macro to signal libxsd-frontend library type being linked
+#endif
diff --git a/libxsd-frontend/generators/dependencies.hxx b/libxsd-frontend/generators/dependencies.hxx
index 564e713..08be464 100644
--- a/libxsd-frontend/generators/dependencies.hxx
+++ b/libxsd-frontend/generators/dependencies.hxx
@@ -11,6 +11,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Generators
@@ -19,7 +21,7 @@ namespace XSDFrontend
// including the main schema file) which can then be used to produce
// make dependencies, etc.
//
- class Dependencies
+ class LIBXSD_FRONTEND_SYMEXPORT Dependencies
{
public:
std::vector<SemanticGraph::Path>
diff --git a/libxsd-frontend/parser.cxx b/libxsd-frontend/parser.cxx
index cf6ad37..06cd960 100644
--- a/libxsd-frontend/parser.cxx
+++ b/libxsd-frontend/parser.cxx
@@ -611,7 +611,7 @@ namespace XSDFrontend
s_.new_edge<Arguments> (
resolve<SemanticGraph::Type> (ns_name, uq_name, s_, cache_), s);
}
- catch (NotName const& ex)
+ catch (NotName const&)
{
wcerr << s.file () << ":" << s.line () << ":" << s.column () << ": "
<< "error: unable to resolve type '" << uq_name << "' "
@@ -639,7 +639,7 @@ namespace XSDFrontend
s_.new_edge<Arguments> (
resolve<SemanticGraph::Type> (ns_name, uq_name, s_, cache_), l);
}
- catch (NotName const& ex)
+ catch (NotName const&)
{
wcerr << l.file () << ":" << l.line () << ":" << l.column () << ": "
<< "error: unable to resolve item type '" << uq_name << "' "
@@ -677,7 +677,7 @@ namespace XSDFrontend
resolve<SemanticGraph::Type> (
i->ns_name, i->uq_name, s_, cache_), na);
}
- catch (NotName const& ex)
+ catch (NotName const&)
{
wcerr << u.file () << ":" << u.line () << ":" << u.column () << ": "
<< "error: unable to resolve item type '" << i->uq_name << "' "
@@ -740,7 +740,7 @@ namespace XSDFrontend
else
assert (false);
}
- catch (NotName const& ex)
+ catch (NotName const&)
{
wcerr << c.file () << ":" << c.line () << ":" << c.column () << ": "
<< "error: unable to resolve base type '" << uq_name << "' "
@@ -820,7 +820,7 @@ namespace XSDFrontend
e.context ().remove ("facets");
}
}
- catch (NotName const& ex)
+ catch (NotName const&)
{
wcerr << e.file () << ":" << e.line () << ":" << e.column () << ": "
<< "error: unable to resolve base type '" << uq_name << "' "
diff --git a/libxsd-frontend/parser.hxx b/libxsd-frontend/parser.hxx
index 6e26e16..56767f1 100644
--- a/libxsd-frontend/parser.hxx
+++ b/libxsd-frontend/parser.hxx
@@ -10,11 +10,13 @@
#include <libxsd-frontend/types.hxx>
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
struct InvalidSchema {};
- class LocationTranslator
+ class LIBXSD_FRONTEND_SYMEXPORT LocationTranslator
{
public:
virtual
@@ -29,7 +31,7 @@ namespace XSDFrontend
//
typedef std::set<NarrowString> WarningSet;
- class Parser
+ class LIBXSD_FRONTEND_SYMEXPORT Parser
{
public:
~Parser ();
diff --git a/libxsd-frontend/schema-dom-parser.cxx b/libxsd-frontend/schema-dom-parser.cxx
index 05a2261..066f949 100644
--- a/libxsd-frontend/schema-dom-parser.cxx
+++ b/libxsd-frontend/schema-dom-parser.cxx
@@ -3,6 +3,8 @@
#include <libxsd-frontend/schema-dom-parser.hxx>
+#include <cstdint> // uintptr_t
+
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMElement.hpp>
#include <xercesc/dom/DOMAttr.hpp>
@@ -74,8 +76,13 @@ namespace XSDFrontend
unsigned long l (static_cast<unsigned long> (info.lineNumber));
unsigned long c (static_cast<unsigned long> (info.colNumber));
- fCurrentNode->setUserData (line_key, reinterpret_cast<void*> (l), 0);
- fCurrentNode->setUserData (column_key, reinterpret_cast<void*> (c), 0);
+ fCurrentNode->setUserData (line_key,
+ reinterpret_cast<void*> (
+ static_cast<std::uintptr_t> (l)), 0);
+
+ fCurrentNode->setUserData (column_key,
+ reinterpret_cast<void*> (
+ static_cast<std::uintptr_t> (c)), 0);
// If an empty element, call the endElement() now.
//
diff --git a/libxsd-frontend/schema-dom-parser.hxx b/libxsd-frontend/schema-dom-parser.hxx
index d494277..8e92c2c 100644
--- a/libxsd-frontend/schema-dom-parser.hxx
+++ b/libxsd-frontend/schema-dom-parser.hxx
@@ -13,6 +13,8 @@
#include <libxsd-frontend/version.hxx> // Check Xerces-C++ version.
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace XML
@@ -22,7 +24,8 @@ namespace XSDFrontend
extern const XMLCh line_key[2];
extern const XMLCh column_key[2];
- class SchemaDOMParser: public Xerces::XercesDOMParser
+ class LIBXSD_FRONTEND_SYMEXPORT SchemaDOMParser:
+ public Xerces::XercesDOMParser
{
public :
SchemaDOMParser (
diff --git a/libxsd-frontend/semantic-graph/any-attribute.hxx b/libxsd-frontend/semantic-graph/any-attribute.hxx
index 3a25200..200bcac 100644
--- a/libxsd-frontend/semantic-graph/any-attribute.hxx
+++ b/libxsd-frontend/semantic-graph/any-attribute.hxx
@@ -9,11 +9,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/namespace.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class AnyAttribute: public virtual Nameable
+ class LIBXSD_FRONTEND_SYMEXPORT AnyAttribute: public virtual Nameable
{
typedef std::vector<String> Namespaces;
diff --git a/libxsd-frontend/semantic-graph/any.hxx b/libxsd-frontend/semantic-graph/any.hxx
index be9dcbf..6239849 100644
--- a/libxsd-frontend/semantic-graph/any.hxx
+++ b/libxsd-frontend/semantic-graph/any.hxx
@@ -10,12 +10,14 @@
#include <libxsd-frontend/semantic-graph/particle.hxx>
#include <libxsd-frontend/semantic-graph/namespace.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class Any: public virtual Nameable,
- public virtual Particle
+ class LIBXSD_FRONTEND_SYMEXPORT Any: public virtual Nameable,
+ public virtual Particle
{
typedef std::vector<String> Namespaces;
diff --git a/libxsd-frontend/semantic-graph/attribute-group.hxx b/libxsd-frontend/semantic-graph/attribute-group.hxx
index b49d86e..59500c9 100644
--- a/libxsd-frontend/semantic-graph/attribute-group.hxx
+++ b/libxsd-frontend/semantic-graph/attribute-group.hxx
@@ -6,11 +6,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class AttributeGroup: public virtual Scope
+ class LIBXSD_FRONTEND_SYMEXPORT AttributeGroup: public virtual Scope
{
public:
AttributeGroup (Path const& file,
diff --git a/libxsd-frontend/semantic-graph/attribute.hxx b/libxsd-frontend/semantic-graph/attribute.hxx
index 5b0b160..982eaaf 100644
--- a/libxsd-frontend/semantic-graph/attribute.hxx
+++ b/libxsd-frontend/semantic-graph/attribute.hxx
@@ -6,11 +6,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class Attribute: public virtual Member
+ class LIBXSD_FRONTEND_SYMEXPORT Attribute: public virtual Member
{
public:
bool
diff --git a/libxsd-frontend/semantic-graph/complex.hxx b/libxsd-frontend/semantic-graph/complex.hxx
index f1cf526..fd0ee76 100644
--- a/libxsd-frontend/semantic-graph/complex.hxx
+++ b/libxsd-frontend/semantic-graph/complex.hxx
@@ -7,11 +7,14 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/compositors.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class Complex: public virtual Type, public virtual Scope
+ class LIBXSD_FRONTEND_SYMEXPORT Complex: public virtual Type,
+ public virtual Scope
{
public:
bool
diff --git a/libxsd-frontend/semantic-graph/compositors.hxx b/libxsd-frontend/semantic-graph/compositors.hxx
index 4864b70..0b0d732 100644
--- a/libxsd-frontend/semantic-graph/compositors.hxx
+++ b/libxsd-frontend/semantic-graph/compositors.hxx
@@ -9,13 +9,15 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/particle.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
//
//
- class ContainsCompositor: public virtual Edge
+ class LIBXSD_FRONTEND_SYMEXPORT ContainsCompositor: public virtual Edge
{
public:
Compositor&
@@ -206,7 +208,7 @@ namespace XSDFrontend
//
//
- class All: public virtual Compositor
+ class LIBXSD_FRONTEND_SYMEXPORT All: public virtual Compositor
{
public:
All (Path const& file, unsigned long line, unsigned long column);
@@ -214,7 +216,7 @@ namespace XSDFrontend
//
//
- class Choice: public virtual Compositor
+ class LIBXSD_FRONTEND_SYMEXPORT Choice: public virtual Compositor
{
public:
Choice (Path const& file, unsigned long line, unsigned long column);
@@ -222,7 +224,7 @@ namespace XSDFrontend
//
//
- class Sequence: public virtual Compositor
+ class LIBXSD_FRONTEND_SYMEXPORT Sequence: public virtual Compositor
{
public:
Sequence (Path const& file, unsigned long line, unsigned long column);
diff --git a/libxsd-frontend/semantic-graph/element-group.hxx b/libxsd-frontend/semantic-graph/element-group.hxx
index e8c9c65..c4f78dd 100644
--- a/libxsd-frontend/semantic-graph/element-group.hxx
+++ b/libxsd-frontend/semantic-graph/element-group.hxx
@@ -7,11 +7,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/compositors.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class ElementGroup: public virtual Scope
+ class LIBXSD_FRONTEND_SYMEXPORT ElementGroup: public virtual Scope
{
public:
ContainsCompositor&
diff --git a/libxsd-frontend/semantic-graph/element.hxx b/libxsd-frontend/semantic-graph/element.hxx
index ff5a863..4ee2b85 100644
--- a/libxsd-frontend/semantic-graph/element.hxx
+++ b/libxsd-frontend/semantic-graph/element.hxx
@@ -7,6 +7,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/particle.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
@@ -47,8 +49,8 @@ namespace XSDFrontend
};
- class Element: public virtual Member,
- public virtual Particle
+ class LIBXSD_FRONTEND_SYMEXPORT Element: public virtual Member,
+ public virtual Particle
{
public:
bool
diff --git a/libxsd-frontend/semantic-graph/elements.hxx b/libxsd-frontend/semantic-graph/elements.hxx
index a7ff2fa..5a0d64b 100644
--- a/libxsd-frontend/semantic-graph/elements.hxx
+++ b/libxsd-frontend/semantic-graph/elements.hxx
@@ -21,6 +21,8 @@
#include <libxsd-frontend/types.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
@@ -84,7 +86,7 @@ namespace XSDFrontend
//
//
- class Node
+ class LIBXSD_FRONTEND_SYMEXPORT Node
{
public:
Context&
@@ -434,7 +436,7 @@ namespace XSDFrontend
class Inherits;
class Arguments;
- class Type: public virtual Nameable
+ class LIBXSD_FRONTEND_SYMEXPORT Type: public virtual Nameable
{
protected:
typedef std::vector<Belongs*> Classifies;
@@ -542,7 +544,7 @@ namespace XSDFrontend
ArgumentsSet arguments_;
};
- class Instance: public virtual Nameable
+ class LIBXSD_FRONTEND_SYMEXPORT Instance: public virtual Nameable
{
public:
Belongs&
@@ -851,7 +853,7 @@ namespace XSDFrontend
// Parametric types.
//
- class Specialization: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Specialization: public virtual Type
{
typedef std::vector<Arguments*> Argumented;
@@ -997,7 +999,7 @@ namespace XSDFrontend
// ADL won't find it because Path is a typedef. Note that this
// function prints in native format.
//
-std::wostream&
+LIBXSD_FRONTEND_SYMEXPORT std::wostream&
operator<< (std::wostream& os, XSDFrontend::SemanticGraph::Path const& path);
#endif // LIBXSD_FRONTEND_SEMANTIC_GRAPH_ELEMENTS_HXX
diff --git a/libxsd-frontend/semantic-graph/enumeration.hxx b/libxsd-frontend/semantic-graph/enumeration.hxx
index 88fb5d8..c01e0d0 100644
--- a/libxsd-frontend/semantic-graph/enumeration.hxx
+++ b/libxsd-frontend/semantic-graph/enumeration.hxx
@@ -7,18 +7,20 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/complex.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class Enumeration: public virtual Complex
+ class LIBXSD_FRONTEND_SYMEXPORT Enumeration: public virtual Complex
{
public:
Enumeration (Path const& file, unsigned long line, unsigned long column);
};
- class Enumerator: public virtual Instance
+ class LIBXSD_FRONTEND_SYMEXPORT Enumerator: public virtual Instance
{
public:
Enumerator (Path const& file, unsigned long line, unsigned long column);
diff --git a/libxsd-frontend/semantic-graph/fundamental.hxx b/libxsd-frontend/semantic-graph/fundamental.hxx
index e45557d..222e342 100644
--- a/libxsd-frontend/semantic-graph/fundamental.hxx
+++ b/libxsd-frontend/semantic-graph/fundamental.hxx
@@ -6,6 +6,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
@@ -14,7 +16,7 @@ namespace XSDFrontend
{
// Type
//
- class Type: public virtual SemanticGraph::Type
+ class LIBXSD_FRONTEND_SYMEXPORT Type: public virtual SemanticGraph::Type
{
protected:
Type ();
@@ -22,7 +24,7 @@ namespace XSDFrontend
// Byte
//
- class Byte: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Byte: public virtual Type
{
public:
Byte (Path const& file,
@@ -32,7 +34,7 @@ namespace XSDFrontend
// UnsignedByte
//
- class UnsignedByte: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT UnsignedByte: public virtual Type
{
public:
UnsignedByte (Path const& file,
@@ -42,7 +44,7 @@ namespace XSDFrontend
// Short
//
- class Short: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Short: public virtual Type
{
public:
Short (Path const& file,
@@ -52,7 +54,7 @@ namespace XSDFrontend
// UnsignedShort
//
- class UnsignedShort: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT UnsignedShort: public virtual Type
{
public:
UnsignedShort (Path const& file,
@@ -62,7 +64,7 @@ namespace XSDFrontend
// Int
//
- class Int: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Int: public virtual Type
{
public:
Int (Path const& file,
@@ -72,7 +74,7 @@ namespace XSDFrontend
// UnsignedInt
//
- class UnsignedInt: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT UnsignedInt: public virtual Type
{
public:
UnsignedInt (Path const& file,
@@ -82,7 +84,7 @@ namespace XSDFrontend
// Long
//
- class Long: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Long: public virtual Type
{
public:
Long (Path const& file,
@@ -92,7 +94,7 @@ namespace XSDFrontend
// UnsignedLong
//
- class UnsignedLong: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT UnsignedLong: public virtual Type
{
public:
UnsignedLong (Path const& file,
@@ -102,7 +104,7 @@ namespace XSDFrontend
// Integer
//
- class Integer: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Integer: public virtual Type
{
public:
Integer (Path const& file,
@@ -112,7 +114,7 @@ namespace XSDFrontend
// NonPositiveInteger
//
- class NonPositiveInteger: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NonPositiveInteger: public virtual Type
{
public:
NonPositiveInteger (Path const& file,
@@ -122,7 +124,7 @@ namespace XSDFrontend
// NonNegativeInteger
//
- class NonNegativeInteger: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NonNegativeInteger: public virtual Type
{
public:
NonNegativeInteger (Path const& file,
@@ -132,7 +134,7 @@ namespace XSDFrontend
// PositiveInteger
//
- class PositiveInteger: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT PositiveInteger: public virtual Type
{
public:
PositiveInteger (Path const& file,
@@ -142,7 +144,7 @@ namespace XSDFrontend
// NegativeInteger
//
- class NegativeInteger: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NegativeInteger: public virtual Type
{
public:
NegativeInteger (Path const& file,
@@ -152,7 +154,7 @@ namespace XSDFrontend
// Boolean
//
- class Boolean: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Boolean: public virtual Type
{
public:
Boolean (Path const& file,
@@ -162,7 +164,7 @@ namespace XSDFrontend
// Float
//
- class Float: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Float: public virtual Type
{
public:
Float (Path const& file,
@@ -172,7 +174,7 @@ namespace XSDFrontend
// Double
//
- class Double: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Double: public virtual Type
{
public:
Double (Path const& file,
@@ -182,7 +184,7 @@ namespace XSDFrontend
// Decimal
//
- class Decimal: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Decimal: public virtual Type
{
public:
Decimal (Path const& file,
@@ -192,7 +194,7 @@ namespace XSDFrontend
// String
//
- class String: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT String: public virtual Type
{
public:
String (Path const& file,
@@ -202,7 +204,7 @@ namespace XSDFrontend
// NormalizedString
//
- class NormalizedString: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NormalizedString: public virtual Type
{
public:
NormalizedString (Path const& file,
@@ -212,7 +214,7 @@ namespace XSDFrontend
// Token
//
- class Token: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Token: public virtual Type
{
public:
Token (Path const& file,
@@ -222,7 +224,7 @@ namespace XSDFrontend
// Name
//
- class Name: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Name: public virtual Type
{
public:
Name (Path const& file,
@@ -232,7 +234,7 @@ namespace XSDFrontend
// NameToken
//
- class NameToken: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NameToken: public virtual Type
{
public:
NameToken (Path const& file,
@@ -242,7 +244,7 @@ namespace XSDFrontend
// NameTokens
//
- class NameTokens: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NameTokens: public virtual Type
{
public:
NameTokens (Path const& file,
@@ -252,7 +254,7 @@ namespace XSDFrontend
// NCName
//
- class NCName: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT NCName: public virtual Type
{
public:
NCName (Path const& file,
@@ -262,7 +264,7 @@ namespace XSDFrontend
// Language
//
- class Language: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Language: public virtual Type
{
public:
Language (Path const& file,
@@ -272,7 +274,7 @@ namespace XSDFrontend
// QName
//
- class QName: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT QName: public virtual Type
{
public:
QName (Path const& file,
@@ -282,7 +284,7 @@ namespace XSDFrontend
// Id
//
- class Id: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Id: public virtual Type
{
public:
Id (Path const& file,
@@ -292,8 +294,8 @@ namespace XSDFrontend
// IdRef
//
- class IdRef: public virtual Type,
- public virtual Specialization
+ class LIBXSD_FRONTEND_SYMEXPORT IdRef: public virtual Type,
+ public virtual Specialization
{
public:
IdRef (Path const& file,
@@ -303,8 +305,8 @@ namespace XSDFrontend
// IdRefs
//
- class IdRefs: public virtual Type,
- public virtual Specialization
+ class LIBXSD_FRONTEND_SYMEXPORT IdRefs: public virtual Type,
+ public virtual Specialization
{
public:
IdRefs (Path const& file,
@@ -314,7 +316,7 @@ namespace XSDFrontend
// AnyURI
//
- class AnyURI: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT AnyURI: public virtual Type
{
public:
AnyURI (Path const& file,
@@ -324,7 +326,7 @@ namespace XSDFrontend
// Base64Binary
//
- class Base64Binary: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Base64Binary: public virtual Type
{
public:
Base64Binary (Path const& file,
@@ -334,7 +336,7 @@ namespace XSDFrontend
// HexBinary
//
- class HexBinary: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT HexBinary: public virtual Type
{
public:
HexBinary (Path const& file,
@@ -344,7 +346,7 @@ namespace XSDFrontend
// Date
//
- class Date: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Date: public virtual Type
{
public:
Date (Path const& file,
@@ -354,7 +356,7 @@ namespace XSDFrontend
// DateTime
//
- class DateTime: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT DateTime: public virtual Type
{
public:
DateTime (Path const& file,
@@ -364,7 +366,7 @@ namespace XSDFrontend
// Duration
//
- class Duration: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Duration: public virtual Type
{
public:
Duration (Path const& file,
@@ -374,7 +376,7 @@ namespace XSDFrontend
// Day
//
- class Day: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Day: public virtual Type
{
public:
Day (Path const& file,
@@ -384,7 +386,7 @@ namespace XSDFrontend
// Month
//
- class Month: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Month: public virtual Type
{
public:
Month (Path const& file,
@@ -394,7 +396,7 @@ namespace XSDFrontend
// MonthDay
//
- class MonthDay: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT MonthDay: public virtual Type
{
public:
MonthDay (Path const& file,
@@ -404,7 +406,7 @@ namespace XSDFrontend
// Year
//
- class Year: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Year: public virtual Type
{
public:
Year (Path const& file,
@@ -414,7 +416,7 @@ namespace XSDFrontend
// YearMonth
//
- class YearMonth: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT YearMonth: public virtual Type
{
public:
YearMonth (Path const& file,
@@ -424,7 +426,7 @@ namespace XSDFrontend
// Time
//
- class Time: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Time: public virtual Type
{
public:
Time (Path const& file,
@@ -434,7 +436,7 @@ namespace XSDFrontend
// Entity
//
- class Entity: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Entity: public virtual Type
{
public:
Entity (Path const& file,
@@ -444,7 +446,7 @@ namespace XSDFrontend
// Entities
//
- class Entities: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Entities: public virtual Type
{
public:
Entities (Path const& file,
@@ -454,7 +456,7 @@ namespace XSDFrontend
// Notation
//
- class Notation: public virtual Type
+ class LIBXSD_FRONTEND_SYMEXPORT Notation: public virtual Type
{
public:
Notation (Path const& file,
diff --git a/libxsd-frontend/semantic-graph/list.hxx b/libxsd-frontend/semantic-graph/list.hxx
index efd6c67..d9211ae 100644
--- a/libxsd-frontend/semantic-graph/list.hxx
+++ b/libxsd-frontend/semantic-graph/list.hxx
@@ -6,11 +6,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class List: public virtual Specialization
+ class LIBXSD_FRONTEND_SYMEXPORT List: public virtual Specialization
{
public:
List (Path const& file, unsigned long line, unsigned long column);
diff --git a/libxsd-frontend/semantic-graph/namespace.hxx b/libxsd-frontend/semantic-graph/namespace.hxx
index 1ae0a6f..3db3412 100644
--- a/libxsd-frontend/semantic-graph/namespace.hxx
+++ b/libxsd-frontend/semantic-graph/namespace.hxx
@@ -6,11 +6,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class Namespace : public virtual Scope
+ class LIBXSD_FRONTEND_SYMEXPORT Namespace : public virtual Scope
{
public:
Namespace (Path const& file, unsigned long line, unsigned long column);
diff --git a/libxsd-frontend/semantic-graph/particle.hxx b/libxsd-frontend/semantic-graph/particle.hxx
index e438863..a8da249 100644
--- a/libxsd-frontend/semantic-graph/particle.hxx
+++ b/libxsd-frontend/semantic-graph/particle.hxx
@@ -6,6 +6,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
@@ -18,7 +20,7 @@ namespace XSDFrontend
//
//
- class ContainsParticle: public virtual Edge
+ class LIBXSD_FRONTEND_SYMEXPORT ContainsParticle: public virtual Edge
{
public:
Particle&
@@ -83,7 +85,7 @@ namespace XSDFrontend
//
//
- class Particle: public virtual Node
+ class LIBXSD_FRONTEND_SYMEXPORT Particle: public virtual Node
{
public:
bool
diff --git a/libxsd-frontend/semantic-graph/schema.hxx b/libxsd-frontend/semantic-graph/schema.hxx
index abcd5ca..e533d1f 100644
--- a/libxsd-frontend/semantic-graph/schema.hxx
+++ b/libxsd-frontend/semantic-graph/schema.hxx
@@ -10,6 +10,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
#include <libxsd-frontend/semantic-graph/namespace.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
@@ -96,7 +98,7 @@ namespace XSDFrontend
//
//
- class Schema: public graph, public virtual Scope
+ class LIBXSD_FRONTEND_SYMEXPORT Schema: public graph, public virtual Scope
{
typedef std::vector<Uses*> UsesList;
typedef std::vector<Uses*> UsedList;
diff --git a/libxsd-frontend/semantic-graph/union.hxx b/libxsd-frontend/semantic-graph/union.hxx
index bef0144..54dcdef 100644
--- a/libxsd-frontend/semantic-graph/union.hxx
+++ b/libxsd-frontend/semantic-graph/union.hxx
@@ -6,11 +6,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace SemanticGraph
{
- class Union: public virtual Specialization
+ class LIBXSD_FRONTEND_SYMEXPORT Union: public virtual Specialization
{
public:
Union (Path const& file, unsigned long line, unsigned long column);
diff --git a/libxsd-frontend/transformations/anonymous.hxx b/libxsd-frontend/transformations/anonymous.hxx
index bf0e42e..0ada202 100644
--- a/libxsd-frontend/transformations/anonymous.hxx
+++ b/libxsd-frontend/transformations/anonymous.hxx
@@ -9,11 +9,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Transformations
{
- class AnonymousNameTranslator
+ class LIBXSD_FRONTEND_SYMEXPORT AnonymousNameTranslator
{
public:
virtual
@@ -35,7 +37,7 @@ namespace XSDFrontend
// then the transformation detects and reports unstable conflicts
// in name assignment.
//
- class Anonymous
+ class LIBXSD_FRONTEND_SYMEXPORT Anonymous
{
public:
struct Failed {};
diff --git a/libxsd-frontend/transformations/enum-synthesis.hxx b/libxsd-frontend/transformations/enum-synthesis.hxx
index ebd1bae..57b2c28 100644
--- a/libxsd-frontend/transformations/enum-synthesis.hxx
+++ b/libxsd-frontend/transformations/enum-synthesis.hxx
@@ -9,6 +9,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Transformations
@@ -17,7 +19,7 @@ namespace XSDFrontend
// with the same base with an equivalent synthesized enumeration.
// This transformation assumes that there are no anonymous types.
//
- class EnumSynthesis
+ class LIBXSD_FRONTEND_SYMEXPORT EnumSynthesis
{
public:
void
diff --git a/libxsd-frontend/transformations/restriction.hxx b/libxsd-frontend/transformations/restriction.hxx
index f22179e..be3ae2b 100644
--- a/libxsd-frontend/transformations/restriction.hxx
+++ b/libxsd-frontend/transformations/restriction.hxx
@@ -9,6 +9,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Transformations
@@ -21,7 +23,7 @@ namespace XSDFrontend
// or compositor in the base. Note that restriction of anyType is
// a special case and is not handled by this transformation.
//
- class Restriction
+ class LIBXSD_FRONTEND_SYMEXPORT Restriction
{
public:
struct Failed {};
diff --git a/libxsd-frontend/transformations/schema-per-type.cxx b/libxsd-frontend/transformations/schema-per-type.cxx
index bd941a1..2d48c16 100644
--- a/libxsd-frontend/transformations/schema-per-type.cxx
+++ b/libxsd-frontend/transformations/schema-per-type.cxx
@@ -1,7 +1,11 @@
// file : libxsd-frontend/transformations/schema-per-type.cxx
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
-#include <strings.h> // strcasecmp
+#ifndef _WIN32
+# include <strings.h> // strcasecmp()
+#else
+# include <string.h> // _stricmp()
+#endif
#include <map>
#include <set>
@@ -31,7 +35,11 @@ namespace XSDFrontend
bool
operator() (NarrowString const& x, NarrowString const& y) const
{
+#ifndef _WIN32
return strcasecmp (x.c_str (), y.c_str ()) < 0;
+#else
+ return _stricmp (x.c_str (), y.c_str ()) < 0;
+#endif
}
};
diff --git a/libxsd-frontend/transformations/schema-per-type.hxx b/libxsd-frontend/transformations/schema-per-type.hxx
index 6eb7442..04aa58d 100644
--- a/libxsd-frontend/transformations/schema-per-type.hxx
+++ b/libxsd-frontend/transformations/schema-per-type.hxx
@@ -11,11 +11,13 @@
#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Transformations
{
- class SchemaPerTypeTranslator
+ class LIBXSD_FRONTEND_SYMEXPORT SchemaPerTypeTranslator
{
public:
virtual
@@ -34,7 +36,7 @@ namespace XSDFrontend
// This transformation restructures the semantic graph to have
// each type definition in a seperate schema file.
//
- class SchemaPerType
+ class LIBXSD_FRONTEND_SYMEXPORT SchemaPerType
{
public:
struct Failed {};
diff --git a/libxsd-frontend/transformations/simplifier.hxx b/libxsd-frontend/transformations/simplifier.hxx
index fc9f5aa..aa25f25 100644
--- a/libxsd-frontend/transformations/simplifier.hxx
+++ b/libxsd-frontend/transformations/simplifier.hxx
@@ -9,6 +9,8 @@
#include <libxsd-frontend/semantic-graph/elements.hxx> // Path
#include <libxsd-frontend/semantic-graph/schema.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Transformations
@@ -17,7 +19,7 @@ namespace XSDFrontend
// (e.g., removing empty compositors, etc). This transformation
// assumes that there are no anonymous types.
//
- class Simplifier
+ class LIBXSD_FRONTEND_SYMEXPORT Simplifier
{
public:
void
diff --git a/libxsd-frontend/traversal/attribute-group.hxx b/libxsd-frontend/traversal/attribute-group.hxx
index 51c6a00..f343973 100644
--- a/libxsd-frontend/traversal/attribute-group.hxx
+++ b/libxsd-frontend/traversal/attribute-group.hxx
@@ -7,11 +7,14 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/attribute-group.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct AttributeGroup: ScopeTemplate<SemanticGraph::AttributeGroup>
+ struct LIBXSD_FRONTEND_SYMEXPORT AttributeGroup:
+ ScopeTemplate<SemanticGraph::AttributeGroup>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/attribute.hxx b/libxsd-frontend/traversal/attribute.hxx
index c8fb8e6..4ace501 100644
--- a/libxsd-frontend/traversal/attribute.hxx
+++ b/libxsd-frontend/traversal/attribute.hxx
@@ -8,12 +8,13 @@
#include <libxsd-frontend/semantic-graph/attribute.hxx>
+#include <libxsd-frontend/export.hxx>
namespace XSDFrontend
{
namespace Traversal
{
- struct Attribute : Node<SemanticGraph::Attribute>
+ struct LIBXSD_FRONTEND_SYMEXPORT Attribute : Node<SemanticGraph::Attribute>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/complex.hxx b/libxsd-frontend/traversal/complex.hxx
index 2109172..28b154d 100644
--- a/libxsd-frontend/traversal/complex.hxx
+++ b/libxsd-frontend/traversal/complex.hxx
@@ -7,11 +7,14 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/complex.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct Complex : ScopeTemplate<SemanticGraph::Complex>
+ struct LIBXSD_FRONTEND_SYMEXPORT Complex:
+ ScopeTemplate<SemanticGraph::Complex>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/compositors.hxx b/libxsd-frontend/traversal/compositors.hxx
index a36f3b3..78f1d5b 100644
--- a/libxsd-frontend/traversal/compositors.hxx
+++ b/libxsd-frontend/traversal/compositors.hxx
@@ -7,13 +7,16 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/compositors.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
//
//
- struct ContainsParticle: Edge<SemanticGraph::ContainsParticle>
+ struct LIBXSD_FRONTEND_SYMEXPORT ContainsParticle:
+ Edge<SemanticGraph::ContainsParticle>
{
ContainsParticle ()
{
@@ -31,7 +34,8 @@ namespace XSDFrontend
//
//
- struct ContainsCompositor: Edge<SemanticGraph::ContainsCompositor>
+ struct LIBXSD_FRONTEND_SYMEXPORT ContainsCompositor:
+ Edge<SemanticGraph::ContainsCompositor>
{
ContainsCompositor ()
{
@@ -48,7 +52,8 @@ namespace XSDFrontend
//
//
- struct Compositor : Node<SemanticGraph::Compositor>
+ struct LIBXSD_FRONTEND_SYMEXPORT Compositor:
+ Node<SemanticGraph::Compositor>
{
virtual void
traverse (Type&);
@@ -69,7 +74,7 @@ namespace XSDFrontend
//
//
- struct All : Node<SemanticGraph::All>
+ struct LIBXSD_FRONTEND_SYMEXPORT All: Node<SemanticGraph::All>
{
virtual void
traverse (Type&);
@@ -90,7 +95,7 @@ namespace XSDFrontend
//
//
- struct Choice : Node<SemanticGraph::Choice>
+ struct LIBXSD_FRONTEND_SYMEXPORT Choice: Node<SemanticGraph::Choice>
{
virtual void
traverse (Type&);
@@ -111,7 +116,7 @@ namespace XSDFrontend
//
//
- struct Sequence : Node<SemanticGraph::Sequence>
+ struct LIBXSD_FRONTEND_SYMEXPORT Sequence: Node<SemanticGraph::Sequence>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/element-group.hxx b/libxsd-frontend/traversal/element-group.hxx
index 2088e3c..01f19e5 100644
--- a/libxsd-frontend/traversal/element-group.hxx
+++ b/libxsd-frontend/traversal/element-group.hxx
@@ -7,11 +7,14 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/element-group.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct ElementGroup: ScopeTemplate<SemanticGraph::ElementGroup>
+ struct LIBXSD_FRONTEND_SYMEXPORT ElementGroup:
+ ScopeTemplate<SemanticGraph::ElementGroup>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/element.hxx b/libxsd-frontend/traversal/element.hxx
index e530ac1..6e301f0 100644
--- a/libxsd-frontend/traversal/element.hxx
+++ b/libxsd-frontend/traversal/element.hxx
@@ -7,11 +7,13 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/element.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct Element : Node<SemanticGraph::Element>
+ struct LIBXSD_FRONTEND_SYMEXPORT Element : Node<SemanticGraph::Element>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/elements.hxx b/libxsd-frontend/traversal/elements.hxx
index b3c7d13..a3031ce 100644
--- a/libxsd-frontend/traversal/elements.hxx
+++ b/libxsd-frontend/traversal/elements.hxx
@@ -9,6 +9,8 @@
#include <libxsd-frontend/types.hxx>
#include <libxsd-frontend/semantic-graph/elements.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
@@ -253,7 +255,7 @@ namespace XSDFrontend
//
//
- struct Instance : Node<SemanticGraph::Instance>
+ struct LIBXSD_FRONTEND_SYMEXPORT Instance: Node<SemanticGraph::Instance>
{
virtual void
traverse (Type&);
@@ -274,7 +276,7 @@ namespace XSDFrontend
//
//
- struct Member : Node<SemanticGraph::Member>
+ struct LIBXSD_FRONTEND_SYMEXPORT Member: Node<SemanticGraph::Member>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/enumeration.hxx b/libxsd-frontend/traversal/enumeration.hxx
index eded1d9..f042f2b 100644
--- a/libxsd-frontend/traversal/enumeration.hxx
+++ b/libxsd-frontend/traversal/enumeration.hxx
@@ -7,11 +7,14 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/enumeration.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct Enumeration : ScopeTemplate<SemanticGraph::Enumeration>
+ struct LIBXSD_FRONTEND_SYMEXPORT Enumeration:
+ ScopeTemplate<SemanticGraph::Enumeration>
{
virtual void
traverse (Type&);
@@ -32,7 +35,8 @@ namespace XSDFrontend
post (Type&);
};
- struct Enumerator : Node<SemanticGraph::Enumerator>
+ struct LIBXSD_FRONTEND_SYMEXPORT Enumerator:
+ Node<SemanticGraph::Enumerator>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/list.hxx b/libxsd-frontend/traversal/list.hxx
index 473af7f..60c3730 100644
--- a/libxsd-frontend/traversal/list.hxx
+++ b/libxsd-frontend/traversal/list.hxx
@@ -7,11 +7,13 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/list.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct List: Node<SemanticGraph::List>
+ struct LIBXSD_FRONTEND_SYMEXPORT List: Node<SemanticGraph::List>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/particle.hxx b/libxsd-frontend/traversal/particle.hxx
index c931e65..096ca07 100644
--- a/libxsd-frontend/traversal/particle.hxx
+++ b/libxsd-frontend/traversal/particle.hxx
@@ -7,11 +7,13 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/particle.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct Particle : Node<SemanticGraph::Particle>
+ struct LIBXSD_FRONTEND_SYMEXPORT Particle: Node<SemanticGraph::Particle>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/traversal/union.hxx b/libxsd-frontend/traversal/union.hxx
index a1df894..9c52233 100644
--- a/libxsd-frontend/traversal/union.hxx
+++ b/libxsd-frontend/traversal/union.hxx
@@ -7,11 +7,13 @@
#include <libxsd-frontend/traversal/elements.hxx>
#include <libxsd-frontend/semantic-graph/union.hxx>
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
namespace Traversal
{
- struct Union: Node<SemanticGraph::Union>
+ struct LIBXSD_FRONTEND_SYMEXPORT Union: Node<SemanticGraph::Union>
{
virtual void
traverse (Type&);
diff --git a/libxsd-frontend/types.cxx b/libxsd-frontend/types.cxx
index 3769bfe..a72c49f 100644
--- a/libxsd-frontend/types.cxx
+++ b/libxsd-frontend/types.cxx
@@ -4,6 +4,7 @@
#include <cstdlib> // std::mbstowcs
#include <libxsd-frontend/types.hxx>
+#include <libxsd-frontend/export.hxx>
namespace XSDFrontend
{
@@ -21,7 +22,7 @@ namespace XSDFrontend
// Specialization for char to wchar_t conversion.
//
template <>
- void StringTemplate<wchar_t, char>::
+ LIBXSD_FRONTEND_SYMEXPORT void StringTemplate<wchar_t, char>::
from_narrow (char const* s)
{
size_type size (std::mbstowcs (0, s, 0) + 1);
@@ -38,7 +39,8 @@ namespace XSDFrontend
// Specialization for wchar_t to char conversion.
//
template <>
- StringTemplate<char> StringTemplate<wchar_t, char>::
+ LIBXSD_FRONTEND_SYMEXPORT StringTemplate<char>
+ StringTemplate<wchar_t, char>::
to_narrow () const
{
size_type size (std::wcstombs (0, c_str (), 0));
diff --git a/libxsd-frontend/types.hxx b/libxsd-frontend/types.hxx
index b7aff37..926227c 100644
--- a/libxsd-frontend/types.hxx
+++ b/libxsd-frontend/types.hxx
@@ -7,6 +7,8 @@
#include <string>
#include <cstddef> // std::size_t
+#include <libxsd-frontend/export.hxx>
+
namespace XSDFrontend
{
using std::size_t;
@@ -28,7 +30,7 @@ namespace XSDFrontend
};
}
- struct NonRepresentable: std::exception
+ struct LIBXSD_FRONTEND_SYMEXPORT NonRepresentable: std::exception
{
virtual char const*
what () const throw ();
@@ -204,7 +206,6 @@ namespace XSDFrontend
from_narrow (NC const* s);
};
-
template<typename C>
StringTemplate<C>
operator+ (StringTemplate<C> const& lhs, StringTemplate<C> const& rhs)
diff --git a/libxsd-frontend/xml.hxx b/libxsd-frontend/xml.hxx
index bc8f36b..df9576a 100644
--- a/libxsd-frontend/xml.hxx
+++ b/libxsd-frontend/xml.hxx
@@ -6,6 +6,7 @@
#include <vector>
#include <ostream>
+#include <cstdint> // uintptr_t
#include <xercesc/dom/DOM.hpp>
#include <xercesc/util/XMLString.hpp>
@@ -220,7 +221,9 @@ namespace XSDFrontend
{
//@@ cache
//
- return reinterpret_cast<unsigned long> (e_->getUserData (line_key));
+ return static_cast<unsigned long> (
+ reinterpret_cast<std::uintptr_t> (
+ e_->getUserData (line_key)));
}
unsigned long
@@ -228,7 +231,9 @@ namespace XSDFrontend
{
//@@ cache
//
- return reinterpret_cast<unsigned long> (e_->getUserData (column_key));
+ return static_cast<unsigned long> (
+ reinterpret_cast<std::uintptr_t> (
+ e_->getUserData (column_key)));
}
public: