⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aggregatenotifier.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
// -*- c-basic-offset: 4 -*-#ifndef CLICK_AGGREGATENOTIFIER_HH#define CLICK_AGGREGATENOTIFIER_HH#include <click/vector.hh>CLICK_DECLSclass Packet;class AggregateListener { public:    AggregateListener()			{ }    virtual ~AggregateListener()	{ }    enum AggregateEvent { NEW_AGG, DELETE_AGG };    virtual void aggregate_notify(uint32_t, AggregateEvent, const Packet *);    };class AggregateNotifier { public:    AggregateNotifier()			{ }    ~AggregateNotifier()		{ }    void add_listener(AggregateListener *);    void remove_listener(AggregateListener *);    void notify(uint32_t, AggregateListener::AggregateEvent, const Packet *) const;      private:    Vector<AggregateListener *> _listeners;    };inline voidAggregateNotifier::notify(uint32_t agg, AggregateListener::AggregateEvent e, const Packet *p) const{    for (int i = 0; i < _listeners.size(); i++)	_listeners[i]->aggregate_notify(agg, e, p);}CLICK_ENDDECLS#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -