Hurricane VLSI Database


Occurrence.h
1 // ****************************************************************************************************
2 // File: ./hurricane/Occurrence.h
3 // Authors: R. Escassut
4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
5 //
6 // This file is part of Hurricane.
7 //
8 // Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
9 // Lesser General Public License as 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 WITHOUT ANY WARRANTY; without even
13 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
17 // not, see <http://www.gnu.org/licenses/>.
18 // ****************************************************************************************************
19 
20 #ifndef HURRICANE_OCCURENCE
21 #define HURRICANE_OCCURENCE
22 
23 #include "hurricane/Path.h"
24 #include "hurricane/Name.h"
25 #include "hurricane/Properties.h"
26 
27 namespace Hurricane {
28 
29 class Entity;
30 class SharedPath;
31 class Quark;
32 class BasicLayer;
33 
34 
35 // ****************************************************************************************************
36 // Occurrence declaration
37 // ****************************************************************************************************
38 
39 class Occurrence {
40 // *************
41 
42 // Attributes
43 // **********
44 
45  private: Entity* _entity;
46  private: SharedPath* _sharedPath;
47 
48 // Constructors
49 // ************
50 
51  public: Occurrence(const Entity* entity = NULL);
52  public: Occurrence(const Entity* entity, const Path& path);
53  public: Occurrence(const Occurrence& occurrence);
54 
55 // Operators
56 // *********
57 
58  public: Occurrence& operator=(const Occurrence& occurrence);
59 
60  public: bool operator==(const Occurrence& occurrence) const;
61  public: bool operator!=(const Occurrence& occurrence) const;
62 
63  public: bool operator<(const Occurrence& occurrence) const; // for stl set -> less predicate
64 
65 // Accessors
66 // *********
67 
68  public: Entity* getEntity() const {return _entity;};
69  public: Path getPath() const {return Path(_sharedPath);};
70  public: Cell* getOwnerCell() const;
71  public: Cell* getMasterCell() const;
72  public: Property* getProperty(const Name& name) const;
73  public: Properties getProperties() const;
74  public: Occurrence getNetOccurrence() const;
75  public: Box getBoundingBox() const;
76  public: Box getBoundingBox(const BasicLayer*) const;
77 
78 // Predicates
79 // **********
80 
81  public: bool isValid() const {return (_entity != NULL);};
82  public: bool isBelowTerminalNetlist() const;
83  public: bool hasProperty() const;
84 
85 // Updators
86 // ********
87 
88  public: void makeInvalid();
89  public: void put(Property* property);
90  public: void remove(Property* property);
91  public: void removeProperty(const Name& name);
92  public: void clearProperties();
93 
94 // Others
95 // ******
96 
97  public: string getName() const;
98  public: string _getTypeName() const { return _TName("Occurrence"); };
99  public: string _getString() const;
100  public: string getCompactString() const;
101  public: void toJson(JsonWriter*) const;
102  public: Record* _getRecord() const;
103  public: SharedPath* _getSharedPath() const {return _sharedPath;};
104  public: Quark* _getQuark() const;
105 
106 };
107 
108 
109 // ****************************************************************************************************
110 // JsonOccurrence declaration
111 // ****************************************************************************************************
112 
113 
114 class JsonOccurrence : public JsonObject {
115 // **********************************
116 
117  public: static void initialize();
118  public: JsonOccurrence(unsigned long);
119  public: virtual string getTypeName() const;
120  public: virtual JsonOccurrence* clone(unsigned long) const;
121  public: virtual void toData(JsonStack&);
122 };
123 
124 } // End of Hurricane namespace.
125 
126 
127 INSPECTOR_PV_SUPPORT(Hurricane::Occurrence);
128 
129 
130 #endif // HURRICANE_OCCURENCE
131 
132 
133 // ****************************************************************************************************
134 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
135 // ****************************************************************************************************
BasicLayer description (API)
Definition: BasicLayer.h:44
Box description (API)
Definition: Box.h:31
The model (API).
Definition: Cell.h:64
Occurrenceable objects root class (API).
Definition: Entity.h:37
Generic Collection auto-pointer.
Definition: Collection.h:235
Name description (API)
Definition: Name.h:35
Occurrence description (API)
Definition: Occurrence.h:39
bool hasProperty() const
bool operator<(const Occurrence &occurrence) const
Occurrence & operator=(const Occurrence &occurrence)
bool operator!=(const Occurrence &occurrence) const
Cell * getMasterCell() const
Box getBoundingBox() const
void remove(Property *property)
void removeProperty(const Name &name)
Occurrence(const Entity *entity=NULL)
void put(Property *property)
Property * getProperty(const Name &name) const
Entity * getEntity() const
Definition: Occurrence.h:68
Properties getProperties() const
bool operator==(const Occurrence &occurrence) const
bool isValid() const
Definition: Occurrence.h:81
Path getPath() const
Definition: Occurrence.h:69
Occurrence(const Entity *entity, const Path &path)
Cell * getOwnerCell() const
Occurrence(const Occurrence &occurrence)
Path description (API)
Definition: Path.h:35
Property description (API)
Definition: Property.h:56
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5


Generated by doxygen 1.9.1 on Thu Aug 11 2022 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved