4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
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 Packet inline non-template implementation */
28 #define prefix_ inline
29 ///////////////////////////////cci.p///////////////////////////////////////
31 ///////////////////////////////////////////////////////////////////////////
36 prefix_ senf::Packet::Packet()
39 prefix_ senf::Packet senf::Packet::clone()
42 return Packet(ptr()->clone());
45 // Interpreter chain access
47 prefix_ senf::Packet senf::Packet::next()
50 PacketInterpreterBase::ptr p (ptr()->next());
51 return !p && ptr()->nextPacketRange() ? checkNext() : Packet(p);
54 prefix_ senf::Packet senf::Packet::prev()
57 return Packet(ptr()->prev());
60 prefix_ senf::Packet senf::Packet::first()
63 return Packet(ptr()->first());
66 prefix_ senf::Packet senf::Packet::last()
69 Packet p (ptr()->last());
70 return p.next() ? checkLast() : p;
73 prefix_ senf::Packet senf::Packet::parseNextAs(factory_t factory)
76 return Packet(ptr()->parseNextAs(factory));
79 prefix_ senf::Packet senf::Packet::append(Packet packet)
82 return Packet(ptr()->append(packet.ptr()));
87 prefix_ senf::PacketData & senf::Packet::data()
93 prefix_ senf::Packet::size_type senf::Packet::size()
102 prefix_ bool senf::Packet::operator==(Packet other)
105 return ptr() == other.ptr();
108 prefix_ void senf::Packet::finalize()
111 last(); // Make sure the packet is complete
115 prefix_ void senf::Packet::dump(std::ostream & os)
118 last(); // Make sure the packet is complete
122 prefix_ senf::TypeIdValue senf::Packet::typeId()
125 return ptr()->typeId();
128 prefix_ senf::Packet::factory_t senf::Packet::factory()
131 return ptr()->factory();
134 prefix_ bool senf::Packet::boolean_test()
137 return packet_ && packet_->valid();
142 prefix_ senf::Packet::Packet(PacketInterpreterBase::ptr packet)
146 prefix_ senf::PacketInterpreterBase::ptr senf::Packet::ptr()
149 BOOST_ASSERT(packet_);
153 ///////////////////////////////cci.e///////////////////////////////////////
160 // c-file-style: "senf"
161 // indent-tabs-mode: nil
162 // ispell-local-dictionary: "american"
163 // compile-command: "scons -u test"
164 // comment-column: 40