//----
- template <typename OutputStream, typename _Document>
- void generate(OutputStream& os, const _Document& doc) const
+ template <typename OutputStream, typename _Param>
+ void generate(OutputStream& os, const _Param& param) const
{
os << data;
}
//----
- template <typename OutputStream, typename _Document>
- void generate(OutputStream& os, const _Document& doc) const
+ template <typename OutputStream, typename _Param>
+ void generate(OutputStream& os, const _Param& param) const
{
os.write(data, length);
///////////////////////////////////////////////////
- template <typename _It, typename _Param>
- bool parse(_It& it, _Param& param)
+ template <typename InputIterator, typename _Param>
+ bool parse(InputIterator& it, _Param& param)
{
T0 t0;
_It it_work = it;
it = it_work;
return true;
}
+
+ ////////
- template <typename _Strm, typename _Document>
- bool generate(_Strm& strm, _Document& doc) const
+ template <typename OutputStream, typename _Param>
+ void generate(OutputStream& os, const _Param& param) const
{
/*
T0 t0;
return true;
*/
- return _seq_generate(strm, doc, typename _Base::_Next());
+ _seq_generate(*this, os, param, typename _Base::_Next());
}
};
template <int N> void get(); // for gcc 4.4.5 compilable
// generate
- template <typename _Strm, typename _NestType>
- bool _seq_generate(_Strm& strm, _NestType& doc, const EmptyType& )
+ template <typename _Seq, typename OutputStream, typename _Param>
+ void _seq_generate(_Seq& _this, OutputStream& os, _Param& param, const EmptyType& )
{
//if ( generate(strm, doc.get<0>()) == false )
- if ( doc.get<0>().generate(strm, doc.get<0>()) == false )
+ /*if (*/ _this.get<0>().generate(os, param) /*== false )
return false;
- return true;
+ return true*/;
}
// generate
- template <typename _Strm, typename _NestType, typename _NextType>
- bool _seq_generate(_Strm& strm, _NestType& doc, const _NextType& )
+ template <typename _Seq, typename OutputStream, typename _Param, typename _NextType>
+ void _seq_generate(_Seq& _this, OutputStream& os, _Param& param, const _NextType& )
{
//if ( generate(strm, doc.get<0>()) == false )
- if ( doc.get<0>().generate(strm, doc.get<0>()) == false )
- return false;
+ /*if (*/ _this.get<0>().generate(os, param) /*== false )
+ return false*/;
- if ( _seq_generate(strm, doc.next, typename _NextType::_Next()) == false )
+ /*if (*/ _seq_generate(_this, os, _this.next, typename _NextType::_Next())/* == false )
return false;
- return true;
+ return true*/;
}
//////////////////////////////////////////////////////////////