00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef Reflex_InternalTools
00016 #define Reflex_InternalTools
00017
00018 namespace Reflex {
00019 namespace OTools {
00020 template <typename TO> class ToIter {
00021 public:
00022 template <typename CONT>
00023 static typename std::vector<TO>::iterator
00024 Begin(const CONT& cont) {
00025 return ((typename std::vector<TO> &) const_cast<CONT&>(cont)).begin();
00026 }
00027
00028
00029 template <typename CONT>
00030 static typename std::vector<TO>::iterator
00031 End(const CONT& cont) {
00032 return ((typename std::vector<TO> &) const_cast<CONT&>(cont)).end();
00033 }
00034
00035
00036 template <typename CONT>
00037 static typename std::vector<TO>::const_reverse_iterator
00038 RBegin(const CONT& cont) {
00039 return ((const typename std::vector<TO> &)cont).rbegin();
00040 }
00041
00042
00043 template <typename CONT>
00044 static typename std::vector<TO>::const_reverse_iterator
00045 REnd(const CONT& cont) {
00046 return ((const typename std::vector<TO> &)cont).rend();
00047 }
00048
00049
00050 };
00051
00052 }
00053 }
00054
00055 #endif // Reflex_InternalTools