oaPlugInIDMObject.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaDMIObjectI.h
00004 //
00005 // This file contains the definitions for the DM object interface classes. 
00006 // These objects are used to pass information through the interface. This file 
00007 // contains the interface definitions only. These objects can be implemented
00008 // by either side of the interface. A simple implementation is also provided
00009 // by the interface package.
00010 //
00011 // The following classes are supported:
00012 //
00013 //  IDMObject
00014 //      This is the base class which encapsulates DM object information. 
00015 //      The class hierarchy rooted at oaDMIObject reflects the DM Object 
00016 //      hierarchy. The purpose of each class is to encapsulate the information 
00017 //      needed to find or reconstruct the object, without dependencies on OA 
00018 //      types. It is intended that the objects will be created by the 
00019 //      application or plug-in as needed, passed through the interface, then
00020 //      destructed by the caller after the interface call returns.
00021 //
00022 //  IDMFileIter
00023 //  IDMContainer
00024 //  IDMLib
00025 //  ICell
00026 //  IView
00027 //  ICellView
00028 //  IDMFile
00029 //
00030 //  IDMObjectIter
00031 //      This is a particular expansion of the IIter interface to iterate
00032 //      components via IDMObject interface pointers.
00033 //
00034 //  IAttr
00035 //      This is an abstract class to represent an attribute which is used at
00036 //      the plug-in interface,  specifically DM attribute which is a string 
00037 //      based name-value pair.
00038 //
00039 // *****************************************************************************
00040 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00041 // Integration Initiative, this material may not be copied, modified,
00042 // re-published, uploaded, executed, or distributed in any way, in any medium,
00043 // in whole or in part, without prior written permission from Cadence.
00044 //
00045 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00046 //                           All Rights Reserved.
00047 //
00048 //  $Author: icftcm $
00049 //  $Revision: #2 $
00050 //  $Date: 2010/08/24 $
00051 //  $State: Exp $
00052 // *****************************************************************************
00053 // *****************************************************************************
00054 
00055 
00056 
00057 #if !defined(oaDMIObjectI_P)
00058 #define oaDMIObjectI_P
00059 
00060 
00061 
00062 // *****************************************************************************
00063 // Nested includes
00064 // *****************************************************************************
00065 #include "oaPlugInTypes.h"
00066 #include "oaCommonSPtr.h"
00067 
00068 
00069 
00070 // *****************************************************************************
00071 // Declare and define types in the OpenAccess namespace.
00072 // *****************************************************************************
00073 BEGIN_OA_PLUGIN_NAMESPACE
00074 
00075 
00076 
00077 // *****************************************************************************
00078 // Forward Public Class Declarations
00079 // *****************************************************************************
00080 class IDMFile;
00081 class ICell;
00082 class IView;
00083 class ICellView;
00084 
00085 
00086 
00087 // *****************************************************************************
00088 // IDMObject
00089 // *****************************************************************************
00090 extern OA_PLUGIN_DLL_API const Guid IID_IDMObject;
00091 
00092 class OA_PLUGIN_DLL_API IDMObject : public IBase {
00093 public:
00094     virtual bool            isContainer() = 0;
00095     virtual bool            isLib() = 0;
00096     virtual bool            isCell() = 0;
00097     virtual bool            isView() = 0;
00098     virtual bool            isCellView() = 0;
00099     virtual bool            isDMFile() = 0;
00100 
00101     static const Guid       &getId();
00102 };
00103 
00104 
00105 
00106 // *****************************************************************************
00107 // IDMObjectIter
00108 // *****************************************************************************
00109 extern OA_PLUGIN_DLL_API const Guid IID_IDMObjectIter;
00110 typedef IIter<IDMObject*, &IID_IDMObjectIter> IDMObjectIter;
00111 
00112 
00113 
00114 // *****************************************************************************
00115 // IDMFileIter
00116 // *****************************************************************************
00117 extern OA_PLUGIN_DLL_API const Guid IID_IDMFileIter;
00118 typedef IIter<IDMFile*, &IID_IDMFileIter> IDMFileIter;
00119 
00120 
00121 
00122 // *****************************************************************************
00123 // ICellIter
00124 // *****************************************************************************
00125 extern OA_PLUGIN_DLL_API const Guid IID_ICellIter;
00126 typedef IIter<ICell*, &IID_ICellIter> ICellIter;
00127 
00128 
00129 
00130 // *****************************************************************************
00131 // IViewIter
00132 // *****************************************************************************
00133 extern OA_PLUGIN_DLL_API const Guid IID_IViewIter;
00134 typedef IIter<IView*, &IID_IViewIter> IViewIter;
00135 
00136 
00137 
00138 // *****************************************************************************
00139 // ICellViewIter
00140 // *****************************************************************************
00141 extern OA_PLUGIN_DLL_API const Guid IID_ICellViewIter;
00142 
00143 class ICellViewIter : public IBase {
00144 public:
00145     typedef ICellView       *Type;
00146     typedef ICellView       IType;
00147 
00148     virtual bool            next(ICellView *&objOut) = 0;
00149     virtual void            reset() = 0;
00150 
00151     static const Guid       &getId();
00152 };
00153 
00154 
00155 
00156 // *****************************************************************************
00157 // IDMFile
00158 // *****************************************************************************
00159 extern OA_PLUGIN_DLL_API const Guid IID_IDMFile;
00160 
00161 class OA_PLUGIN_DLL_API IDMFile : public IDMObject {
00162 public:
00163     virtual void            getParent(IDMObject *&p) = 0;
00164     virtual SRef<IString>   getName() = 0;
00165     virtual void            getLeader(IDMFile *&l) = 0;
00166     virtual bool            isPrimary() = 0;
00167     virtual bool            isLeader() = 0;
00168     virtual void            getFollowers(IDMFileIter *&files) = 0;
00169     virtual bool            isDMData() = 0;
00170     virtual bool            isTech() = 0;
00171 
00172     static const Guid       &getId();
00173 };
00174 
00175 
00176 
00177 // *****************************************************************************
00178 // IDMContainer
00179 // *****************************************************************************
00180 extern OA_PLUGIN_DLL_API const Guid IID_IDMContainer;
00181 
00182 class OA_PLUGIN_DLL_API IDMContainer : public IDMObject {
00183 public:
00184     virtual void            getDMFiles(IDMFileIter *&files) = 0;
00185 
00186     static const Guid       &getId();
00187 };
00188 
00189 
00190 
00191 // *****************************************************************************
00192 // IDMLib
00193 // *****************************************************************************
00194 extern OA_PLUGIN_DLL_API const Guid IID_IDMLib;
00195 
00196 class OA_PLUGIN_DLL_API IDMLib : public IDMContainer {
00197 public:
00198     virtual SRef<IString>   getLibName() = 0;
00199 
00200     virtual void            getCells(ICellIter *&cells) = 0;
00201     virtual void            getViews(IViewIter *&views) = 0;
00202     virtual void            getCellViews(ICellViewIter *&cellViews) = 0;
00203 
00204     static const Guid       &getId();
00205 };
00206 
00207 
00208 
00209 // *****************************************************************************
00210 // IDMLibIter
00211 // *****************************************************************************
00212 extern OA_PLUGIN_DLL_API const Guid IID_IDMLibIter;
00213 typedef IIter<IDMLib*, &IID_IDMLibIter> IDMLibIter;
00214 
00215 
00216 
00217 // *****************************************************************************
00218 // ICell
00219 // *****************************************************************************
00220 extern OA_PLUGIN_DLL_API const Guid IID_ICell;
00221 
00222 class OA_PLUGIN_DLL_API ICell : public IDMContainer {
00223 public:
00224     virtual void            getLib(IDMLib *&l) = 0;
00225     virtual SRef<IString>   getName() = 0;
00226 
00227     virtual void            getCellViews(ICellViewIter *&cellViews) = 0;
00228 
00229     static const Guid       &getId();
00230 };
00231 
00232 
00233 
00234 // *****************************************************************************
00235 // IView
00236 // *****************************************************************************
00237 extern OA_PLUGIN_DLL_API const Guid IID_IView;
00238 
00239 class OA_PLUGIN_DLL_API IView : public IDMContainer {
00240 public:
00241     virtual void            getLib(IDMLib *&l) = 0;
00242     virtual SRef<IString>   getName() = 0;
00243     virtual SRef<IString>   getViewType() = 0;
00244 
00245     virtual void            getCellViews(ICellViewIter *&cellViews) = 0;
00246 
00247     static const Guid       &getId();
00248 };
00249 
00250 
00251 
00252 // *****************************************************************************
00253 // ICellView
00254 // *****************************************************************************
00255 extern OA_PLUGIN_DLL_API const Guid IID_ICellView;
00256 
00257 class OA_PLUGIN_DLL_API ICellView : public IDMContainer {
00258 public:
00259     virtual void            getCell(ICell *&c) = 0;
00260     virtual void            getView(IView *&v) = 0;
00261     virtual SRef<IString>   getCellName() = 0;
00262     virtual SRef<IString>   getViewName() = 0;
00263     virtual SRef<IString>   getViewType() = 0;
00264 
00265     static const Guid       &getId();
00266 };
00267 
00268 
00269 
00270 // *****************************************************************************
00271 // IAttr
00272 // *****************************************************************************
00273 extern OA_PLUGIN_DLL_API const Guid IID_IAttr;
00274 
00275 class OA_PLUGIN_DLL_API IAttr : public IBase {
00276 public:
00277     virtual SRef<IString>   getName() = 0;
00278     virtual SRef<IString>   getValue() = 0;
00279 
00280     static const Guid       &getId();
00281 };
00282 
00283 
00284 
00285 // *****************************************************************************
00286 // IAttrIter
00287 // *****************************************************************************
00288 extern OA_PLUGIN_DLL_API const Guid IID_IAttrIter;
00289 typedef IIter<IAttr*, &IID_IAttr> IAttrIter;
00290 
00291 
00292 
00293 END_OA_PLUGIN_NAMESPACE
00294 
00295 
00296 
00297 BEGIN_OA_COMMON_NAMESPACE
00298 
00299 
00300 
00301 USE_OA_PLUGIN_NAMESPACE
00302 
00303 // *****************************************************************************
00304 // IDTester
00305 // *****************************************************************************
00306 template<>
00307 class IDTester<IDMContainer> {
00308 public:
00309     static bool             test(const Guid &id);
00310 };
00311 
00312 template<>
00313 class IDTester<IDMLib> {
00314 public:
00315     static bool             test(const Guid &id);
00316 };
00317 
00318 template<>
00319 class IDTester<ICell> {
00320 public:
00321     static bool             test(const Guid &id);
00322 };
00323 
00324 template<>
00325 class IDTester<IView> {
00326 public:
00327     static bool             test(const Guid &id);
00328 };
00329 
00330 template<>
00331 class IDTester<ICellView> {
00332 public:
00333     static bool             test(const Guid &id);
00334 };
00335 
00336 template<>
00337 class IDTester<IDMFile> {
00338 public:
00339     static bool             test(const Guid &id);
00340 };
00341 
00342 
00343 
00344 END_OA_COMMON_NAMESPACE
00345 
00346 #endif

Return to top of page