|
OpenASIP 2.2
|
#include <CostDBEntryKey.hh>

Public Member Functions | |
| CostDBEntryKey (const EntryKeyProperty *entryType) | |
| virtual | ~CostDBEntryKey () |
| CostDBEntryKey * | copy () const |
| const EntryKeyProperty * | type () const |
| EntryKeyField | keyFieldOfType (const EntryKeyFieldProperty &fieldType) const |
| EntryKeyField | keyFieldOfType (std::string fieldType) const |
| bool | isEqual (const CostDBEntryKey &entryKey) const |
| void | addField (EntryKeyField *field) |
| void | replaceField (EntryKeyField *newField) |
| int | fieldCount () const |
| const EntryKeyField & | field (int index) const |
Private Types | |
| typedef std::vector< EntryKeyField * > | FieldTable |
| Table of entry fields. | |
Private Member Functions | |
| CostDBEntryKey (const CostDBEntryKey &) | |
| Copying not allowed. | |
| CostDBEntryKey & | operator= (const CostDBEntryKey &) |
| Assignment not allowed. | |
Private Attributes | |
| const EntryKeyProperty * | type_ |
| Type of the entry key. | |
| FieldTable | fields_ |
| Fields of the entry key. | |
Represents the key of the CostDBEntry.
Key properties are the properties of an entry that are used as a search key.
Definition at line 52 of file CostDBEntryKey.hh.
|
private |
Table of entry fields.
Definition at line 70 of file CostDBEntryKey.hh.
| CostDBEntryKey::CostDBEntryKey | ( | const EntryKeyProperty * | entryType | ) |
Constructor.
| entryType | Type of the entry key. |
Definition at line 43 of file CostDBEntryKey.cc.
|
virtual |
Destructor.
Deallocates memory reserved for the fields of the entry key.
Definition at line 52 of file CostDBEntryKey.cc.
|
private |
Copying not allowed.
| void CostDBEntryKey::addField | ( | EntryKeyField * | field | ) |
Adds certain field to the entry key.
| field | A field to be added. |
| ObjectAlreadyExists | Equal field already exists. |
Definition at line 88 of file CostDBEntryKey.cc.
References field(), fields_, and EntryKeyField::type().
Referenced by CostDatabase::buildBuses(), CostDatabase::buildFunctionUnits(), CostDatabase::buildRegisterFiles(), CostDatabase::buildSockets(), copy(), InterpolatingRFEstimator::createSearch(), and InterpolatingFUEstimator::createSearch().

| CostDBEntryKey * CostDBEntryKey::copy | ( | ) | const |
Copies the entry key.
Client is responsible of deallocating the memory reserved for the returned object.
Definition at line 69 of file CostDBEntryKey.cc.
References addField(), copy(), fields_, and type_.
Referenced by CostDBEntry::copy(), copy(), FilterSearch::Cache::copy(), CostDBEntry::CostDBEntry(), and FilterSearch::search().

| const EntryKeyField & CostDBEntryKey::field | ( | int | index | ) | const |
Returns the field found on the given index.
The index must be between 0 and the number of fields - 1.
| index | Index. |
| OutOfRange | Index was out of range. |
Definition at line 181 of file CostDBEntryKey.cc.
References fieldCount(), and fields_.
Referenced by addField(), and CostDBEntry::field().

| int CostDBEntryKey::fieldCount | ( | ) | const |
Referenced by field(), and CostDBEntry::fieldCount().
| bool CostDBEntryKey::isEqual | ( | const CostDBEntryKey & | entryKey | ) | const |
Compares if two entry keys are equal.
| entryKey | An entry key. |
Definition at line 152 of file CostDBEntryKey.cc.
References fields_, keyFieldOfType(), and type().
Referenced by CostDBEntry::isEqualKey().

| EntryKeyField CostDBEntryKey::keyFieldOfType | ( | const EntryKeyFieldProperty & | fieldType | ) | const |
Returns demanded field of the entry key.
| fieldType | Type of the field. |
| KeyNotFound | Requested field type was not found. |
Definition at line 123 of file CostDBEntryKey.cc.
References fields_.
Referenced by Interpolation::filter(), isEqual(), CostDBEntry::keyFieldOfType(), keyFieldOfType(), CostDBEntry::keyFieldOfType(), and ExactMatch::quickFilter().
| EntryKeyField CostDBEntryKey::keyFieldOfType | ( | std::string | fieldType | ) | const |
Returns demanded field of the entry key.
Definition at line 140 of file CostDBEntryKey.cc.
References EntryKeyProperty::fieldProperty(), keyFieldOfType(), and type_.

|
private |
Assignment not allowed.
| void CostDBEntryKey::replaceField | ( | EntryKeyField * | newField | ) |
Replaces certain field of the entry key.
| newField | A field. |
| KeyNotFound | Equal field was not found. |
Definition at line 105 of file CostDBEntryKey.cc.
References fields_, and EntryKeyField::type().
Referenced by CostDBEntry::CostDBEntry(), and CostDBEntry::replaceField().

| const EntryKeyProperty * CostDBEntryKey::type | ( | ) | const |
Referenced by isEqual(), CostDatabase::search(), and CostDBEntry::type().
|
private |
Fields of the entry key.
Definition at line 75 of file CostDBEntryKey.hh.
Referenced by addField(), copy(), field(), isEqual(), keyFieldOfType(), replaceField(), and ~CostDBEntryKey().
|
private |
Type of the entry key.
Definition at line 73 of file CostDBEntryKey.hh.
Referenced by copy(), and keyFieldOfType().