4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief AuxParser public header */
27 #define HH_AuxParser_ 1
30 #error "Don't include 'AuxParser.hh' directly, include 'Packets.hh'"
34 #include "PacketParser.hh"
35 #include "SafeIterator.hh"
37 //#include "AuxParser.mpp"
38 ///////////////////////////////hh.p////////////////////////////////////////
44 struct PrefixAuxParserPolicy
46 typedef PrefixAuxParserPolicy WrapperPolicy;
49 static PacketParserBase::size_type const aux_bytes = ParserType::fixed_bytes;
51 ParserType aux(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
52 PacketParserBase::data_iterator adjust(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
55 template <class P, unsigned Dist>
56 struct FixedAuxParserPolicy
58 typedef FixedAuxParserPolicy WrapperPolicy;
61 static PacketParserBase::size_type const aux_bytes = 0;
63 ParserType aux(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
64 PacketParserBase::data_iterator adjust(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
67 template <class P> struct DynamicWrapperAuxParserPolicy;
70 struct DynamicAuxParserPolicy
72 typedef DynamicWrapperAuxParserPolicy<P> WrapperPolicy;
75 static PacketParserBase::size_type const aux_bytes = 0;
77 DynamicAuxParserPolicy(ParserType p);
78 DynamicAuxParserPolicy(WrapperPolicy const & other);
80 ParserType aux(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
81 PacketParserBase::data_iterator adjust(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
87 struct DynamicWrapperAuxParserPolicy
89 typedef DynamicAuxParserPolicy<P> ParserPolicy;
92 static PacketParserBase::size_type const aux_bytes = 0;
94 DynamicWrapperAuxParserPolicy(ParserPolicy const & other);
96 ParserType aux(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
97 PacketParserBase::data_iterator adjust(PacketParserBase::data_iterator i, PacketParserBase::state_type s) const;
99 SafePacketParserWrapper<ParserType> p_;
103 ///////////////////////////////hh.e////////////////////////////////////////
105 #if !defined(HH_Packets__decls_) && !defined(HH_AuxParser_i_)
106 #define HH_AuxParser_i_
107 //#include "AuxParser.cci"
108 //#include "AuxParser.ct"
109 #include "AuxParser.cti"
116 // comment-column: 40
117 // c-file-style: "senf"
118 // indent-tabs-mode: nil
119 // ispell-local-dictionary: "american"
120 // compile-command: "scons -u test"