A
Anton Bredikhin
Hello!
I have a class hierarchy that consists mainly of one base class
CtxBase, and two children: LoginCtx and DisconnectCtx.
Now, there's a need to provide an interfaces for this hierarchy. I'd
like to export this classes from a DLL.
And I'm in doubt how can I achieve this?
My first option was to define a base interface (ICtxBase) and then
derive both ILoginCtx and IDisconnectCtx from it. But using this
approach I get ambiguous calls inside derived classes, cause the
inherit from both their specific interfaces and the base classs,
making the base interface ICtxBase to appear in the hierarchy twice.
Can anyone tell me, is there a standard approach for such situation?
Thanks!
I have a class hierarchy that consists mainly of one base class
CtxBase, and two children: LoginCtx and DisconnectCtx.
Now, there's a need to provide an interfaces for this hierarchy. I'd
like to export this classes from a DLL.
And I'm in doubt how can I achieve this?
My first option was to define a base interface (ICtxBase) and then
derive both ILoginCtx and IDisconnectCtx from it. But using this
approach I get ambiguous calls inside derived classes, cause the
inherit from both their specific interfaces and the base classs,
making the base interface ICtxBase to appear in the hierarchy twice.
Can anyone tell me, is there a standard approach for such situation?
Thanks!