Sirikata
Classes | Public Types | Public Member Functions | Protected Member Functions
Sirikata::UpstreamElementBase< PacketType > Class Template Reference

Base class for elements that generate output. More...

#include <RouterElement.hpp>

Inheritance diagram for Sirikata::UpstreamElementBase< PacketType >:

List of all members.

Classes

class  OutputPort
 An output port for this element. More...

Public Types

typedef DownstreamElementBase
< PacketType > 
OutputElement

Public Member Functions

virtual ~UpstreamElementBase ()
virtual bool connect (uint32 outport, OutputElement *elmt, uint32 inport)
 Connect the specified output port of this element to another router element, on the specified input port.
virtual PacketType * pull (uint32 port)=0
 Pull a packet from the element on the specified port.

Protected Member Functions

virtual OutputPortoutput (uint32 k)=0

Detailed Description

template<typename PacketType>
class Sirikata::UpstreamElementBase< PacketType >

Base class for elements that generate output.

Upstream refers to the fact that packets flow from it to other elements.


Member Typedef Documentation

template<typename PacketType>
typedef DownstreamElementBase<PacketType> Sirikata::UpstreamElementBase< PacketType >::OutputElement

Constructor & Destructor Documentation

template<typename PacketType>
virtual Sirikata::UpstreamElementBase< PacketType >::~UpstreamElementBase ( ) [inline, virtual]

Member Function Documentation

template<typename PacketType>
virtual bool Sirikata::UpstreamElementBase< PacketType >::connect ( uint32  outport,
OutputElement elmt,
uint32  inport 
) [inline, virtual]

Connect the specified output port of this element to another router element, on the specified input port.

Parameters:
outportthe output port to connect to the other element
elmtthe element to connect the port to
inportthe input port on the receiving element to connect to
Returns:
true if the connection was successful, false otherwise
template<typename PacketType>
virtual OutputPort& Sirikata::UpstreamElementBase< PacketType >::output ( uint32  k) [protected, pure virtual]
template<typename PacketType>
virtual PacketType* Sirikata::UpstreamElementBase< PacketType >::pull ( uint32  port) [pure virtual]

Pull a packet from the element on the specified port.

Parameters:
portthe port to request the packet from
Returns:
a packet, or NULL if one cannot be pulled currently

Implemented in Sirikata::QueueRouterElement< PacketType >, and Sirikata::QueueRouterElement< ObjectMessage >.

Referenced by Sirikata::DownstreamElementBase< PacketType >::InputPort::pull().


The documentation for this class was generated from the following file: