aboutsummaryrefslogtreecommitdiff
path: root/xsd/cxx/tree
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-01-12 15:14:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-01-12 15:14:06 +0200
commitf3e67f694188a16e426e92fda846998fd26db50d (patch)
tree8479968d3e677af5858e7bda565674bf85d8fef8 /xsd/cxx/tree
parent8e6517dd89899e8fd3b8d5b314bcdf50bd3296cc (diff)
Include file component in regex strings for schema being compiled
Diffstat (limited to 'xsd/cxx/tree')
-rw-r--r--xsd/cxx/tree/counter.cxx6
-rw-r--r--xsd/cxx/tree/counter.hxx4
-rw-r--r--xsd/cxx/tree/elements.cxx2
-rw-r--r--xsd/cxx/tree/elements.hxx1
-rw-r--r--xsd/cxx/tree/generator.cxx6
-rw-r--r--xsd/cxx/tree/name-processor.cxx10
-rw-r--r--xsd/cxx/tree/validator.cxx6
7 files changed, 21 insertions, 14 deletions
diff --git a/xsd/cxx/tree/counter.cxx b/xsd/cxx/tree/counter.cxx
index d2a5c10..9254226 100644
--- a/xsd/cxx/tree/counter.cxx
+++ b/xsd/cxx/tree/counter.cxx
@@ -236,10 +236,12 @@ namespace CXX
}
Counts Counter::
- count (CLI::Options const& options, SemanticGraph::Schema& tu)
+ count (CLI::Options const& options,
+ SemanticGraph::Schema& tu,
+ SemanticGraph::Path const& path)
{
Counts counts;
- Context ctx (std::wcerr, tu, options, counts, false, 0, 0, 0, 0);
+ Context ctx (std::wcerr, tu, path, options, counts, false, 0, 0, 0, 0);
Traversal::Schema schema;
Traversal::Sources sources;
diff --git a/xsd/cxx/tree/counter.hxx b/xsd/cxx/tree/counter.hxx
index 85e9ec7..726de47 100644
--- a/xsd/cxx/tree/counter.hxx
+++ b/xsd/cxx/tree/counter.hxx
@@ -19,7 +19,9 @@ namespace CXX
Counter (); // Dummy ctor, helps with long symbols on HP-UX.
Counts
- count (CLI::Options const& options, SemanticGraph::Schema&);
+ count (CLI::Options const&,
+ SemanticGraph::Schema&,
+ SemanticGraph::Path const&);
};
}
}
diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx
index d9615ac..31e0c08 100644
--- a/xsd/cxx/tree/elements.cxx
+++ b/xsd/cxx/tree/elements.cxx
@@ -36,6 +36,7 @@ namespace CXX
Context::
Context (std::wostream& o,
SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
CLI::Options const& ops,
Counts const& counts_,
Boolean generate_xml_schema__,
@@ -45,6 +46,7 @@ namespace CXX
Regex const* ie)
: CXX::Context (o,
root,
+ path,
map,
ops.value<CLI::char_type> (),
ops.value<CLI::char_encoding> (),
diff --git a/xsd/cxx/tree/elements.hxx b/xsd/cxx/tree/elements.hxx
index 0af42c9..1caf378 100644
--- a/xsd/cxx/tree/elements.hxx
+++ b/xsd/cxx/tree/elements.hxx
@@ -114,6 +114,7 @@ namespace CXX
public:
Context (std::wostream& o,
SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
CLI::Options const& ops,
Counts const& counts_,
Boolean generate_xml_schema,
diff --git a/xsd/cxx/tree/generator.cxx b/xsd/cxx/tree/generator.cxx
index f81a8f4..012a1fd 100644
--- a/xsd/cxx/tree/generator.cxx
+++ b/xsd/cxx/tree/generator.cxx
@@ -847,7 +847,7 @@ namespace CXX
Counts counts;
{
Counter counter;
- counts = counter.count (ops, schema);
+ counts = counter.count (ops, schema, file_path);
/*
wcerr << "global type count: " << counts.global_types << endl;
@@ -1195,6 +1195,7 @@ namespace CXX
{
Context ctx (fwd,
schema,
+ file_path,
ops,
counts,
generate_xml_schema,
@@ -1310,6 +1311,7 @@ namespace CXX
{
Context ctx (hxx,
schema,
+ file_path,
ops,
counts,
generate_xml_schema,
@@ -1464,6 +1466,7 @@ namespace CXX
{
Context ctx (ixx,
schema,
+ file_path,
ops,
counts,
generate_xml_schema,
@@ -1597,6 +1600,7 @@ namespace CXX
Context ctx (os,
schema,
+ file_path,
ops,
counts,
generate_xml_schema,
diff --git a/xsd/cxx/tree/name-processor.cxx b/xsd/cxx/tree/name-processor.cxx
index c90433f..1949c5d 100644
--- a/xsd/cxx/tree/name-processor.cxx
+++ b/xsd/cxx/tree/name-processor.cxx
@@ -43,10 +43,11 @@ namespace CXX
Counts const& counts,
Boolean generate_xml_schema,
SemanticGraph::Schema& root,
- SemanticGraph::Path const& file,
+ SemanticGraph::Path const& path,
StringLiteralMap const& map)
: Tree::Context (std::wcerr,
root,
+ path,
options,
counts,
generate_xml_schema,
@@ -54,8 +55,6 @@ namespace CXX
0,
0,
0),
- schema_path_ (file),
- schema_path (schema_path_),
global_type_names (global_type_names_),
global_element_names (global_element_names_),
type_regex (type_regex_),
@@ -270,7 +269,6 @@ namespace CXX
protected:
Context (Context& c)
: Tree::Context (c),
- schema_path (c.schema_path),
global_type_names (c.global_type_names),
global_element_names (c.global_element_names),
type_regex (c.type_regex),
@@ -518,8 +516,6 @@ namespace CXX
}
private:
- SemanticGraph::Path const schema_path_;
-
Cult::Containers::Map<String, NameSet> global_type_names_;
Cult::Containers::Map<String, NameSet> global_element_names_;
@@ -538,8 +534,6 @@ namespace CXX
RegexVector element_type_regex_;
public:
- SemanticGraph::Path const& schema_path;
-
Cult::Containers::Map<String, NameSet>& global_type_names;
Cult::Containers::Map<String, NameSet>& global_element_names;
diff --git a/xsd/cxx/tree/validator.cxx b/xsd/cxx/tree/validator.cxx
index 057e617..1f05e65 100644
--- a/xsd/cxx/tree/validator.cxx
+++ b/xsd/cxx/tree/validator.cxx
@@ -26,6 +26,7 @@ namespace CXX
{
public:
ValidationContext (SemanticGraph::Schema& root,
+ SemanticGraph::Path const& path,
CLI::Options const& options,
const WarningSet& disabled_warnings,
Counts const& counts,
@@ -33,6 +34,7 @@ namespace CXX
Boolean& valid_)
: Context (std::wcerr,
root,
+ path,
options,
counts,
generate_xml_schema,
@@ -528,13 +530,13 @@ namespace CXX
Boolean Validator::
validate (CLI::Options const& options,
SemanticGraph::Schema& schema,
- SemanticGraph::Path const&,
+ SemanticGraph::Path const& path,
const WarningSet& disabled_warnings,
Counts const& counts)
{
Boolean valid (true);
ValidationContext ctx (
- schema, options, disabled_warnings, counts, false, valid);
+ schema, path, options, disabled_warnings, counts, false, valid);
//
//