
#ifndef GENERATOR_H
#define GENERATOR_H


#include "packet.h"
#include <popt.h>

/** Abstract base class for all kinds of Generators
 * The generator design is keep as simple as possible. User defined its own Generator by extending this class and 
 * implement the nextPacket fucntion.
 */

class Generator
{     
public:
    inline Generator(){}
    virtual ~Generator(){}
   /**
    * Function to initialize the generator
    */
   virtual void init() = 0;
   //inline void pauseGenerator(){paused_ = true;}
   //inline void resumeGenerator(){paused_=false;}
   //inline bool isPaused(){return paused_;}
  /**
   * Function to generate next packet
   */            
  virtual bool nextPacket(Packet* p) = 0;     
  virtual const struct poptOption* getOptions()=0;    

       
protected:
  //bool paused_;
};

#endif

