[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-atl
Subject:    Re: How to realize this requirement
From:       John Holliday <jholliday () LEXCEL ! COM>
Date:       1998-09-30 3:25:05
[Download RAW message or body]


Satak,

Is it possible to isolate in one interface the common functionality that is
shared by all components in the framework?  If so, then implement the
methods of that interface in a base class that has no coclass but from which
all the other framework classes are derived.  Then you are free to implement
other (more business-specific) interfaces on the derived coclasses, while
sharing functionality across the framework through the more abstract "base"
interface.  Because the base class is not associated with a CLSID, the only
way for clients to obtain a jack to the shared interface is to create a
business object.

class CBase : public ISharedInterface
{
public:
        CBase();
// ISharedInterface methods
};

class CDerived : public CBase, public ISpecificInterface
{
// ISpecificInterface methods
// Overridden ISharedInterface methods
};


> -----Original Message-----
> From: ATL - Active Template Library [mailto:ATL@DISCUSS.MICROSOFT.COM]On
> Behalf Of Satakarni
> Sent: Friday, September 18, 1998 9:07 AM
> To: ATL@DISCUSS.MICROSOFT.COM
> Subject: How to realize this requirement
>
>
> Hi,
>
>         I need to develop a frame work where there will be set of
> ATL Classes which
> may or may not implement interfaces of their own.
>
>         While using the framework, specific components are
> derived from these
> framework classes. These framework classes have some pure virtual
> functions
> to be implemented by the business class. There is a lot of binding between
> the framework and business classes where each of them call the other. The
> interfaces that are implemented by the framework classes should also be
> exposed by the business components.
>
>         Can some body help me how to do it.
>
>         I am trying to derive the business components from the
> framework classes
> and use COM_INTERFACE_ENTRY_CHAIN macro. But I am hitting into many
> compilation errors.
>
> Thanx
> Satak
>
> ----------------------------------------------------------------
> Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html
>

----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic