Hi,
To clean up a class which contains too many fonctions and attributes, I want to implement decorators for that class.
However, the class contains many virtual functions.
If I understood well, I should re-implement all these virtual functions as (suppose I do not derive further from my decorator) :
Am I right ?Code:class to_be_decorated { public: virtual bool foo(); }; class decorator : public to_be_decorated { public: decorator(class to_be_decorated&); bool foo() { return obj.foo(); } private: to_be_decorated& obj; };
This will cause my simple decorators to become quite cumbersome as well... any other solutions or ideas?
Thanks!!
Mark



LinkBack URL
About LinkBacks


