oaLibDefListMem.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaLibDefListMem.h
00004 //
00005 // This file contains the definition for the oaLibDefListMem class and the
00006 // derived classes oaLibDef and oaLibDefListRef.
00007 //
00008 //  oaLibDefListMem
00009 //      This is the base class which implements a member in an oaLibDefList.
00010 //      Members of the oaLibDefList can be moved about in the list as well as
00011 //      being destroyed (and thus removed) from the list.
00012 //
00013 //  oaLibDef
00014 //      The oaLibDef class derives from oaLibDefListMem and implements the
00015 //      definition of a library in an owning oaLibDefList. A library definition
00016 //      maps a logical library name to a physical file/directory path and
00017 //      supports associating attributes to the definition.
00018 //
00019 //  oaLibDefListRef
00020 //      The oaLibDefListRef derives from oaLibDefListMem and implements a
00021 //      reference to another library definition list inside of an owning
00022 //      oaLibDefList.
00023 //
00024 // *****************************************************************************
00025 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00026 // Integration Initiative, this material may not be copied, modified,
00027 // re-published, uploaded, executed, or distributed in any way, in any medium,
00028 // in whole or in part, without prior written permission from Cadence.
00029 //
00030 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00031 //                           All Rights Reserved.
00032 //
00033 //  $Author: icftcm $
00034 //  $Revision: #1 $
00035 //  $Date: 2010/08/09 $
00036 //  $State: Exp $
00037 // *****************************************************************************
00038 // *****************************************************************************
00039 
00040 
00041 
00042 #if !defined(oaLibDefListMem_P)
00043 #define oaLibDefListMem_P
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // Nested includes
00049 // *****************************************************************************
00050 #include "oaLib.h"
00051 #include "oaLibDefList.h"
00052 
00053 
00054 
00055 // *****************************************************************************
00056 // Declare and define types in the OpenAccess namespace.
00057 // *****************************************************************************
00058 BEGIN_OA_NAMESPACE
00059 
00060 
00061 
00062 // *****************************************************************************
00063 // Forward class declaration
00064 // *****************************************************************************
00065 class oaDMAttrArray;
00066 
00067 
00068 
00069 // *****************************************************************************
00070 // oaLibDefListMem
00071 // *****************************************************************************
00072 class OA_DM_DLL_API oaLibDefListMem : public oaSessionObject {
00073 public:
00074     oaLibDefList            *getList() const;
00075 
00076     void                    moveAfter(oaLibDefListMem *member);
00077     void                    moveToFirst();
00078     void                    moveToLast();
00079 
00080     void                    destroy();
00081 };
00082 
00083 
00084 
00085 // *****************************************************************************
00086 // oaLibDef
00087 // *****************************************************************************
00088 class OA_DM_DLL_API oaLibDef : public oaLibDefListMem {
00089 public:
00090     static oaLibDef         *create(oaLibDefList        *defList,
00091                                     const oaScalarName  &libName,
00092                                     const oaString      &libPath,
00093                                     const oaString      &writePath = "",
00094                                     oaLibMode           libMode = oacSharedLibMode,
00095                                     const oaDMAttrArray *libAttrs = NULL,
00096                                     oaLibDefListMem     *followingMem = NULL);
00097 
00098     static oaLibDef         *find(const oaLibDefList    *defList,
00099                                   const oaScalarName    &libName);
00100 
00101     void                    getLibName(oaScalarName &libName) const;
00102     void                    getLibPath(oaString &path) const;
00103 
00104     void                    getLibWritePath(oaString &writePath) const;
00105     void                    setLibWritePath(const oaString &writePath);
00106 
00107     oaLibMode               getLibMode() const;
00108     void                    setLibMode(oaLibMode libMode);
00109 
00110     void                    getLibAttributes(oaDMAttrArray &attrs) const;
00111     void                    addLibAttribute(const oaString  &attrName,
00112                                             const oaString  &attrVal);
00113     void                    removeLibAttribute(const oaString &attrName);
00114 
00115 };
00116 
00117 
00118 
00119 // *****************************************************************************
00120 // oaLibDefListRef
00121 // *****************************************************************************
00122 class OA_DM_DLL_API oaLibDefListRef : public oaLibDefListMem {
00123 public:
00124     static oaLibDefListRef  *create(oaLibDefList    *libList,
00125                                     const oaString  &refListPath,
00126                                     oaLibDefListMem *followingMem = NULL);
00127 
00128     static oaLibDefListRef  *find(const oaLibDefList    *defList,
00129                                   const oaString        &refListPath);
00130 
00131     void                    getRefListPath(oaString &path) const;
00132 };
00133 
00134 
00135 
00136 // *****************************************************************************
00137 // Traits
00138 // *****************************************************************************
00139 template<>
00140 class oaTraits<oaLibDefListMem> {
00141 public:
00142     typedef oaSessionObject             parentType;
00143     typedef oaLibDefListMemModTypeEnum  modTypeType;
00144     enum {domain = oacNoDomain};
00145     enum {isMultiDomain = false};
00146     enum {isConcrete = false};
00147     enum {dbType = oacBaseDBType};
00148     enum {abstractTypeEnumVal = oacLibDefListMemType};
00149 };
00150 
00151 template<>
00152 class oaTraits<oaLibDef> {
00153 public:
00154     typedef oaLibDefListMem parentType;
00155     enum {domain = oacNoDomain};
00156     enum {isMultiDomain = false};
00157     enum {dbType = oacBaseDBType};
00158     enum {isConcrete = true};
00159     enum {objectTypeEnumVal = oacLibDefType};
00160 };
00161 
00162 template<>
00163 class oaTraits<oaLibDefListRef> {
00164 public:
00165     typedef oaLibDefListMem parentType;
00166     enum {domain = oacNoDomain};
00167     enum {isMultiDomain = false};
00168     enum {dbType = oacBaseDBType};
00169     enum {isConcrete = true};
00170     enum {objectTypeEnumVal = oacLibDefListRefType};
00171 };
00172 
00173 
00174 
00175 END_OA_NAMESPACE
00176 
00177 #endif

Return to top of page