oaNetTermArray.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaNetTermArray.h
00004 //
00005 // This file contains the definition for the oaNetTermArray class. This
00006 // class implements a specification of all the connections between a set of
00007 // nets and a set of terminals in an instance master. It is used with the 
00008 // oaInstTerm::create() and oaModInstTerm::create() APIs.
00009 //
00010 // IMPORTANT! The public interface types cannot use the class based typedef
00011 // because this will not work with the oaTcl auto-generation compiler.
00012 //
00013 // *****************************************************************************
00014 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00015 // Integration Initiative, this material may not be copied, modified,
00016 // re-published, uploaded, executed, or distributed in any way, in any medium,
00017 // in whole or in part, without prior written permission from Cadence.
00018 //
00019 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00020 //                           All Rights Reserved.
00021 //
00022 //  $Author: icftcm $
00023 //  $Revision: #1 $
00024 //  $Date: 2010/08/09 $
00025 //  $State$
00026 // *****************************************************************************
00027 // *****************************************************************************
00028 
00029 
00030 
00031 #if !defined(oaNetTermArray_P)
00032 #define oaNetTermArray_P
00033 
00034 
00035 
00036 // *****************************************************************************
00037 // Nested includes
00038 // *****************************************************************************
00039 #include "oaArray.h"
00040 #include "oaNet.h"
00041 #include "oaNetTermPair.h"
00042 
00043 
00044 
00045 // *****************************************************************************
00046 // Declare and define types in the OpenAccess namespace.
00047 // *****************************************************************************
00048 BEGIN_OA_NAMESPACE
00049 
00050 
00051 
00052 // *****************************************************************************
00053 // oaNetTermArrayBase
00054 // *****************************************************************************
00055 template<class NetType, class TermType>
00056 class oaNetTermArrayBase {
00057 public:
00058     typedef oaNetTermPair<NetType, TermType>    NetTermPair;
00059 
00060                                                 oaNetTermArrayBase(oaUInt4 size);
00061 
00062     void                                        append(const NetType    &net,
00063                                                        const TermType   &term);
00064 
00065     oaUInt4                                     getNumElements() const;
00066     void                                        setNumElements(oaUInt4 numElements);
00067     oaUInt4                                     getSize() const;
00068 
00069     const oaNetTermPair<NetType, TermType>      &get(oaUInt4 index) const;
00070     oaNetTermPair<NetType, TermType>            &get(oaUInt4 index);
00071 
00072     const oaNetTermPair<NetType, TermType>      &operator[](oaUInt4 index) const;
00073     oaNetTermPair<NetType, TermType>            &operator[](oaUInt4 index);
00074 
00075     oaUInt4                                     getNumBits() const;
00076     oaUInt4                                     getNumMultiBit() const;
00077 
00078 private:
00079     oaArray<NetTermPair>                        elements;
00080 };
00081 
00082 
00083 
00084 // *****************************************************************************
00085 // oaNetTermArray
00086 // *****************************************************************************
00087 class oaNetTermArray : public oaNetTermArrayBase<oaNet*, oaTerm*> {
00088 public:
00089                             oaNetTermArray(oaUInt4 size = 4);
00090 };
00091 
00092 class oaNetTermNameArray : public oaNetTermArrayBase<oaNet*, oaName> {
00093 public:
00094                             oaNetTermNameArray(oaUInt4 size = 4);
00095 };
00096 
00097 class oaNetTermPosArray : public oaNetTermArrayBase<oaNet*, oaUInt4> {
00098 public:
00099                             oaNetTermPosArray(oaUInt4 size = 4);
00100 };
00101 
00102 
00103 
00104 // *****************************************************************************
00105 // oaModNetTermArray
00106 // *****************************************************************************
00107 class oaModNetTermArray : public oaNetTermArrayBase<oaModNet*, oaModTerm*> {
00108 public:
00109                             oaModNetTermArray(oaUInt4 size = 4);
00110 };
00111 
00112 class oaModNetTermNameArray : public oaNetTermArrayBase<oaModNet*, oaName> {
00113 public:
00114                             oaModNetTermNameArray(oaUInt4 size = 4);
00115 };
00116 
00117 class oaModNetTermPosArray : public oaNetTermArrayBase<oaModNet*, oaUInt4> {
00118 public:
00119                             oaModNetTermPosArray(oaUInt4 size = 4);
00120 };
00121 
00122 
00123 
00124 END_OA_NAMESPACE
00125 
00126 #endif

Return to top of page