Otawa  0.10
FeatureDependency.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * FeatureDependency class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2008, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 #ifndef OTAWA_PROC_FEATURE_DEPENDENCY_H
23 #define OTAWA_PROC_FEATURE_DEPENDENCY_H
24 
25 #include <elm/string.h>
26 #include <elm/util/Cleaner.h>
27 #include <elm/genstruct/SLList.h>
29 
30 namespace otawa {
31 
32 using namespace elm;
33 
34 // FeatureDependency class
37 public:
38 
39  // constructors
40  FeatureDependency(const AbstractFeature *_feature);
41  ~FeatureDependency(void);
42  void add(FeatureDependency *to);
43  void remove(FeatureDependency *from);
44 
45  // accessors
46  inline const AbstractFeature *getFeature(void) const { return feature; }
47 
48  // Iterator on dependencies
49  class Dependent: public list_t::Iterator {
50  public:
51  inline Dependent(FeatureDependency *d): list_t::Iterator(d->children) { }
52  inline Dependent(const Dependent& i): list_t::Iterator(i) { }
53  };
54 
55 private:
59 };
60 
61 } // otawa
62 
63 #endif /* OTAWA_PROC_FEATURE_DEPENDENCY_H */
genstruct::SLList< FeatureDependency * > list_t
Definition: FeatureDependency.h:36
list_t parents
Definition: FeatureDependency.h:57
Dependent(const Dependent &i)
Definition: FeatureDependency.h:52
A feature dependency represents the dependencies used to implement a feature and is a node of the dep...
Definition: FeatureDependency.h:35
const AbstractFeature * feature
Definition: FeatureDependency.h:56
Definition: FeatureDependency.h:49
inst add(int d, int a, int b)
Definition: inst.h:163
list_t children
Definition: FeatureDependency.h:58
See Feature.
Definition: AbstractFeature.h:36
Dependent(FeatureDependency *d)
Definition: FeatureDependency.h:51
const AbstractFeature * getFeature(void) const
Get the feature supported by this dependency.
Definition: FeatureDependency.h:46