X-Git-Url: http://g0dil.de/git?p=senf.git;a=blobdiff_plain;f=senf%2FPackets%2FPacketInterpreter.ct;fp=senf%2FPackets%2FPacketInterpreter.ct;h=1225872abc663526e5094b8494380eb98bf4801a;hp=e7337368a4b3e514528c58832856c6aaed8e8e99;hb=3b799c202bbbbcf8a43649e91b022b8c69e6a9f8;hpb=ff5e62baaa8f7e571fbe767f7b2ce7f129c783c4 diff --git a/senf/Packets/PacketInterpreter.ct b/senf/Packets/PacketInterpreter.ct index e733736..1225872 100644 --- a/senf/Packets/PacketInterpreter.ct +++ b/senf/Packets/PacketInterpreter.ct @@ -78,15 +78,14 @@ prefix_ typename senf::PacketInterpreter::ptr senf::PacketInterpreter::create(size_type size, senf::NoInit_t) { detail::PacketImpl::Guard p (new detail::PacketImpl(size,0)); - ptr pi (create(p.p,p.p->begin(),p.p->end(),Append)); - return pi; + return create(p.p,p.p->begin(),p.p->end(),Append); } // Create packet as new packet after a given packet template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr const & packet, size_type size) { if (size < initSize()) @@ -99,7 +98,7 @@ senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr pack template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr const & packet, size_type size, senf::NoInit_t) { optional_range r (packet->nextPacketRange()); @@ -117,7 +116,7 @@ senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr pack template template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr const & packet, ForwardReadableRange const & range) { optional_range r (packet->nextPacketRange()); @@ -137,7 +136,7 @@ senf::PacketInterpreter::createAfter(PacketInterpreterBase::ptr pack template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createBefore(PacketInterpreterBase::ptr packet) +senf::PacketInterpreter::createBefore(PacketInterpreterBase::ptr const & packet) { ptr pi (createBefore(packet, senf::noinit)); pi->data().insert(pi->data().begin(),initHeadSize(),byte(0x00u)); @@ -148,7 +147,7 @@ senf::PacketInterpreter::createBefore(PacketInterpreterBase::ptr pac template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t) +senf::PacketInterpreter::createBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t) { if (packet->prev()) packet->impl().truncateInterpretersBackwards(packet->prev().get()); @@ -158,7 +157,7 @@ senf::PacketInterpreter::createBefore(PacketInterpreterBase::ptr pac template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createInsertBefore(PacketInterpreterBase::ptr packet) +senf::PacketInterpreter::createInsertBefore(PacketInterpreterBase::ptr const & packet) { ptr pi (createInsertBefore(packet, senf::noinit)); pi->data().insert(pi->data().begin(),initHeadSize(),byte(0x00u)); @@ -169,7 +168,7 @@ senf::PacketInterpreter::createInsertBefore(PacketInterpreterBase::p template prefix_ typename senf::PacketInterpreter::ptr -senf::PacketInterpreter::createInsertBefore(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::createInsertBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t) { return create(&packet->impl(),packet->data().begin(),packet->data().end(),packet); @@ -253,7 +252,7 @@ senf::PacketInterpreterBase::Factory::create(ForwardReadableRange const & range) template prefix_ senf::PacketInterpreterBase::ptr -senf::PacketInterpreterBase::Factory::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreterBase::Factory::createAfter(PacketInterpreterBase::ptr const & packet, ForwardReadableRange const & range) const { @@ -303,7 +302,7 @@ senf::PacketInterpreter::FactoryImpl::create(size_type size, senf::N template prefix_ typename senf::PacketInterpreterBase::ptr -senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet) +senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet) const { return senf::PacketInterpreter::createAfter(packet); @@ -311,7 +310,7 @@ senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterB template prefix_ typename senf::PacketInterpreterBase::ptr -senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet, senf::NoInit_t) const { @@ -320,7 +319,7 @@ senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterB template prefix_ typename senf::PacketInterpreterBase::ptr -senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet, size_type size) const { @@ -329,7 +328,7 @@ senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterB template prefix_ typename senf::PacketInterpreterBase::ptr -senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr packet, +senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterBase::ptr const & packet, size_type size, senf::NoInit_t) const { @@ -341,7 +340,7 @@ senf::PacketInterpreter::FactoryImpl::createAfter(PacketInterpreterB template prefix_ typename senf::PacketInterpreterBase::ptr senf::PacketInterpreter::FactoryImpl:: -createBefore(PacketInterpreterBase::ptr packet) +createBefore(PacketInterpreterBase::ptr const & packet) const { return senf::PacketInterpreter::createBefore(packet); @@ -350,7 +349,7 @@ createBefore(PacketInterpreterBase::ptr packet) template prefix_ senf::PacketInterpreterBase::ptr senf::PacketInterpreter::FactoryImpl:: -createBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t) +createBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t) const { return senf::PacketInterpreter::createBefore(packet,senf::noinit); @@ -359,7 +358,7 @@ createBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t) template prefix_ senf::PacketInterpreterBase::ptr senf::PacketInterpreter::FactoryImpl:: -createInsertBefore(PacketInterpreterBase::ptr packet) +createInsertBefore(PacketInterpreterBase::ptr const & packet) const { return senf::PacketInterpreter::createInsertBefore(packet); @@ -368,7 +367,7 @@ createInsertBefore(PacketInterpreterBase::ptr packet) template prefix_ senf::PacketInterpreterBase::ptr senf::PacketInterpreter::FactoryImpl:: -createInsertBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t) +createInsertBefore(PacketInterpreterBase::ptr const & packet, senf::NoInit_t) const { return senf::PacketInterpreter::createInsertBefore(packet,senf::noinit); @@ -378,7 +377,7 @@ createInsertBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t) template prefix_ typename senf::PacketInterpreterBase::ptr -senf::PacketInterpreter::FactoryImpl::parseNext(PacketInterpreterBase::ptr packet, PacketInterpreterBase::optional_range const & range) +senf::PacketInterpreter::FactoryImpl::parseNext(PacketInterpreterBase::ptr const & packet, PacketInterpreterBase::optional_range const & range) const { if (!range)