CComAggObject Class
This class implements the IUnknown interface for an aggregated object. By definition, an aggregated object is contained within an outer object. The CComAggObject class is similar to the CComObject Class, except that it exposes an interface that is directly accessible to external clients.
template<
class contained
>
class CComAggObject :
public IUnknown, public CComObjectRootEx
< contained::_ThreadModel::ThreadModelNoCS >
Parameters
- contained
Your class, derived from CComObjectRoot or CComObjectRootEx, as well as from any other interfaces you want to support on the object.
Members
Public Constructors
Name |
Description |
---|---|
The constructor. |
|
The destructor. |
Public Methods
Name |
Description |
---|---|
Increments the reference count on the aggregated object. |
|
This static function allows you to create a new CComAggObject< contained > object without the overhead of CoCreateInstance. |
|
Performs final initialization of m_contained. |
|
Performs final destruction of m_contained. |
|
Retrieves a pointer to the requested interface. |
|
Decrements the reference count on the aggregated object. |
Public Data Members
Name |
Description |
---|---|
Delegates IUnknown calls to the outer unknown. |
Remarks
CComAggObject implements IUnknown for an aggregated object. CComAggObject has its own IUnknown interface, separate from the outer object's IUnknown interface, and maintains its own reference count.
For more information about aggregation, see the article Fundamentals of ATL COM Objects.
Inheritance Hierarchy
CComObjectRootBase
IUnknown
CComAggObject
Requirements
Header: atlcom.h