From 6f7cedfc8797c821b248c1a2a6217ed68ba44f3d Mon Sep 17 00:00:00 2001 From: Myun2 Date: Fri, 4 Jun 2010 02:40:10 +0900 Subject: [PATCH] =?utf8?q?counter=5Fiterator=20=E3=82=82=E3=81=A1=E3=82=83?= =?utf8?q?=E3=82=93=E3=81=A8=E3=82=B3=E3=83=B3=E3=83=91=E3=82=A4=E3=83=AB?= =?utf8?q?=E9=80=9A=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=AA=E3=82=8A?= =?utf8?q?=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/container/indexer_iterator.hpp | 8 +++++++- roast/include/roast/container/linear_iterator_base.hpp | 9 ++++++++- roast/test/roast_test_VC90/iterator_test.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/roast/include/roast/container/indexer_iterator.hpp b/roast/include/roast/container/indexer_iterator.hpp index 009704dc..99c04653 100644 --- a/roast/include/roast/container/indexer_iterator.hpp +++ b/roast/include/roast/container/indexer_iterator.hpp @@ -52,7 +52,13 @@ namespace roast{ typedef _ValueType ValueType; typedef _IndexType IndexType; typedef _IndexType IteratorType; - + + typedef _ValueType& ValueTypeRef; + typedef _ValueType* ValueTypePtr; + typedef const _ValueType CValueType; + typedef const _ValueType& CValueTypeRef; + typedef const _ValueType* CValueTypePtr; + protected: ContainerMemberType m_con; diff --git a/roast/include/roast/container/linear_iterator_base.hpp b/roast/include/roast/container/linear_iterator_base.hpp index 00c9219f..bcc121aa 100644 --- a/roast/include/roast/container/linear_iterator_base.hpp +++ b/roast/include/roast/container/linear_iterator_base.hpp @@ -19,7 +19,13 @@ namespace roast { public: typedef T IteratorType; + typedef T ValueType; + typedef T ValueTypeRef; + typedef T* ValueTypePtr; + typedef const T CValueType; + typedef const T CValueTypeRef; + typedef const T* CValueTypePtr; protected: T m_it; @@ -48,7 +54,8 @@ namespace roast } // Value - T& get_value_ref() const + //T& get_value_ref() const + T get_value_ref() const { return m_it; } diff --git a/roast/test/roast_test_VC90/iterator_test.cpp b/roast/test/roast_test_VC90/iterator_test.cpp index 633352d5..4bfed269 100644 --- a/roast/test/roast_test_VC90/iterator_test.cpp +++ b/roast/test/roast_test_VC90/iterator_test.cpp @@ -13,7 +13,7 @@ void main() work[0] = 1; //indexer_iterator::type a = _indexer_iterator_impl(work,32); - indexer_iterator::type a = make_indexer_iterator(work,1,lengthof(work)); + indexer_iterator::type a = make_indexer_iterator(work,0,lengthof(work)); counter_iterator ca(lengthof(work)); //*a = 0; -- 2.11.0