X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FStringParser.hh;h=dda7e2faf1a9e273607b83e9b28094e821942f69;hb=a3f9296f648c4991a1576d4200abfdc72788bc16;hp=bc0ffb27a62eab094a116309cecc4c0c3d77676e;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Packets/StringParser.hh b/senf/Packets/StringParser.hh index bc0ffb2..dda7e2f 100644 --- a/senf/Packets/StringParser.hh +++ b/senf/Packets/StringParser.hh @@ -37,16 +37,20 @@ namespace senf { - struct StringParser + template + class StringParser : public PacketParserBase { - + public: StringParser(data_iterator i, state_type s); /////////////////////////////////////////////////////////////////////////// +# include SENF_PARSER() + SENF_PARSER_PRIVATE_FIELD ( length, LengthParser ); + typedef std::string value_type; - static const size_type init_bytes = 2; + static const size_type init_bytes = senf::init_bytes::value; size_type bytes() const; value_type value() const; @@ -55,7 +59,8 @@ namespace senf { StringParser const & operator=(value_type other); }; - std::ostream & operator<<(std::ostream & os, StringParser const & value); + template + std::ostream & operator<<(std::ostream & os, StringParser const & value); } @@ -63,9 +68,9 @@ namespace senf { #endif #if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_StringParser_i_) #define HH_SENF_Packets_StringParser_i_ -#include "StringParser.cci" +//#include "StringParser.cci" //#include "StringParser.ct" -//#include "StringParser.cti" +#include "StringParser.cti" #endif