OpenASIP 2.2
Loading...
Searching...
No Matches
CostEstimationData.icc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file CostEstimationData.icc
26 *
27 * Inline implementation of CostEstimationData class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33/**
34 * Sets the cost estimation data name.
35 *
36 * @param name Name of the data.
37 */
38inline void
39CostEstimationData::setName(const std::string& name) {
40 name_ = name;
41 hasName_ = true;
42}
43
44/**
45 * Returns true if the name attribute is set.
46 *
47 * @return True, if the name attribute is set.
48 */
49inline bool
50CostEstimationData::hasName() const {
51 return hasName_;
52}
53
54
55/**
56 * Sets the cost estimation data value.
57 *
58 * @param name Value of the data.
59 */
60inline void
61CostEstimationData::setValue(const DataObject& value) {
62 value_ = value;
63 hasValue_ = true;
64}
65
66
67/**
68 * Returns true if the value attribute is set.
69 *
70 * @return True, if the value attribute is set.
71 */
72inline bool
73CostEstimationData::hasValue() const {
74 return hasValue_;
75}
76
77
78/**
79 * Sets the FU reference
80 *
81 * @param fuEntryID ID of the FU entry.
82 */
83inline void
84CostEstimationData::setFUReference(RowID fuEntryID) {
85 fuReference_ = fuEntryID;
86 hasFUReference_ = true;
87}
88
89
90/**
91 * Returns true if the data references an FU Entry.
92 *
93 * @return True, if the data references an FU entry.
94 */
95inline bool
96CostEstimationData::hasFUReference() const {
97 return hasFUReference_;
98}
99
100
101/**
102 * Sets the RF reference
103 *
104 * @param rfEntryID ID of the RF entry.
105 */
106inline void
107CostEstimationData::setRFReference(RowID rfEntryID) {
108 rfReference_ = rfEntryID;
109 hasRFReference_ = true;
110}
111
112
113/**
114 * Returns true if the data references an RF Entry.
115 *
116 * @return True, if the data references an RF entry.
117 */
118inline bool
119CostEstimationData::hasRFReference() const {
120 return hasRFReference_;
121}
122
123/**
124 * Sets the socket reference
125 *
126 * @param socketEntryID ID of the socket entry.
127 */
128inline void
129CostEstimationData::setSocketReference(RowID socketEntryID) {
130 socketReference_ = socketEntryID;
131 hasSocketReference_ = true;
132}
133
134
135/**
136 * Returns true if the data references an socket Entry.
137 *
138 * @return True, if the data references an socketentry.
139 */
140inline bool
141CostEstimationData::hasSocketReference() const {
142 return hasSocketReference_;
143}
144
145/**
146 * Sets the bus reference
147 *
148 * @param busEntryID ID of the bus entry.
149 */
150inline void
151CostEstimationData::setBusReference(RowID busEntryID) {
152 busReference_ = busEntryID;
153 hasBusReference_ = true;
154}
155
156
157/**
158 * Returns true if the data references an bus Entry.
159 *
160 * @return True, if the data references an busentry.
161 */
162inline bool
163CostEstimationData::hasBusReference() const {
164 return hasBusReference_;
165}
166
167/**
168 * Sets the data plugin.
169 *
170 * @param pluginID ID of the cost function plugin.
171 */
172inline void
173CostEstimationData::setPluginID(RowID pluginID) {
174 pluginID_ = pluginID;
175 hasPluginID_ = true;
176}
177
178
179/**
180 * Returns true if the data has a plugin ID set.
181 *
182 * @return True, if the data has a plugin ID set.
183 */
184inline bool
185CostEstimationData::hasPluginID() const {
186 return hasPluginID_;
187}