summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ace')
-rw-r--r--ace/Hash_Map_Manager.h31
-rw-r--r--ace/Map_Manager.h32
2 files changed, 47 insertions, 16 deletions
diff --git a/ace/Hash_Map_Manager.h b/ace/Hash_Map_Manager.h
index ff382618459..8c3a627ec6d 100644
--- a/ace/Hash_Map_Manager.h
+++ b/ace/Hash_Map_Manager.h
@@ -343,7 +343,11 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK>
class ACE_Hash_Map_Iterator_Base
{
// = TITLE
- // Iterator for the ACE_Hash_Map_Manager.
+ // Base iterator for the <ACE_Hash_Map_Manager>
+ //
+ // = DESCRIPTION
+ // This class factors out common code from its templatized
+ // subclasses.
public:
// = Initialization method.
ACE_Hash_Map_Iterator_Base (ACE_Hash_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm,
@@ -361,8 +365,7 @@ public:
// Returns 1 when all items have been seen, else 0.
ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void);
- // Returns a reference to the interal element <this> is pointing
- // to.
+ // Returns a reference to the interal element <this> is pointing to.
ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>& map (void);
// Returns reference the Hash_Map_Manager that is being iterated
@@ -399,13 +402,18 @@ protected:
};
template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Hash_Map_Iterator
- : public ACE_Hash_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
+class ACE_Hash_Map_Iterator : public ACE_Hash_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
{
// = TITLE
- // Iterator for the ACE_Hash_Map_Manager.
+ // Forward iterator for the <ACE_Hash_Map_Manager>.
//
// = DESCRIPTION
+ // This class does not perform any internal locking of the
+ // <ACE_Hash_Map_Manager> it is iterating upon since locking is
+ // inherently inefficient and/or error-prone within an STL-style
+ // iterator. If you require locking, you can explicitly use an
+ // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Hash_Map_Manager>'s
+ // internal lock, which is accessible via its <mutex> method.
public:
// = Initialization method.
ACE_Hash_Map_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
@@ -439,13 +447,18 @@ public:
};
template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Hash_Map_Reverse_Iterator
- : public ACE_Hash_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
+class ACE_Hash_Map_Reverse_Iterator : public ACE_Hash_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
{
// = TITLE
- // Iterator for the ACE_Hash_Map_Manager.
+ // Reverse iterator for the <ACE_Hash_Map_Manager>.
//
// = DESCRIPTION
+ // This class does not perform any internal locking of the
+ // <ACE_Hash_Map_Manager> it is iterating upon since locking is
+ // inherently inefficient and/or error-prone within an STL-style
+ // iterator. If you require locking, you can explicitly use an
+ // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Hash_Map_Manager>'s
+ // internal lock, which is accessible via its <mutex> method.
public:
// = Initialization method.
ACE_Hash_Map_Reverse_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
diff --git a/ace/Map_Manager.h b/ace/Map_Manager.h
index cbcb6a5a76f..c282cd186fe 100644
--- a/ace/Map_Manager.h
+++ b/ace/Map_Manager.h
@@ -290,7 +290,11 @@ template <class EXT_ID, class INT_ID, class ACE_LOCK>
class ACE_Map_Iterator_Base
{
// = TITLE
- // Iterator for the ACE_Map_Manager.
+ // Iterator for the <ACE_Map_Manager>.
+ //
+ // = DESCRIPTION
+ // This class factors out common code from its templatized
+ // subclasses.
public:
// = Initialization method.
ACE_Map_Iterator_Base (ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm,
@@ -341,11 +345,18 @@ protected:
};
template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Iterator
- : public ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
+class ACE_Map_Iterator : public ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
{
// = TITLE
- // Iterator for the ACE_Map_Manager.
+ // Forward iterator for the <ACE_Map_Manager>.
+ //
+ // = DESCRIPTION
+ // This class does not perform any internal locking of the
+ // <ACE_Map_Manager> it is iterating upon since locking is
+ // inherently inefficient and/or error-prone within an STL-style
+ // iterator. If you require locking, you can explicitly use an
+ // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Map_Manager>'s
+ // internal lock, which is accessible via its <mutex> method.
public:
// = Initialization method.
ACE_Map_Iterator (ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm,
@@ -379,11 +390,18 @@ public:
};
template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Reverse_Iterator
- : public ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
+class ACE_Map_Reverse_Iterator : public ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
{
// = TITLE
- // Reverse Iterator for the ACE_Map_Manager.
+ // Reverse Iterator for the <ACE_Map_Manager>.
+ //
+ // = DESCRIPTION
+ // This class does not perform any internal locking of the
+ // <ACE_Map_Manager> it is iterating upon since locking is
+ // inherently inefficient and/or error-prone within an STL-style
+ // iterator. If you require locking, you can explicitly use an
+ // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Map_Manager>'s
+ // internal lock, which is accessible via its <mutex> method.
public:
// = Initialization method.
ACE_Map_Reverse_Iterator (ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm,