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

📄 alignclass.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
#ifndef ALIGNCLASS_HH#define ALIGNCLASS_HH#include "alignment.hh"#include "eclasst.hh"#include "elementt.hh"class Aligner { public:    Aligner()		{ }    virtual ~Aligner()	{ }  virtual void have_flow(const Vector<Alignment> &in, int ioff, int nin,			 Vector<Alignment> &out, int ooff, int nout);  virtual void want_flow(Vector<Alignment> &in, int ioff, int nin,			 const Vector<Alignment> &out, int ooff, int nout);  virtual void adjust_flow(Vector<Alignment> &in, int ioff, int nin,			   const Vector<Alignment> &out, int ooff, int nout);};class NullAligner : public Aligner { public:  NullAligner() { }  void have_flow(const Vector<Alignment> &in, int ioff, int nin,		 Vector<Alignment> &out, int ooff, int nout);  void want_flow(Vector<Alignment> &in, int ioff, int nin,		 const Vector<Alignment> &out, int ooff, int nout);};class CombinedAligner : public Aligner {  Aligner *_have;  Aligner *_want; public:  CombinedAligner(Aligner *have, Aligner *want) : _have(have), _want(want) { }  void have_flow(const Vector<Alignment> &in, int ioff, int nin,		 Vector<Alignment> &out, int ooff, int nout);  void want_flow(Vector<Alignment> &in, int ioff, int nin,		 const Vector<Alignment> &out, int ooff, int nout);};class GeneratorAligner : public Aligner {  Alignment _alignment; public:  GeneratorAligner(const Alignment &a) : _alignment(a) { }  void have_flow(const Vector<Alignment> &in, int ioff, int nin,		 Vector<Alignment> &out, int ooff, int nout);  void want_flow(Vector<Alignment> &in, int ioff, int nin,		 const Vector<Alignment> &out, int ooff, int nout);};class ShifterAligner : public Aligner {  int _shift; public:  ShifterAligner(int shift) : _shift(shift) { }  void have_flow(const Vector<Alignment> &in, int ioff, int nin,		 Vector<Alignment> &out, int ooff, int nout);  void want_flow(Vector<Alignment> &in, int ioff, int nin,		 const Vector<Alignment> &out, int ooff, int nout);};class WantAligner : public Aligner {  Alignment _alignment; public:  WantAligner(Alignment a) : _alignment(a) { }  void want_flow(Vector<Alignment> &in, int ioff, int nin,		 const Vector<Alignment> &out, int ooff, int nout);};class ClassifierAligner : public Aligner { public:  ClassifierAligner() { }  void adjust_flow(Vector<Alignment> &in, int ioff, int nin,		   const Vector<Alignment> &out, int ooff, int nout);};class AlignClass : public ElementClassT {  Aligner *_aligner; public:  AlignClass(const String &);  AlignClass(const String &, Aligner *);  virtual Aligner *create_aligner(ElementT *, RouterT *, ErrorHandler *);  void *cast(const char *);};class StripAlignClass : public AlignClass { public:  StripAlignClass();  Aligner *create_aligner(ElementT *, RouterT *, ErrorHandler *);};class CheckIPHeaderAlignClass : public AlignClass {  int _argno; public:  CheckIPHeaderAlignClass(const String &, int);  Aligner *create_aligner(ElementT *, RouterT *, ErrorHandler *);};class AlignAlignClass : public AlignClass { public:  AlignAlignClass();  Aligner *create_aligner(ElementT *, RouterT *, ErrorHandler *);};Alignment common_alignment(const Vector<Alignment> &, int off, int count);Aligner *default_aligner();#endif

⌨️ 快捷键说明

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