00001 #ifndef _theplu_yat_utility_index_
00002 #define _theplu_yat_utility_index_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "SmartPtr.h"
00027
00028 #include <vector>
00029
00030 namespace theplu {
00031 namespace yat {
00032 namespace utility {
00033
00041 class Index
00042 {
00043 public:
00049 typedef std::vector<size_t>::const_iterator const_iterator;
00050
00054 Index(void);
00055
00060 explicit Index(size_t n);
00061
00065 Index(const Index& a, const Index& b);
00066
00070 explicit Index(const SmartPtr<const std::vector<size_t> >& vec);
00071
00077 explicit Index(const std::vector<size_t>& vec);
00078
00084 const_iterator begin(void) const;
00085
00091 const_iterator end(void) const;
00092
00096 const size_t& operator[](size_t) const;
00097
00101 size_t size(void) const;
00102
00106 const std::vector<size_t>& vector(void) const;
00107
00108 private:
00109
00110
00111
00112
00113 SmartPtr<const std::vector<size_t> > index_;
00114 };
00115
00116 }}}
00117
00118 #endif