Can someone suggest me a way to map a template classes with a set of member functions from another class? Whenever i call one of the function inside a template class, it should call the associated member function of the other class.
Updating with a use-case
template<int walktype>
class Walker
{
Node* node;
bool walk()
{
switch(walktype)
case 1:
node->firstwalk();
case 2:
node->secondwalk();
......
}
};
Please consider the above one as a pseudo-code.
I want the switch-case decision to be taken at the compile time.
Thanks,
Gokul.
I found a way to do it using boost::mpl::map. I need to create a type out of the function and use that type as a template parameter for the class and associate this class with the original class using boost::mpl::map.
Thanks,
Gokul.