A
Angus
Hello
My program works with different types of telephone system. Their interfaces
are all different.
But, of course, I don't want to have to write a different program for each
system. There is a LOT of code in the existing program which interfaces
with just one telephone system. I can re-use a lot of that. But I want a
flexible interface to the hardware.
My thinking is I would need to use some sort of polymorphic interface class.
Is this idea along the right lines:
class CTelephoneInterface
This class would have pure virtual functions eg to connect, disconnect,
request, configure, etc.
Then I would I would inherit:
class CSpecificSystem : public CTelephoneInterface
which would implement the base class pure virtual functions.
Any tips on implementation would be handy?
Then my next problem is that the telephone system sends event information.
some of it is unsolicited (ie no request generated the event). How would I
model that?
Any help would be much appreciated.
A
My program works with different types of telephone system. Their interfaces
are all different.
But, of course, I don't want to have to write a different program for each
system. There is a LOT of code in the existing program which interfaces
with just one telephone system. I can re-use a lot of that. But I want a
flexible interface to the hardware.
My thinking is I would need to use some sort of polymorphic interface class.
Is this idea along the right lines:
class CTelephoneInterface
This class would have pure virtual functions eg to connect, disconnect,
request, configure, etc.
Then I would I would inherit:
class CSpecificSystem : public CTelephoneInterface
which would implement the base class pure virtual functions.
Any tips on implementation would be handy?
Then my next problem is that the telephone system sends event information.
some of it is unsolicited (ie no request generated the event). How would I
model that?
Any help would be much appreciated.
A