Listing 5
(a)
template <typename STREAM>
class io_operation :
public super_io_operation {
...
}
(b)
template <typename STREAM>
class io_operation : public super_io_operation {
...
io_operation<STREAM>&
getline(char_type* s, std::streamsize n) {
hio[input].test_running();
hio[input].vec.push_back(
new getline1_target<STREAM>(mystr,s,n) );
return *this;
}
...
}
(c)
template <typename STREAM>
class io_operation : public super_io_operation {
...
template<typename DATATYPE>
io_operation<STREAM>& operator>>(DATATYPE& data) {
hio[input].test_running();
hio[input].vec.push_back(
new input_target<STREAM,DATATYPE>(mystr,&data));
return *this;
}
...
}