oaMarker.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaMarker.h
00004 //
00005 // This file contains the definition for the oaMarker class.
00006 //
00007 // Marker objects are associated with zero or more oaDesignObjects and are 
00008 // represented using a point array.  Markers are often used to indicate 
00009 // violations between the specified objects. 
00010 //
00011 // *****************************************************************************
00012 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00013 // Integration Initiative, this material may not be copied, modified,
00014 // re-published, uploaded, executed, or distributed in any way, in any medium,
00015 // in whole or in part, without prior written permission from Cadence.
00016 //
00017 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00018 //                           All Rights Reserved.
00019 //
00020 //  $Author: icftcm $
00021 //  $Revision: #1 $
00022 //  $Date: 2010/08/09 $
00023 //  $State: Exp $
00024 // *****************************************************************************
00025 // *****************************************************************************
00026 
00027 
00028 
00029 #if !defined(oaMarker_P)
00030 #define oaMarker_P
00031 
00032 
00033 
00034 // *****************************************************************************
00035 // Nested includes
00036 // *****************************************************************************
00037 #include "oaPointArray.h"
00038 #include "oaFig.h"
00039 #include "oaBlock.h"
00040 
00041 
00042 
00043 // *****************************************************************************
00044 // Declare and define types in the OpenAccess namespace.
00045 // *****************************************************************************
00046 BEGIN_OA_NAMESPACE
00047 
00048 
00049 
00050 // *****************************************************************************
00051 // oaMarkerDeleteWhenEnum
00052 // *****************************************************************************
00053 #define oavNumMarkerDeleteWhenTypes    5
00054 
00055 enum oaMarkerDeleteWhenEnum {
00056     oacDeleteOnUnknown  = 0,
00057     oacDeleteOnNever    = 1,
00058     oacDeleteOnFirst    = 2,
00059     oacDeleteOnLast     = 3,
00060     oacDeleteOnModify   = 4
00061 };
00062 
00063 
00064 
00065 // *****************************************************************************
00066 // oaMarkerDeleteWhen
00067 // *****************************************************************************
00068 class OA_DESIGN_DLL_API oaMarkerDeleteWhen {
00069 public:
00070                             oaMarkerDeleteWhen(oaMarkerDeleteWhenEnum valueIn);
00071                             oaMarkerDeleteWhen(const oaString &name);
00072                             ~oaMarkerDeleteWhen();
00073 
00074     const oaString          &getName() const;
00075 
00076                             operator                oaMarkerDeleteWhenEnum() const;
00077 
00078 private:
00079     oaMarkerDeleteWhenEnum  value;
00080 
00081     static const oaString   names[];
00082 };
00083 
00084 
00085 // *****************************************************************************
00086 // oaMarkerSeverity
00087 // *****************************************************************************
00088 #define oavNumMarkerSeverityTypes    9
00089 
00090 enum oaMarkerSeverityEnum {
00091     oacAnnotationMarkerSeverity             = 0,
00092     oacInfoMarkerSeverity                   = 1,
00093     oacAcknowledgedWarningMarkerSeverity    = 2,
00094     oacWarningMarkerSeverity                = 3,
00095     oacSignedOffErrorMarkerSeverity         = 4,
00096     oacErrorMarkerSeverity                  = 5,
00097     oacSignedOffCriticalErrorMarkerSeverity = 6,
00098     oacCriticalErrorMarkerSeverity          = 7,
00099     oacFatalErrorMarkerSeverity             = 8
00100 };
00101 
00102 
00103 
00104 // *****************************************************************************
00105 // oaMarkerSeverity
00106 // *****************************************************************************
00107 class OA_DESIGN_DLL_API oaMarkerSeverity {
00108 public:
00109                             oaMarkerSeverity(oaMarkerSeverityEnum valueIn);
00110                             oaMarkerSeverity(const oaString &name);
00111                             ~oaMarkerSeverity();
00112 
00113     const oaString          &getName() const;
00114 
00115                             operator                oaMarkerSeverityEnum() const;
00116 
00117 private:
00118     oaMarkerSeverityEnum    value;
00119 
00120     static const oaString   names[];
00121 };
00122 
00123 
00124 
00125 // *****************************************************************************
00126 // oaMarker
00127 // *****************************************************************************
00128 class OA_DESIGN_DLL_API oaMarker : public oaFig {
00129 public:
00130     static oaMarker                         *create(oaBlock             *block,
00131                                                     const oaPointArray  &points,
00132                                                     const oaString      &msg,
00133                                                     const oaString      &shortMsg,
00134                                                     const oaString      &tool,
00135                                                     oaBoolean           isVisible,
00136                                                     oaBoolean           isClosed,
00137                                                     oaMarkerSeverity    severity,
00138                                                     oaMarkerDeleteWhen  deleteWhen
00139                                                     = oacDeleteOnFirst);
00140 
00141     void                                    transform(oaDouble  scale,
00142                                                       oaDouble  angle);
00143 
00144     void                                    addObject(oaBlockObject *obj);
00145     void                                    removeObject(oaBlockObject *obj);
00146 
00147     oaBoolean                               isVisible() const;
00148     oaBoolean                               isClosed() const;
00149     oaMarkerSeverity                        getSeverity() const;
00150     void                                    getPoints(oaPointArray &points) const;
00151     void                                    getMsg(oaString &msg) const;
00152     void                                    getShortMsg(oaString &shortMsg) const;
00153     void                                    getTool(oaString &tool) const;
00154     oaMarkerDeleteWhen                      getDeleteWhen() const;
00155 
00156     void                                    setIsVisible(oaBoolean val);
00157     void                                    setIsClosed(oaBoolean val);
00158     void                                    setSeverity(oaMarkerSeverity severity);
00159     void                                    setPoints(const oaPointArray &points);
00160     void                                    setMsg(const oaString &msg);
00161     void                                    setShortMsg(const oaString &shortMsg);
00162     void                                    setTool(const oaString &tool);
00163     void                                    setDeleteWhen(oaMarkerDeleteWhen deleteWhen);
00164 
00165     oaCollection<oaBlockObject, oaMarker>   getObjects() const;
00166 
00167     enum {dtIndex = oacMarkerDataType};
00168 };
00169 
00170 
00171 
00172 // *****************************************************************************
00173 // Design Traits.
00174 // *****************************************************************************
00175 template<>
00176 class oaTraits<oaMarker> {
00177 public:
00178     typedef oaFig               parentType;
00179     typedef oaMarkerModTypeEnum modTypeType;
00180     enum {domain = oacBlockDomain};
00181     enum {dbType = oacDesignDBType};
00182     enum {isMultiDomain = false};
00183     enum {dtIndex = oacMarkerDataType};
00184     enum {isConcrete = true};
00185     enum {objectTypeEnumVal = oacMarkerType};
00186     enum {dataTypeEnumVal = oacMarkerDataType};
00187 };
00188 
00189 
00190 
00191 END_OA_NAMESPACE
00192 
00193 #endif

Return to top of page