summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2018-03-25 18:26:25 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2018-03-25 18:26:25 +0200
commitc3ba4e68c86219610841d08d0506c8bbd66c3034 (patch)
treefa00d78b4a2866f19817a2e878cfb6f93d4e2c14
parent4e39b7db8eed8cddbb4ec1a97ae2870f842f7976 (diff)
downloadATCD-c3ba4e68c86219610841d08d0506c8bbd66c3034.tar.gz
Minor improvements to the XML utils classes
* ACE/ace/UUID.h: * ACE/ace/XML_Utils/XMLSchema/id_map.hpp: * ACE/ace/XML_Utils/XSCRT/Elements.hpp:
-rw-r--r--ACE/ace/UUID.h2
-rw-r--r--ACE/ace/XML_Utils/XMLSchema/id_map.hpp26
-rw-r--r--ACE/ace/XML_Utils/XSCRT/Elements.hpp18
3 files changed, 17 insertions, 29 deletions
diff --git a/ACE/ace/UUID.h b/ACE/ace/UUID.h
index 1e9671214d1..5ed3877da89 100644
--- a/ACE/ace/UUID.h
+++ b/ACE/ace/UUID.h
@@ -267,7 +267,7 @@ namespace ACE_Utils
bool destroy_lock_;
- /// Initalization state of the generator.
+ /// Initialization state of the generator.
bool is_init_;
};
diff --git a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp
index 6cdcbe45a13..559d461665f 100644
--- a/ACE/ace/XML_Utils/XMLSchema/id_map.hpp
+++ b/ACE/ace/XML_Utils/XMLSchema/id_map.hpp
@@ -89,7 +89,6 @@
{
throw NULL_PTR_Entry();
}
- return;
}
// Add an IDREF to the IDREF map
@@ -103,7 +102,6 @@
{
throw NULL_PTR_Entry();
}
- return;
}
void resolve_single_idref (const std::basic_string<ACE_TCHAR>& idref, ::XSCRT::Type * element)
@@ -124,27 +122,23 @@
//Note: The pointer is of type "XSCRT::Type*"
void resolve_idref ( void )
{
- //Declare iterators to navigate the maps
- ID_Map::id_iterator id_iterator;
- ID_Map::idref_iterator idref_iterator;
-
- for (idref_iterator = this->idref_map_.begin();
+ // Declare iterators to navigate the maps
+ for (ID_Map::idref_iterator idref_iterator = this->idref_map_.begin();
idref_iterator != this->idref_map_.end();
++idref_iterator)
{
//Find the ID that matches the IDREF element
- id_iterator = this->id_map_.find(idref_iterator->first);
+ ID_Map::id_iterator id_iterator = this->id_map_.find(idref_iterator->first);
if (id_iterator != this->id_map_.end())
{
- //Add the IDREF identifier and the reference to the
- //identified object
+ // Add the IDREF identifier and the reference to the
+ // identified object
std::basic_string<ACE_TCHAR> temp_id = id_iterator->first;
idref_iterator->second->set_idref(temp_id, id_iterator->second);
}
else
{
- std::basic_string<ACE_TCHAR> temp (idref_iterator->first);
- throw Unresolved_IDREF(temp);
+ throw Unresolved_IDREF(idref_iterator->first);
}
}
}
@@ -156,11 +150,11 @@
}
private:
- //id_map_: maps the ID string to the element with the
- // ID attribute
+ /// Maps the ID string to the element with the
+ /// ID attribute
ID_MAP id_map_;
- //idref_map_: multimap that maps the IDREF string to the
- // element with the IDREF attribute
+ /// Multimap that maps the IDREF string to the
+ /// element with the IDREF attribute
IDREF_MAP idref_map_;
};
diff --git a/ACE/ace/XML_Utils/XSCRT/Elements.hpp b/ACE/ace/XML_Utils/XSCRT/Elements.hpp
index eeda58c424a..9c60b881c36 100644
--- a/ACE/ace/XML_Utils/XSCRT/Elements.hpp
+++ b/ACE/ace/XML_Utils/XSCRT/Elements.hpp
@@ -28,7 +28,6 @@ namespace XSCRT
class Type
{
public:
-
virtual ~Type (void)
{
}
@@ -152,8 +151,7 @@ namespace XSCRT
map_ = std::auto_ptr<Map_> (new Map_);
}
- if (!map_->insert (
- std::pair<IdentityProvider const*, Type*> (&id, t)).second)
+ if (!map_->insert (std::pair<IdentityProvider const*, Type*> (&id, t)).second)
{
throw 1;
}
@@ -197,12 +195,11 @@ namespace XSCRT
return 0;
}
- //Get and set methods for the idref_map_ data member
+ /// Get and set methods for the idref_map_ data member
Type* get_idref (const char* name)
{
std::basic_string<ACE_TCHAR> name_string (ACE_TEXT_CHAR_TO_TCHAR(name));
- std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i =
- this->idref_map_.find(name_string);
+ std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = this->idref_map_.find(name_string);
if (i != idref_map_.end())
{
return i->second;
@@ -215,8 +212,7 @@ 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);
+ std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = this->idref_map_.find(name);
if (i != idref_map_.end())
{
return i->second;
@@ -230,8 +226,7 @@ namespace XSCRT
Type* get_idref (const wchar_t *name)
{
std::basic_string<ACE_TCHAR> name_string (ACE_TEXT_WCHAR_TO_TCHAR(name));
- std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i =
- this->idref_map_.find(name_string);
+ std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*>::iterator i = this->idref_map_.find(name_string);
if (i != idref_map_.end())
{
return i->second;
@@ -245,12 +240,11 @@ namespace XSCRT
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;
}
private:
- //Data member to handle unbounded IDREF attributes and elements
+ // Data member to handle unbounded IDREF attributes and elements
std::map<std::basic_string<ACE_TCHAR>, XSCRT::Type*> idref_map_;
Type* container_;