oaViaTopology.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaViaTopology.h
00004 //
00005 // This file contains the definitions for the oaViaTopology class and its
00006 // associated classes.
00007 //
00008 //  oaViaTopologyType
00009 //      This is the wrapper class for oaViaTopologyTypeEnum.
00010 //
00011 //  oaViaTopology
00012 //      This utility class represents a bound or unbound oaViaDef or
00013 //      oaViaVariant. It is used to create an oaViaTopologyArray, which is used
00014 //      to create an oaViaTopologyArrayValue.
00015 //
00016 // *****************************************************************************
00017 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00018 // Integration Initiative, this material may not be copied, modified,
00019 // re-published, uploaded, executed, or distributed in any way, in any medium,
00020 // in whole or in part, without prior written permission from Cadence.
00021 //
00022 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00023 //                           All Rights Reserved.
00024 //
00025 //  $Author: icftcm $
00026 //  $Revision: #1 $
00027 //  $Date: 2010/08/09 $
00028 //  $State: Exp $
00029 // *****************************************************************************
00030 // *****************************************************************************
00031 
00032 
00033 
00034 #if !defined(oaViaTopology_P)
00035 #define oaViaTopology_P
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Nested includes
00041 // *****************************************************************************
00042 #include "oaViaVariant.h"
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // Declare and define types in the OpenAccess namespace.
00048 // *****************************************************************************
00049 BEGIN_OA_NAMESPACE
00050 
00051 
00052 
00053 // *****************************************************************************
00054 // oaViaTopologyTypeEnum
00055 // *****************************************************************************
00056 #define oavNumViaTopologyTypes     2
00057 
00058 enum oaViaTopologyTypeEnum {
00059     oacViaVariantTopologyType   = 0,
00060     oacViaDefTopologyType       = 1
00061 };
00062 
00063 
00064 
00065 // *****************************************************************************
00066 // oaViaTopologyType
00067 // *****************************************************************************
00068 class OA_TECH_DLL_API oaViaTopologyType {
00069 public:
00070                             oaViaTopologyType(oaViaTopologyTypeEnum valueIn);
00071                             oaViaTopologyType(const oaString &name);
00072                             ~oaViaTopologyType();
00073 
00074     const oaString          &getName() const;
00075                             operator                oaViaTopologyTypeEnum() const;
00076 
00077 private:
00078     static const oaString   *initNames();
00079 
00080     oaViaTopologyTypeEnum   value;
00081 
00082     static const oaString   *names;
00083 };
00084 
00085 
00086 
00087 // *****************************************************************************
00088 // oaViaTopology
00089 // *****************************************************************************
00090 class OA_TECH_DLL_API oaViaTopology {
00091 public:
00092                             oaViaTopology();
00093                             oaViaTopology(oaViaDef *viaDefIn);
00094                             oaViaTopology(oaViaVariant *viaVariantIn);
00095                             ~oaViaTopology();
00096 
00097     void                    init(oaViaDef *viaDefIn);
00098     void                    init(oaViaVariant *viaVariantIn);
00099     void                    init(const oaString     &topologyName,
00100                                  oaObject           *ownerDB,
00101                                  oaViaTopologyType  typeIn);
00102 
00103     void                    getName(oaString &name) const;
00104     const oaObject          *getOwner() const;
00105     oaViaDef                *getViaDef() const;
00106     oaViaVariant            *getViaVariant() const;
00107     oaViaTopologyType       getType() const;
00108 
00109     oaBoolean               operator==(const oaViaTopology &viaTopology);
00110     oaBoolean               operator!=(const oaViaTopology &viaTopology);
00111     oaBoolean               operator==(const oaViaTopology &viaTopology) const;
00112     oaBoolean               operator!=(const oaViaTopology &viaTopology) const;
00113 
00114 private:
00115     union {
00116         oaViaDef            *viaDef;
00117         oaViaVariant        *viaVariant;
00118     };
00119 
00120     oaObject                *owner;
00121     oaString                name;
00122     oaViaTopologyType       type;
00123 };
00124 
00125 
00126 
00127 // *****************************************************************************
00128 // oaViaTopologyArray
00129 // *****************************************************************************
00130 class OA_TECH_DLL_API oaViaTopologyArray : public oaArray<oaViaTopology> {
00131 public:
00132                             oaViaTopologyArray(oaUInt4 size = 0);
00133                             oaViaTopologyArray(const oaViaTopologyArray &arrayIn);
00134 };
00135 
00136 
00137 
00138 END_OA_NAMESPACE
00139 
00140 #endif

Return to top of page