oaCluster.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaCluster.h
00004 //
00005 // This file contains the definition for the oaCluster class and its public 
00006 // supporting classes.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaCluster_P)
00027 #define oaCluster_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaBlock.h"
00035 
00036 
00037 
00038 // *****************************************************************************
00039 // Declare and define types in the OpenAccess namespace.
00040 // *****************************************************************************
00041 BEGIN_OA_NAMESPACE
00042 
00043 
00044 // *****************************************************************************
00045 // oaClusterTypeEnum
00046 // *****************************************************************************
00047 #define oavNumClusterTypes      3
00048 
00049 enum oaClusterTypeEnum {
00050     oacClusterTypeInclusive = 0,
00051     oacClusterTypeExclusive = 1,
00052     oacClusterTypeSuggested = 2
00053 };
00054 
00055 
00056 
00057 // *****************************************************************************
00058 // oaClusterType
00059 // *****************************************************************************
00060 class OA_DESIGN_DLL_API oaClusterType {
00061 public:
00062                             oaClusterType(oaClusterTypeEnum valueIn);
00063                             oaClusterType(const oaString &name);
00064                             ~oaClusterType();
00065 
00066     const oaString          &getName() const;
00067 
00068                             operator                oaClusterTypeEnum() const;
00069 
00070 private:
00071     oaClusterTypeEnum       value;
00072 
00073     static const oaString   names[];
00074 };
00075 
00076 
00077 
00078 // *****************************************************************************
00079 // oaCluster
00080 // *****************************************************************************
00081 class OA_DESIGN_DLL_API oaCluster : public oaBlockObject {
00082 public:
00083     static oaCluster                            *create(oaBlock         *block,
00084                                                         const oaString  &name,
00085                                                         oaClusterType   type);
00086 
00087     void                                        destroy();
00088 
00089     static oaCluster                            *find(const oaBlock     *block,
00090                                                       const oaString    &name);
00091 
00092     oaCluster                                   *getParent() const;
00093     void                                        getName(oaString &name) const;
00094     oaClusterType                               getClusterType() const;
00095 
00096     void                                        setName(const oaString &name);
00097     void                                        setClusterType(oaClusterType type);
00098 
00099     oaBoolean                                   isParent() const;
00100 
00101     void                                        addToCluster(oaCluster *cluster);
00102     void                                        removeFromCluster();
00103 
00104     oaCollection<oaCluster, oaCluster>          getClusters() const;
00105     oaCollection<oaInst, oaCluster>             getInsts() const;
00106     oaCollection<oaClusterBoundary, oaCluster>  getBoundaries() const;
00107     oaCollection<oaBlockage, oaCluster>         getBlockagesOwnedBy() const;
00108 
00109     enum {dtIndex = oacClusterDataType};
00110 };
00111 
00112 
00113 
00114 // *****************************************************************************
00115 // Design Traits.
00116 // *****************************************************************************
00117 template<>
00118 class oaTraits<oaCluster> {
00119 public:
00120     typedef oaBlockObject           parentType;
00121     typedef oaClusterModTypeEnum    modTypeType;
00122     enum {domain = oacBlockDomain};
00123     enum {dbType = oacDesignDBType};
00124     enum {isMultiDomain = false};
00125     enum {dtIndex = oacClusterDataType};
00126     enum {isConcrete = true};
00127     enum {objectTypeEnumVal = oacClusterType};
00128     enum {dataTypeEnumVal = oacClusterDataType};
00129 };
00130 
00131 
00132 
00133 END_OA_NAMESPACE
00134 
00135 #endif

Return to top of page