summaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-11-14 12:18:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-11-14 12:18:10 +0200
commit366503ddde486f1674194dc0b7015c01f8de70cc (patch)
tree659ee8a572d94a1ede590d5294746cf6ef0e49ce /xsd
parente488cc27eb20e1b96cb0751249b19236a7e373ea (diff)
Get rid of long symbol workaround for HP-UX
Diffstat (limited to 'xsd')
-rw-r--r--xsd/cxx/parser/elements.cxx56
-rw-r--r--xsd/cxx/parser/name-processor.cxx6
-rw-r--r--xsd/cxx/parser/name-processor.hxx2
-rw-r--r--xsd/cxx/parser/type-processor.cxx6
-rw-r--r--xsd/cxx/parser/type-processor.hxx2
-rw-r--r--xsd/cxx/parser/validator.cxx6
-rw-r--r--xsd/cxx/parser/validator.hxx2
-rw-r--r--xsd/cxx/tree/counter.cxx5
-rw-r--r--xsd/cxx/tree/counter.hxx2
-rw-r--r--xsd/cxx/tree/elements.cxx44
-rw-r--r--xsd/cxx/tree/name-processor.cxx6
-rw-r--r--xsd/cxx/tree/name-processor.hxx2
-rw-r--r--xsd/cxx/tree/validator.cxx6
-rw-r--r--xsd/cxx/tree/validator.hxx2
14 files changed, 49 insertions, 98 deletions
diff --git a/xsd/cxx/parser/elements.cxx b/xsd/cxx/parser/elements.cxx
index bd610a3..af68568 100644
--- a/xsd/cxx/parser/elements.cxx
+++ b/xsd/cxx/parser/elements.cxx
@@ -9,35 +9,6 @@ namespace CXX
{
namespace Parser
{
- // Keep this symbol first to help HP-UX linker (long symbols?).
- //
- 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;
- }
-
Context::
Context (std::wostream& o,
SemanticGraph::Schema& root,
@@ -129,6 +100,33 @@ namespace CXX
{
}
+ 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)
{
diff --git a/xsd/cxx/parser/name-processor.cxx b/xsd/cxx/parser/name-processor.cxx
index 7cd959c..70e8281 100644
--- a/xsd/cxx/parser/name-processor.cxx
+++ b/xsd/cxx/parser/name-processor.cxx
@@ -20,12 +20,6 @@ namespace CXX
{
namespace Parser
{
- NameProcessor::
- NameProcessor ()
- {
- // Dummy ctor, helps with long symbols on HP-UX.
- }
-
namespace
{
//
diff --git a/xsd/cxx/parser/name-processor.hxx b/xsd/cxx/parser/name-processor.hxx
index a6c41ff..26f27e6 100644
--- a/xsd/cxx/parser/name-processor.hxx
+++ b/xsd/cxx/parser/name-processor.hxx
@@ -20,8 +20,6 @@ namespace CXX
class NameProcessor
{
public:
- NameProcessor (); // Dummy ctor, helps with long symbols on HP-UX.
-
void
process (options const&,
XSDFrontend::SemanticGraph::Schema&,
diff --git a/xsd/cxx/parser/type-processor.cxx b/xsd/cxx/parser/type-processor.cxx
index fa60b3c..4cfa458 100644
--- a/xsd/cxx/parser/type-processor.cxx
+++ b/xsd/cxx/parser/type-processor.cxx
@@ -17,12 +17,6 @@ namespace CXX
{
namespace Parser
{
- TypeProcessor::
- TypeProcessor ()
- {
- // Dummy ctor, helps with long symbols on HP-UX.
- }
-
namespace
{
//
diff --git a/xsd/cxx/parser/type-processor.hxx b/xsd/cxx/parser/type-processor.hxx
index 2889138..77e8636 100644
--- a/xsd/cxx/parser/type-processor.hxx
+++ b/xsd/cxx/parser/type-processor.hxx
@@ -21,8 +21,6 @@ namespace CXX
class TypeProcessor
{
public:
- TypeProcessor (); // Dummy ctor, helps with long symbols on HP-UX.
-
void
process (options const&,
XSDFrontend::SemanticGraph::Schema&,
diff --git a/xsd/cxx/parser/validator.cxx b/xsd/cxx/parser/validator.cxx
index e808e27..e84996e 100644
--- a/xsd/cxx/parser/validator.cxx
+++ b/xsd/cxx/parser/validator.cxx
@@ -545,12 +545,6 @@ namespace CXX
}
- Validator::
- Validator ()
- {
- // Dummy ctor, helps with long symbols on HP-UX.
- }
-
bool Validator::
validate (options const& ops,
SemanticGraph::Schema& root,
diff --git a/xsd/cxx/parser/validator.hxx b/xsd/cxx/parser/validator.hxx
index 036e38c..e5172c2 100644
--- a/xsd/cxx/parser/validator.hxx
+++ b/xsd/cxx/parser/validator.hxx
@@ -19,8 +19,6 @@ namespace CXX
class Validator
{
public:
- Validator (); // Dummy ctor, helps with long symbols on HP-UX.
-
bool
validate (options const&,
SemanticGraph::Schema&,
diff --git a/xsd/cxx/tree/counter.cxx b/xsd/cxx/tree/counter.cxx
index 40a7c61..58bd22d 100644
--- a/xsd/cxx/tree/counter.cxx
+++ b/xsd/cxx/tree/counter.cxx
@@ -230,11 +230,6 @@ namespace CXX
};
}
- Counter::
- Counter ()
- {
- }
-
Counts Counter::
count (options const& ops,
SemanticGraph::Schema& tu,
diff --git a/xsd/cxx/tree/counter.hxx b/xsd/cxx/tree/counter.hxx
index 7c91068..e274891 100644
--- a/xsd/cxx/tree/counter.hxx
+++ b/xsd/cxx/tree/counter.hxx
@@ -16,8 +16,6 @@ namespace CXX
class Counter
{
public:
- Counter (); // Dummy ctor, helps with long symbols on HP-UX.
-
Counts
count (options const&,
SemanticGraph::Schema&,
diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx
index 5fdee30..8021287 100644
--- a/xsd/cxx/tree/elements.cxx
+++ b/xsd/cxx/tree/elements.cxx
@@ -11,28 +11,6 @@ namespace CXX
{
// Context
//
- void Context::
- update_ns_scope () // Keeping this function first helps HP-UX
- { // (long symbols).
- 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;
- }
- }
-
Context::
Context (std::wostream& o,
SemanticGraph::Schema& root,
@@ -366,6 +344,28 @@ namespace CXX
{
}
+ 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
{
diff --git a/xsd/cxx/tree/name-processor.cxx b/xsd/cxx/tree/name-processor.cxx
index 1e21bab..844d8e1 100644
--- a/xsd/cxx/tree/name-processor.cxx
+++ b/xsd/cxx/tree/name-processor.cxx
@@ -20,12 +20,6 @@ namespace CXX
{
namespace Tree
{
- NameProcessor::
- NameProcessor ()
- {
- // Dummy ctor, helps with long symbols on HP-UX.
- }
-
namespace
{
//
diff --git a/xsd/cxx/tree/name-processor.hxx b/xsd/cxx/tree/name-processor.hxx
index 8026a3d..c8505c7 100644
--- a/xsd/cxx/tree/name-processor.hxx
+++ b/xsd/cxx/tree/name-processor.hxx
@@ -18,8 +18,6 @@ namespace CXX
class NameProcessor
{
public:
- NameProcessor (); // Dummy ctor, helps with long symbols on HP-UX.
-
bool
process (options const&,
XSDFrontend::SemanticGraph::Schema&,
diff --git a/xsd/cxx/tree/validator.cxx b/xsd/cxx/tree/validator.cxx
index 32aaeb0..4b8da17 100644
--- a/xsd/cxx/tree/validator.cxx
+++ b/xsd/cxx/tree/validator.cxx
@@ -520,12 +520,6 @@ namespace CXX
};
}
- Validator::
- Validator ()
- {
- // Dummy ctor, helps with long symbols on HP-UX.
- }
-
bool Validator::
validate (options const& ops,
SemanticGraph::Schema& schema,
diff --git a/xsd/cxx/tree/validator.hxx b/xsd/cxx/tree/validator.hxx
index f79adcb..ace8abe 100644
--- a/xsd/cxx/tree/validator.hxx
+++ b/xsd/cxx/tree/validator.hxx
@@ -18,8 +18,6 @@ namespace CXX
class Validator
{
public:
- Validator (); // Dummy ctor, helps with long symbols on HP-UX.
-
bool
validate (options const&,
SemanticGraph::Schema&,