Hurricane VLSI Database


Diagonal.h
1// -*- C++ -*-
2//
3// Copyright (c) BULL S.A. 2000-2023, All Rights Reserved
4//
5// This file is part of Hurricane.
6//
7// Hurricane is free software: you can redistribute it and/or modify
8// it under the terms of the GNU Lesser General Public License as
9// published by the Free Software Foundation, either version 3 of the
10// License, or (at your option) any later version.
11//
12// Hurricane is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
14// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
15// General Public License for more details.
16//
17// You should have received a copy of the Lesser GNU General Public
18// License along with Hurricane. If not, see
19// <http://www.gnu.org/licenses/>.
20//
21// +-----------------------------------------------------------------+
22// | H U R R I C A N E |
23// | V L S I B a c k e n d D a t a - B a s e |
24// | |
25// | Authors : Jean-Paul Chaput |
26// | E-mail : Jean-Paul.Chaput@lip6.fr |
27// | =============================================================== |
28// | C++ Header : "./hurricane/Diagonal.h" |
29// +-----------------------------------------------------------------+
30
31
32#pragma once
33#include "hurricane/Component.h"
34
35
36namespace Hurricane {
37
38 class Layer;
39
40
41// -------------------------------------------------------------------
42// Class : "Diagonal".
43
44 class Diagonal : public Component {
45 public:
46 typedef Component Super;
47 private:
48 static FastRTTI _fastRTTI;
49 public:
50 static inline const FastRTTI& fastRTTI ();
51 virtual const FastRTTI& vfastRTTI () const;
52
53 public:
54 static Diagonal* create ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
55 // Accessors.
56 virtual bool isNonRectangle () const;
57 virtual DbU::Unit getX () const;
58 virtual DbU::Unit getY () const;
59 virtual DbU::Unit getSourceX () const;
60 virtual DbU::Unit getSourceY () const;
61 virtual DbU::Unit getTargetX () const;
62 virtual DbU::Unit getTargetY () const;
63 virtual Point getSourcePosition () const;
64 virtual Point getTargetPosition () const;
65 virtual Box getBoundingBox () const;
66 virtual Box getBoundingBox ( const BasicLayer* ) const;
67 virtual size_t getPointsSize () const;
68 virtual Point getPoint ( size_t i ) const;
69 DbU::Unit getWidth () const;
70 virtual const Layer* getLayer () const;
71 // Mutators.
72 void setLayer ( const Layer* );
73 void setWidth ( DbU::Unit );
74 virtual void translate ( const DbU::Unit& dx, const DbU::Unit& dy );
75 void setSource ( Point );
76 void setTarget ( Point );
77 // Hurricane management.
78 virtual void _toJson ( JsonWriter* ) const;
79 static JsonObject* getJsonObject ( unsigned long flags );
80 virtual string _getTypeName () const;
81 virtual string _getString () const;
82 virtual Record* _getRecord () const;
83 protected:
84 Diagonal ( Net*, const Layer*, const Point& source, const Point& target, DbU::Unit width );
85 void _updateB ();
86 private:
87 const Layer* _layer;
88 Point _source;
89 Point _target;
90 DbU::Unit _width;
91 DbU::Unit _dWidth; // octagon half Y.
92 };
93
94
95 inline const FastRTTI& Diagonal::fastRTTI () { return _fastRTTI; }
96
97
98// -------------------------------------------------------------------
99// Class : "JsonRoutingDiagonal".
100
101 class JsonDiagonal : public JsonComponent {
102 public:
103 static void initialize ();
104 JsonDiagonal ( unsigned long flags );
105 virtual std::string getTypeName () const;
106 virtual JsonDiagonal* clone ( unsigned long ) const;
107 virtual void toData ( JsonStack& );
108 };
109
110} // Hurricane namespace.
111
112
113INSPECTOR_P_SUPPORT(Hurricane::Diagonal);
BasicLayer description (API)
Definition BasicLayer.h:42
Box description (API)
Definition Box.h:30
std::int64_t Unit
Definition DbU.h:67
Diagonal description (API)
Definition Diagonal.h:44
Component Super
Definition Diagonal.h:46
static Diagonal * create(Net *, const Layer *, const Point &source, const Point &target, DbU::Unit width)
Support for JSON export.
Definition JsonObject.h:83
Layer description (API)
Definition Layer.h:120
Net description (API)
Definition Net.h:46
Point description (API)
Definition Point.h:30
Contains Almost Everything.
Definition BasicLayer.h:39


Generated by doxygen 1.13.2 on Fri Sep 27 2024 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved