00001
00008 #ifndef CDATSET_H
00009 #define CDATSET_H 1
00010
00011 #include <iostream>
00012 #include "cdat.h"
00013
00019 class CDatSet
00020 : public CDat<int>, public boost::operators<CDatSet>
00021 {
00022 public:
00033 CDatSet()
00034 {}
00035
00046 CDatSet(const int newval)
00047 : CDat<int>(newval)
00048 {}
00049
00061 friend std::istream& operator>>(std::istream & stream, CDatSet& cdat)
00062 {
00063 unsigned count = 0;
00064 while(stream.good() && !stream.eof())
00065 {
00066 int val = stream.get();
00067 if (val != 'o')
00068 break;
00069 ++count;
00070 }
00071 stream.clear();
00072 cdat.m_value = count;
00073 return stream;
00074 }
00075 };
00076
00077 #endif
00078
00079