aboutsummaryrefslogtreecommitdiff
path: root/xsd-frontend/transformations/schema-per-type.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-02-19 10:26:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-02-19 10:26:27 +0200
commit1bdeb8aa9049a943de8d39c730d66b41d577a534 (patch)
tree100ec7579e6dadb50db5aa037424d6aee742bf39 /xsd-frontend/transformations/schema-per-type.hxx
parent63bc2f3535bb87d017cc277d7833b79e33853e08 (diff)
Add support for translating schema file paths
Diffstat (limited to 'xsd-frontend/transformations/schema-per-type.hxx')
-rw-r--r--xsd-frontend/transformations/schema-per-type.hxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/xsd-frontend/transformations/schema-per-type.hxx b/xsd-frontend/transformations/schema-per-type.hxx
index 79912f7..89b6d83 100644
--- a/xsd-frontend/transformations/schema-per-type.hxx
+++ b/xsd-frontend/transformations/schema-per-type.hxx
@@ -18,14 +18,20 @@ namespace XSDFrontend
{
using namespace Cult::Types;
- class TypeSchemaTranslator
+ class SchemaPerTypeTranslator
{
public:
virtual
- ~TypeSchemaTranslator ();
+ ~SchemaPerTypeTranslator ();
+ // The following two functions should return empty string if
+ // there is no match.
+ //
virtual WideString
- translate (WideString const& ns, WideString const& name) = 0;
+ translate_type (WideString const& ns, WideString const& name) = 0;
+
+ virtual NarrowString
+ translate_schema (NarrowString const& abs_path) = 0;
};
// This transformation restructures the semantic graph to have
@@ -40,14 +46,14 @@ namespace XSDFrontend
// with the by_value_key key and it is true, then the schema
// for this type is included "strongly".
//
- SchemaPerType (TypeSchemaTranslator&, Char const* by_value_key = 0);
+ SchemaPerType (SchemaPerTypeTranslator&, Char const* by_value_key = 0);
Cult::Containers::Vector<SemanticGraph::Schema*>
transform (SemanticGraph::Schema&);
private:
Char const* by_value_key_;
- TypeSchemaTranslator& trans_;
+ SchemaPerTypeTranslator& trans_;
};
}
}