OpenASIP
2.0
src
applibs
hdb
CostEstimationData.cc
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.cc
26
*
27
* 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
#include "
CostEstimationData.hh
"
34
35
/**
36
* The Constructor.
37
*/
38
CostEstimationData::CostEstimationData
():
39
hasName_(
false
), hasValue_(
false
),
40
hasFUReference_(
false
), hasRFReference_(
false
),
41
hasBusReference_(
false
), hasSocketReference_(
false
),
42
hasPluginID_(
false
) {
43
44
}
45
46
/**
47
* Destructor.
48
*/
49
CostEstimationData::~CostEstimationData
() {
50
}
51
52
/**
53
* Returns name of the cost estimation data value.
54
*
55
* @return Cost data name.
56
*/
57
std::string
58
CostEstimationData::name
()
const
{
59
if
(!
hasName_
) {
60
throw
NotAvailable
(
61
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
62
}
63
64
return
name_
;
65
}
66
67
/**
68
* Returns value of the cost estimation data.
69
*
70
* @return Cost data value.
71
*/
72
DataObject
73
CostEstimationData::value
()
const
{
74
if
(!
hasValue_
) {
75
throw
NotAvailable
(
76
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
77
}
78
79
return
value_
;
80
}
81
82
/**
83
* Returns the cost function plugin ID.
84
*
85
* @return Cost function plugin ID.
86
*/
87
RowID
88
CostEstimationData::pluginID
()
const
{
89
if
(!
hasPluginID_
) {
90
throw
NotAvailable
(
91
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
92
}
93
94
return
pluginID_
;
95
}
96
97
/**
98
* Returns the FU entry reference.
99
*
100
* @return Function unit entry reference.
101
*/
102
RowID
103
CostEstimationData::fuReference
()
const
{
104
if
(!
hasFUReference_
) {
105
throw
NotAvailable
(
106
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
107
}
108
109
return
fuReference_
;
110
}
111
112
/**
113
* Returns the RF entry reference.
114
*
115
* @return Register file entry reference.
116
*/
117
RowID
118
CostEstimationData::rfReference
()
const
{
119
if
(!
hasRFReference_
) {
120
throw
NotAvailable
(
121
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
122
}
123
124
return
rfReference_
;
125
}
126
127
/**
128
* Returns the bus entry reference.
129
*
130
* @return Register file entry reference.
131
*/
132
RowID
133
CostEstimationData::busReference
()
const
{
134
if
(!
hasBusReference_
) {
135
throw
NotAvailable
(
136
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
137
}
138
139
return
busReference_
;
140
}
141
142
/**
143
* Returns the socket entry reference.
144
*
145
* @return Register file entry reference.
146
*/
147
RowID
148
CostEstimationData::socketReference
()
const
{
149
if
(!
hasSocketReference_
) {
150
throw
NotAvailable
(
151
__FILE__, __LINE__,
__func__
,
"Attribute value not set."
);
152
}
153
154
return
socketReference_
;
155
}
CostEstimationData::rfReference
RowID rfReference() const
Definition:
CostEstimationData.cc:118
CostEstimationData::hasValue_
bool hasValue_
Is the value set?
Definition:
CostEstimationData.hh:82
CostEstimationData::CostEstimationData
CostEstimationData()
Definition:
CostEstimationData.cc:38
CostEstimationData::name
std::string name() const
Definition:
CostEstimationData.cc:58
CostEstimationData::hasName_
bool hasName_
Is the data name set?
Definition:
CostEstimationData.hh:77
DataObject
Definition:
DataObject.hh:50
CostEstimationData::pluginID
RowID pluginID() const
Definition:
CostEstimationData.cc:88
CostEstimationData::socketReference_
RowID socketReference_
Socket reference.
Definition:
CostEstimationData.hh:104
RowID
int RowID
Type definition of row ID in relational databases.
Definition:
DBTypes.hh:37
CostEstimationData::hasFUReference_
bool hasFUReference_
Is the fu reference set?
Definition:
CostEstimationData.hh:87
CostEstimationData::rfReference_
RowID rfReference_
RF reference.
Definition:
CostEstimationData.hh:94
NotAvailable
Definition:
Exception.hh:728
CostEstimationData::busReference_
RowID busReference_
Bus reference.
Definition:
CostEstimationData.hh:99
CostEstimationData.hh
CostEstimationData::hasRFReference_
bool hasRFReference_
Is the RF reference set?
Definition:
CostEstimationData.hh:92
CostEstimationData::~CostEstimationData
virtual ~CostEstimationData()
Definition:
CostEstimationData.cc:49
CostEstimationData::name_
std::string name_
Name of the data.
Definition:
CostEstimationData.hh:79
CostEstimationData::hasBusReference_
bool hasBusReference_
Is the bus reference set?
Definition:
CostEstimationData.hh:97
CostEstimationData::busReference
RowID busReference() const
Definition:
CostEstimationData.cc:133
__func__
#define __func__
Definition:
Application.hh:67
CostEstimationData::value_
DataObject value_
Value data.
Definition:
CostEstimationData.hh:84
CostEstimationData::socketReference
RowID socketReference() const
Definition:
CostEstimationData.cc:148
CostEstimationData::value
DataObject value() const
Definition:
CostEstimationData.cc:73
CostEstimationData::hasSocketReference_
bool hasSocketReference_
Is the socket reference set?
Definition:
CostEstimationData.hh:102
CostEstimationData::hasPluginID_
bool hasPluginID_
Is the plugin ID set?
Definition:
CostEstimationData.hh:107
false
find Finds info of the inner loops in the false
Definition:
InnerLoopFinder.cc:81
CostEstimationData::fuReference
RowID fuReference() const
Definition:
CostEstimationData.cc:103
CostEstimationData::pluginID_
RowID pluginID_
Plugin ID.
Definition:
CostEstimationData.hh:109
CostEstimationData::fuReference_
RowID fuReference_
FU reference.
Definition:
CostEstimationData.hh:89
Generated by
1.8.17