class Test
{
public:
typedef enum {kBegin = 0, kBandwidth = 1, kLatency = 2, kEnd = 3} TestType;

public:
   typedef map<TestType, ResultBase*> ResultColl;
   typedef map<TestType, ResultBase*>::iterator ResultIter;

public:
   /*
    * Constructor and Destructor
    */
   Test() : m_ulTarget(0), m_curTest(kBegin) {addTest(kBegin);}
   ~Test();

   /*
    * Copy Constructor
    */
   Test(Test &test); //copy constructor

   /*
    * Assignment operator
    */
   Test& operator=(Test &test); //assignment operator


   /*
    * Returns target host
    */
   unsigned long
   getTarget() {return m_ulTarget;}

   /*
    * Sets target host
    */
   void
   setTarget(unsigned long ulTarget) {m_ulTarget = ulTarget;}

   /*
    * Copies test object
    */
   void
   copyTest(TestType type, ResultBase *pResult);

   /*
    * Adds new test type
    */
   void
   addTest(TestType type);

   /*
    * Returns curren test
    */
   TestType
   getActiveTest() {return m_curTest;}

   /*
    * Finds next test
    */
   TestType
   nextTest();

   /*
    * Have all tests been iterated?
    */
   bool
   isLastTest();

   /*
    * Sets Latency
    */
   void
   setLatency(double dVal);

   /*
    * Sets Bandwidth
    */
   void
   setBandwidth(long lVal);

   /*
    * Gets Latency
    */
   double
   getLatency();

   /*
    * Gets Bandwidth
    */
   long
   getBandwidth();

   /*
    * Returns result collection
    */
   ResultColl
   getResults() {return m_results;}

   /*
    * Converts value to test type
    */
   static TestType
   toTestType(unsigned char ucType);

private:
   unsigned long m_ulTarget;  //target address
   ResultColl m_results;      //result collection
   TestType m_curTest;        //current test
};
