diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-09 11:50:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-09 11:50:57 +0200 |
commit | 6bf1e46ccc93777ca9f62746ada0e18c72fcf138 (patch) | |
tree | 89af9295e53ed2751f8343e32b55f799ce385c07 /xsd/type-map/type-map.hxx | |
parent | 3067cb353cca291d25b4b1fcf6acdb110e560536 (diff) |
Port to use regex from libcutl instead of libbackend-elements
Diffstat (limited to 'xsd/type-map/type-map.hxx')
-rw-r--r-- | xsd/type-map/type-map.hxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/xsd/type-map/type-map.hxx b/xsd/type-map/type-map.hxx index ab8231c..e5715dd 100644 --- a/xsd/type-map/type-map.hxx +++ b/xsd/type-map/type-map.hxx @@ -6,20 +6,29 @@ #ifndef XSD_TYPE_MAP_TYPE_MAP_HXX #define XSD_TYPE_MAP_TYPE_MAP_HXX +#include <cutl/re.hxx> + #include <cult/types.hxx> #include <cult/containers/vector.hxx> -#include <backend-elements/regex.hxx> - namespace TypeMap { using namespace Cult::Types; typedef WideString String; - typedef BackendElements::Regex::Pattern<WideChar> Pattern; + typedef cutl::re::wregex Pattern; class Type { public: + Type (String const& xsd_name, + String const& cxx_ret_name, + String const& cxx_arg_name) + : xsd_name_ (xsd_name), + cxx_ret_name_ (cxx_ret_name), + cxx_arg_name_ (cxx_arg_name) + { + } + Type (Pattern const& xsd_name, String const& cxx_ret_name, String const& cxx_arg_name) @@ -56,6 +65,11 @@ namespace TypeMap class Namespace { public: + Namespace (String const& xsd_name) + : xsd_name_ (xsd_name), has_cxx_name_ (false) + { + } + Namespace (Pattern const& xsd_name) : xsd_name_ (xsd_name), has_cxx_name_ (false) { @@ -116,6 +130,14 @@ namespace TypeMap } Void + types_push_back (String const& xsd_type, + String const& cxx_ret_type, + String const& cxx_arg_type = L"") + { + types_.push_back (Type (xsd_type, cxx_ret_type, cxx_arg_type)); + } + + Void types_push_back (Pattern const& xsd_type, String const& cxx_ret_type, String const& cxx_arg_type = L"") @@ -157,4 +179,3 @@ namespace TypeMap } #endif // XSD_TYPE_MAP_TYPE_MAP_HXX - |