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

Base class for elements that accept input. More...

#include <RouterElement.hpp>

Inheritance diagram for Sirikata::DownstreamElementBase< PacketType >:

List of all members.

Classes

class  InputPort
 An input port for this element. More...

Public Types

typedef UpstreamElementBase
< PacketType > 
InputElement

Public Member Functions

virtual ~DownstreamElementBase ()
virtual bool connectInput (uint32 inport, InputElement *elmt, uint32 outport)
 Connect the specified input port of this element to another router element, on the specified output port.
virtual bool push (uint32 port, PacketType *pkt)=0
 Push a packet to this element on the given port.

Protected Member Functions

virtual InputPortinput (uint32 k)=0

Detailed Description

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

Base class for elements that accept input.

Downstream refers to the fact that it receives input from other elements.


Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename PacketType>
virtual bool Sirikata::DownstreamElementBase< PacketType >::connectInput ( uint32  inport,
InputElement elmt,
uint32  outport 
) [inline, virtual]

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

Parameters:
inportthe input port to connect to the other element
elmtthe element to connect the port to
outportthe output port on the providing element to connect to
Returns:
true if the connection was successful, false otherwise

Referenced by Sirikata::UpstreamElementBase< ObjectMessage >::connect().

template<typename PacketType>
virtual InputPort& Sirikata::DownstreamElementBase< PacketType >::input ( uint32  k) [protected, pure virtual]
template<typename PacketType>
virtual bool Sirikata::DownstreamElementBase< PacketType >::push ( uint32  port,
PacketType *  pkt 
) [pure virtual]

Push a packet to this element on the given port.

Parameters:
portthe port to push the packet to
pktthe packet to push

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

Referenced by Sirikata::UpstreamElementBase< PacketType >::OutputPort::push().


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