I've been trying to find an Adapter solution in C++ to two external interfaces, which are so similar but differs in return types in enumerations.
enum
{
SAME_VALUE1,
SAME_VALUE2
} EnumTypeA
enum
{
SAME_VALUE1,
SAME_VALUE2,
DIFFERENT_VALUE3
} EnumTypeB
class A // not inherited
{
EnumTypeA Method();
}
class B // not inherited
{
EnumTypeB Method();
}
Do you have any idea about a solution so I can use a wrapper to call either interface A or B?
ReturnType? MyAdapter::Method()
{
// Call Method from A or B but how
}
Regards, Burak
Note Added: I've solved the problem using Boost.Variant