oaDesignInterfaces.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaDesignInterfaces.h
00004 //
00005 // This file contains the definitions for design interface classes:
00006 //
00007 //  IRCBase
00008 //     This intermediate base class allows enabling and disabling the reference
00009 //     counting for specific period of time within an application.
00010 //
00011 //  IPcell
00012 //     The IPcell class implements the interfaces required to build and maintain
00013 //     parameterized cells in the OpenAccess database. Any application that
00014 //     wants to provide parameterized cells as a feature is required to derive
00015 //     from this class. The derived class is identified as a pcell evaluator.
00016 //     An IPcell can be provided in memory or through a plug-in module. When the
00017 //     IPcell is provided in memory, the application needs to create its IPcell
00018 //     derived class and call oaPcellLink::create() to register with OpenAccess.
00019 //     For IPcell provided through a plug-in module, oaPcellLink::find() and
00020 //     oaPcellLink::getPcellDef() can be used to access the IPcell in the 
00021 //     plug-in module.
00022 //
00023 //  IPcellGen
00024 //     The IPcellGen class is an interface for application to hookup with an
00025 //     IPcell to provide the content generation on a subMaster. The content
00026 //     generation on a subMaster is identified as a pcell generator. oaPcellCPP
00027 //     uses this interface as the link between the evaluator and generator.
00028 //
00029 //  PcellFile
00030 //     The PcellFile class is an utility class for the IPcell interface users
00031 //     to read/write a pcell subMaster if they choose to do so.
00032 //
00033 //  IEvalText
00034 //     The IEvalText class implements a callback used by an oaEvalText object to
00035 //     interpret the text string. Any application that wants to customize the
00036 //     oaEvalText text interpretation as a feature is required to derive from
00037 //     this class. An IEvalText can be provided in memory or through a plug-in
00038 //     module. When the IEvalText is provided in memory, the application needs
00039 //     to create its IEvalText derived class and call oaEvalTextLink::create()
00040 //     to register with OpenAccess. For IEvalText provided through a plug-in
00041 //     module, oaEvalTextLink::find() can be used to access the IEvalText in
00042 //     the plug-in module.
00043 //
00044 //  ITextInvalidate
00045 //     The ITextInvalidate class is an interface that is used by text bBox 
00046 //     components to invalidate the bounding box of an oaText, oaTextDisplay 
00047 //     or all text objects in a block.
00048 //
00049 //  IText 
00050 //     The IText class is an interface that is used by an oaText or
00051 //     oaTextDisplay object to find the bounding box of the object. Any 
00052 //     application that wants to customize the bounding box calculations has to
00053 //     to implement this interface by defining a class derived from
00054 //     this interface. An IText implementation can be provided in memory or 
00055 //     through a plug-in module. Applications may initialize their bBox
00056 //     component with OpenAccess.
00057 //
00058 // *****************************************************************************
00059 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00060 // Integration Initiative, this material may not be copied, modified,
00061 // re-published, uploaded, executed, or distributed in any way, in any medium,
00062 // in whole or in part, without prior written permission from Cadence.
00063 //
00064 //                Copyright 2002-2009 Cadence Design Systems, Inc.
00065 //                           All Rights Reserved.
00066 //
00067 //  $Author: icftcm $
00068 //  $Revision: #1 $
00069 //  $Date: 2010/08/09 $
00070 //  $State: Exp $
00071 // *****************************************************************************
00072 // *****************************************************************************
00073 
00074 
00075 
00076 #if !defined(oaDesignInterface_P)
00077 #define oaDesignInterface_P
00078 
00079 
00080 
00081 // *****************************************************************************
00082 // Nested includes
00083 // *****************************************************************************
00084 #include "oaCommonIBase.h"
00085 #include "oaMapWindow.h"
00086 #include "oaTextDisplay.h"
00087 
00088 
00089 
00090 // *****************************************************************************
00091 // Declare and define types in the OpenAccess namespace.
00092 // *****************************************************************************
00093 BEGIN_OA_NAMESPACE
00094 
00095 
00096 
00097 // *****************************************************************************
00098 // IPcell
00099 // *****************************************************************************
00100 class OA_DESIGN_DLL_API IPcell : public IBase {
00101 public:
00102     virtual                 ~IPcell();
00103 
00104     virtual oaPcellDef      *getPcellDef() = 0;
00105 
00106     virtual void            getName(oaString &name) = 0;
00107 
00108     virtual void            onBind(oaDesign     *design,
00109                                    oaPcellDef   *pcellDef) = 0;
00110     virtual void            onUnbind(oaDesign   *design,
00111                                      oaPcellDef *pcellDef) = 0;
00112 
00113     virtual void            onEval(oaDesign     *design,
00114                                    oaPcellDef   *pcellDef) = 0;
00115 
00116     virtual void            onRead(oaDesign         *design,
00117                                    oaMapFileWindow  &mapWindow,
00118                                    oaUInt4          &loc,
00119                                    oaPcellDef       *pcellDef) = 0;
00120     virtual void            onWrite(oaDesign        *design,
00121                                     oaMapFileWindow &mapWindow,
00122                                     oaUInt4         &loc,
00123                                     oaPcellDef      *pcellDef) = 0;
00124 
00125     virtual oaUInt4         calcDiskSize(oaPcellDef *pcellDef) const = 0;
00126 
00127 
00128     static const Guid       &getId();
00129 };
00130 
00131 
00132 
00133 // *****************************************************************************
00134 // IPcellGen
00135 // *****************************************************************************
00136 class OA_DESIGN_DLL_API IPcellGen : public IBase {
00137 public:
00138     virtual void            genPcell(const oaString &masterType,
00139                                      oaDesign       *design,
00140                                      oaPcellDef     *pcellDef) = 0;
00141 
00142     static const Guid       &getId();
00143 
00144 };
00145 
00146 
00147 
00148 // *****************************************************************************
00149 // PcellFile
00150 // *****************************************************************************
00151 class OA_DESIGN_DLL_API PcellFile {
00152 public:
00153                             PcellFile(const oaString &fileName);
00154                             ~PcellFile();
00155 
00156     void                    open(oaChar mode);
00157     void                    close();
00158 
00159     void                    read(oaDesign   *subMaster,
00160                                  oaUInt8    offset);
00161     oaUInt8                 append(oaDesign *subMaster);
00162 
00163     oaUInt8                 getSize() const;
00164 
00165 private:
00166     void                    *impl;
00167 };
00168 
00169 
00170 
00171 // *****************************************************************************
00172 // IEvalText
00173 // *****************************************************************************
00174 class OA_DESIGN_DLL_API IEvalText : public IBase {
00175 public:
00176     virtual                 ~IEvalText();
00177 
00178     virtual void            getName(oaString &name) = 0;
00179 
00180     virtual void            onEval(const oaString   &textIn,
00181                                    oaString         &textOut) = 0;
00182 
00183     static const Guid       &getId();
00184 };
00185 
00186 
00187 
00188 // *****************************************************************************
00189 // ITextInvalidate
00190 // *****************************************************************************
00191 class OA_DESIGN_DLL_API ITextInvalidate : public IBase {
00192 public:
00193 
00194     virtual void            invalidate(oaText *text) = 0;
00195     virtual void            invalidate(oaTextDisplay *textDisplay) = 0;
00196     virtual void            invalidate(oaBlock *blk) = 0;
00197 
00198     static const Guid       &getId();
00199 };
00200 
00201 
00202 
00203 // *****************************************************************************
00204 // IText
00205 // *****************************************************************************
00206 class OA_DESIGN_DLL_API IText : public IBase {
00207 public:
00208     virtual void            getName(oaString &name) = 0;
00209 
00210     virtual void            getBBox(const oaText    *text,
00211                                     oaBox           &bBox) = 0;
00212 
00213     virtual void            getBBox(const oaTextDisplay *textDisplay,
00214                                     oaBox               &bBox) = 0;
00215 
00216     virtual void            init(ITextInvalidate *textInvalidate) = 0;
00217 
00218     void                    disableRefCounting(bool val);
00219 
00220     static const Guid       &getId();
00221 };
00222 
00223 
00224 
00225 END_OA_NAMESPACE
00226 
00227 #endif

Return to top of page