diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-01-26 18:57:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 18:57:16 +0100 |
commit | c5d68d4ed60d031445356d670fa293d78f04c505 (patch) | |
tree | 9cb086862790df2f5e63a97bf92ced2d8aa58499 | |
parent | 6639d53a99c728daeae254761d7499c564bc4042 (diff) | |
parent | fb5c132cda315cf72f7ba0873c2f06b60ca8b952 (diff) | |
download | ATCD-c5d68d4ed60d031445356d670fa293d78f04c505.tar.gz |
Merge pull request #568 from jwillemsen/master
Update XML_Utils file with the latest from xsc
-rw-r--r-- | ACE/ace/ETCL/ETCL.ll | 3 | ||||
-rw-r--r-- | ACE/ace/XML_Utils/XMLSchema/id_map.hpp | 29 |
2 files changed, 28 insertions, 4 deletions
diff --git a/ACE/ace/ETCL/ETCL.ll b/ACE/ace/ETCL/ETCL.ll index 7cbc0c47828..fde5839ac57 100644 --- a/ACE/ace/ETCL/ETCL.ll +++ b/ACE/ace/ETCL/ETCL.ll @@ -1,7 +1,6 @@ %option noyywrap %{ -// ETCL.ll,v 1.5 2005/11/16 07:53:24 ossama Exp // ======================================================================== // // = LIBRARY @@ -156,4 +155,4 @@ yywrap (void) return 1; } -ACE_END_VERSIONED_NAMESPACE_DECL
\ No newline at end of file +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp index 2803a5a85be..5b591985db4 100644 --- a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp +++ b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp @@ -54,7 +54,18 @@ //Unresolved_IDREF thrown when there are IDREF's in the //XML document. - class Unresolved_IDREF {}; + class Unresolved_IDREF { + public: + explicit Unresolved_IDREF(std::basic_string<ACE_TCHAR> &message) : message(message) + {} + ~Unresolved_IDREF(){} + std::basic_string<ACE_TCHAR> get_message ( void ) + { + return message; + } + private: + std::basic_string<ACE_TCHAR> message; + }; //Only a default constructor and destructor are needed //Constructor @@ -95,6 +106,19 @@ return; } + void resolve_single_idref (std::basic_string<ACE_TCHAR> idref, ::XSCRT::Type * element) + { + ID_Map::id_iterator id_iterator = this->id_map_.find(idref); + if (id_iterator != this->id_map_.end()) + { + element->set_idref(idref, id_iterator->second); + } + else + { + throw Unresolved_IDREF(idref); + } + } + //Sets the referencing elements XSCRT::Type::idref_ to point to the //referenced element. //Note: The pointer is of type "XSCRT::Type*" @@ -119,7 +143,8 @@ } else { - //throw Unresolved_IDREF(); + std::basic_string<ACE_TCHAR> temp (idref_iterator->first); + throw Unresolved_IDREF(temp); } } } |