2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 // Stefan Bund <g0dil@berlios.de>
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 \brief Packet inline non-template implementation */
26 #define prefix_ inline
27 ///////////////////////////////cci.p///////////////////////////////////////
29 ///////////////////////////////////////////////////////////////////////////
34 prefix_ senf::Packet::Packet()
37 prefix_ senf::Packet senf::Packet::clone()
40 return Packet(ptr()->clone());
43 // Interpreter chain access
45 prefix_ senf::Packet senf::Packet::next()
48 PacketInterpreterBase::ptr p (ptr()->next());
49 return !p && ptr()->nextPacketRange() ? checkNext() : Packet(p);
52 prefix_ senf::Packet senf::Packet::prev()
55 return Packet(ptr()->prev());
58 prefix_ senf::Packet senf::Packet::first()
61 return Packet(ptr()->first());
64 prefix_ senf::Packet senf::Packet::last()
67 Packet p (ptr()->last());
68 return p.next() ? checkLast() : p;
71 prefix_ senf::Packet senf::Packet::parseNextAs(factory_t factory)
74 return Packet(ptr()->parseNextAs(factory));
77 prefix_ senf::Packet senf::Packet::append(Packet packet)
80 return Packet(ptr()->append(packet.ptr()));
85 prefix_ senf::PacketData & senf::Packet::data()
91 prefix_ senf::Packet::size_type senf::Packet::size()
100 prefix_ bool senf::Packet::operator==(Packet other)
103 return ptr() == other.ptr();
106 prefix_ void senf::Packet::finalize()
109 last(); // Make sure the packet is complete
113 prefix_ void senf::Packet::dump(std::ostream & os)
116 last(); // Make sure the packet is complete
120 prefix_ senf::TypeIdValue senf::Packet::typeId()
123 return ptr()->typeId();
126 prefix_ senf::Packet::factory_t senf::Packet::factory()
129 return ptr()->factory();
132 prefix_ bool senf::Packet::boolean_test()
135 return packet_ && packet_->valid();
140 prefix_ senf::Packet::Packet(PacketInterpreterBase::ptr packet)
144 prefix_ senf::PacketInterpreterBase::ptr senf::Packet::ptr()
147 BOOST_ASSERT(packet_);
151 ///////////////////////////////cci.e///////////////////////////////////////
158 // c-file-style: "senf"
159 // indent-tabs-mode: nil
160 // ispell-local-dictionary: "american"
161 // compile-command: "scons -u test"
162 // comment-column: 40