Inheritance diagram for classias::weight_base:
This class implements the base interface to represent a weight of an instance.
Public Types | |
typedef double | weight_type |
The type representing the weight. | |
Public Member Functions | |
weight_base () | |
Constructs an object. | |
weight_base (const weight_type &weight) | |
Constructs an object initialized by the specified value. | |
weight_base (const weight_base &rho) | |
Constructs an object that is a copy of another object. | |
virtual | ~weight_base () |
Destructs the object. | |
weight_base & | operator= (const weight_base &rho) |
Assigns a new weight to the object. | |
void | set_weight (weight_type weight) |
Assigns a new weight to the object. | |
weight_type | get_weight () const |
Obtains the current weight value. | |
Protected Attributes | |
weight_type | m_weight |
The instance weight. | |
Friends | |
bool | operator== (const weight_base &x, const weight_base &y) |
Tests the equality of two weight objects. | |
bool | operator!= (const weight_base &x, const weight_base &y) |
Tests the inequality of two weight objects. |
classias::weight_base::weight_base | ( | const weight_type & | weight | ) | [inline] |
Constructs an object initialized by the specified value.
weight | The weight value used to initialize the object. |
classias::weight_base::weight_base | ( | const weight_base & | rho | ) | [inline] |
Constructs an object that is a copy of another object.
rho | The original object used to initialize the object. |
weight_base& classias::weight_base::operator= | ( | const weight_base & | rho | ) | [inline] |
Assigns a new weight to the object.
rho | The source object. |
weight_type& | The reference to this object. |
void classias::weight_base::set_weight | ( | weight_type | weight | ) | [inline] |
Assigns a new weight to the object.
weight | The weight value. |
weight_type classias::weight_base::get_weight | ( | ) | const [inline] |
Obtains the current weight value.
weight_type | The current value. |
bool operator== | ( | const weight_base & | x, | |
const weight_base & | y | |||
) | [friend] |
Tests the equality of two weight objects.
x | A weight object. | |
y | Another weight object. |
bool | true if the values of two objects are identical, false otherwise. |
bool operator!= | ( | const weight_base & | x, | |
const weight_base & | y | |||
) | [friend] |
Tests the inequality of two weight objects.
x | A weight object. | |
y | Another weight object. |
bool | true if the values of two objects are not identical, false otherwise. |