oaPcellLink.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaPcellLink.h
00004 //
00005 // This file contains the definitions for oaPcellLink and oaPcellDef classes:
00006 //
00007 //  oaPcellLink
00008 //     This class is used as an container class for IPcell. IPcell is the
00009 //     pcell processing interface provided by application. An IPcell can be
00010 //     created in memory by the application or through pcell plug-in.
00011 //
00012 //  oaPcellDef
00013 //     This class contain the binding information of the IPcell for the
00014 //     supermaster. It also provides a name/value pair string table for the
00015 //     storing user data to a pcell evaluator. In the oaPcellCPP, the pcell
00016 //     generator name and the masterType indentifing which type master to
00017 //     generate are using this name/value to store in oaPcellDef when
00018 //     a oaPcellCPP supermaster is created.
00019 //
00020 // *****************************************************************************
00021 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00022 // Integration Initiative, this material may not be copied, modified,
00023 // re-published, uploaded, executed, or distributed in any way, in any medium,
00024 // in whole or in part, without prior written permission from Cadence.
00025 //
00026 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00027 //                           All Rights Reserved.
00028 //
00029 //  $Author: icftcm $
00030 //  $Revision: #1 $
00031 //  $Date: 2010/08/09 $
00032 //  $State: Exp $
00033 // *****************************************************************************
00034 // *****************************************************************************
00035 
00036 
00037 
00038 #if !defined(oaPcellLink_P)
00039 #define oaPcellLink_P
00040 
00041 
00042 
00043 // *****************************************************************************
00044 // Nested includes
00045 // *****************************************************************************
00046 #include "oaCommonSPtr.h"
00047 #include "oaDesignInterfaces.h"
00048 
00049 
00050 
00051 // *****************************************************************************
00052 // Declare and define types in the OpenAccess namespace.
00053 // *****************************************************************************
00054 BEGIN_OA_NAMESPACE
00055 
00056 
00057 
00058 // *****************************************************************************
00059 // oaPcellErrorTypeEnum
00060 // *****************************************************************************
00061 enum oaPcellErrorTypeEnum {
00062     oacPcellBindError           = 0,
00063     oacPcellUnbindError         = 1,
00064     oacPcellEvalError           = 2,
00065     oacPcellReadError           = 3,
00066     oacPcellWriteError          = 4,
00067     oacPcellCalcDiskSizeError   = 5,
00068     oacPcellPlugInError         = 6
00069 };
00070 
00071 
00072 
00073 // *****************************************************************************
00074 // Explicit template instantiations
00075 // *****************************************************************************
00076 #if defined(OA_DESIGN_DLL_EXTERN)
00077 OA_DESIGN_DLL_EXTERN template
00078  class OA_DESIGN_DLL_API SPtr<IPcell>;
00079 #endif
00080 
00081 
00082 
00083 // *****************************************************************************
00084 // oaPcellLink
00085 // *****************************************************************************
00086 class OA_DESIGN_DLL_API oaPcellLink {
00087 public:
00088     void                    destroy();
00089     IPcell                  *getIPcell() const;
00090 
00091     static oaPcellLink      *find(const oaString &name);
00092     static oaPcellLink      *create(IPcell *pcellIn);
00093     static oaPcellDef       *getPcellDef(const oaString &name);
00094 
00095 private:
00096                             oaPcellLink(IPcell *pcellIn);
00097 
00098     SPtr<IPcell>            pcell;
00099     oaPcellLink             *next;
00100     static oaPcellLink      *first;
00101 
00102     friend class IPcell;
00103 };
00104 
00105 
00106 
00107 struct oaPcellDefData;
00108 #if defined(OA_DESIGN_DLL_EXTERN)
00109 OA_DESIGN_DLL_EXTERN template
00110  class OA_DESIGN_DLL_API oaArray<oaPcellDefData*>;
00111 #endif
00112 
00113 
00114 
00115 
00116 // *****************************************************************************
00117 // oaPcellDef
00118 // *****************************************************************************
00119 class OA_DESIGN_DLL_API oaPcellDef {
00120 public:
00121                                 oaPcellDef(IPcell *pcellIn);
00122     virtual                     ~oaPcellDef();
00123 
00124     IPcell                      *getIPcell() const;
00125 
00126     virtual oaBoolean           addData(const oaString  &name,
00127                                         const oaString  &value);
00128     virtual oaBoolean           removeData(const oaString &name);
00129     virtual oaBoolean           getDataValue(const oaString &name,
00130                                              oaString       &value);
00131     virtual oaBoolean           setDataValue(const oaString &name,
00132                                              const oaString &value);
00133 
00134 private:
00135     oaPcellDefData              *findData(const oaString &name);
00136 
00137     IPcell                      *pcell;
00138     oaArray<oaPcellDefData*>    data;
00139 };
00140 
00141 
00142 
00143 END_OA_NAMESPACE
00144 
00145 
00146 
00147 #endif

Return to top of page