oaCommonAgg.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaCommonAgg.h
00004 //
00005 // This file contains the definition of the Aggregate class.  This class is
00006 // used by objects that can be aggregated by other objects.  By inheriting from
00007 // this class objects can expose their own interface to another other object.
00008 //
00009 // *****************************************************************************
00010 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00011 // Integration Initiative, this material may not be copied, modified,
00012 // re-published, uploaded, executed, or distributed in any way, in any medium,
00013 // in whole or in part, without prior written permission from Cadence.
00014 //
00015 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00016 //                           All Rights Reserved.
00017 //
00018 //  $Author: icftcm $
00019 //  $Revision: #1 $
00020 //  $Date: 2010/08/09 $
00021 //  $State: Exp $
00022 // *****************************************************************************
00023 // *****************************************************************************
00024 
00025 
00026 
00027 #if !defined(oaCommonAgg_P)
00028 #define oaCommonAgg_P
00029 
00030 
00031 
00032 // *****************************************************************************
00033 // Nested includes
00034 // *****************************************************************************
00035 #include "oaCommonIBase.h"
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Declare and define types in the oaCommon namespace.
00041 // *****************************************************************************
00042 BEGIN_OA_COMMON_NAMESPACE
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // Agg
00048 // *****************************************************************************
00049 template<class T>
00050 class Agg : public IBase {
00051 public:
00052                             Agg(T *owner);
00053     virtual inline          ~Agg();
00054 
00055     virtual long            queryInterface(const Guid   &id,
00056                                            void         **iPtr);
00057     virtual unsigned long   addRef();
00058     virtual unsigned long   release();
00059 
00060 protected:
00061     unsigned int            refCount;
00062     T                       *m_owner;
00063 };
00064 
00065 
00066 
00067 END_OA_COMMON_NAMESPACE
00068 
00069 #endif

Return to top of page