summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhoffert <jhoffert@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-05-01 18:59:45 +0000
committerjhoffert <jhoffert@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-05-01 18:59:45 +0000
commit6370eba197f9a6173e1d9f339f31b66464b73454 (patch)
tree8e66345cca7f169c7422123b1c7140092ee7b07b
parent8fd1740daadf6b094d13e9c06c375b741eb8257e (diff)
downloadATCD-6370eba197f9a6173e1d9f339f31b66464b73454.tar.gz
Fixing iterator factory methods to generate the correct type of iterator
-rw-r--r--TAO/tao/Unbounded_Object_Reference_Sequence_T.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/TAO/tao/Unbounded_Object_Reference_Sequence_T.h b/TAO/tao/Unbounded_Object_Reference_Sequence_T.h
index a48848bbeff..63249260a80 100644
--- a/TAO/tao/Unbounded_Object_Reference_Sequence_T.h
+++ b/TAO/tao/Unbounded_Object_Reference_Sequence_T.h
@@ -124,51 +124,57 @@ public:
// Get an iterator that points to the beginning of the sequence.
iterator begin (void)
{
- return impl_.begin ();
+ return iterator (&this->impl_);
}
// Get a const iterator that points to the beginning of the sequence.
const_iterator begin (void) const
{
- return impl_.begin ();
+ return const_iterator (&this->impl_);
}
// Get an iterator that points to the end of the sequence.
iterator end (void)
{
- return impl_.end ();
+ return iterator (&this->impl_,
+ this->impl_.length ());
}
// Get a const iterator that points to the end of the sequence.
const_iterator end (void) const
{
- return impl_.end ();
+ return const_iterator (&this->impl_,
+ this->impl_.length ());
}
// Get a reverse iterator that points to the end of the sequence.
reverse_iterator rbegin (void)
{
- return impl_.rbegin ();
+ return reverse_iterator (&this->impl_,
+ this->impl_.length () - 1);
}
// Get a const reverse iterator that points to the end of the sequence.
const_reverse_iterator rbegin (void) const
{
- return impl_.rbegin ();
+ return const_reverse_iterator (&this->impl_,
+ this->impl_.length () - 1);
}
// Get a reverse iterator that points to one before the beginning
// of the sequence.
reverse_iterator rend (void)
{
- return impl_.rend ();
+ return reverse_iterator (&this->impl_,
+ -1);
}
// Get a const reverse iterator that points to one before the
// beginning of the sequence.
const_reverse_iterator rend (void) const
{
- return impl_.rend ();
+ return const_reverse_iterator (&this->impl_,
+ -1);
}
#endif /* TAO_HAS_SEQUENCE_ITERATORS */