summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhoffert <jhoffert@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-11-09 17:54:43 +0000
committerjhoffert <jhoffert@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-11-09 17:54:43 +0000
commit3d06100ead4c9b0909f7931e103e8aefc3d11ec0 (patch)
tree08c9ebe38607f575df4c5e093ea0b6b508eeea8a
parenta10d9e85a0c0a7fb3c38d71d900385a2617a2206 (diff)
downloadATCD-3d06100ead4c9b0909f7931e103e8aefc3d11ec0.tar.gz
Adding initial iterator support.
-rw-r--r--TAO/tao/Unbounded_Basic_String_Sequence_T.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/TAO/tao/Unbounded_Basic_String_Sequence_T.h b/TAO/tao/Unbounded_Basic_String_Sequence_T.h
index b43ef6764f6..e1ac398a9e2 100644
--- a/TAO/tao/Unbounded_Basic_String_Sequence_T.h
+++ b/TAO/tao/Unbounded_Basic_String_Sequence_T.h
@@ -113,6 +113,67 @@ public:
}
+ ///
+ /// Additions to support iterator semantics for TAO unbounded basic
+ /// string sequences.
+ ///
+
+ // = Traits and factory methods that create iterators.
+ typedef details::Generic_Sequence_Iterator<value_type, allocation_traits, element_traits> iterator;
+ typedef details::Const_Generic_Sequence_Iterator<value_type, allocation_traits, element_traits> const_iterator;
+ typedef details::Generic_Sequence_Reverse_Iterator<value_type, allocation_traits, element_traits> reverse_iterator;
+ typedef details::Const_Generic_Sequence_Reverse_Iterator<value_type, allocation_traits, element_traits> const_reverse_iterator;
+
+ // Get an iterator that points to the beginning of the sequence.
+ iterator begin (void)
+ {
+ return impl_.begin ();
+ }
+
+ // Get a const iterator that points to the beginning of the sequence.
+ const_iterator begin (void) const
+ {
+ return impl_.begin ();
+ }
+
+ // Get an iterator that points to the end of the sequence.
+ iterator end (void)
+ {
+ return impl_.end ();
+ }
+
+ // Get a const iterator that points to the end of the sequence.
+ const_iterator end (void) const
+ {
+ return impl_.end ();
+ }
+
+ // Get a reverse iterator that points to the end of the sequence.
+ reverse_iterator rbegin (void)
+ {
+ return impl_.rbegin ();
+ }
+
+ // Get a const reverse iterator that points to the end of the sequence.
+ const_reverse_iterator rbegin (void) const
+ {
+ return impl_.rbegin ();
+ }
+
+ // Get a reverse iterator that points to one before the beginning
+ // of the sequence.
+ reverse_iterator rend (void)
+ {
+ return impl_.end ();
+ }
+
+ // Get a const reverse iterator that points to one before the
+ // beginning of the sequence.
+ const_reverse_iterator rend (void) const
+ {
+ return impl_.rend ();
+ }
+
private:
implementation_type impl_;
};