00001 00014 #ifndef _BUBBLE_GENERATOR_H_ 00015 #define _BUBBLE_GENERATOR_H_ 00016 00017 #include <vector> 00018 00019 #include "bubble.h" 00020 #include "camera.h" 00021 00029 class BubbleGenerator 00030 { 00031 private: 00032 00034 typedef std::vector<Bubble *> BubbleContainerType; 00035 00037 BubbleContainerType _availableBubbles; 00038 00040 Camera *_camera; 00041 00043 const unsigned NUMBER_OF_DIFFERENT_BUBBLES; 00044 00045 private: 00046 00047 // Disable copy constructor and assignment operator 00048 BubbleGenerator(const BubbleGenerator &); 00049 BubbleGenerator & operator=(const BubbleGenerator &); 00050 00054 void generateAvailableBubbles(); 00055 00061 unsigned getRandomIndex() const; 00062 00063 public: 00064 00073 BubbleGenerator(unsigned numOfDifferentBubbles, Camera *camera); 00074 00078 ~BubbleGenerator(); 00079 00089 Bubble *generateBubble() const; 00090 }; 00091 00092 #endif