Hurricane VLSI Database


Occurrences.h
1// -*- C++ -*-
2//
3// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
4//
5// This file is part of Hurricane.
6//
7// Hurricane is free software: you can redistribute it and/or modify
8// it under the terms of the GNU Lesser General Public License as
9// 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
13// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
14// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
15// General Public License for more details.
16//
17// You should have received a copy of the Lesser GNU General Public
18// License along with Hurricane. If not, see
19// <http://www.gnu.org/licenses/>.
20//
21// +-----------------------------------------------------------------+
22// | H U R R I C A N E |
23// | V L S I B a c k e n d D a t a - B a s e |
24// | |
25// | Author : Rémy Escassut |
26// | E-mail : Jean-Paul.Chaput@lip6.fr |
27// | =============================================================== |
28// | C++ Module : "./Occurrences.cpp" |
29// +-----------------------------------------------------------------+
30
31
32#ifndef HURRICANE_OCCURENCES
33#define HURRICANE_OCCURENCES
34
35#include "hurricane/Collection.h"
36#include "hurricane/Occurrence.h"
37
38namespace Hurricane {
39
40 class Instance;
41
45
46
47// -------------------------------------------------------------------
48// Class : "Occurrence_Contains".
49
50 class Occurrence_Contains : public OccurrenceFilter {
51 public:
52 inline Occurrence_Contains ( const Instance* );
53 inline Occurrence_Contains ( const Occurrence_Contains& );
54 virtual OccurrenceFilter* getClone () const;
55 virtual bool accept ( Occurrence ) const;
56 virtual string _getString () const;
57 protected:
58 const Instance* _instance;
59 };
60
61
62 Occurrence_Contains::Occurrence_Contains ( const Instance* instance )
64 , _instance(instance)
65 { }
66
67 Occurrence_Contains::Occurrence_Contains ( const Occurrence_Contains& other )
69 , _instance(other._instance)
70 { }
71
72
73#define for_each_occurrence(occurrence, occurrences) \
74{ \
75 OccurrenceLocator _locator = occurrences.getLocator(); \
76 while (_locator.isValid()) { \
77 Occurrence occurrence = _locator.getElement(); \
78 _locator.progress();
79
80
81} // Hurricane namespace.
82
83#endif // HURRICANE_OCCURENCES
Generic Collection auto-pointer.
Definition Collection.h:235
Generic Filter auto-pointer.
Definition Filter.h:86
Generic Locator auto-pointer.
Definition Locator.h:113
Instance description (API)
Definition Instance.h:35
Occurrence description (API)
Definition Occurrence.h:39
Contains Almost Everything.
Definition BasicLayer.h:39
GenericCollection< Occurrence > Occurrences
Definition Occurrences.h:42
GenericLocator< Occurrence > OccurrenceLocator
Definition Occurrences.h:43
GenericFilter< Occurrence > OccurrenceFilter
Definition Occurrences.h:44


Generated by doxygen 1.13.2 on Fri Sep 27 2024 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved