A
Angus
Hi
I have designed a framework for working with devices. There is a
framework which has a generic device class - called devices. To
interface with an actual device the framework user would extend
devices like this:
class ABCDevice : public devices
Generally the program created will connect to a specific XYZ and there
will be many devices connected ot this XYZ. XYZ is not a device. Hope
that makes some sense.
The problem I am trying to get my head round is that it is useful to
retain a collection of devices. But if devices has been extended then
a collection of <Whatever>devices is required.
So do I just not bother with this functionality in the framework and
let the user of the framework write all the collection of devices
code? Or is there some way to write some of this code?
If I have a collection of devices (currently a list of device* 's),
then this is not so useful if framework user has extended devices. My
framework has no knowledge of all the possible different types of
specific device created.
Do I need some osrt of AddDevice() function - but then what to pass?
Any suggestions/help with my confusion would be much appreciated.
Angus
I have designed a framework for working with devices. There is a
framework which has a generic device class - called devices. To
interface with an actual device the framework user would extend
devices like this:
class ABCDevice : public devices
Generally the program created will connect to a specific XYZ and there
will be many devices connected ot this XYZ. XYZ is not a device. Hope
that makes some sense.
The problem I am trying to get my head round is that it is useful to
retain a collection of devices. But if devices has been extended then
a collection of <Whatever>devices is required.
So do I just not bother with this functionality in the framework and
let the user of the framework write all the collection of devices
code? Or is there some way to write some of this code?
If I have a collection of devices (currently a list of device* 's),
then this is not so useful if framework user has extended devices. My
framework has no knowledge of all the possible different types of
specific device created.
Do I need some osrt of AddDevice() function - but then what to pass?
Any suggestions/help with my confusion would be much appreciated.
Angus