wrapper for a vector
I have the next problem. In one class A I have an attribute which is a vector of type Device with the following declaration
vector <Device *>* pDeviceCollection
In another class B which extends A and is a template class with DeviceType parameter. I would like to create a new attribute in this class like a vector
vector <DeviceType *>* pDeviceConcreteCollection
letting me access directly to the DeviceType but without cloning the previous vector something like
wrapperVector <DeviceType*> * pDeviceConcreteCollection = new wrapperVector <DeviceType*> (Device);
and every time you access to the vector it does the cast for you between DeviceType and Device.
Is there a class which does that for you?
Thanks in advance, David.
|All times are GMT +5.5. The time now is 12:54.|