prefix_ typename senf::ppi::connector::detail::TypedInputMixin<Self,PacketType>::Type
senf::ppi::connector::detail::TypedInputMixin<Self,PacketType>::operator()()
{
- return read();
+ Packet p (static_cast<Self*>(this)->InputConnector::operator()());
+ return p ? p.as<Type>() : Type();
}
template <class Self, class PacketType>
prefix_ typename senf::ppi::connector::detail::TypedInputMixin<Self,PacketType>::Type
senf::ppi::connector::detail::TypedInputMixin<Self,PacketType>::read()
{
- Packet p (static_cast<Self*>(this)->InputConnector::read());
- return p ? p.as<Type>() : Type();
+ return operator()();
}
///////////////////////////////////////////////////////////////////////////
class ActiveOutput : public GenericActiveOutput
{
public:
- operator()(PacketType packet); ///< Send out a packet
- void write(PacketType packet); ///< Alias for operator()
+ void operator()(PacketType packet); ///< Send out a packet
+ void write(PacketType packet); ///< Alias for operator()
};
/** \brief Connector passively providing packets
class PassiveOutput : public GenericPassiveOutput
{
public:
- operator()(PacketType packet); ///< Send out a packet
- void write(PacketType packet); ///< Alias for operator()
+ void operator()(PacketType packet); ///< Send out a packet
+ void write(PacketType packet); ///< Alias for operator()
};
#endif
template <class Writer>
prefix_ void senf::ppi::module::PassiveQueueingSocketSink<Writer>::write()
{
- PacketType p ( input.read());
+ PacketType p ( input());
if (qAlgo_->size() > 0) {
qAlgo_->enqueue( p);
return;
{}
template <class PacketType>
-prefix_ typename senf::ConcretePacket<PacketType>::interpreter::ptr
-senf::ConcretePacket<PacketType>::ptr()
+prefix_ typename senf::ConcretePacket<PacketType>::interpreter * senf::ConcretePacket<PacketType>::ptr()
const
{
- return boost::static_pointer_cast< PacketInterpreter<PacketType> >(Packet::ptr());
+ return static_cast< PacketInterpreter<PacketType> *>( Packet::ptr().get());
}
///////////////////////////////cti.e///////////////////////////////////////
when using a packet in a boolean context. */
void finalizeThis(); ///< Update calculated fields
- /**< The finalize() fammily of members will update
+ /**< The finalize() family of members will update
calculated packet fields: checksums, size fields and so
on. This includes any field, which can be set from
other information in the packet. Each concrete packet
template <class Other>
void finalizeTo(); ///< Update calculated fields
- /**< The finalize() fammily of members will update
+ /**< The finalize() family of members will update
calculated packet fields: checksums, size fields and so
on. This includes any field, which can be set from
other information in the packet. Each concrete packet
\endcode */
void finalizeTo(Packet const & other); ///< Update calculated fields
- /**< The finalize() fammily of members will update
+ /**< The finalize() family of members will update
calculated packet fields: checksums, size fields and so
on. This includes any field, which can be set from
other information in the packet. Each concrete packet
ConcretePacket(typename interpreter::ptr const & packet_);
- typename interpreter::ptr ptr() const;
+ interpreter * ptr() const;
friend class Packet;
friend class PacketInterpreter<PacketType>;
///////////////////////////////////////////////////////////////////////////
// senf::detail::AnnotationRegistry
+prefix_ void senf::detail::AnnotationRegistry::dump(key_type key, std::ostream & os,
+ void * annotation)
+ const
+{
+ Registry::const_iterator i (registry_.find(key));
+ if (i != registry_.end()) {
+ os << fieldName(i->second->v_name());
+ i->second->v_dump(os, annotation);
+ os << "\n";
+ }
+}
+
prefix_ void senf::detail::AnnotationRegistry::dumpRegistrations(std::ostream & os)
{
boost::format fmt ("%-56.56s %-4.4s %-7.7s %5d\n");
///////////////////////////////////////////////////////////////////////////
// senf::detail::AnnotationRegistry
-prefix_ void senf::detail::AnnotationRegistry::dump(key_type key, std::ostream & os,
- void * annotation)
- const
-{
- Registry::const_iterator i (registry_.find(key));
- if (i != registry_.end()) {
- os << fieldName(i->second->v_name());
- i->second->v_dump(os, annotation);
- os << "\n";
- }
-}
-
prefix_ std::string senf::detail::AnnotationRegistry::name(key_type key)
const
{
intrusive_refcount_t<PacketInterpreterBase>::add_ref();
}
-prefix_ bool senf::PacketInterpreterBase::release()
+prefix_ void senf::PacketInterpreterBase::release()
{
if (impl_ && refcount()==1)
// This call will set impl_ to 0 if we just removed the last reference ...
// reference/memory management. Only to be called by intrusive_refcount_t.
void add_ref();
- bool release();
+ void release();
// containment management. Only to be called by PacketImpl.