I have a base class called cParent. It's child is cChild
//This is a sharedPtr. I have 1000's of this type and for issue description purpose, I just took one here.
DataObjectEnumSharedPtr mySharePtr1;
DataObjectEnumSharedPtr mySharePtr2;
................
................
DataObjectEnumSharedPtr mySharePtr1000;
//If I use this, map insertion is throwing compile error
//This is to make the function pointer
typedef void(cParent::*ddEnumParamFP)(DataObjectInt*);
//It is working but I want above one and that is ultimate aim
//This is to make the function pointer
typedef void(cChild::*ddEnumParamFP)(DataObjectInt*);
//I use this map to insert the sharedPtr and an associated callback function's function pointer
map <DataObjectSharedPtr, ddEnumParamFP> m_enumDDMap;
Utilclass::insert()
{
//I have a function to initialize mySharePtr1 to mySharePtr1000
//It is working fine so I am not adding function here.
initialize_shareptrs();
//See this is working absolutely fine if I use cChild::
m_enumDDMap.insert(std::make_pair(m_eFeatureSeats_DISPLAYEDSTATE, &cChild::oneFeatureSeats_DisplayedState));
//But following is not working
m_enumDDMap.insert(std::make_pair(m_eFeatureSeats_DISPLAYEDSTATE, &iIcimNode2::oneFeatureSeats_DisplayedState));
I have 5 classes.. and all of them have same base class. In each class I have M signals and it's corresponding callback functions. I wish to keep the callback functions in the child class but wish to move all the signals to a seperate class. This will reduce the lines of codes.
What I wish to do is , moving this code to a new class. Specifically for this operation.
I wish to have a single map for all class. So, when I declare map, ddEnumParamFP should be generic to all C1,C2,C3,C4,C5. Only option is to refer it's base. So I changed from
typedef void(C1::*ddEnumParamFP)(DataObjectInt*); to