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 inline template implementation */
26 //#include "AuxParser.ih"
30 #define prefix_ inline
31 ///////////////////////////////cti.p///////////////////////////////////////
33 ///////////////////////////////////////////////////////////////////////////
34 // senf::detail::PrefixAuxParserPolicy<P>
37 prefix_ typename senf::detail::PrefixAuxParserPolicy<P>::ParserType
38 senf::detail::PrefixAuxParserPolicy<P>::aux(PacketParserBase::data_iterator i,
39 PacketParserBase::state_type s)
42 return ParserType(i, s);
46 prefix_ senf::PacketParserBase::data_iterator
47 senf::detail::PrefixAuxParserPolicy<P>::adjust(PacketParserBase::data_iterator i,
48 PacketParserBase::state_type s)
51 return i+ParserType::fixed_bytes;
54 ///////////////////////////////////////////////////////////////////////////
55 // senf::detail::FixedAuxParserPolicy<P>
57 template <class P, unsigned Dist>
58 prefix_ typename senf::detail::FixedAuxParserPolicy<P,Dist>::ParserType
59 senf::detail::FixedAuxParserPolicy<P,Dist>::aux(PacketParserBase::data_iterator i,
60 PacketParserBase::state_type s)
63 return ParserType(i-Dist, s);
66 template <class P, unsigned Dist>
67 prefix_ senf::PacketParserBase::data_iterator
68 senf::detail::FixedAuxParserPolicy<P,Dist>::adjust(PacketParserBase::data_iterator i,
69 PacketParserBase::state_type s)
75 ///////////////////////////////////////////////////////////////////////////
76 // senf::detail::DynamicAuxParserPolicy<P>
79 prefix_ senf::detail::DynamicAuxParserPolicy<P>::DynamicAuxParserPolicy(ParserType p)
85 senf::detail::DynamicAuxParserPolicy<P>::DynamicAuxParserPolicy(WrapperPolicy const & other)
90 prefix_ typename senf::detail::DynamicAuxParserPolicy<P>::ParserType
91 senf::detail::DynamicAuxParserPolicy<P>::aux(PacketParserBase::data_iterator i,
92 PacketParserBase::state_type s)
99 prefix_ senf::PacketParserBase::data_iterator
100 senf::detail::DynamicAuxParserPolicy<P>::adjust(PacketParserBase::data_iterator i,
101 PacketParserBase::state_type s)
107 ///////////////////////////////////////////////////////////////////////////
108 // senf::detail::DynamicWrapperAuxParserPolicy<P>
111 prefix_ senf::detail::DynamicWrapperAuxParserPolicy<P>::
112 DynamicWrapperAuxParserPolicy(ParserPolicy const & other)
117 prefix_ typename senf::detail::DynamicWrapperAuxParserPolicy<P>::ParserType
118 senf::detail::DynamicWrapperAuxParserPolicy<P>::aux(PacketParserBase::data_iterator i,
119 PacketParserBase::state_type s)
126 prefix_ senf::PacketParserBase::data_iterator
127 senf::detail::DynamicWrapperAuxParserPolicy<P>::adjust(PacketParserBase::data_iterator i,
128 PacketParserBase::state_type s)
134 ///////////////////////////////cti.e///////////////////////////////////////
141 // comment-column: 40
142 // c-file-style: "senf"
143 // indent-tabs-mode: nil
144 // ispell-local-dictionary: "american"
145 // compile-command: "scons -u test"