oaNode.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaNode.h
00004 //
00005 // This file contains the definitions for the oaNode class, which represents
00006 // a node in a parasitic network for a net.
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(oaNode_P)
00027 #define oaNode_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaPoint.h"
00035 #include "oaCollection.h"
00036 #include "oaTechDBTypes.h"
00037 #include "oaDesignModTypes.h"
00038 #include "oaDesignObject.h"
00039 
00040 
00041 
00042 // *****************************************************************************
00043 // Declare and define types in the OpenAccess namespace.
00044 // *****************************************************************************
00045 BEGIN_OA_NAMESPACE
00046 
00047 
00048 
00049 // *****************************************************************************
00050 // Constants
00051 // *****************************************************************************
00052 #define oacInvalidNodeID  oacNullIndex
00053 
00054 
00055 
00056 // *****************************************************************************
00057 // oaNode
00058 // *****************************************************************************
00059 class OA_DESIGN_DLL_API oaNode : public oaDesignObject {
00060 public:
00061     static oaNode                           *create(oaParasiticNetwork *network);
00062     static oaNode                           *create(oaParasiticNetwork  *network,
00063                                                     oaUInt4             id);
00064 
00065     static oaNode                           *find(const oaParasiticNetwork  *network,
00066                                                   oaUInt4                   id);
00067 
00068     static oaNode                           *find(const oaParasiticNetwork  *network,
00069                                                   const oaString            &name);
00070 
00071     static oaBoolean                        isValidName(const oaParasiticNetwork    *network,
00072                                                         const oaString              &name);
00073 
00074     static oaUInt4                          getUniqueId(oaParasiticNetwork *network);
00075 
00076     void                                    destroy();
00077 
00078     void                                    setName(const oaString &name);
00079     void                                    setLayerNum(oaLayerNum layer);
00080     void                                    setLocation(const oaPoint &location);
00081 
00082     oaBoolean                               hasId() const;
00083     oaBoolean                               hasLayerNum() const;
00084     oaBoolean                               hasLocation() const;
00085 
00086     oaParasiticNetwork                      *getParasiticNetwork() const;
00087     oaUInt4                                 getId() const;
00088     void                                    getName(oaString &name) const;
00089     oaLayerNum                              getLayerNum() const;
00090     void                                    getLocation(oaPoint &location) const;
00091 
00092     void                                    addConn(oaDesignObject *conn);
00093     void                                    removeConn(oaDesignObject *conn);
00094 
00095     void                                    addToSubNetwork(oaSubNetwork *subNetwork);
00096     void                                    removeFromSubNetwork(oaSubNetwork *subNetwork);
00097 
00098     oaCollection<oaDevice, oaNode>          getFromDevices() const;
00099     oaCollection<oaDevice, oaNode>          getToDevices() const;
00100     oaCollection<oaSubNetwork, oaNode>      getSubNetworks() const;
00101     oaCollection<oaDesignObject, oaNode>    getConns() const;
00102 
00103     enum {dtIndex = oacNodeDataType};
00104     enum {domain = oacNoDomain};
00105 };
00106 
00107 
00108 
00109 // *****************************************************************************
00110 // Design Traits.
00111 // *****************************************************************************
00112 template<>
00113 class oaTraits<oaNode> {
00114 public:
00115     typedef oaDesignObject      parentType;
00116     typedef oaNodeModTypeEnum   modTypeType;
00117     enum {dbType = oacDesignDBType};
00118     enum {domain = oacNoDomain};
00119     enum {isMultiDomain = false};
00120     enum {dtIndex = oacNodeDataType};
00121     enum {isConcrete = true};
00122     enum {objectTypeEnumVal = oacNodeType};
00123     enum {dataTypeEnumVal = oacNodeDataType};
00124     enum {abstractTypeEnumVal = oacAbstractNodeType};
00125 };
00126 
00127 
00128 
00129 END_OA_NAMESPACE
00130 
00131 #endif

Return to top of page