|
Revision 547, 0.8 kB
(checked in by zhibinwu, 3 years ago)
|
|
Fix all warning messages, clean build
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | #ifndef GENERATOR_H |
|---|
| 3 | #define GENERATOR_H |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | #include "packet.h" |
|---|
| 7 | #include <popt.h> |
|---|
| 8 | |
|---|
| 9 | /** Abstract base class for all kinds of Generators |
|---|
| 10 | * The generator design is keep as simple as possible. User defined its own Generator by extending this class and |
|---|
| 11 | * implement the nextPacket fucntion. |
|---|
| 12 | */ |
|---|
| 13 | |
|---|
| 14 | class Generator |
|---|
| 15 | { |
|---|
| 16 | public: |
|---|
| 17 | inline Generator(){} |
|---|
| 18 | virtual ~Generator(){} |
|---|
| 19 | /** |
|---|
| 20 | * Function to initialize the generator |
|---|
| 21 | */ |
|---|
| 22 | virtual void init() = 0; |
|---|
| 23 | //inline void pauseGenerator(){paused_ = true;} |
|---|
| 24 | //inline void resumeGenerator(){paused_=false;} |
|---|
| 25 | //inline bool isPaused(){return paused_;} |
|---|
| 26 | /** |
|---|
| 27 | * Function to generate next packet |
|---|
| 28 | */ |
|---|
| 29 | virtual bool nextPacket(Packet* p) = 0; |
|---|
| 30 | virtual const struct poptOption* getOptions()=0; |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | protected: |
|---|
| 34 | //bool paused_; |
|---|
| 35 | }; |
|---|
| 36 | |
|---|
| 37 | #endif |
|---|