OpenASIP
2.0
|
#include <EntryKeyField.hh>
Public Member Functions | |
EntryKeyField (EntryKeyData *fieldData, const EntryKeyFieldProperty *type) | |
virtual | ~EntryKeyField () |
EntryKeyField (const EntryKeyField &old) | |
EntryKeyField & | operator= (const EntryKeyField &old) |
bool | isEqual (const EntryKeyField &field) const |
bool | isGreater (const EntryKeyField &field) const |
bool | isSmaller (const EntryKeyField &field) const |
double | coefficient (const EntryKeyField &field1, const EntryKeyField &field2) const |
std::string | toString () const |
const EntryKeyFieldProperty * | type () const |
Private Attributes | |
EntryKeyData * | data_ |
Value of the field. More... | |
const EntryKeyFieldProperty * | properties_ |
Type of the field. More... | |
Represents a field containing a value and a type.
Definition at line 45 of file EntryKeyField.hh.
EntryKeyField::EntryKeyField | ( | EntryKeyData * | fieldData, |
const EntryKeyFieldProperty * | type | ||
) |
Constructor.
fieldData | Value of the field. |
type | Type of the field. |
Definition at line 44 of file EntryKeyField.cc.
|
virtual |
EntryKeyField::EntryKeyField | ( | const EntryKeyField & | old | ) |
double EntryKeyField::coefficient | ( | const EntryKeyField & | field1, |
const EntryKeyField & | field2 | ||
) | const |
Returns the relative position between two fields.
Returns the field's relative position to the first field compared to the second. For example, if this field has value 14, the first field has 10 and the second 20, relative position would be 0.4.
field1 | First field. |
field2 | Second field. |
Definition at line 130 of file EntryKeyField.cc.
References EntryKeyData::coefficient(), and data_.
Referenced by CostDBEntry::CostDBEntry().
bool EntryKeyField::isEqual | ( | const EntryKeyField & | field | ) | const |
Checks if two fields are equal.
field | A field. |
Definition at line 92 of file EntryKeyField.cc.
References data_, and EntryKeyData::isEqual().
Referenced by Interpolation::filter(), and Matcher::onlyThisFieldDiffers().
bool EntryKeyField::isGreater | ( | const EntryKeyField & | field | ) | const |
Checks if this field is greater than another field.
field | A field. |
Definition at line 103 of file EntryKeyField.cc.
References data_, and EntryKeyData::isGreater().
Referenced by Interpolation::filter().
bool EntryKeyField::isSmaller | ( | const EntryKeyField & | field | ) | const |
Checks if this field is smaller than another field.
field | A field. |
Definition at line 114 of file EntryKeyField.cc.
References data_, and EntryKeyData::isSmaller().
Referenced by Interpolation::filter().
EntryKeyField & EntryKeyField::operator= | ( | const EntryKeyField & | old | ) |
Assignment operator.
old | A field. |
Definition at line 77 of file EntryKeyField.cc.
References EntryKeyData::copy(), data_, and properties_.
std::string EntryKeyField::toString | ( | ) | const |
Returns value of the field as a string.
Definition at line 143 of file EntryKeyField.cc.
References data_, and EntryKeyData::toString().
const EntryKeyFieldProperty* EntryKeyField::type | ( | ) | const |
|
private |
Value of the field.
Definition at line 62 of file EntryKeyField.hh.
Referenced by coefficient(), isEqual(), isGreater(), isSmaller(), operator=(), toString(), and ~EntryKeyField().
|
private |