# Hurricane VLSI Database

List of all members | Public Member Functions
Hurricane::Quark Class Reference

Quark description (API) More...

Inheritance diagram for Hurricane::Quark:
[legend]

## 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 ()

## Detailed Description

Quark description (API)

# Introduction

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.

# Important

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.

# Construction and destruction

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.

# Example

The following sample code shows how to print the set of owners of a shared property :

Property* property = ...; // we get a property
if (is_a<SharedPropery*>(property)) {
forEach(DBo*, idbo, ((SharedProperty*)property)getOwners()) {
if (not is_a<Quark*>(*idbo))
cerr << *idbo << endl;
else
cerr << ((Quark*)*idbo)->getOccurence() << endl;
}
}

## Member Function Documentation

## ◆ getOccurrence()

const Occurrence & Hurricane::Quark::getOccurrence | ( |  | ) | const
| inline

Returns: an occurence of which this quark is a representative.

The documentation for this class was generated from the following files:

- Quark.h
- Quark.dox

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