Quark description (API) More...
Public Member Functions | |
const Occurrence & | getOccurrence () const |
Public Member Functions inherited from Hurricane::DBo | |
virtual void | destroy () |
Property * | getProperty (const Name &) const |
Properties | getProperties () const |
bool | hasProperty () const |
void | put (Property *) |
void | remove (Property *) |
void | removeProperty (const Name &) |
void | clearProperties () |
Quark description (API)
As explained in the Occurence class, occurences are very simple objects used to designate any entity of the virtually unfolded hierarchy. However, those occurences, which are built and deleted very easily, are very volatile objects to which we can't, of course, attach properties directly.
But the usefullness of occurences lies in their ability to attach them properties.
In order to do that, properties must be stored in a secure place, where they can be found when needed. That is the purpose of quarks : they are data base objects and then can own the properties of the occurences.
A quark designates all occurences refering to the same entity of the virtually unfolded hierarchy.
This means that a property put on an occurence can be recovered by an other occurence refering the same entity of the virtually unfolded hierarchy.
Quarks being completely managed by the system, there is no constructor provided.
They are themselves volatile because they need to exist only if there is at least a property attached to them (you must never store pointers to them !).
An occurence may have, during its life, different quarks representing it.
Nevertheless, it is possible to destroy a quark. This one will carry away with it the destruction of all its owned properties (like any other data base object). This is equivalent to destroying the properties associated to the occurences whom it is the unique representative. Conceptually, it is wiser to use the call : occurence.clearProperties() which does the same.
The following sample code shows how to print the set of owners of a shared property :
|
inline |
Returns: an occurence of which this quark is a representative.
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 |