# 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
38 namespace Hurricane {
39
40 class Instance;
41
42 typedef GenericCollection<Occurrence> Occurrences;
43 typedef GenericLocator<Occurrence> OccurrenceLocator;
44 typedef GenericFilter<Occurrence> OccurrenceFilter;
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 )
63 : OccurrenceFilter()
64 , _instance(instance)
65 { }
66
67 Occurrence_Contains::Occurrence_Contains ( const Occurrence_Contains& other )
68 : OccurrenceFilter()
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
Hurricane::Occurrence
Occurrence description (API)
Definition: Occurrence.h:39
Hurricane::GenericLocator
Generic Locator auto-pointer.
Definition: Locator.h:113
Hurricane::GenericFilter
Generic Filter auto-pointer.
Definition: Filter.h:27
Hurricane::OccurrenceLocator
GenericLocator< Occurrence > OccurrenceLocator
Definition: Occurrences.h:43
Hurricane::GenericCollection
Generic Collection auto-pointer.
Definition: Collection.h:28
Hurricane::Instance
Instance description (API)
Definition: Instance.h:37
Hurricane::OccurrenceFilter
GenericFilter< Occurrence > OccurrenceFilter
Definition: Occurrences.h:44
Hurricane
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5
Hurricane::Occurrences
GenericCollection< Occurrence > Occurrences
Definition: Occurrences.h:40

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