return Packet(ptr()->parseNextAs(factory));
}
-prefix_ senf::Packet senf::Packet::append(Packet packet)
+prefix_ senf::Packet senf::Packet::append(Packet const & packet)
const
{
return Packet(ptr()->append(packet.ptr()));
// Other methods
-prefix_ bool senf::Packet::operator==(Packet other)
+prefix_ bool senf::Packet::operator==(Packet const & other)
const
{
return ptr() == other.ptr();
ptr()->finalizeThis();
}
-prefix_ void senf::Packet::finalizeTo(Packet other)
+prefix_ void senf::Packet::finalizeTo(Packet const & other)
{
ptr()->finalizeTo(other.ptr());
}
return ptr()->factory();
}
+prefix_ unsigned long senf::Packet::id()
+ const
+{
+ return reinterpret_cast<unsigned long>(&ptr()->impl());
+}
+
prefix_ bool senf::Packet::boolean_test()
const
{
return packet_ && packet_->valid();
}
+prefix_ bool senf::Packet::valid()
+ const
+{
+ return *this;
+}
+
+template <class PacketType, class Parser>
+prefix_ Parser senf::operator<<(Parser target, ConcretePacket<PacketType> const & packet)
+{
+ target << packet.parser();
+ return target;
+}
+
///////////////////////////////cci.e///////////////////////////////////////
#undef prefix_