oaText.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaText.h
00004 //
00005 // This file contains the definition for the oaText class. This class implements
00006 // a text shape.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaText_P)
00027 #define oaText_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaShape.h"
00035 #include "oaBlock.h"
00036 #include "oaFont.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // oaText
00049 // *****************************************************************************
00050 class OA_DESIGN_DLL_API oaText : public oaShape {
00051 public:
00052     static oaText           *create(oaBlock         *block,
00053                                     oaLayerNum      layerNum,
00054                                     oaPurposeNum    purposeNum,
00055                                     const oaString  &text,
00056                                     const oaPoint   &origin,
00057                                     oaTextAlign     alignment,
00058                                     oaOrient        orient,
00059                                     oaFont          font,
00060                                     oaDist          height,
00061                                     oaBoolean       overbar = false,
00062                                     oaBoolean       visible = true,
00063                                     oaBoolean       drafting = true);
00064 
00065     void                    getOrigin(oaPoint &origin) const;
00066     void                    getText(oaString &text) const;
00067     oaTextAlign             getAlignment() const;
00068     oaOrient                getOrient() const;
00069     oaFont                  getFont() const;
00070     oaDist                  getHeight() const;
00071     oaBoolean               hasOverbar() const;
00072     oaBoolean               isVisible() const;
00073     oaBoolean               isDrafting() const;
00074 
00075     void                    setOrigin(const oaPoint &origin);
00076     void                    setText(const oaString &text);
00077     void                    setAlignment(oaTextAlign alignment);
00078     void                    setOrient(oaOrient orient);
00079     void                    setFont(oaFont font);
00080     void                    setHeight(oaDist height);
00081     void                    setOverbar(oaBoolean overbar);
00082     void                    setVisible(oaBoolean visible);
00083     void                    setDrafting(oaBoolean drafting);
00084 };
00085 
00086 
00087 
00088 // *****************************************************************************
00089 // oaEvalText
00090 // *****************************************************************************
00091 class OA_DESIGN_DLL_API oaEvalText : public oaText {
00092 public:
00093     static oaEvalText       *create(oaBlock         *block,
00094                                     oaLayerNum      layerNum,
00095                                     oaPurposeNum    purposeNum,
00096                                     const oaString  &text,
00097                                     const oaPoint   &origin,
00098                                     oaTextAlign     alignment,
00099                                     oaOrient        orient,
00100                                     oaFont          font,
00101                                     oaDist          height,
00102                                     oaEvalTextLink  *linkIn = NULL,
00103                                     oaBoolean       overbar = false,
00104                                     oaBoolean       visible = true,
00105                                     oaBoolean       drafting = true);
00106 
00107     static oaEvalText       *create(oaBlock         *block,
00108                                     oaLayerNum      layerNum,
00109                                     oaPurposeNum    purposeNum,
00110                                     const oaString  &text,
00111                                     const oaPoint   &origin,
00112                                     oaTextAlign     alignment,
00113                                     oaOrient        orient,
00114                                     oaFont          font,
00115                                     oaDist          height,
00116                                     const oaString  &linkName,
00117                                     oaBoolean       overbar = false,
00118                                     oaBoolean       visible = true,
00119                                     oaBoolean       drafting = true);
00120 
00121     oaEvalTextLink          *getLink() const;
00122     void                    getExpression(oaString &text) const;
00123     void                    getEvaluatorName(oaString &name) const;
00124 
00125     void                    setLink(oaEvalTextLink *linkIn);
00126 };
00127 
00128 
00129 
00130 // *****************************************************************************
00131 // Design Traits.
00132 // *****************************************************************************
00133 template<>
00134 class oaTraits<oaText> {
00135 public:
00136     typedef oaShapeModTypeEnum  modTypeType;
00137     typedef oaShape             parentType;
00138     enum {dtIndex = oacShapeDataType};
00139     enum {dataTypeEnumVal = oacShapeDataType};
00140     enum {domain = oacBlockDomain};
00141     enum {dbType = oacDesignDBType};
00142     enum {isMultiDomain = false};
00143     enum {isConcrete = true};
00144     enum {objectTypeEnumVal = oacTextType};
00145     enum {abstractTypeEnumVal = oacAbstractTextType};
00146 };
00147 
00148 template<>
00149 class oaTraits<oaEvalText> {
00150 public:
00151     typedef oaShapeModTypeEnum  modTypeType;
00152     typedef oaText              parentType;
00153     enum {dtIndex = oacShapeDataType};
00154     enum {dataTypeEnumVal = oacShapeDataType};
00155     enum {domain = oacBlockDomain};
00156     enum {dbType = oacDesignDBType};
00157     enum {isMultiDomain = false};
00158     enum {isConcrete = true};
00159     enum {objectTypeEnumVal = oacEvalTextType};
00160 };
00161 
00162 END_OA_NAMESPACE
00163 
00164 #endif

Return to top of page