Decorator
From: al (allin_at_168.net)
Date: 12/23/03
- Next message: Daniel T.: "Re: The Sort Excercise"
- Previous message: Ken: "Re: Contracts, Components and QoS"
- Next in thread: Avner Ben: "Re: Decorator"
- Reply: Avner Ben: "Re: Decorator"
- Reply: Daniel T.: "Re: Decorator"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Dec 2003 02:34:11 GMT
class what
{
public:
virtual bool method1();
...
};
class Decorator : public what
{
public:
bool method1();
int added_new_method();
...
};
Assume method1() is one of the methods interesting client.
Is Decorator so important? Why not just added_new_method() directly into
what class? Additionally, the method1() in what class has to be virtual to
be "decorated" by Decorator class.
Am I missing seeing its importance?
Thank you very much!
- Next message: Daniel T.: "Re: The Sort Excercise"
- Previous message: Ken: "Re: Contracts, Components and QoS"
- Next in thread: Avner Ben: "Re: Decorator"
- Reply: Avner Ben: "Re: Decorator"
- Reply: Daniel T.: "Re: Decorator"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|