# Hurricane Documentation

# 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_PR_SUPPORT(Hurricane::Occurrence);
128
129
130 #endif // HURRICANE_OCCURENCE
131
132
133 // ****************************************************************************************************
134 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
135 // ****************************************************************************************************
Hurricane::Occurrence::getEntity
Entity * getEntity() const
Definition: Occurrence.h:68
Hurricane::Path
Path description (API)
Definition: Path.h:37
Hurricane::Occurrence
Occurrence description (API)
Definition: Occurrence.h:39
Hurricane::Occurrence::put
void put(Property *property)
Hurricane::Occurrence::getBoundingBox
Box getBoundingBox() const
Hurricane::BasicLayer
BasicLayer description (API)
Definition: BasicLayer.h:44
Hurricane::Occurrence::getProperty
Property * getProperty(const Name &name) const
Hurricane::Occurrence::isValid
bool isValid() const
Definition: Occurrence.h:81
Hurricane::Occurrence::getProperties
Properties getProperties() const
Hurricane::Name
Name description (API)
Definition: Name.h:35
Hurricane::Occurrence::getMasterCell
Cell * getMasterCell() const
Hurricane::Occurrence::hasProperty
bool hasProperty() const
Hurricane::Cell
The model (API).
Definition: Cell.h:66
Hurricane::Occurrence::operator<
bool operator<(const Occurrence &occurrence) const
Hurricane::GenericCollection
Generic Collection auto-pointer.
Definition: Collection.h:28
Hurricane::Property
Property description (API)
Definition: Property.h:58
Hurricane::Occurrence::operator!=
bool operator!=(const Occurrence &occurrence) const
Hurricane::Occurrence::getOwnerCell
Cell * getOwnerCell() const
Hurricane::Box
Box description (API)
Definition: Box.h:31
Hurricane::Occurrence::Occurrence
Occurrence(const Entity *entity=NULL)
Hurricane::Occurrence::operator=
Occurrence & operator=(const Occurrence &occurrence)
Hurricane::Occurrence::clearProperties
void clearProperties()
Entity
Hurricane
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5
Hurricane::Occurrence::getPath
Path getPath() const
Definition: Occurrence.h:69
Hurricane::Occurrence::removeProperty
void removeProperty(const Name &name)
Hurricane::Occurrence::operator==
bool operator==(const Occurrence &occurrence) const