diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-03-21 08:30:59 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-03-21 08:30:59 +0100 |
commit | 2867697ce480fda37af565f38c729a3dbc13e6ee (patch) | |
tree | 74f7b940f64c403b8ca552037ccc6199dac90635 /ACE/ace/XML_Utils | |
parent | 92d0806c151f4be4735a516aecfedd81f3876196 (diff) | |
download | ATCD-2867697ce480fda37af565f38c729a3dbc13e6ee.tar.gz |
Add get_idref that works wit a string&
* ACE/ace/XML_Utils/XMLSchema/Types.hpp:
* ACE/ace/XML_Utils/XSCRT/Elements.hpp:
Diffstat (limited to 'ACE/ace/XML_Utils')
-rw-r--r-- | ACE/ace/XML_Utils/XMLSchema/Types.hpp | 2 | ||||
-rw-r--r-- | ACE/ace/XML_Utils/XSCRT/Elements.hpp | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/ACE/ace/XML_Utils/XMLSchema/Types.hpp b/ACE/ace/XML_Utils/XMLSchema/Types.hpp index 1e947c744ce..966c588fd3e 100644 --- a/ACE/ace/XML_Utils/XMLSchema/Types.hpp +++ b/ACE/ace/XML_Utils/XMLSchema/Types.hpp @@ -57,8 +57,6 @@ namespace XMLSchema typedef basic_string<C> Base__ ; public: - // typedef ACE_Refcounted_Auto_Ptr < string, ACE_Null_Mutex > _ptr; - //@@ VC6 does not inject XSCRT::Type into the scope so I have // to qualify it all the time. // diff --git a/ACE/ace/XML_Utils/XSCRT/Elements.hpp b/ACE/ace/XML_Utils/XSCRT/Elements.hpp index 601e0f9f338..eeda58c424a 100644 --- a/ACE/ace/XML_Utils/XSCRT/Elements.hpp +++ b/ACE/ace/XML_Utils/XSCRT/Elements.hpp @@ -213,6 +213,20 @@ namespace XSCRT } } + Type* get_idref (const std::basic_string<ACE_TCHAR>& name) + { + std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = + this->idref_map_.find(name); + if (i != idref_map_.end()) + { + return i->second; + } + else + { + return 0; + } + } + Type* get_idref (const wchar_t *name) { std::basic_string<ACE_TCHAR> name_string (ACE_TEXT_WCHAR_TO_TCHAR(name)); @@ -228,8 +242,7 @@ namespace XSCRT } } - - void set_idref (std::basic_string<ACE_TCHAR> name, Type* new_idref) + void set_idref (const std::basic_string<ACE_TCHAR>& name, Type* new_idref) { this->idref_map_.insert(std::pair<std::basic_string<ACE_TCHAR>,Type*>(name, new_idref)); return; @@ -267,9 +280,6 @@ namespace XSCRT public: // Trait for marshaling a FundamentalType X typedef X CDR_Type__; -#if !defined (__BORLANDC__) || (__BORLANDC__ >= 0x620) - typedef ACE_Refcounted_Auto_Ptr < FundamentalType, ACE_Null_Mutex > _ptr; -#endif /* !__BORLANDC__ */ FundamentalType () { |