Occurrence description (API) More...
Public Member Functions | |
Occurrence (const Entity *entity=NULL) | |
Occurrence (const Entity *entity, const Path &path) | |
Occurrence (const Occurrence &occurrence) | |
Occurrence & | operator= (const Occurrence &occurrence) |
bool | operator== (const Occurrence &occurrence) const |
bool | operator!= (const Occurrence &occurrence) const |
bool | operator< (const Occurrence &occurrence) const |
Entity * | getEntity () const |
Path | getPath () const |
Cell * | getOwnerCell () const |
Cell * | getMasterCell () const |
Property * | getProperty (const Name &name) const |
Properties | getProperties () const |
Box | getBoundingBox () const |
bool | isValid () const |
bool | hasProperty () const |
void | put (Property *property) |
void | remove (Property *property) |
void | removeProperty (const Name &name) |
void | clearProperties () |
Occurrence description (API)
Occurrences are objects providing the capability to designate any entity of the hierarchical assembly as if this one was virtually unfolded.
For that purpose they handle, on one side the referenced entity and on the other side the hierarchical instanciation path which refers to the cell containing this entity.
Those occurrences are handy, volatile and very light objects. Two different occurrences may designate the same entity of the virtually unfolded data structure, simplifying the creation and deletion of those objects.
Anyway it is possible to attach properties to each occurrence.
Of course, those properties are securely stored in order to access them unambiguously.
Therefore, if a property is placed on an occurrence, we have access to it from a different occurrence provided it designates the same entity of the virtually unfolded data structure.
An occurrence is said invalid if it refers no entity.
When it is valid, an occurrence has : an OwnerCell which is either the cell owning the path if this one is non void, else the cell owning the entity itself. and a MasterCell which is always the cell owning the entity.
All constructors, the destructor and the different operators are very efficient.
Hurricane::Occurrence::Occurrence | ( | const Entity * | entity = NULL | ) |
Builds an occurrence refering to an entity through a void path, in some way it is equivalent to the entity itself.
Builds an occurrence refering to an entity through a path (possibly void).
Hurricane::Occurrence::Occurrence | ( | const Occurrence & | Occurrence | ) |
Copy constructor.
Occurrence & Hurricane::Occurrence::operator= | ( | const Occurrence & | occurrence | ) |
Assignment operator.
bool Hurricane::Occurrence::operator== | ( | const Occurrence & | occurrence | ) | const |
Two occurrences are equal if both are valid and refer to the same entity and have indentical instanciation pathes.
bool Hurricane::Occurrence::operator!= | ( | const Occurrence & | occurrence | ) | const |
Two occurrences are different if a least one is either invalid or both don't refer to the same entity or have differing instanciation pathes.
bool Hurricane::Occurrence::operator< | ( | const Occurrence & | occurrence | ) | const |
This comparator has no particular signification. It is just defined to be abble to use a STL set of occurrences which need a comparator.
|
inline |
Returns: the referenced entity or NULL if the occurrence is invalid.
|
inline |
Returns: the hierarchical instanciation path of the occurrence (possibly void, but always void when the occurrence id invalid).
Cell * Hurricane::Occurrence::getOwnerCell | ( | ) | const |
Returns: the owner cell of the occurrence or NULL if the occurrence is invalid.
Referenced by Hurricane::HyperNet::getCell().
Cell * Hurricane::Occurrence::getMasterCell | ( | ) | const |
Returns: the cell owning the referenced entity or NULL if the occurrence is invalid.
Returns: the property named <name>
if it exists or NULL if not (or if the occurrence is invalid).
Properties Hurricane::Occurrence::getProperties | ( | ) | const |
Returns: the collection of properties attached to the occurrence (always empty if the occurrence is invalid).
Box Hurricane::Occurrence::getBoundingBox | ( | ) | const |
Returns: the bounding box of the occurrence (within the coordinate sysem of the owner cell) if it is valid or else the empty box.
|
inline |
Returns: true if the occurrence is valid, else false (the occurrence refers no entity).
bool Hurricane::Occurrence::hasProperty | ( | ) | const |
Returns: true if the occurrence owns some property else false.
void Hurricane::Occurrence::put | ( | Property * | property | ) |
Adds the property <property>
to the occurrence property set. The property being named, if another property already exists in the set it will be, in a first step, detached from this set.
void Hurricane::Occurrence::remove | ( | Property * | property | ) |
removes the property <property>
from the occurrence property set.
void Hurricane::Occurrence::removeProperty | ( | const Name & | name | ) |
removes the property of name <name>
if it exists.
void Hurricane::Occurrence::clearProperties | ( | ) |
removes all properties attached to the occurrence. As a consequence, the occurrence is deleted.
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 |