# 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 hasProperty() const;
83
84 // Updators
85 // ********
86
87 public: void makeInvalid();
88 public: void put(Property* property);
89 public: void remove(Property* property);
90 public: void removeProperty(const Name& name);
91 public: void clearProperties();
92
93 // Others
94 // ******
95
96 public: string getName() const;
97 public: string _getTypeName() const { return _TName("Occurrence"); };
98 public: string _getString() const;
99 public: string getCompactString() const;
100 public: void toJson(JsonWriter*) const;
101 public: Record* _getRecord() const;
102 public: SharedPath* _getSharedPath() const {return _sharedPath;};
103 public: Quark* _getQuark() const;
104
105 };
106
107
108 // ****************************************************************************************************
109 // JsonOccurrence declaration
110 // ****************************************************************************************************
111
112
113 class JsonOccurrence : public JsonObject {
114 // **********************************
115
116 public: static void initialize();
117 public: JsonOccurrence(unsigned long);
118 public: virtual string getTypeName() const;
119 public: virtual JsonOccurrence* clone(unsigned long) const;
120 public: virtual void toData(JsonStack&);
121 };
122
123 } // End of Hurricane namespace.
124
125
126 INSPECTOR_PR_SUPPORT(Hurricane::Occurrence);
127
128
129 #endif // HURRICANE_OCCURENCE
130
131
132 // ****************************************************************************************************
133 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
134 // ****************************************************************************************************
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

Generated by doxygen 1.8.14 on Tue Jul 21 2020 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved