#include <Aggregate.h>
Inheritance diagram for Aggregate:
Public Types | |
typedef std::map< std::string, Aggregate * >::const_iterator | const_iterator |
Public Member Functions | |
Aggregate (const Aggregate &toCopy) | |
copy the structure of an aggregate | |
virtual Aggregate * | clone (void) const |
virtual int | getPacketCount (void) const |
Return the number of packets contained within the aggregate. | |
const Attribute & | getAttrib (const std::string &ident) const throw ( UnknownAttributeException ) |
Return a reference to the requested attribute, or throw an exception if the attribute doesn't exist for this aggregate. | |
const StreamKey & | getStreamKey (void) const |
virtual void | addAttrib (const std::string &ident, const Attribute &attrib, uint32_t tier=0) |
Add an attribute to the aggregate. | |
void | addListener (PacketListener &listener) |
void | setParent (Aggregate &p) |
void | setStreamKey (const StreamKey &stream) |
virtual void | handlePacket (TraceIterator &newPkt) |
void | copyFrom (const Aggregate &toCopy) |
void | clear (void) |
Protected Member Functions | |
virtual Aggregate & | operator= (const Aggregate &rhs) |
void | callListeners (TraceIterator &newPkt) |
Protected Attributes | |
std::map< std::string, Attribute * > | attributes |
std::vector< std::vector< Attribute * > > | tiers |
std::map< std::string, Aggregate * > | aggregates |
std::vector< PacketListener * > | listeners |
StreamKey * | streamKey |
Aggregate * | parent |
Static Protected Attributes | |
static const PacketCountAttribute | countAttrib |
An Aggregate can contain other Aggregates, and should at some level contain packets (e.g. an Aggregate of Traces will not directly contain packets, but those Traces will).
An Aggregate will have a StreamKey; this indicates how this particular aggregate is distinguished from others at the same level. For example, when aggregating by 5-tuple (protocol, src/dst addr, src/dest port), an IPv4Key may be used, which stores the values of that 5-tuple. For a top-level Aggregate, the StreamKey will be null.
|
copy the structure of an aggregate
|
|
Add an attribute to the aggregate.
|
|
Add a PacketListener for the aggregate
|
|
Notify any listeners that a packet has been added to the Aggregate.
|
|
Return a reference to the requested attribute, or throw an exception if the attribute doesn't exist for this aggregate.
|
|
Return the number of packets contained within the aggregate. The count of packets in an Aggregate can also be accessed via the 'count' attribute - for non-Trace Aggregates, that may be the only reliable way to get it, as this method probably will not be implemented properly.
Reimplemented in Trace. |
|
handler for a new packet Implements PacketListener. |
|
not implemented; provided to avoid implicit definitions and for later implementation |
|
sub-aggregates |
|
attributes |
|
prototype packet count attribute - a clone will be added by individual aggregates |
|
ProtocolParsers listening for new packets |
|
Aggregate containing this one, if any |
|
Key indicating to which stream this Trace belongs, if applicable |
|
tiers for prioritizing attributes
|