arduarn:
class utilities {
public:
utilities() {}
//lots of Members
void sth() { }
};
class animation {
public:
animation(utilities &u) : utils(u) {}
virtual void render() = 0; //abstract class
//other members
protected:
utilities &utils;
};
class randomAnimation : public animation {
public:
randomAnimation(/int wait, RGB24B color,/ utilities &u) : animation(u) {}
virtual void render() {
utils.sth();
}
};
I do not completly understand what this code would do:
If I would create a instance of randomAnimation would I have to do this:
randomAnimation ani(myInstanceofutilities)
?
I would test if it works but the code is for a 777 or 121212 RGB LEDCube and I am in holiday right now and do not have a cube with me.