data and interfaces
- From: Mr Fish <SORRY_NO_SPAM@xxxxxxxxxx>
- Date: Tue, 27 Sep 2005 11:56:35 +0000 (UTC)
howdi,
I'm curious to how people feel about this... I often create an
interface then realize that *all* subclasses will have similar data
such as, say, a list of floats so I define the interface as
class ISomeInterface
{
protected:
list<float> m_Floats;
public:
~ ISomeInterface();
virtual void SomeMethod()=0;
};
I'm sure though that the purists would exclude the data from the
intertrface class and I'm sure there must be some good reasons to do
so.
Can you provide me with any? (assuming that the data type will not
change from subclass to subclass *ever*)
thanks
.
- Follow-Ups:
- Re: data and interfaces
- From: Andrew McDonagh
- Re: data and interfaces
- Prev by Date: Re: Looking for someone who has used No Magic's Magic Draw modeler
- Next by Date: Strategy or A factory with Template Method
- Previous by thread: Breaking the Last Dependency in C++?
- Next by thread: Re: data and interfaces
- Index(es):
Relevant Pages
|