#include <iostream>
#include "no_collision_dict.h"

class MyIntDevice : public PObject
{
public:

  MyIntDevice (int _val)
    : val(_val) {}

  int val;

  void PrintOn (ostream &stream) const
  {
    stream << val;
  }
};

int
main (int argc, char *argv[])
{
  PNoCollisionDictionary<MyIntDevice> dictInt;

  dictInt.AddNoClash ("MyWebcam", new MyIntDevice (1));
  dictInt.AddNoClash ("MyWebcam", new MyIntDevice (2));
  dictInt.AddNoClash ("MyWebcam", new MyIntDevice (3));

  dictInt.PrintOn (cout);
}
