-\81\84[FrontPage]\81\84[\83\8a\83t\83@\83\8c\83\93\83X]
-
-= Roast+ \83C\83e\83\8c\81[\83^
-
Roast+\82Å\82Ì\83C\83e\83\8c\81[\83^\82Í\81ASTL\93\99\82Ì\82»\82ê\82Æ\82Í\88Ù\82È\82è\82Ü\82·\81B
-{{{ comment
-
STL\82â\81A\82»\82ê\82É\8f\87\82¸\82é\8c`\82Å\8dì\90¬\82³\82ê\82Ä\82¢\82é
-}}}
-
-=== \8dÅ\92á\8cÀ\96\9e\82½\82·\82×\82«\97v\8c\8f
-
-{{{ code cpp
- template <typename ValueType, typename IndexType>
- class iterator_require
- {
- public:
- // Next (Like iterator ++)
- void next();
-
- // Iterator pointer iValid?
- bool is_valid();
-
- // Value
- operator const ValueType() const ;
- ValueType& operator *();
- ValueType& operator ->();
- ValueType get_value();
-
- // Index operations
- void set_index(const IndexType& index);
- IndexType get_index() const;
-
- // Change the end pointer
- void change_end(const IndexType& index);
- };
-}}}
-defined by [http://sourceforge.jp/projects/roast/svn/view/trunk/roast/include/roast/container/iterator_require.hpp?view=markup&root=roast roast/include/roast/container/iterator_require.hpp]
-
- * ValueType\81\81\92l\82Ì\8c^
- * IndexType\81\81\83C\83\93\83f\83b\83N\83X\82Ì\8c^
-
-\82Å\82 \82é\81B\94C\88Ó\82Ì\8c^\82Å\82æ\82¢\81B
-\82Ü\82½\81A\83R\83\93\83X\83g\83\89\83N\83^\81E\83f\83X\83g\83\89\83N\83^\82à\94C\88Ó\82É\92è\8b`\82µ\82Ä\82æ\82¢\81B
-
-\82±\82Ì\83N\83\89\83X\82ð\8cp\8f³\82µ\81A\83I\81[\83o\81[\83\8d\81[\83h\82·\82é\8e\96\82à\8fo\97\88\82é\82ª\81A\8f\83\90\88\89¼\91z\8aÖ\90\94\82Å\82Í\82È\82¢\81i\89¼\91z\8aÖ\90\94\81A\8by\82Ñ\8f\83\90\88\89¼\91z\8aÖ\90\94\82ð\8eg\97p\82·\82é\82Æ\97]\95ª\82È\83I\81[\83o\81[\83w\83b\83h\82ª\95K\91R\93I\82É\94\90¶\82µ\82Ä\82µ\82Ü\82¤\82½\82ß\81j\82½\82ß\92\8d\88Ó\82·\82é\82±\82Æ\81B
-
-{{{ comment
-\96¢\92è\8b`\82Ì\8fê\8d\87\82Å\82 \82Á\82Ä\82à\83C\83\93\83X\83^\83\93\83X\89»\82·\82é\8e\96\82ª\8fo\97\88\82Ä\82µ\82Ü\82¤\82Ì\82Å
-}}}
-
-=== \83T\83\93\83v\83\8b
-
-{{{ code cpp
-
- template <typename T, unsigned int _END=0, unsigned int _START=0>
- class sample_iterator
- {
- protected:
- T* m_p_array;
- unsigned int m_index;
- unsigned int m_end;
-
- public:
- //////////////////////////////////////////
-
- // Constructors
- primitive_array_iterator(T* p_array=NULL, unsigned int length=_END){
- m_p_array = p_array;
- m_index = _START;
- m_end = length;
- }
- primitive_array_iterator(T* p_array, unsigned int start, unsigned int end){
- m_p_array = p_array;
- m_index = start;
- m_end = end;
- }
-
- //////////////////////////////////////////
-
- // Next
- void next()
- {
- m_index++;
- }
-
- // IsValid?
- bool is_valid()
- {
- return m_index < m_end;
- }
-
- //////////////////////////////////////////
-
- operator const T() const
- {
- return m_p_array[m_index];
- }
-
- T& operator *()
- {
- return m_p_array[m_index];
- }
-
- T& operator ->()
- {
- return m_p_array[m_index];
- }
- T get_value() const { return m_p_array[m_index]; }
-
- void set_index(unsigned int index) { m_index = index; }
- unsigned int get_index() const { return m_index; }
-
- void change_end(unsigned int index) { m_end = index; }
- };
-}}}
-
-sample by [http://sourceforge.jp/projects/roast/svn/view/trunk/roast/include/roast/container/primitive_array_iterator.hpp?view=markup&root=roast roast/include/roast/container/primitive_array_iterator.hpp]
-
-=== \8aî\96{\93I\82È\83C\83e\83\8c\81[\83^
- * [\8aî\96{\93I\82È\83C\83e\83\8c\81[\83^]
\ No newline at end of file